:root {
  --bg: #04060f;
  --bg-gradient: linear-gradient(160deg, #04060f 0%, #070d24 45%, #091534 100%);
  --surface: #122352;
  --surface-hover: #16295e;
  --border: #2a3d7a;
  --text: #ffffff;
  --text-muted: #b7c1e6;
  --accent: #ffc233;
  --accent-strong: #ffd35c;
  --accent-soft: rgba(255, 194, 51, 0.14);
  --accent-purple: #8b5cf6;
  --accent-purple-strong: #a78bfa;
  --correct: #3ddc97;
  --correct-soft: rgba(61, 220, 151, 0.15);
  --wrong: #ff6b6b;
  --wrong-soft: rgba(255, 107, 107, 0.15);
  --radius: 12px;
  --max-width: 980px;
  --shadow: 0 8px 24px rgba(2, 6, 23, 0.35);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", -apple-system, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg-gradient);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: radial-gradient(ellipse 60% 50% at 50% 60%, rgba(255, 255, 255, 0.1), transparent 70%);
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}

body.room-lit::after {
  opacity: 1;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(4, 6, 15, 0.82);
  backdrop-filter: blur(6px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-logo {
  height: 2rem;
  width: auto;
  display: block;
}

.brand-suffix {
  margin-left: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-muted);
}

.breadcrumb {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--accent-strong);
}

.breadcrumb .sep {
  margin: 0 0.35rem;
  opacity: 0.6;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--accent-strong);
}

main {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  flex: 1 0 auto;
}

.hero {
  position: relative;
  margin-bottom: 2.25rem;
  padding: 2rem 0 2rem;
  text-align: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -2rem 20% auto 20%;
  height: 16rem;
  background: radial-gradient(closest-side, rgba(255, 194, 51, 0.16), transparent 70%);
  filter: blur(4px);
  z-index: 0;
  pointer-events: none;
}

.hero-decor {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.decor-icon {
  position: absolute;
  color: var(--accent);
  opacity: 0.22;
  animation: decor-float 6s ease-in-out infinite;
}

.icon-trophy   { top: 10%;  left: 7%;   width: 3.2rem; height: 3.2rem; --r: -8deg;  animation-delay: 0s; }
.icon-book     { top: 14%;  right: 8%;  width: 3.4rem; height: 3.4rem; --r: 6deg;   animation-delay: 0.8s; }
.icon-cap      { bottom: 12%; left: 11%; width: 3rem;   height: 3rem;  --r: -5deg;  animation-delay: 1.6s; }
.icon-medal    { bottom: 10%; right: 10%; width: 3rem;  height: 3rem;  --r: 7deg;   animation-delay: 0.4s; }
.icon-pencil   { top: 45%;  left: 3%;   width: 2.2rem; height: 2.2rem; --r: 20deg; opacity: 0.16; animation-delay: 1.2s; }
.icon-star     { width: 1.1rem; height: 1.1rem; opacity: 0.35; --r: 0deg; }
.star-1        { top: 22%; left: 26%; animation-delay: 0.2s; }
.star-2        { top: 30%; right: 22%; animation-delay: 1s; }
.star-3        { bottom: 22%; right: 30%; animation-delay: 1.8s; }

@keyframes decor-float {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--r, 0deg)); }
}

.welcome-title, .welcome-subtitle, .lamp-scene, .search-wrap {
  position: relative;
  z-index: 1;
}

.welcome-title {
  margin: 0 0 0.7rem;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.welcome-title .title-line {
  display: inline;
  color: var(--text-muted);
  text-shadow: none;
  transition: color 0.8s ease, text-shadow 0.8s ease;
}

.welcome-title .title-line + .title-line {
  margin-left: 0.35em;
}

#hero.is-lit .welcome-title .title-line {
  color: var(--text);
  animation: title-glow 3s ease-in-out 0.8s infinite;
}

#hero.is-lit .welcome-title .title-line--purple {
  color: var(--accent-purple-strong);
  text-shadow: 0 0 18px rgba(139, 92, 246, 0.55);
  animation: none;
}

#hero.is-lit .welcome-title .title-line--gold {
  color: var(--accent-strong);
  text-shadow: 0 0 18px rgba(255, 194, 51, 0.55);
  animation: none;
}

.welcome-subtitle {
  margin: 0 0 0.6rem;
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 500;
  color: var(--text-muted);
  opacity: 0.8;
  transition: opacity 0.8s ease;
}

.welcome-subtitle .subtitle-line {
  display: block;
}

.welcome-subtitle .subtitle-line--accent {
  color: var(--text-muted);
  font-weight: 700;
  transition: color 0.8s ease;
}

#hero.is-lit .welcome-subtitle {
  opacity: 1;
}

#hero.is-lit .welcome-subtitle .subtitle-line--accent {
  color: var(--accent-purple-strong);
}

@media (max-width: 640px) {
  .decor-icon { display: none; }
}

/* ---- Table lamp switch ---- */

.lamp-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 0.5rem auto 1.75rem;
}

.lamp-visual {
  position: relative;
  display: inline-block;
}

.lamp-img {
  display: block;
  height: clamp(190px, 32vw, 260px);
  width: auto;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;
}

.lamp-img-on {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  opacity: 0;
  transition: opacity 0.7s ease;
}

#hero.is-lit .lamp-img-on {
  opacity: 1;
  filter: drop-shadow(0 0 26px rgba(255, 200, 120, 0.55))
    drop-shadow(0 0 60px rgba(255, 170, 80, 0.3));
}

.lamp-chain {
  position: absolute;
  left: 58.09%;
  top: 39.41%;
  width: 13.91%;
  height: 21.18%;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transform-origin: top center;
}

.lamp-chain-on {
  opacity: 0;
  transition: opacity 0.7s ease;
}

#hero.is-lit .lamp-chain-on {
  opacity: 1;
  filter: drop-shadow(0 0 10px rgba(255, 200, 120, 0.6));
}

.is-pulling .lamp-chain {
  animation: lamp-tug 0.4s ease-out;
}

.lamp-switch {
  position: absolute;
  left: 68%;
  top: 58.1%;
  width: 2.75rem;
  height: 2.75rem;
  transform: translate(-50%, -50%);
  border: none;
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.lamp-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lamp-switch .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.lamp-hint {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.75;
  transition: opacity 0.6s ease;
}

#hero.is-lit .lamp-hint {
  opacity: 0;
}

.lamp-callout {
  display: none;
  position: absolute;
  left: 60%;
  top: 26%;
  width: 44%;
  height: 40%;
  color: var(--accent-strong);
  pointer-events: none;
  opacity: 0.95;
  transition: opacity 0.6s ease;
}

.lamp-callout-arrow {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--accent-strong);
  pointer-events: none;
  opacity: 0.95;
  transition: opacity 0.6s ease;
  transform: translate(10%, 0) rotate(30deg);
  transform-origin: 68.9% 56.9%;
}

#hero.is-lit .lamp-callout,
#hero.is-lit .lamp-callout-arrow {
  opacity: 0;
}

.lamp-callout-text {
  position: absolute;
  top: 0;
  right: -55%;
  transform: translate(110%, 100%);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

@media (min-width: 480px) {
  .lamp-callout {
    display: block;
  }

  .lamp-callout-arrow {
    display: block;
  }

  .lamp-hint {
    display: none;
  }
}

@keyframes lamp-tug {
  0%   { transform: translateY(0) rotate(0deg); }
  35%  { transform: translateY(5px) rotate(-1.2deg); }
  65%  { transform: translateY(1px) rotate(0.6deg); }
  100% { transform: translateY(0) rotate(0deg); }
}

@keyframes title-glow {
  0%, 100% { text-shadow: 0 0 18px rgba(255, 255, 255, 0.55), 0 0 4px rgba(255, 255, 255, 0.4); }
  50% { text-shadow: 0 0 28px rgba(255, 255, 255, 0.8), 0 0 8px rgba(255, 255, 255, 0.6); }
}

.search-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
}

.has-js .search-wrap {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px);
  pointer-events: none;
  transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s, visibility 0s linear 0.75s;
}

#hero.is-lit .search-wrap {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.6s ease 0.15s, transform 0.6s ease 0.15s;
}

.state-search {
  width: 100%;
  padding: 0.85rem 1.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 1rem;
  outline: none;
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.state-search::placeholder {
  color: var(--text-muted);
}

.state-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  max-height: 22rem;
  overflow-y: auto;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: left;
  z-index: 20;
}

.search-results li {
  border-radius: 8px;
}

.search-results li a {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
}

.search-results li:hover a,
.search-results li.is-active a {
  background: var(--accent-soft);
}

.result-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.result-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.page-head {
  margin-bottom: 2rem;
}

.page-head h1 {
  margin-bottom: 0.2rem;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
}

.subtle {
  color: var(--text-muted);
  margin-top: 0;
}

.exam-list, .question-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.section-heading {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-strong);
  margin: 0 0 0.9rem;
}

.syllabus {
  margin-bottom: 2rem;
  padding-bottom: 1.75rem;
  border-bottom: 1px solid var(--border);
}

.subject-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.subject-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.85rem;
  color: var(--text);
  opacity: 0.65;
}

a.subject-pill.has-questions {
  text-decoration: none;
  opacity: 1;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

a.subject-pill.has-questions:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
}

.pill-count {
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 700;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.page-link {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.page-link:hover {
  background: var(--accent);
  color: #1a1200;
}

.page-status {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.exam-card {
  display: block;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.exam-card:hover {
  border-color: var(--accent);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.exam-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.exam-name {
  font-weight: 700;
  font-size: 1.05rem;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  white-space: nowrap;
}

.exam-desc {
  color: var(--text-muted);
  margin: 0.5rem 0;
  font-size: 0.93rem;
}

.exam-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.question-card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.question-card h3 {
  margin-top: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.options {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.options li {
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.93rem;
  background: rgba(255, 255, 255, 0.02);
}

.options li.static-option {
  padding: 0.55rem 0.75rem;
}

.options li label {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 0.75rem;
  cursor: pointer;
}

.options input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid var(--border);
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: border-color 0.15s ease;
}

.options input[type="radio"]::before {
  content: "";
  width: 0.6rem;
  height: 0.6rem;
  clip-path: polygon(20% 45%, 40% 65%, 80% 15%, 95% 30%, 40% 90%, 5% 50%);
  background: var(--accent);
  transform: scale(0);
  transition: transform 0.1s ease;
}

.options input[type="radio"]:checked {
  border-color: var(--accent);
}

.options input[type="radio"]:checked::before {
  transform: scale(1);
}

.options input[type="radio"]:disabled {
  cursor: default;
}

.options li label:has(input:disabled) {
  cursor: default;
}

.opt-label {
  display: inline-block;
  width: 1.5rem;
  font-weight: 700;
  color: var(--accent-strong);
}

.question-card.answer-shown .options li.is-correct {
  border-color: var(--correct);
  background: var(--correct-soft);
}

.question-card.answer-shown .options li.is-correct input[type="radio"] {
  border-color: var(--correct);
}

.question-card.answer-shown .options li.is-correct input[type="radio"]::before {
  background: var(--correct);
}

.question-card.answer-shown .options li.is-wrong {
  border-color: var(--wrong);
  background: var(--wrong-soft);
}

.question-card.answer-shown .options li.is-wrong input[type="radio"] {
  border-color: var(--wrong);
}

.question-card.answer-shown .options li.is-wrong input[type="radio"]::before {
  background: var(--wrong);
  clip-path: none;
  border-radius: 50%;
}

.reveal-btn {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: transparent;
  color: var(--accent-strong);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.reveal-btn:hover {
  background: var(--accent);
  color: #1a1200;
}

.answer-panel {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  font-size: 0.93rem;
}

.answer-panel strong {
  color: var(--correct);
}

.explanation {
  color: var(--text-muted);
}

.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem 1rem;
}

.empty-state p {
  margin: 0.75rem 0 0;
}

.coming-soon-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(255, 194, 51, 0.4);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

.site-footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 1.75rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
}

.site-footer p {
  margin: 0;
}

.footer-nav {
  display: flex;
  gap: 1.25rem;
}

.footer-nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--accent-strong);
  text-decoration: underline;
}

.disclaimer-list {
  color: var(--text-muted);
  margin: 0 0 1.75rem;
  padding-left: 1.25rem;
}

.disclaimer-list li {
  margin-bottom: 0.6rem;
}

.legal-content h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.1rem;
  color: var(--accent-strong);
}

.legal-content p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.legal-content a {
  color: var(--accent);
}

.contact-email {
  font-size: 1.3rem;
  font-weight: 700;
}

.contact-email a {
  color: var(--accent-strong);
}

.cookie-consent[hidden] {
  display: none;
}

.cookie-consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cookie-consent p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex: 1 1 320px;
}

.cookie-consent a {
  color: var(--accent);
}

.cookie-consent-actions {
  display: flex;
  gap: 0.6rem;
  flex-shrink: 0;
}

.cookie-consent-btn {
  border-radius: 8px;
  padding: 0.5rem 1.1rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}

.cookie-consent-btn--primary {
  background: var(--accent);
  color: #1a1300;
  border-color: var(--accent);
}

.cookie-consent-btn--primary:hover {
  background: var(--accent-strong);
}

.cookie-consent-btn--secondary {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border);
}

.cookie-consent-btn--secondary:hover {
  color: var(--text);
  border-color: var(--text-muted);
}

@media (max-width: 480px) {
  .cookie-consent {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-consent-actions {
    justify-content: flex-end;
  }
}

.about-content {
  max-width: 720px;
}

.about-content > p {
  margin-bottom: 1.5rem;
  color: var(--text-muted);
}

.about-card {
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
}

.about-mission h2 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
  color: var(--accent-strong);
}

.about-mission p {
  color: var(--text-muted);
  margin: 0;
}

.about-subheading {
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

.about-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.75rem;
}

.about-tagline {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent-strong);
  text-align: center;
  margin-top: 2rem;
}

.game-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
}

.game-card {
  display: block;
  width: 220px;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.game-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.game-card-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.game-card-title {
  color: var(--text);
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
}

.game-card-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.game-wrap {
  max-width: 720px;
  margin: 0 auto;
}

.game-hud {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.game-hud strong {
  color: var(--accent-strong);
}

.game-canvas-frame {
  position: relative;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: #070d24;
  box-shadow: var(--shadow);
}

.game-canvas-frame canvas {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}

.game-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.6rem;
  padding: 1.5rem;
  background: rgba(4, 6, 15, 0.82);
  backdrop-filter: blur(2px);
}

.game-overlay.is-hidden {
  display: none;
}

.game-overlay h2 {
  margin: 0;
  color: var(--accent-strong);
}

.game-overlay p {
  margin: 0;
  color: var(--text-muted);
  max-width: 420px;
}

.game-controls-hint {
  font-size: 0.85rem;
}

.game-btn {
  margin-top: 0.5rem;
  padding: 0.65rem 1.75rem;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #1a1200;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

.game-btn:hover {
  background: var(--accent-strong);
  transform: translateY(-1px);
}

.game-btn-sm {
  margin-top: 0;
  padding: 0.4rem 1.1rem;
  font-size: 0.85rem;
}

.game-back {
  display: inline-block;
  margin-top: 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.game-back:hover {
  color: var(--accent-strong);
}
