:root {
  color-scheme: dark;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #5fb8ff 0%, #2b7fff 100%);
  color: white;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #5fb8ff 0%, #2b7fff 100%);
  overflow: hidden;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  overscroll-behavior: none;
}

.app-shell {
  width: min(92vw, 760px);
  display: grid;
  gap: 1rem;
  padding: 1rem 0 2rem;
}

.topbar {
  text-align: center;
}

.topbar h1 {
  margin: 0 0 0.2rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}

.topbar p {
  margin: 0;
  color: rgba(255,255,255,0.9);
}

.game-card {
  background: rgba(6, 31, 79, 0.24);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(1, 16, 34, 0.25);
  backdrop-filter: blur(8px);
  overflow: hidden;
  isolation: isolate;
}

canvas {
  display: block;
  width: 100%;
  height: min(72vh, 620px);
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  background: linear-gradient(180deg, #81e7ff 0%, #bdefff 100%);
}

.hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem 1rem 1rem;
  gap: 0.75rem;
}

.score-pill,
button {
  border-radius: 999px;
  padding: 0.7rem 0.95rem;
  font-weight: 700;
}

.score-pill {
  background: rgba(7, 28, 54, 0.8);
  color: white;
}

button {
  border: none;
  background: #ff6b3d;
  color: white;
  cursor: pointer;
}

button:active {
  transform: scale(0.97);
}

@media (max-width: 600px) {
  .app-shell {
    padding-top: 0.3rem;
  }

  canvas {
    height: min(70vh, 560px);
  }

  .hud {
    padding: 0.75rem 0.8rem 0.9rem;
  }
}
