:root {
  --bg: #080d1a;
  --bg-elevated: #0f172a;
  --bg-card: rgba(17, 25, 48, 0.85);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.3);
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --imposter: #ff4d6d;
  --imposter-dark: #be123c;
  --crew: #10b981;
  --crew-dark: #047857;
  --accent: #38bdf8;
  --accent-2: #818cf8;
  --warning: #f59e0b;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --max-w: 1080px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(circle at 15% 10%, rgba(255, 77, 109, 0.14), transparent 38%),
    radial-gradient(circle at 85% 5%, rgba(56, 189, 248, 0.14), transparent 36%),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(8, 13, 26, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.brand span em {
  font-style: normal;
  color: var(--imposter);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.main-nav a {
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 600;
  padding: 0.45rem 0.78rem;
  border-radius: 999px;
  transition: background 0.18s ease, color 0.18s ease;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(148, 163, 184, 0.14);
  text-decoration: none;
}

.main-nav a.active {
  color: #ffffff;
  background: var(--imposter);
  box-shadow: 0 4px 14px rgba(255, 77, 109, 0.35);
  text-decoration: none;
}

/* Main container */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 4rem;
}

.hero {
  text-align: center;
  margin-bottom: 1.75rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.36rem 0.95rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  background: rgba(56, 189, 248, 0.14);
  color: #e0f2fe;
  border: 1px solid rgba(56, 189, 248, 0.38);
  margin-bottom: 0.75rem;
}

[data-theme="light"] .badge {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #93c5fd;
}

.hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero p {
  margin: 0 auto;
  max-width: 680px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Game Shell */
.game-shell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 3rem;
}

.game-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.game-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-muted);
}

.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--crew);
  box-shadow: 0 0 10px var(--crew);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Controls & Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.78rem 1.25rem;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  font-family: inherit;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--imposter), #f97316);
  color: #fff;
  box-shadow: 0 10px 26px rgba(255, 77, 109, 0.35);
}

.btn-primary:hover {
  opacity: 0.95;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
}

.btn-crew {
  background: linear-gradient(135deg, var(--crew), #059669);
  color: #fff;
}

.btn-sm {
  padding: 0.45rem 0.78rem;
  font-size: 0.84rem;
  border-radius: 10px;
}

.btn-lg {
  width: 100%;
  padding: 1rem 1.4rem;
  font-size: 1.08rem;
}

/* Setup Grid */
.setup-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.5rem;
}

.panel {
  background: rgba(8, 13, 26, 0.58);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
}

.panel-title {
  margin: 0 0 0.9rem;
  font-size: 0.98rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.stepper-row:last-child {
  border-bottom: none;
}

.stepper-label strong {
  display: block;
  font-size: 0.95rem;
}

.stepper-label small {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
}

.stepper button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
}

.stepper button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.stepper span {
  min-width: 28px;
  text-align: center;
  font-weight: 800;
  font-size: 1.05rem;
}

.toggle {
  position: relative;
  width: 48px;
  height: 28px;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(148, 163, 184, 0.25);
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
}

.toggle input:checked + .toggle-slider {
  background: var(--crew);
}

.toggle input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

select, input[type="text"], textarea {
  width: 100%;
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.58rem 0.78rem;
  font-size: 0.92rem;
  font-family: inherit;
}

select:focus, input[type="text"]:focus, textarea:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-bottom: 0.9rem;
}

.cat-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.62rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: 0.15s;
}

.cat-chip:hover {
  background: rgba(255, 255, 255, 0.09);
}

.cat-chip.selected {
  background: rgba(56, 189, 248, 0.16);
  border-color: var(--accent);
  color: #e0f2fe;
}

.player-inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  max-height: 210px;
  overflow-y: auto;
  padding-right: 0.25rem;
}

.custom-word-box {
  margin-top: 0.75rem;
  display: none;
}

.custom-word-box.visible {
  display: block;
}

/* Reveal Stage */
.stage {
  max-width: 540px;
  margin: 0.5rem auto;
  text-align: center;
}

.stage-progress {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.4rem;
}

.stage h2 {
  margin: 0 0 0.5rem;
  font-size: 1.7rem;
}

.stage-sub {
  margin: 0 0 1.4rem;
  color: var(--text-muted);
}

/* 3D Flip Card */
.flip-scene {
  perspective: 1000px;
  margin: 0 auto 1.35rem;
  max-width: 390px;
  height: 250px;
}

.flip-card {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
  user-select: none;
}

.flip-card.flipped {
  transform: rotateY(180deg);
}

.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 22px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--border-strong);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.card-front {
  background: linear-gradient(155deg, #172554, #0f172a);
  border-color: rgba(56, 189, 248, 0.4);
}

.card-front .tap-icon {
  font-size: 2.8rem;
  margin-bottom: 0.55rem;
}

.card-front strong {
  font-size: 1.2rem;
}

.card-front span {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

.card-back {
  transform: rotateY(180deg);
}

.card-back.crew {
  background: linear-gradient(155deg, #064e3b, #0f172a);
  border-color: var(--crew);
}

.card-back.imposter {
  background: linear-gradient(155deg, #881337, #0f172a);
  border-color: var(--imposter);
}

.role-pill {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.8rem;
}

.crew .role-pill {
  background: rgba(16, 185, 129, 0.22);
  color: #6ee7b7;
}

.imposter .role-pill {
  background: rgba(255, 77, 109, 0.25);
  color: #fda4af;
}

.secret-word {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0.2rem 0 0.5rem;
}

.role-hint {
  font-size: 0.92rem;
  color: #cbd5e1;
  background: rgba(0, 0, 0, 0.28);
  padding: 0.45rem 0.85rem;
  border-radius: 10px;
}

/* Timer & Voting */
.timer-box {
  font-size: 3.4rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin: 0.75rem 0;
  color: var(--text);
}

.timer-box.urgent {
  color: var(--imposter);
}

.first-speaker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #bae6fd;
  font-weight: 700;
  margin-bottom: 1rem;
}

.vote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin: 1.25rem 0;
}

.vote-btn {
  padding: 0.85rem 0.75rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-strong);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  transition: 0.15s;
}

.vote-btn:hover {
  border-color: var(--imposter);
  background: rgba(255, 77, 109, 0.14);
}

.result-card {
  border-radius: 20px;
  padding: 1.5rem;
  background: rgba(8, 13, 26, 0.7);
  border: 1px solid var(--border-strong);
  margin: 1rem 0 1.4rem;
}

.scoreboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 0.5rem;
  margin-top: 1rem;
}

.score-item {
  display: flex;
  justify-content: space-between;
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  font-size: 0.88rem;
}

/* Word Generator Tool */
.generator-result {
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.95));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 20px;
  padding: 1.75rem;
  text-align: center;
  margin: 1.25rem 0;
}

.word-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.word-tag {
  padding: 0.38rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  color: #e2e8f0;
}

/* SEO Content Sections */
.content-section {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.content-section h2 {
  margin: 0 0 0.85rem;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
}

.content-section h3 {
  margin: 1.35rem 0 0.45rem;
  font-size: 1.12rem;
  color: #e2e8f0;
}

.content-section p, .content-section li {
  color: #cbd5e1;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.step-card {
  background: rgba(8, 13, 26, 0.65);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.15rem;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 77, 109, 0.18);
  color: #fda4af;
  font-weight: 800;
  margin-bottom: 0.6rem;
}

.faq-list details {
  border-bottom: 1px solid var(--border);
  padding: 0.9rem 0;
}

.faq-list details:last-child {
  border-bottom: none;
}

.faq-list summary {
  font-weight: 700;
  cursor: pointer;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-list summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.25rem;
}

.faq-list details[open] summary::after {
  content: "−";
}

.faq-list details p {
  margin: 0.65rem 0 0;
  color: var(--text-muted);
}

.edition-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.edition-card {
  display: block;
  padding: 1.1rem;
  border-radius: 16px;
  background: rgba(8, 13, 26, 0.65);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.18s ease, transform 0.15s ease;
}

.edition-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  text-decoration: none;
}

.edition-card strong {
  display: block;
  margin-bottom: 0.3rem;
}

.edition-card span {
  font-size: 0.86rem;
  color: var(--text-muted);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: rgba(8, 13, 26, 0.85);
  padding: 2.25rem 1.25rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.25rem;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.9rem;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.86rem;
}

.hidden {
  display: none !important;
}

@media (max-width: 820px) {
  .setup-grid {
    grid-template-columns: 1fr;
  }
  .game-shell {
    padding: 1.1rem;
  }
  .content-section {
    padding: 1.35rem;
  }
}

@media (max-width: 480px) {
  .category-grid, .player-inputs {
    grid-template-columns: 1fr;
  }
}

/* Mode Switcher & Solo AI UI */
.mode-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
  margin-bottom: 1.25rem;
}

.mode-tab {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  transition: 0.18s ease;
  font-family: inherit;
}

.mode-tab strong {
  color: var(--text);
  font-size: 0.98rem;
}

.mode-tab small {
  font-size: 0.8rem;
}

.mode-tab.active {
  background: linear-gradient(135deg, rgba(255, 77, 109, 0.16), rgba(56, 189, 248, 0.12));
  border-color: var(--imposter);
  color: #e2e8f0;
  box-shadow: 0 8px 24px rgba(255, 77, 109, 0.16);
}

.avatar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 1.15rem;
  flex-shrink: 0;
  border: 2px solid rgba(255, 255, 255, 0.28);
}

.clue-board {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 1rem 0 1.25rem;
  text-align: left;
}

.clue-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.95rem;
  border-radius: 14px;
  background: rgba(8, 13, 26, 0.7);
  border: 1px solid var(--border);
  animation: fadeSlideIn 0.25s ease both;
}

.clue-player {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
}

.clue-word-pill {
  padding: 0.32rem 0.8rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #e0f2fe;
  font-weight: 800;
  font-size: 0.92rem;
}

.clue-input-bar {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.solo-role-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding: 0.85rem 1.1rem;
  border-radius: 14px;
  margin-bottom: 1rem;
  text-align: left;
}

.solo-role-banner.crew {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.45);
}

.solo-role-banner.imposter {
  background: rgba(255, 77, 109, 0.16);
  border: 1px solid rgba(255, 77, 109, 0.5);
}

/* Space Ejection Banner */
.ejection-banner {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 2rem 1.25rem;
  margin: 0.75rem 0 1.25rem;
  background:
    radial-gradient(2px 2px at 15% 25%, #fff, transparent),
    radial-gradient(2px 2px at 42% 75%, #cbd5e1, transparent),
    radial-gradient(2px 2px at 78% 20%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 88% 68%, #94a3b8, transparent),
    radial-gradient(2px 2px at 60% 35%, #e0f2fe, transparent),
    linear-gradient(135deg, #020617, #0f172a 60%, #1e1b4b);
  border: 1px solid var(--border-strong);
  text-align: center;
}

.ejected-floater {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  font-size: 2rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 0 28px rgba(255, 77, 109, 0.45);
  animation: ejectSpin 3.6s ease-in-out infinite;
}

.ejection-text {
  font-size: 1.28rem;
  font-weight: 900;
  letter-spacing: 0.01em;
}

@keyframes ejectSpin {
  0% { transform: translateX(-18px) rotate(-14deg); }
  50% { transform: translateX(18px) rotate(14deg); }
  100% { transform: translateX(-18px) rotate(-14deg); }
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.guess-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 1rem 0;
}

@media (max-width: 600px) {
  .mode-tabs, .guess-grid {
    grid-template-columns: 1fr;
  }
}

/* Light Theme Support */
[data-theme="light"] {
  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-card: #ffffff;
  --border: rgba(15, 23, 42, 0.11);
  --border-strong: rgba(15, 23, 42, 0.22);
  --text: #0f172a;
  --text-muted: #475569;
  --shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] body {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 77, 109, 0.09), transparent 36%),
    radial-gradient(circle at 88% 6%, rgba(56, 189, 248, 0.11), transparent 34%),
    var(--bg);
}

[data-theme="light"] .site-header,
[data-theme="light"] .site-footer {
  background: rgba(255, 255, 255, 0.92);
}

[data-theme="light"] .panel,
[data-theme="light"] .step-card,
[data-theme="light"] .edition-card,
[data-theme="light"] .clue-row,
[data-theme="light"] .result-card,
[data-theme="light"] .content-section {
  background: #ffffff;
}

[data-theme="light"] .content-section p,
[data-theme="light"] .content-section li,
[data-theme="light"] .content-section h3,
[data-theme="light"] .word-tag {
  color: #334155;
}

[data-theme="light"] select,
[data-theme="light"] input[type="text"],
[data-theme="light"] textarea {
  background: #f1f5f9;
  color: #0f172a;
}

[data-theme="light"] .btn-secondary {
  background: #f1f5f9;
  color: #0f172a;
}

[data-theme="light"] .mode-tab {
  background: #f8fafc;
}

[data-theme="light"] .clue-word-pill {
  background: rgba(14, 165, 233, 0.12);
  color: #0369a1;
}

[data-theme="light"] .ejection-banner {
  color: #f8fafc;
}

.theme-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  transition: 0.15s;
}

.theme-btn:hover {
  border-color: var(--accent);
}

/* Arcade Hub Filter Bar & Vibrant Game Cards */
.hub-section {
  margin-bottom: 2.5rem;
}

.hub-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.15rem;
}

.hub-header h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.filter-pill {
  padding: 0.44rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: 0.15s;
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--imposter);
  border-color: var(--imposter);
  color: #ffffff;
}

.arcade-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 1rem;
}

.arcade-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 188px;
  padding: 1.25rem;
  border-radius: 20px;
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.arcade-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34);
  text-decoration: none;
}

.arcade-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.arcade-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.arcade-pill {
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.26rem 0.62rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.24);
  color: #ffffff;
}

.arcade-card h3 {
  margin: 0 0 0.3rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.arcade-card p {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.88);
}

.card-rose { background: linear-gradient(135deg, #e11d48, #f97316); }
.card-indigo { background: linear-gradient(135deg, #4f46e5, #0ea5e9); }
.card-emerald { background: linear-gradient(135deg, #059669, #14b8a6); }
.card-amber { background: linear-gradient(135deg, #d97706, #ef4444); }
.card-violet { background: linear-gradient(135deg, #7c3aed, #ec4899); }
.card-sky { background: linear-gradient(135deg, #0284c7, #2563eb); }
.card-teal { background: linear-gradient(135deg, #0d9488, #22c55e); }
.card-fuchsia { background: linear-gradient(135deg, #c026d3, #f43f5e); }

/* GEO Comparison Table & Promo Banner */
.table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
}

.geo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

.geo-table th,
.geo-table td {
  padding: 0.78rem 1rem;
  border-bottom: 1px solid var(--border);
}

.geo-table th {
  background: rgba(56, 189, 248, 0.1);
  color: var(--text);
  font-weight: 800;
}

.geo-table tr:last-child td {
  border-bottom: none;
}

/* Responsive Mobile Header & Hamburger Drawer */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
}

@media (max-width: 768px) {
  .header-inner {
    position: relative;
    flex-wrap: nowrap;
  }

  .menu-btn {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.85rem 1rem 1rem;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-strong);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35);
    z-index: 50;
  }

  .main-nav.open {
    display: grid;
  }

  .main-nav a {
    padding: 0.68rem 0.75rem;
    border-radius: 12px;
    font-size: 0.92rem;
    text-align: center;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid var(--border);
  }

  .main-nav a.active {
    background: var(--imposter);
    border-color: var(--imposter);
    color: #ffffff;
  }

  .badge {
    font-size: 0.72rem;
    padding: 0.34rem 0.75rem;
  }
}
