@font-face {
  font-family: 'Cinzel';
  font-style: normal;
  font-weight: 500 900;
  font-display: swap;
  src: url(/fonts/cinzel-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'Inter Tight';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/fonts/inter-tight-latin.woff2) format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url(/fonts/jetbrains-mono-latin.woff2) format('woff2');
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; overflow: hidden; background: #0a0a0a; overscroll-behavior: none; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; position: fixed; inset: 0; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
#loading-overlay {
  position: fixed; inset: 0;
  background: #0a0a0a;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  z-index: 100;
  transition: opacity 0.5s ease-out;
}
#loading-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}
.loader {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,215,0,0.2);
  border-top-color: #ffd700;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
#loading-bar-track {
  width: 180px; height: 6px;
  background: rgba(255,215,0,0.15);
  border-radius: 3px;
  overflow: hidden;
}
#loading-bar-fill {
  width: 0%; height: 100%;
  background: #ffd700;
  border-radius: 3px;
  transition: width 0.15s ease-out;
}
#loading-text {
  color: rgba(255,215,0,0.5);
  font: 12px/1 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
@keyframes spin { to { transform: rotate(360deg); } }
#consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0;
  z-index: 300;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
  background: rgba(16, 16, 30, 0.96);
  border-top: 1px solid rgba(255, 215, 0, 0.25);
  color: #ccc;
  font: 13px/1.4 -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#consent-banner a { color: #74b9ff; }
#consent-banner .consent-btns { display: flex; gap: 8px; }
#consent-banner button {
  padding: 6px 16px; border: none; border-radius: 5px;
  font-size: 13px; font-weight: 600; cursor: pointer;
}
#consent-banner #consent-yes { background: #ffd700; color: #0a0a0a; }
#consent-banner #consent-no { background: rgba(255,255,255,0.12); color: #ccc; }
#tutorial-prompt {
  position: fixed; inset: 0;
  z-index: 150;
  display: flex; align-items: center; justify-content: center;
  background: rgba(10, 10, 10, 0.55);
  padding: 16px;
}
#tutorial-prompt .tp-card {
  max-width: 340px; width: 100%;
  padding: 22px 24px 20px;
  background: rgba(20, 15, 10, 0.96);
  border: 2px solid rgba(255, 215, 0, 0.6);
  border-radius: 12px;
  text-align: center;
  color: #ddd;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}
#tutorial-prompt h2 {
  color: #ffd700; font-size: 1.15rem; margin-bottom: 10px;
  font-family: Cinzel, Georgia, serif;
}
#tutorial-prompt p { font-size: 0.9rem; color: #bbb; line-height: 1.45; margin-bottom: 18px; }
#tutorial-prompt .tp-btns { display: flex; gap: 10px; justify-content: center; }
#tutorial-prompt button {
  padding: 10px 22px; border: none; border-radius: 6px;
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
  touch-action: manipulation;
}
#tutorial-prompt #tp-play { background: #ffd700; color: #0a0a0a; }
#tutorial-prompt #tp-play:hover { background: #ffed4a; }
#tutorial-prompt #tp-skip { background: rgba(255,255,255,0.12); color: #ccc; }
#tutorial-prompt #tp-skip:hover { background: rgba(255,255,255,0.2); }
#error-overlay {
  display: none; position: fixed; inset: 0;
  background: #0a0a0a;
  z-index: 200;
  flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  text-align: center; padding: 2rem;
}
#error-overlay h2 { color: #ffd700; font-size: 1.3rem; }
#error-overlay p { font-size: 0.9rem; color: #aaa; max-width: 400px; }
#error-overlay button {
  margin-top: 8px; padding: 10px 28px;
  background: #ffd700; color: #0a0a0a; border: none; border-radius: 6px;
  font-size: 0.95rem; font-weight: 600; cursor: pointer;
}
#error-overlay button:hover { background: #ffed4a; }
