:root {
  --night: #0b0f2c;
  --night-deep: #050717;
  --star: #fef3a3;
  --player: #ff9ab1;
  --card-bg: #fff8e8;
  --card-ink: #1a1f3a;
  --correct: #4ade80;
  --wrong: #ef4444;
  --ui: #ffe9c2;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--night-deep);
  color: var(--ui);
  font-family: 'Press Start 2P', system-ui, sans-serif;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#game-shell {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.04), transparent 60%),
    linear-gradient(180deg, #050717 0%, #0b0f2c 60%, #1d244d 100%);
}

#game-container {
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  max-width: 100vw;
  max-height: 100vh;
  position: relative;
}

#game-container canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

#mute-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(0,0,0,0.4);
  border: 2px solid var(--ui);
  border-radius: 8px;
  color: var(--ui);
  font-size: 18px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
}

#mute-btn:hover { background: rgba(0,0,0,0.6); }
#mute-btn[data-muted="true"] { opacity: 0.55; }

#loading {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--night-deep);
  color: var(--ui);
  font-size: 14px;
  z-index: 20;
  pointer-events: none;
  transition: opacity 0.4s;
}

#loading.hidden { opacity: 0; }

@media (max-width: 600px) {
  #mute-btn { font-size: 14px; padding: 4px 8px; }
}
