:root {
  --bg-top: #72b9ff;
  --bg-bottom: #d3f2ff;
  --panel-bg: rgba(5, 17, 34, 0.86);
  --panel-border: rgba(255, 255, 255, 0.25);
  --text: #f0f7ff;
  --accent: #8ff7bf;
  --danger: #ff9a8a;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--text);
  background: #041223;
}

#app,
#game-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

#game-canvas {
  position: fixed;
  inset: 0;
}

.screen,
.overlay {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 5;
}

.title-poster {
  display: grid;
  justify-items: center;
  align-content: end;
  gap: 0.35rem;
  min-height: 80%;
  pointer-events: auto;
  padding-bottom: 2.5rem;
}

.poster-title {
  margin: 0;
  font-size: clamp(2.1rem, 7vw, 5.4rem);
  line-height: 0.95;
  letter-spacing: 0.12em;
  font-weight: 900;
  color: #e9f5ff;
  text-shadow:
    0 2px 0 #0c2a4a,
    0 6px 12px rgba(0, 0, 0, 0.55),
    0 0 18px rgba(145, 225, 255, 0.28);
  -webkit-text-stroke: 1px rgba(9, 34, 60, 0.9);
  animation: poster-glow 2.2s ease-in-out infinite;
}

.poster-tagline {
  margin: 0;
  font-size: clamp(0.9rem, 2.2vw, 1.3rem);
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
  color: #cfe9ff;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}

#title-skip {
  margin-top: 0.45rem;
  background: rgba(143, 247, 191, 0.94);
}

@keyframes poster-glow {
  0%,
  100% {
    transform: translateY(0);
    filter: brightness(1);
  }
  50% {
    transform: translateY(-2px);
    filter: brightness(1.08);
  }
}

.visible {
  display: grid;
  place-items: center;
}

.hidden {
  display: none !important;
}

.panel {
  max-width: 640px;
  margin: 1rem;
  padding: 1.25rem;
  border-radius: 18px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  backdrop-filter: blur(2px);
  text-align: center;
}

h1,
h2,
p {
  margin: 0.55rem 0;
}

button {
  cursor: pointer;
  border: 0;
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font: inherit;
  color: #06213d;
  background: var(--accent);
  font-weight: 700;
}

#hud {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  pointer-events: none;
  z-index: 6;
  padding: 1rem;
}

#progress-label,
#timer-label {
  justify-self: start;
  font-size: 1.3rem;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

#timer-label {
  justify-self: end;
}

#prompt-overlay {
  pointer-events: none;
  z-index: 7;
}

#prompt-text {
  position: fixed;
  top: 16%;
  width: 100%;
  text-align: center;
  font-size: 1.2rem;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

.choice-row {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 10%;
  display: grid;
  grid-template-columns: minmax(120px, 280px) minmax(120px, 280px);
  justify-content: center;
  gap: 1rem;
  pointer-events: auto;
  padding: 0 1rem;
}

.choice-card {
  min-height: 88px;
  padding: 0.8rem;
  line-height: 1.25;
  color: #f3fbff;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(7, 30, 55, 0.88);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.choice-card:hover,
.choice-card:focus-visible {
  outline: none;
  transform: translateY(-2px);
  border-color: #ffffff;
}

#feedback-overlay {
  display: grid;
  place-items: center;
  z-index: 8;
  pointer-events: none;
}

#feedback-text {
  max-width: 460px;
  margin: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  background: rgba(0, 16, 30, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.32);
  text-align: center;
  font-weight: 700;
}

#roundup-screen .panel {
  max-width: 460px;
}

@media (max-width: 768px) {
  #prompt-text {
    top: 13%;
    padding: 0 1rem;
  }

  .choice-row {
    bottom: 7%;
    grid-template-columns: 1fr;
  }

  #progress-label,
  #timer-label {
    font-size: 1.1rem;
  }
}
