:root {
  color-scheme: dark;
  --bg: #050510;
  --bg-2: #0c1025;
  --accent: #f6b93b;
  --accent-2: #ff6b6b;
  --accent-glow: rgba(246, 185, 59, 0.35);
  --ink: #f3f4f8;
  --muted: #a0a7c1;
  --panel: rgba(11, 17, 32, 0.88);
  --card: rgba(8, 12, 24, 0.82);
  --outline: rgba(255, 255, 255, 0.08);
  --outline-hover: rgba(255, 255, 255, 0.18);
  --success: #34d399;
  --danger: #f87171;
  --shadow: 0 22px 60px rgba(0, 0, 0, 0.55);
  --shadow-glow: 0 8px 40px rgba(246, 185, 59, 0.08);
  --font-display: "Playfair Display", "Copperplate", "Georgia", serif;
  --font-body: "Inter", "Trebuchet MS", "Segoe UI", sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-smooth: 0.4s var(--ease-out-expo);
}

* {
  box-sizing: border-box;
}

/* Premium scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(246, 185, 59, 0.2);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(246, 185, 59, 0.35);
}

html {
  scrollbar-width: thin;
  scrollbar-color: rgba(246, 185, 59, 0.2) transparent;
  scroll-behavior: smooth;
}

/* Selection highlight */
::selection {
  background: rgba(246, 185, 59, 0.25);
  color: var(--ink);
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, #1a2550 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(100, 50, 180, 0.08) 0%, transparent 50%),
    linear-gradient(130deg, #04040a, #0c0e1e 40%, #0f1428 70%, #080c18);
  color: var(--ink);
  font-family: var(--font-body);
  letter-spacing: 0.2px;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Particle Canvas */
.particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.bg-glow {
  position: fixed;
  inset: -20% -10% auto -10%;
  height: 60vh;
  background: radial-gradient(ellipse 50% 50% at 50% 20%, rgba(255, 207, 66, 0.15), rgba(246, 185, 59, 0.05) 40%, transparent 70%);
  filter: blur(4px);
  pointer-events: none;
  z-index: 0;
  animation: glowPulse 6s ease-in-out infinite;
}

/* Ambient secondary glow */
.bg-glow::after {
  content: '';
  position: absolute;
  bottom: -20%;
  right: -10%;
  width: 50%;
  height: 50%;
  background: radial-gradient(circle, rgba(100, 60, 200, 0.06), transparent 60%);
  filter: blur(40px);
  animation: glowPulse 8s ease-in-out infinite reverse;
}

/* Lightning Effects */
.lightning-effects {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.topbar,
.shell,
.footer-new,
dialog {
  position: relative;
  z-index: 1;
}

dialog {
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border-radius: 20px;
  border: none;
  padding: 0;
  animation: dialogEnter 0.4s var(--ease-spring) both;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.6), 0 0 80px rgba(246, 185, 59, 0.05);
}

dialog::backdrop {
  background: rgba(4, 4, 12, 0.75);
  backdrop-filter: blur(6px) saturate(0.8);
  animation: fadeIn 0.3s ease both;
}

.lightning-beam {
  position: absolute;
  width: 250px;
  height: 150vh;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(246, 185, 59, 0.12),
    rgba(246, 185, 59, 0.25),
    rgba(246, 185, 59, 0.12),
    transparent
  );
  opacity: 0;
  filter: blur(2px);
}

.lightning-beam.beam-1 {
  left: 15%;
  animation: beamSweep 8s ease-in-out infinite;
}

.lightning-beam.beam-2 {
  left: 40%;
  animation: beamSweep 10s ease-in-out infinite 2s;
}

.lightning-beam.beam-3 {
  left: 70%;
  animation: beamSweep 12s ease-in-out infinite 4s;
}

.lightning-effects.flash {
  animation: lightningFlash 0.5s ease-in-out;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 48px;
  background: linear-gradient(180deg, rgba(8, 12, 24, 0.6), transparent);
  backdrop-filter: blur(8px);
  animation: fadeDown 0.5s var(--ease-out-expo) both;
}

.brand {
  display: flex;
  flex-direction: column;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}

.brand-logo img {
  height: 132px;
  width: auto;
  display: block;
  filter: drop-shadow(0 0 16px rgba(246, 185, 59, 0.3));
  background: transparent;
  border-radius: 0;
  transition: filter 0.4s ease, transform 0.4s var(--ease-spring);
}

.brand-logo:hover img {
  filter: drop-shadow(0 0 24px rgba(246, 185, 59, 0.45));
  transform: scale(1.04);
}

.brand-title {
  font-size: 16px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.topbar-nav {
  display: flex;
  gap: 12px;
}

.topbar-actions {
  display: flex;
  gap: 12px;
}

.language-wrap {
  display: flex;
  align-items: center;
  background: rgba(10, 16, 32, 0.9);
  border: 1px solid var(--outline);
  border-radius: 999px;
  padding-left: 10px;
  gap: 2px;
}

.language-flag {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  pointer-events: none;
}

.language-select {
  padding: 8px 10px 8px 4px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background: transparent;
  color: var(--ink);
  border: none;
  min-width: 80px;
  outline: none;
}

.language-wrap:focus-within {
  outline: 2px solid rgba(246, 185, 59, 0.6);
  outline-offset: 2px;
}

.language-select option {
  background: #0b1020;
  color: var(--ink);
  padding: 8px 12px;
  font-size: 14px;
}

.account-menu {
  position: relative;
  pointer-events: auto;
  z-index: 11;
}

.account-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  display: none;
  flex-direction: column;
  gap: 6px;
  min-width: 180px;
  padding: 10px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--outline);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
  z-index: 10;
  pointer-events: auto;
}

.account-dropdown * {
  pointer-events: auto;
}

.account-dropdown.active {
  display: flex;
}


.account-dropdown button {
  width: 100%;
  justify-content: flex-start;
  pointer-events: auto;
  cursor: pointer;
  display: flex;
}

.account-dropdown button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}

.topbar-actions button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.topbar-actions .locked-action {
  opacity: 0.45;
  filter: grayscale(0.6);
}

.category-section {
  display: none;
  margin-top: 8px;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.category-card.locked {
  opacity: 0.5;
  border-style: dashed;
}

.category-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.fullscreen-controls {
  display: none;
  width: 100%;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

#classic-layout:fullscreen {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.75fr);
  grid-template-rows: auto 1fr;
  justify-items: center;
  align-items: center;
  gap: 24px;
  padding: 24px;
}

#classic-layout:fullscreen .fullscreen-controls .timer {
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: var(--ink);
  min-width: 110px;
  text-align: center;
}

#classic-layout:fullscreen .fullscreen-controls {
  display: flex;
}

#classic-layout:fullscreen .classic-board {
  width: min(980px, 60vw);
  justify-self: center;
}

#classic-layout:fullscreen .ladder-card {
  width: min(460px, 30vw);
  justify-self: center;
}

@media (max-width: 700px) {
  #classic-layout:fullscreen {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 16px;
    padding: 16px;
    overflow-y: auto;
    max-height: 100vh;
  }

  #classic-layout:fullscreen .classic-board,
  #classic-layout:fullscreen .ladder-card {
    width: 100%;
    max-width: 100%;
  }

  #classic-layout:fullscreen .question {
    font-size: 18px;
  }

  #classic-layout:fullscreen .options button {
    font-size: 14px;
  }
}

body.classic-light #screen-classic {
  background: #f7f7fb;
  color: #0b1020;
  border-radius: 28px;
}

body.classic-light #screen-classic .panel,
body.classic-light #screen-classic .card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.18);
  color: #0b1020;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

body.classic-light #screen-classic .classic-title-row,
body.classic-light #screen-classic .classic-header,
body.classic-light #screen-classic #classic-pack-title,
body.classic-light #screen-classic #classic-meta {
  color: #0b1020;
}

body.classic-light #screen-classic h2,
body.classic-light #screen-classic h3 {
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
  -webkit-text-fill-color: #0b1020;
  color: #0b1020;
}

body.classic-light #screen-classic .lifeline-row button {
  border-color: rgba(15, 23, 42, 0.25);
  color: #0b1020;
  background: rgba(15, 23, 42, 0.04);
}

body.classic-light #screen-classic .ladder li {
  color: #0b1020;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid rgba(15, 23, 42, 0.12);
}

body.classic-light #screen-classic .timer {
  color: #0b1020;
  text-shadow: none;
}

body.classic-light #screen-classic #fullscreen-timer {
  color: #0b1020;
  text-shadow: none;
}

body.classic-light #screen-classic .options button {
  border-color: rgba(15, 23, 42, 0.2);
  color: #0b1020;
  background: rgba(15, 23, 42, 0.03);
}

body.classic-light #screen-classic .classic-header-controls button,
body.classic-light #screen-classic .fullscreen-controls button {
  color: #0b1020;
  border-color: rgba(15, 23, 42, 0.3);
  background: rgba(15, 23, 42, 0.03);
}

body.classic-light #screen-classic .question,
body.classic-light #screen-classic .feedback {
  color: #0b1020;
}

body.classic-light #screen-classic .ladder li.active {
  background: rgba(246, 185, 59, 0.25);
  border-color: rgba(246, 185, 59, 0.7);
}

body.classic-light #screen-classic .ladder li.safe {
  background: rgba(52, 211, 153, 0.18);
  border-color: rgba(52, 211, 153, 0.6);
}

body.classic-light #screen-classic .ladder li.completed {
  opacity: 0.8;
}

/* Sezwor elements in light mode */
body.classic-light #screen-classic .sezwor-lb-name,
body.classic-light #screen-classic .sezwor-lb-rank,
body.classic-light #screen-classic .sezwor-answer-chip,
body.classic-light #screen-classic .sezwor-answer-chip .chip-name,
body.classic-light #screen-classic .sezwor-waiting-feedback {
  color: #0b1020;
}

body.classic-light #screen-classic .sezwor-lb-row {
  background: rgba(15, 23, 42, 0.04);
  border-left-color: var(--player-color, rgba(15, 23, 42, 0.2));
}

body.classic-light #screen-classic .sezwor-lb-row.sezwor-lb-top {
  background: rgba(246, 185, 59, 0.12);
}

body.classic-light #screen-classic .sezwor-answer-chip {
  background: rgba(15, 23, 42, 0.06);
  border-color: var(--player-color, rgba(15, 23, 42, 0.18));
}

body.classic-light #screen-classic .sezwor-answer-chip.chip-correct {
  background: rgba(46, 204, 113, 0.15);
}

body.classic-light #screen-classic .sezwor-answer-chip.chip-wrong {
  background: rgba(231, 76, 60, 0.15);
}

body.classic-light #screen-classic .sezwor-option {
  color: #fff;
}

body.classic-light .lightning-effects,
body.classic-light .bg-glow {
  opacity: 0.25;
}

body:not(.classic-light) .lightning-effects,
body:not(.classic-light) .bg-glow {
  opacity: 0;
}

.category-card {
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.65), rgba(10, 16, 32, 0.7));
  border: 1px solid rgba(148, 163, 184, 0.15);
  border-radius: 14px;
  padding: 14px 16px;
  text-align: left;
  color: var(--text);
  display: grid;
  gap: 6px;
  transition: all 0.3s var(--ease-out-expo);
  cursor: pointer;
}

.category-card .meta {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.category-card:hover {
  border-color: rgba(246, 185, 59, 0.6);
  box-shadow: 0 0 0 2px rgba(246, 185, 59, 0.2);
}

.category-card.selected {
  border-color: rgba(52, 211, 153, 0.8);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.35);
}

.status-success {
  color: #22c55e;
  font-weight: 600;
}

.toggle-row {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

#login-confirm-wrap {
  display: none;
}


.shell {
  padding: 20px 48px 80px;
}

.screen {
  display: none;
  animation: screenEnter 0.6s var(--ease-out-expo) both;
}

.screen.active {
  display: block;
}

/* Scroll reveal handled by IntersectionObserver JS — stagger delays applied via .revealed class */

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 32px;
  align-items: center;
}

.hero > div:first-child {
  padding-left: 40px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 5px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  opacity: 0;
  animation: revealUp 0.6s var(--ease-out-expo) 0.1s forwards;
  position: relative;
  display: inline-block;
}

.eyebrow::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
}

h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 900;
  margin: 12px 0 40px;
  background: linear-gradient(135deg, #e8a828, #ffd700, #f6b93b, #ffeaa7, #f6b93b);
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerGradient 6s ease-in-out infinite;
  letter-spacing: -1px;
  line-height: 1.08;
  opacity: 0;
  animation: revealUp 0.8s var(--ease-out-expo) 0.2s forwards, shimmerGradient 6s ease-in-out 1s infinite;
}

h2, h3 {
  font-family: var(--font-display);
  letter-spacing: 0.3px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--ink), rgba(243, 244, 248, 0.8));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtext {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
  margin-top: -6px;
}

.hero > div:first-child .subtext {
  opacity: 0;
  animation: revealUp 0.7s var(--ease-out-expo) 0.35s forwards;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
  opacity: 0;
  animation: revealUp 0.7s var(--ease-out-expo) 0.5s forwards;
}

button {
  border: none;
  padding: 12px 22px;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

button:hover {
  transform: translateY(-2px);
}

button:active {
  transform: translateY(0) scale(0.97);
  transition-duration: 0.1s;
}

/* Ripple shimmer on hover */
button::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  transition: opacity 0.5s ease, transform 0.5s ease;
  z-index: -1;
}

button:hover::after {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.primary {
  background: linear-gradient(135deg, var(--accent), #e8920a, #f6b93b);
  background-size: 200% 200%;
  color: #0b0f1f;
  box-shadow: 0 4px 16px rgba(246, 185, 59, 0.3), 0 2px 6px rgba(249, 115, 22, 0.2);
  font-weight: 700;
  letter-spacing: 0.5px;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.15);
}

.primary:hover {
  box-shadow: 0 8px 28px rgba(246, 185, 59, 0.45), 0 4px 12px rgba(249, 115, 22, 0.3);
  background-position: 100% 100%;
  filter: brightness(1.08);
}

.primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transition: left 0.5s ease;
  z-index: 0;
}

.primary:hover::before {
  left: 120%;
}

.secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  border: 1px solid var(--outline);
  backdrop-filter: blur(12px);
}

.secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--outline-hover);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--outline);
}

.ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border-color: var(--outline-hover);
}

.panel {
  background: linear-gradient(135deg, rgba(12, 18, 36, 0.9), rgba(8, 14, 28, 0.95));
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow), var(--shadow-glow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  border: 1px solid var(--outline);
  backdrop-filter: blur(24px) saturate(1.2);
  position: relative;
  overflow: hidden;
}

.panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(246, 185, 59, 0.03), transparent);
  animation: beamSweep 18s ease-in-out infinite;
}

/* Subtle top gradient highlight */
.panel::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246, 185, 59, 0.2), rgba(255, 255, 255, 0.08), rgba(246, 185, 59, 0.2), transparent);
  pointer-events: none;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-body {
  display: grid;
  gap: 22px;
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}

.card {
  background: linear-gradient(145deg, rgba(12, 17, 32, 0.85), rgba(6, 10, 22, 0.9));
  border-radius: 20px;
  padding: 20px;
  border: 1px solid var(--outline);
  backdrop-filter: blur(12px) saturate(1.1);
  transition: all var(--transition-smooth);
  position: relative;
  z-index: 1;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* Mouse-follow spotlight effect (set via JS) */
.card::before {
  content: "";
  position: absolute;
  top: var(--mouse-y, 50%);
  left: var(--mouse-x, 50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(246, 185, 59, 0.08), transparent 70%);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.4s ease;
  pointer-events: none;
  z-index: -1;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3),
              0 0 24px rgba(246, 185, 59, 0.06);
  border-color: rgba(255, 255, 255, 0.14);
}

/* Disable hover lift on touch devices to prevent sticky hover states */
@media (hover: none) {
  .card:hover {
    transform: none;
  }

  .pricing-card:hover {
    transform: none;
  }

  .pricing-card.featured:hover {
    transform: scale(1.02);
  }

  button:hover {
    transform: none;
  }
}

.card:hover::before {
  opacity: 1;
}

.pack-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}

.pack-start {
  font-size: 0.85rem;
  padding: 6px 14px;
}

.pack-delete {
  font-size: 1.1rem;
  padding: 6px 10px;
  border: 1px solid rgba(255, 80, 80, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.pack-delete:hover {
  background: rgba(255, 80, 80, 0.15);
  border-color: rgba(255, 80, 80, 0.6);
}

.hero-card {
  display: flex;
  justify-content: center;
}

.hero-card-inner {
  background: linear-gradient(145deg, rgba(12, 17, 32, 0.9), rgba(6, 10, 22, 0.95));
  border-radius: 28px;
  padding: 28px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow), 0 0 60px rgba(246, 185, 59, 0.04);
  backdrop-filter: blur(16px);
  position: relative;
}

.hero-card-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246, 185, 59, 0.25), transparent);
  border-radius: 28px 28px 0 0;
}

.card-title {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  color: var(--muted);
}

.prize-title {
  font-family: var(--font-display);
}

.card-footnote {
  font-size: 12px;
  color: var(--muted);
  margin-top: 16px;
}

.ladder-preview,
.ladder {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
}

.ladder-preview li,
.ladder li {
  display: flex;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015));
  margin-bottom: 5px;
  font-size: 13px;
  transition: all 0.4s var(--ease-out-expo);
  animation: ladderReveal 0.5s ease both;
  border: 1px solid transparent;
  position: relative;
}

.ladder-preview li:last-child,
.ladder li:last-child {
  margin-bottom: 0;
}

.ladder li:last-child {
  border-left: none;
}

.ladder-preview li {
  animation: ladderReveal 0.6s ease both, ladderPreviewPulse 3s ease-in-out infinite;
}

.ladder li:nth-child(1) { animation-delay: 0.05s; }
.ladder li:nth-child(2) { animation-delay: 0.10s; }
.ladder li:nth-child(3) { animation-delay: 0.15s; }
.ladder li:nth-child(4) { animation-delay: 0.20s; }
.ladder li:nth-child(5) { animation-delay: 0.25s; }
.ladder li:nth-child(6) { animation-delay: 0.30s; }
.ladder li:nth-child(7) { animation-delay: 0.35s; }
.ladder li:nth-child(8) { animation-delay: 0.40s; }
.ladder li:nth-child(9) { animation-delay: 0.45s; }
.ladder li:nth-child(10) { animation-delay: 0.50s; }
.ladder li:nth-child(11) { animation-delay: 0.55s; }
.ladder li:nth-child(12) { animation-delay: 0.60s; }
.ladder li:nth-child(13) { animation-delay: 0.65s; }
.ladder li:nth-child(14) { animation-delay: 0.70s; }
.ladder li:nth-child(15) { animation-delay: 0.75s; }

.ladder-preview li:nth-child(1) { animation-delay: 0.05s; }
.ladder-preview li:nth-child(2) { animation-delay: 0.10s; }
.ladder-preview li:nth-child(3) { animation-delay: 0.15s; }
.ladder-preview li:nth-child(4) { animation-delay: 0.20s; }
.ladder-preview li:nth-child(5) { animation-delay: 0.25s; }
.ladder-preview li:nth-child(6) { animation-delay: 0.30s; }
.ladder-preview li:nth-child(7) { animation-delay: 0.35s; }
.ladder-preview li:nth-child(8) { animation-delay: 0.40s; }
.ladder-preview li:nth-child(9) { animation-delay: 0.45s; }
.ladder-preview li:nth-child(10) { animation-delay: 0.50s; }
.ladder-preview li:nth-child(11) { animation-delay: 0.55s; }
.ladder-preview li:nth-child(12) { animation-delay: 0.60s; }
.ladder-preview li:nth-child(13) { animation-delay: 0.65s; }
.ladder-preview li:nth-child(14) { animation-delay: 0.70s; }
.ladder-preview li:nth-child(15) { animation-delay: 0.75s; }

.ladder li.active {
  background: linear-gradient(90deg, rgba(246, 185, 59, 0.3), rgba(246, 185, 59, 0.15));
  color: var(--accent);
  border: 1px solid rgba(246, 185, 59, 0.5);
  box-shadow: 0 0 20px rgba(246, 185, 59, 0.4), 0 0 40px rgba(246, 185, 59, 0.2);
  transform: scale(1.08) translateX(8px);
  animation: ladderPulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  position: relative;
  overflow: hidden;
}

.ladder li.active::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: ladderShimmer 2s ease-in-out infinite;
}

.ladder li.safe,
.ladder-preview li.safe {
  border-left: 3px solid var(--accent);
  background: rgba(246, 185, 59, 0.08);
}

.ladder li.active.safe,
.ladder-preview li.safe {
  box-shadow: 0 0 24px rgba(246, 185, 59, 0.55), 0 0 50px rgba(246, 185, 59, 0.25);
}


.ladder li.completed {
  background: rgba(52, 211, 153, 0.1);
  color: var(--success);
  border-left: 3px solid var(--success);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field span,
.field-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.field-hint {
  font-size: 11px;
  color: var(--muted);
  opacity: 0.7;
  font-style: italic;
  margin-top: 4px;
  display: block;
}

.field input,
.field textarea,
.field select {
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-family: var(--font-body);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: rgba(246, 185, 59, 0.5);
  box-shadow: 0 0 0 3px rgba(246, 185, 59, 0.1), 0 2px 8px rgba(246, 185, 59, 0.08);
  background: rgba(255, 255, 255, 0.05);
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(160, 167, 193, 0.4);
  transition: color 0.3s ease;
}

.field input:focus::placeholder,
.field textarea:focus::placeholder {
  color: rgba(160, 167, 193, 0.25);
}

.field.inline {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  flex: 1;
  padding-right: 40px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  opacity: 0.6;
  transition: opacity 0.2s;
  color: var(--muted);
}

.password-toggle:hover {
  opacity: 1;
}

.password-toggle:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview {
  min-height: 120px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 12px;
  font-size: 13px;
  color: var(--muted);
}

.template-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  margin: 4px 0 12px;
  font-size: 13px;
}

.template-link:hover {
  text-decoration: underline;
}

.ladder-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(60px, 1fr));
  gap: 10px;
}

.ladder-grid input {
  text-align: center;
}

.classic-layout {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr);
  align-items: start;
}

.classic-board {
  min-width: 0;
}

.ladder-card {
  max-width: 360px;
  width: 100%;
  justify-self: end;
  overflow: visible;
  padding-right: 26px;
}

.ladder-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ladder-card-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.qr-card {
  display: flex;
  gap: 16px;
  align-items: center;
}

.qr-image {
  width: 130px;
  height: 130px;
  border-radius: 12px;
  border: 1px solid var(--outline);
  background: #fff;
  object-fit: contain;
}

.code {
  font-size: 20px;
  letter-spacing: 4px;
  margin: 0 0 12px;
}

.timer-toggle {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 16px;
}

.live-board {
  min-height: 320px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fff-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: start;
  gap: 18px;
}

.fff-qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  min-width: 160px;
}

.fff-qr img {
  width: 140px;
  height: 140px;
  object-fit: contain;
}

@media (max-width: 720px) {
  .fff-layout {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .fff-qr {
    width: 100%;
  }
}

.fff-results {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.fff-row {
  display: grid;
  grid-template-columns: 30px 1fr 50px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.fff-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  overflow: hidden;
}

.fff-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f97316);
}

#screen-classic.fff-session .ladder-card {
  display: none;
}

#screen-classic.fff-session .classic-layout {
  grid-template-columns: 1fr;
}

.question {
  font-size: 20px;
  margin-bottom: 18px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
  padding: 18px 20px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.01));
  border-radius: 16px;
  border-left: 4px solid var(--accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.03);
  animation: questionReveal 0.5s var(--ease-out-expo) both;
  position: relative;
}

.question::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 4px;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(246, 185, 59, 0.15), transparent 60%);
}

.question-image {
  display: none;
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: 16px;
  margin: 0 0 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.classic-header {
  align-items: center;
}

.classic-header-block {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.classic-header-controls {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.classic-header-controls button {
  white-space: nowrap;
}

.classic-title-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.classic-title-row .timer {
  min-width: 88px;
  text-align: right;
  margin-left: 200px;
}

.options {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.options button {
  width: 100%;
  text-align: left;
  position: relative;
  overflow: hidden;
  transition: all 0.3s var(--ease-out-expo);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(4px);
}

.options button::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(246, 185, 59, 0.08), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.options button:hover {
  border-color: rgba(246, 185, 59, 0.3);
  background: linear-gradient(135deg, rgba(246, 185, 59, 0.08), rgba(255, 255, 255, 0.04));
  box-shadow: 0 4px 16px rgba(246, 185, 59, 0.08);
}

.options button:hover::before {
  transform: translateX(100%);
}

.options button.correct {
  animation: correctBlink 0.6s ease-in-out 4;
  border: 2px solid var(--success);
  color: var(--success);
}

.options button.wrong {
  animation: wrongShake 0.6s ease-in-out;
  border: 2px solid var(--danger);
  color: var(--danger);
}

.options button.locked {
  background: rgba(246, 185, 59, 0.15);
  border: 2px solid var(--accent);
  animation: finalAnswerGlow 1.5s ease-in-out infinite;
}

.options button.suspense {
  animation: suspensePulse 1s ease-in-out infinite;
}

.options button:disabled {
  opacity: 0.2;
  cursor: not-allowed;
  text-decoration: line-through;
  background: rgba(100, 100, 100, 0.1);
  transform: scale(0.95);
}
.options button.sezwor-option:disabled {
  opacity: 0.85;
  cursor: default;
  text-decoration: none;
  background: var(--sezwor-color, #3498db);
  transform: none;
}

.options button.correct:disabled {
  text-decoration: none;
  opacity: 1;
  transform: none;
}

.options button.readonly:disabled {
  text-decoration: none;
  opacity: 0.6;
  transform: none;
}

.feedback {
  margin-top: 12px;
  font-weight: 700;
}

.feedback.good {
  color: var(--success);
}

.feedback.bad {
  color: var(--danger);
}

.lifeline-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.lifeline-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

.classic-board #btn-walk-away {
  margin-top: 0;
  align-self: center;
}

.lifeline-row button {
  background: linear-gradient(135deg, rgba(246, 185, 59, 0.2), rgba(249, 115, 22, 0.2));
  border: 2px solid rgba(246, 185, 59, 0.4);
  color: var(--accent);
  font-weight: 600;
  padding: 10px 18px;
  transition: all 0.3s ease;
}

.lifeline-row button:hover:not(:disabled) {
  background: linear-gradient(135deg, rgba(246, 185, 59, 0.3), rgba(249, 115, 22, 0.3));
  border-color: rgba(246, 185, 59, 0.6);
  box-shadow: 0 0 20px rgba(246, 185, 59, 0.3);
}

.lifeline-row button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: rgba(100, 100, 100, 0.2);
  border-color: rgba(100, 100, 100, 0.3);
  color: var(--muted);
}

.timer {
  margin-top: 16px;
  font-size: 32px;
  color: var(--accent);
  font-weight: 700;
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, rgba(246, 185, 59, 0.08), rgba(246, 185, 59, 0.03));
  border-radius: 16px;
  border: 2px solid rgba(246, 185, 59, 0.25);
  text-shadow: 0 0 20px rgba(246, 185, 59, 0.5);
  animation: suspensePulse 1s ease-in-out infinite;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 30px rgba(246, 185, 59, 0.06), inset 0 0 20px rgba(246, 185, 59, 0.03);
}

.status {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.host-head {
  flex-wrap: wrap;
}

.foot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 30px 0 40px;
}

.dialog-card {
  background: linear-gradient(145deg, rgba(14, 20, 38, 0.98), rgba(8, 12, 26, 0.99));
  border-radius: 20px;
  border: 1px solid var(--outline);
  padding: 24px;
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
}

.dialog-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246, 185, 59, 0.2), transparent);
}

.account-meta {
  display: grid;
  gap: 8px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.account-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.account-fields .field {
  margin-bottom: 0;
}

.account-fields .field.full {
  grid-column: 1 / -1;
}

.account-meta .meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
}

.card.locked {
  opacity: 0.5;
  border-style: dashed;
}

.lock-note {
  font-size: 12px;
  color: var(--accent);
  margin-top: 8px;
}

.dialog-card menu {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.lifeline-dialog {
  min-width: min(400px, calc(100vw - 32px));
  max-width: min(500px, calc(100vw - 32px));
}

.lifeline-prompt {
  color: var(--muted);
  margin-bottom: 20px;
  font-size: 14px;
}

/* Ask the Audience Styles */
.audience-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.audience-option {
  display: flex;
  align-items: center;
  gap: 12px;
}

.audience-label {
  font-weight: 600;
  min-width: 30px;
  color: var(--accent);
}

.audience-bar-container {
  flex: 1;
  height: 32px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.audience-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #f97316);
  transition: width 1s ease;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  font-weight: 700;
  color: #0b0f1f;
}

/* Phone a Friend Styles */
.phone-countdown {
  font-size: 64px;
  font-weight: 700;
  text-align: center;
  color: var(--accent);
  margin: 20px 0;
  text-shadow: 0 0 20px rgba(246, 185, 59, 0.6);
  animation: suspensePulse 1s ease-in-out infinite;
}

.phone-message {
  min-height: 80px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  border-left: 4px solid var(--accent);
  margin: 20px 0;
  font-size: 16px;
  line-height: 1.6;
}

.audience-manual,
.phone-manual {
  display: none;
  gap: 10px;
  margin: 12px 0;
}

.audience-manual {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.audience-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audience-input input {
  width: 70px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.phone-manual {
  display: flex;
  align-items: center;
}

.phone-manual input {
  width: 80px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--outline);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  text-transform: uppercase;
  text-align: center;
}

/* Game Over Dialog Styles */
.gameover-dialog {
  min-width: min(500px, calc(100vw - 32px));
  text-align: center;
  position: relative;
  overflow: hidden;
}

.ribbon-burst {
  position: absolute;
  inset: -10px;
  pointer-events: none;
  opacity: 0;
}

#gameover-dialog.win .ribbon-burst,
#gameover-dialog.celebrate .ribbon-burst {
  opacity: 1;
}

.ribbon-burst span {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 80px;
  border-radius: 8px;
  transform-origin: center bottom;
  animation: ribbonSpray 1.4s ease-out infinite;
}

.ribbon-burst span:nth-child(1) { background: #ff6b6b; transform: translate(-50%, -80%) rotate(-55deg); animation-delay: 0s; height: 90px; }
.ribbon-burst span:nth-child(2) { background: #f6b93b; transform: translate(-50%, -80%) rotate(-30deg); animation-delay: 0.1s; height: 70px; }
.ribbon-burst span:nth-child(3) { background: #34d399; transform: translate(-50%, -80%) rotate(-10deg); animation-delay: 0.2s; height: 100px; }
.ribbon-burst span:nth-child(4) { background: #60a5fa; transform: translate(-50%, -80%) rotate(10deg); animation-delay: 0.3s; height: 85px; }
.ribbon-burst span:nth-child(5) { background: #a78bfa; transform: translate(-50%, -80%) rotate(30deg); animation-delay: 0.4s; height: 75px; }
.ribbon-burst span:nth-child(6) { background: #f472b6; transform: translate(-50%, -80%) rotate(55deg); animation-delay: 0.5s; height: 95px; }
.ribbon-burst span:nth-child(7) { background: #22d3ee; transform: translate(-50%, -80%) rotate(-75deg); animation-delay: 0.15s; height: 80px; }
.ribbon-burst span:nth-child(8) { background: #fb7185; transform: translate(-50%, -80%) rotate(75deg); animation-delay: 0.25s; height: 88px; }
.ribbon-burst span:nth-child(9) { background: #facc15; transform: translate(-50%, -80%) rotate(-5deg); animation-delay: 0.35s; height: 78px; }
.ribbon-burst span:nth-child(10) { background: #4ade80; transform: translate(-50%, -80%) rotate(5deg); animation-delay: 0.45s; height: 105px; }
.ribbon-burst span:nth-child(11) { background: #38bdf8; transform: translate(-50%, -80%) rotate(-40deg); animation-delay: 0.55s; height: 82px; }
.ribbon-burst span:nth-child(12) { background: #c084fc; transform: translate(-50%, -80%) rotate(40deg); animation-delay: 0.65s; height: 92px; }

.gameover-icon {
  font-size: 80px;
  margin: 20px 0;
  animation: fadeIn 0.5s ease;
}

.gameover-icon.celebration {
  animation: celebrateSpin 1.4s ease-in-out infinite;
}

.gameover-message {
  font-size: 18px;
  color: var(--muted);
  margin: 16px 0;
  line-height: 1.6;
}

.gameover-prize {
  font-size: 48px;
  font-weight: 900;
  background: linear-gradient(135deg, #e8a828, #ffd700, #f6b93b);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 24px 0;
  filter: drop-shadow(0 0 16px rgba(246, 185, 59, 0.4));
  animation: shimmerGradient 3s ease-in-out infinite;
}

.gameover-prize.big-win {
  font-size: 64px;
  animation: bigWinPulse 1.8s ease-in-out infinite;
}

.high-contrast {
  --bg: #000;
  --bg-2: #111;
  --panel: #000;
  --ink: #fff;
  --muted: #ddd;
  --outline: #fff;
  --accent: #ffd700;
}

/* ========== ANIMATIONS ========== */

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

@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes screenEnter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

@keyframes dialogEnter {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes shimmerGradient {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes glowPulse {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.02);
  }
}

@keyframes questionReveal {
  from {
    opacity: 0;
    transform: translateX(-16px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes floatY {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes correctPulse {
  0%, 100% {
    background: rgba(52, 211, 153, 0.15);
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.4), 0 0 40px rgba(52, 211, 153, 0.2);
    transform: scale(1);
  }
  50% {
    background: rgba(52, 211, 153, 0.3);
    box-shadow: 0 0 40px rgba(52, 211, 153, 0.6), 0 0 80px rgba(52, 211, 153, 0.3);
    transform: scale(1.02);
  }
}

@keyframes correctBlink {
  0%, 100% {
    background: rgba(52, 211, 153, 0.1);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.2);
  }
  50% {
    background: rgba(52, 211, 153, 0.35);
    box-shadow: 0 0 24px rgba(52, 211, 153, 0.7);
  }
}

@keyframes wrongShake {
  0%, 100% {
    background: rgba(248, 113, 113, 0.15);
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-8px);
    background: rgba(248, 113, 113, 0.25);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(8px);
    background: rgba(248, 113, 113, 0.25);
  }
}

@keyframes lightningFlash {
  0%, 100% {
    opacity: 0;
    background-color: transparent;
  }
  5% {
    opacity: 0.5;
    background-color: rgba(246, 185, 59, 0.1);
  }
  10% {
    opacity: 0.3;
    background-color: transparent;
  }
  15% {
    opacity: 0.8;
    background-color: rgba(246, 185, 59, 0.15);
  }
  20%, 80% {
    opacity: 0;
    background-color: transparent;
  }
  85% {
    opacity: 0.6;
    background-color: rgba(246, 185, 59, 0.12);
  }
  90% {
    opacity: 0.4;
    background-color: rgba(246, 185, 59, 0.08);
  }
}

@keyframes beamSweep {
  0% {
    transform: rotate(-45deg) translateY(-100%);
    opacity: 0;
  }
  50% {
    opacity: 0.3;
  }
  100% {
    transform: rotate(-45deg) translateY(200vh);
    opacity: 0;
  }
}

@keyframes glow {
  0%, 100% {
    text-shadow: 0 0 8px rgba(246, 185, 59, 0.4);
    filter: brightness(1);
  }
  50% {
    text-shadow: 0 0 16px rgba(246, 185, 59, 0.6), 0 0 32px rgba(246, 185, 59, 0.3);
    filter: brightness(1.12);
  }
}

@keyframes ladderReveal {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes ladderPulse {
  0%, 100% {
    box-shadow: 0 0 20px rgba(246, 185, 59, 0.4), 0 0 40px rgba(246, 185, 59, 0.2);
  }
  50% {
    box-shadow: 0 0 30px rgba(246, 185, 59, 0.6), 0 0 60px rgba(246, 185, 59, 0.3);
  }
}

@keyframes ladderShimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes ladderPreviewPulse {
  0%, 100% {
    transform: translateX(0);
    box-shadow: 0 0 0 rgba(246, 185, 59, 0);
  }
  50% {
    transform: translateX(6px);
    box-shadow: 0 0 18px rgba(246, 185, 59, 0.25);
  }
}

@keyframes ribbonSpray {
  0% {
    opacity: 0;
    transform: translate(-50%, -40%) scale(0.4) rotate(0deg);
  }
  30% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -140%) scale(1) rotate(18deg);
  }
}

@keyframes buttonHover {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-3px);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes celebrateSpin {
  0%, 100% {
    transform: scale(1) rotate(-4deg);
  }
  50% {
    transform: scale(1.08) rotate(4deg);
  }
}

@keyframes bigWinPulse {
  0%, 100% {
    transform: scale(1);
    text-shadow: 0 0 18px rgba(246, 185, 59, 0.5);
  }
  50% {
    transform: scale(1.08);
    text-shadow: 0 0 32px rgba(246, 185, 59, 0.8);
  }
}

@keyframes finalAnswerGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(246, 185, 59, 0.5);
  }
  50% {
    box-shadow: 0 0 30px rgba(246, 185, 59, 0.8), 0 0 45px rgba(246, 185, 59, 0.4);
  }
}

@keyframes suspensePulse {
  0%, 100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

/* ========================================
   PRICING SCREEN
   ======================================== */

.pricing-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto 24px;
}

.pricing-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--outline);
  background: rgba(9, 14, 30, 0.85);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.billing-option {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.billing-option.active {
  background: linear-gradient(135deg, rgba(246, 185, 59, 0.2), rgba(246, 185, 59, 0.05));
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(246, 185, 59, 0.18);
}

.billing-badge {
  background: var(--accent);
  color: #0b0f1f;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

.pricing-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0;
}

.pricing-card {
  position: relative;
  background: linear-gradient(145deg, rgba(15, 25, 45, 0.95), rgba(8, 14, 30, 0.98));
  border: 1px solid var(--outline);
  border-radius: 20px;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  transition: all var(--transition-smooth);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.pricing-card:hover {
  transform: translateY(-6px);
  border-color: rgba(246, 185, 59, 0.3);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3),
              0 0 40px rgba(246, 185, 59, 0.06);
}

.pricing-card.featured {
  border-color: rgba(246, 185, 59, 0.4);
  background: linear-gradient(145deg, rgba(246, 185, 59, 0.06), rgba(10, 18, 35, 0.95), rgba(246, 185, 59, 0.02));
  box-shadow: 0 12px 40px rgba(246, 185, 59, 0.1), 0 0 60px rgba(246, 185, 59, 0.04);
  transform: scale(1.03);
}

.pricing-card.featured::before {
  background: linear-gradient(90deg, transparent, rgba(246, 185, 59, 0.3), transparent);
}

.pricing-card.featured:hover {
  transform: scale(1.03) translateY(-6px);
  box-shadow: 0 24px 60px rgba(246, 185, 59, 0.12), 0 0 80px rgba(246, 185, 59, 0.06);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), #ffd700, #e8a828);
  background-size: 200% 200%;
  color: var(--bg);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 18px;
  border-radius: 20px;
  box-shadow: 0 4px 16px rgba(246, 185, 59, 0.35);
  animation: shimmerGradient 4s ease-in-out infinite;
  white-space: nowrap;
}

.pricing-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--outline);
}

.pricing-header h3 {
  font-family: var(--font-display);
  font-size: 28px;
  margin: 0 0 16px 0;
  background: linear-gradient(135deg, var(--accent), #ffd700);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.pricing-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.price-amount {
  font-size: 48px;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
}

.price-period {
  font-size: 16px;
  color: var(--muted);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
  flex-grow: 1;
}

.pricing-features li {
  padding: 12px 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.6;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.pricing-features li::before {
  content: "✓";
  color: var(--success);
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
}

.pricing-button {
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.pricing-button.primary {
  background: linear-gradient(135deg, var(--accent), #ffd700);
  color: var(--bg);
  border-color: var(--accent);
}

.pricing-button.primary:hover {
  background: linear-gradient(135deg, #ffd700, var(--accent));
  box-shadow: 0 8px 24px rgba(246, 185, 59, 0.4);
  transform: translateY(-2px);
}

.pricing-button.secondary {
  background: transparent;
  color: var(--muted);
  border-color: var(--outline);
  cursor: default;
}

.pricing-footer {
  text-align: center;
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--outline);
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 20px;
}

.payment-summary {
  margin-bottom: 16px;
}

.payment-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
  margin: 10px 0 12px;
}

.payment-info-box {
  margin-top: 16px;
  padding: 16px;
  border-radius: 10px;
  background: rgba(246, 185, 59, 0.08);
  border: 1px solid rgba(246, 185, 59, 0.2);
}

.payment-info-box p {
  margin: 0 0 8px;
}

.payment-info-box p:last-child {
  margin-bottom: 0;
}

.payment-methods {
  display: grid;
  gap: 16px;
}

.payment-method-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 16px 0;
}

.payment-method-option {
  position: relative;
  display: flex;
  align-items: center;
  padding: 16px;
  border-radius: 12px;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  transition: all 0.2s ease;
}

.payment-method-option:hover {
  border-color: rgba(246, 185, 59, 0.4);
  background: rgba(246, 185, 59, 0.05);
}

.payment-method-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.payment-method-option input[type="radio"]:checked ~ .payment-method-content {
  opacity: 1;
}

.payment-method-option:has(input[type="radio"]:checked) {
  border-color: rgba(246, 185, 59, 0.6);
  background: rgba(246, 185, 59, 0.08);
  box-shadow: 0 0 0 2px rgba(246, 185, 59, 0.2);
}

.payment-method-content {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.payment-method-option:hover .payment-method-content {
  opacity: 1;
}

.payment-method-icon {
  font-size: 28px;
  flex-shrink: 0;
}

.payment-method-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.payment-method-text strong {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
}

.payment-method-text small {
  color: var(--muted);
  font-size: 12px;
}

.payment-features {
  list-style: none;
  padding: 0;
  margin: 16px 0;
}

.payment-features li {
  padding: 8px 0;
  color: var(--muted);
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.payment-features li:last-child {
  border-bottom: none;
}

.stripe-security {
  margin-top: 16px;
  padding: 16px;
  border-radius: 10px;
  background: rgba(15, 25, 45, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.stripe-security p {
  margin: 0 0 8px;
}

.stripe-security p:last-child {
  margin-bottom: 0;
}

.payment-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}

.payment-option.selected {
  border-color: rgba(246, 185, 59, 0.6);
  box-shadow: 0 0 0 2px rgba(246, 185, 59, 0.2);
}

.payment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 20px;
}

.admin-table {
  display: grid;
  gap: 8px;
}

.admin-table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.admin-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
}

.admin-row-head {
  background: rgba(255, 255, 255, 0.06);
  font-weight: 600;
}

.admin-row select {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 18, 34, 0.9);
  color: var(--ink);
}

.admin-row input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
}

#admin-user-tier {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 18, 34, 0.9);
  color: var(--ink);
  cursor: pointer;
}

#admin-user-tier option {
  background: #0b1020;
  color: var(--ink);
  padding: 10px;
}

.admin-actions {
  display: flex;
  gap: 6px;
}

/* ========================================
   LEADERBOARD SCREEN
   ======================================== */

.leaderboard-filters {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
  flex-wrap: wrap;
  justify-content: center;
}

.filter-button {
  padding: 10px 20px;
  background: rgba(15, 25, 45, 0.5);
  border: 1px solid var(--outline);
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
}

.filter-button:hover {
  border-color: rgba(246, 185, 59, 0.3);
  color: var(--ink);
  transform: translateY(-2px);
  background: rgba(246, 185, 59, 0.05);
}

.filter-button.active {
  background: linear-gradient(135deg, var(--accent), #e8a828);
  border-color: var(--accent);
  color: var(--bg);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(246, 185, 59, 0.25);
}

.leaderboard-container {
  overflow-x: auto;
  border-radius: 12px;
  background: rgba(10, 18, 35, 0.5);
  padding: 20px;
}

.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--ink);
}

.leaderboard-table thead {
  border-bottom: 2px solid var(--outline);
}

.leaderboard-table th {
  padding: 16px 12px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
}

.leaderboard-table tbody tr {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  transition: all 0.3s var(--ease-out-expo);
}

.leaderboard-table tbody tr:hover {
  background: linear-gradient(90deg, rgba(246, 185, 59, 0.04), rgba(246, 185, 59, 0.02));
  transform: scale(1.005);
}

.leaderboard-table tbody tr.current-user {
  background: rgba(246, 185, 59, 0.1);
  border-left: 4px solid var(--accent);
}

.leaderboard-table td {
  padding: 16px 12px;
  font-size: 15px;
}

.leaderboard-table .rank {
  font-weight: 700;
  font-size: 18px;
  width: 60px;
}

.leaderboard-table .rank-1 {
  color: #ffd700;
}

.leaderboard-table .rank-2 {
  color: #c0c0c0;
}

.leaderboard-table .rank-3 {
  color: #cd7f32;
}

.leaderboard-table .player-name {
  font-weight: 600;
}

.leaderboard-table .score-value {
  font-weight: 700;
  color: var(--success);
  font-size: 16px;
}

.leaderboard-table .achievement-badges {
  display: flex;
  gap: 4px;
  font-size: 18px;
}

.leaderboard-footer {
  text-align: center;
  margin-top: 30px;
}

/* ========================================
   ACHIEVEMENTS SCREEN
   ======================================== */

.stats-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.stat-card {
  background: linear-gradient(145deg, rgba(15, 25, 45, 0.85), rgba(8, 14, 30, 0.9));
  border: 1px solid var(--outline);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(246, 185, 59, 0.04), transparent 50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.stat-card:hover {
  border-color: rgba(246, 185, 59, 0.25);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2), 0 0 20px rgba(246, 185, 59, 0.05);
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--accent);
  margin-bottom: 8px;
  font-family: var(--font-display);
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.achievements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.achievement-card {
  background: linear-gradient(145deg, rgba(15, 25, 45, 0.9), rgba(8, 14, 30, 0.95));
  border: 2px solid var(--outline);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.achievement-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.achievement-card.unlocked {
  border-color: rgba(246, 185, 59, 0.35);
  background: linear-gradient(145deg, rgba(246, 185, 59, 0.06), rgba(10, 18, 35, 0.95));
  box-shadow: 0 0 24px rgba(246, 185, 59, 0.04);
}

.achievement-card.unlocked::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(246, 185, 59, 0.1), transparent 70%);
  animation: shimmer 3s linear infinite;
}

.achievement-card.locked {
  opacity: 0.5;
  filter: grayscale(100%);
}

.achievement-icon {
  font-size: 48px;
  margin-bottom: 12px;
  display: block;
}

.achievement-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 8px;
}

.achievement-description {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.achievement-card.unlocked .achievement-name {
  color: var(--accent);
}

.achievements-footer {
  text-align: center;
  margin-top: 30px;
}

@keyframes shimmer {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ========================================
   PROFESSIONAL FOOTER
   ======================================== */

.footer-new {
  background: linear-gradient(180deg, rgba(5, 5, 14, 0.95), rgba(8, 12, 24, 0.99));
  border-top: 1px solid var(--outline);
  margin-top: 80px;
  padding: 60px 48px 24px;
  position: relative;
}

.footer-new::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(246, 185, 59, 0.15), transparent);
}

.footer-container {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 48px;
  margin-bottom: 48px;
}

.footer-section h3 {
  font-family: var(--font-display);
  font-size: 18px;
  background: linear-gradient(135deg, var(--accent), #ffd700);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.footer-section p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px 0;
}

.social-links {
  display: flex;
  gap: 16px;
  margin-top: 24px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(246, 185, 59, 0.06);
  border: 1px solid rgba(246, 185, 59, 0.15);
  color: var(--accent);
  transition: all 0.3s var(--ease-out-expo);
}

.social-links a:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 6px 20px rgba(246, 185, 59, 0.3);
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s var(--ease-out-expo);
  display: inline-block;
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out-expo);
}

.footer-links a:hover {
  color: var(--accent);
  transform: translateX(4px);
}

.footer-links a:hover::after {
  width: 100%;
}

.newsletter-form {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(15, 25, 45, 0.5);
  border: 1px solid var(--outline);
  border-radius: 12px;
  color: var(--ink);
  font-size: 14px;
  font-family: var(--font-body);
  transition: all 0.3s ease;
}

.newsletter-form input:focus {
  outline: none;
  border-color: rgba(246, 185, 59, 0.4);
  background: rgba(15, 25, 45, 0.8);
  box-shadow: 0 0 0 3px rgba(246, 185, 59, 0.08);
}

.newsletter-form button {
  padding: 12px 24px;
  white-space: nowrap;
}

.footer-bottom {
  text-align: center;
  padding-top: 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 700px) {
  .topbar {
    flex-direction: column;
    gap: 12px;
    padding: 20px;
  }
  .shell {
    padding: 0 20px 60px;
  }
  .cta-row {
    flex-direction: column;
    align-items: stretch;
  }
  .panel {
    padding: 20px;
  }

  .brand-logo img {
    height: 96px;
  }

  .classic-layout {
    grid-template-columns: 1fr;
  }

  .ladder-card {
    max-width: none;
    justify-self: stretch;
    padding-right: 20px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .pricing-controls {
    align-items: flex-start;
  }

  .pricing-card {
    padding: 24px 20px;
  }

  .pricing-card.featured,
  .pricing-card.featured:hover {
    transform: none;
  }

  .pricing-header h3 {
    font-size: 22px;
    letter-spacing: 1px;
  }

  .price-amount {
    font-size: 36px;
  }

  #screen-pricing .panel {
    overflow: visible;
  }

  #screen-pricing .panel-body {
    display: block;
  }

  #screen-pricing .pricing-grid {
    display: flex;
    flex-direction: column;
  }
}

@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
    gap: 16px;
  }

  .topbar-actions,
  .topbar-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .classic-title-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .classic-title-row .timer {
    margin-left: 0;
  }

  .ladder-card {
    max-width: 420px;
    padding-right: 20px;
  }

  .panel-body.grid-2 {
    grid-template-columns: 1fr;
  }

  .pricing-grid,
  .payment-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero > div:first-child {
    padding-left: 0;
  }

  .hero-card-inner {
    width: 100%;
  }

  .lifeline-row {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .classic-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .classic-title-row .timer {
    margin-left: 0;
    text-align: left;
  }

  .ladder-card-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .classic-layout {
    grid-template-columns: 1fr;
  }

  .options button {
    width: 100%;
  }

  .admin-row {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .admin-actions {
    justify-content: flex-start;
  }

  .classic-header-controls {
    flex-wrap: wrap;
    justify-content: center;
  }

  #classic-layout:fullscreen .classic-board,
  #classic-layout:fullscreen .ladder-card {
    max-width: 100%;
    justify-self: center;
  }
}

@media (max-width: 700px) {
  .topbar {
    justify-content: center;
    text-align: center;
    padding: 16px 20px;
  }

  .brand-logo img {
    height: 90px;
  }

  .cta-row {
    justify-content: center;
  }

  .panel {
    padding: 20px;
  }

  .fullscreen-controls {
    flex-wrap: wrap;
    gap: 8px;
  }

  .classic-title-row {
    align-items: center;
  }

  .classic-title-row .timer {
    text-align: center;
  }
}

@media (max-width: 600px) {
  .topbar-actions,
  .topbar-nav {
    gap: 8px;
  }

  .question {
    font-size: 18px;
  }

  .question-image {
    max-height: 200px;
  }

  .payment-option {
    justify-content: flex-start;
  }

  .payment-actions {
    flex-direction: column;
  }

  .payment-actions button {
    width: 100%;
  }

  .classic-layout {
    gap: 16px;
  }

  .ladder-card {
    padding-right: 0;
    justify-self: center;
  }
}

@media (max-width: 480px) {
  .brand-logo img {
    height: 72px;
  }

  .shell {
    padding: 12px 16px 50px;
  }

  .classic-header-controls,
  .fullscreen-controls {
    justify-content: center;
  }

  .timer {
    font-size: 24px;
    padding: 12px;
  }

  .ladder li {
    font-size: 12px;
  }

  .account-dropdown {
    right: auto;
    left: 0;
  }
}
.topbar-actions #btn-timed,
.topbar-actions #btn-live {
  font-size: 15px;
}

.topbar-actions #btn-timed::first-letter {
  font-size: 24px;
  line-height: 1;
}

/* ═══════════════════════════════════════════════════════════
   SEZWOR MODE STYLES
   ═══════════════════════════════════════════════════════════ */

/* Mode Selection Dialog */
.mode-select-dialog { max-width: 480px; }
.mode-cards { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.mode-card {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 18px 20px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 2px solid var(--outline);
  text-align: left; transition: all 0.2s;
}
.mode-card:hover { border-color: var(--accent); background: rgba(246,185,59,0.08); transform: translateY(-2px); }
.mode-icon { font-size: 28px; }
.mode-name { font-weight: 700; font-size: 16px; color: var(--ink); }
.mode-desc { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* Sezwor Lobby Dialog */
.sezwor-lobby-dialog { max-width: 500px; }
.sezwor-join-form { display: flex; gap: 8px; margin: 12px 0; }
.sezwor-join-form input { flex: 1; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--outline); background: rgba(0,0,0,0.3); color: var(--ink); font-size: 14px; }
.sezwor-join-form input:focus { outline: 2px solid var(--accent); }
.sezwor-join-form button { white-space: nowrap; }
.sezwor-qr-section { text-align: center; margin: 12px 0; }
.sezwor-qr-img { width: 120px; height: 120px; border-radius: 10px; background: #fff; padding: 4px; }
.sezwor-player-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; min-height: 40px; }
.sezwor-player-chip {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 999px; border: 2px solid; background: rgba(0,0,0,0.3);
  font-size: 14px; animation: sezworPop 0.3s ease;
}
.sezwor-avatar { font-size: 20px; }
.sezwor-name { font-weight: 600; color: var(--ink); }
.sezwor-remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 14px; padding: 0 2px; }
.sezwor-remove:hover { color: #e74c3c; }

@keyframes sezworPop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Sezwor Option Buttons */
.sezwor-option {
  width: 100%; padding: 14px 18px; margin-bottom: 8px; border-radius: 10px;
  font-size: 15px; font-weight: 600; cursor: pointer; text-align: left;
  border: 2px solid transparent; transition: all 0.2s;
  background: var(--sezwor-color, #3498db); color: #fff;
}
.sezwor-option:hover:not(:disabled) { transform: translateX(4px); filter: brightness(1.15); }
.sezwor-option:disabled { opacity: 0.7; cursor: default; text-decoration: none; background: var(--sezwor-color, #3498db); transform: none; }
.sezwor-option.correct { background: #2ecc71 !important; border-color: #fff; animation: sezworCorrect 0.5s ease; }
.sezwor-shape { font-size: 16px; margin-right: 8px; opacity: 0.8; }

@keyframes sezworCorrect {
  0%,100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}

/* Sezwor Player Answer Chips */
.sezwor-player-answers { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.sezwor-answer-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  border: 2px solid; background: rgba(0,0,0,0.3); color: var(--ink);
  transition: all 0.3s;
}
.sezwor-answer-chip.waiting { opacity: 0.5; animation: sezworPulse 1.5s infinite; }
.sezwor-answer-chip.answered { opacity: 1; }
.sezwor-answer-chip.chip-correct { background: rgba(46,204,113,0.2); }
.sezwor-answer-chip.chip-wrong { background: rgba(231,76,60,0.2); }
.sezwor-answer-chip small { font-weight: 400; opacity: 0.8; margin-left: 4px; }

@keyframes sezworPulse {
  0%,100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

/* Sezwor Leaderboard (replaces prize ladder) */
.sezwor-leaderboard { display: flex; flex-direction: column; gap: 6px; padding: 8px 0; }
.sezwor-lb-scroll { max-height: 360px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--accent) transparent; }
.sezwor-lb-scroll::-webkit-scrollbar { width: 5px; }
.sezwor-lb-scroll::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }
.sezwor-lb-more { text-align: center; font-size: 13px; color: var(--muted); font-style: italic; padding: 6px 0; margin: 0; }
.sezwor-lb-row {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  border-radius: 10px; background: rgba(255,255,255,0.04);
  border-left: 4px solid var(--player-color, var(--outline));
  transition: all 0.3s; animation: sezworSlideIn 0.4s ease;
}
.sezwor-lb-row.sezwor-lb-top { background: rgba(246,185,59,0.08); }
.sezwor-lb-rank { font-size: 18px; min-width: 28px; text-align: center; }
.sezwor-lb-avatar { font-size: 22px; }
.sezwor-lb-name { flex: 1; font-weight: 600; font-size: 14px; color: var(--ink); }
.sezwor-lb-score { font-weight: 700; font-size: 15px; color: var(--accent); font-variant-numeric: tabular-nums; }

@keyframes sezworSlideIn {
  from { transform: translateX(20px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Sezwor Player Picker Overlay */
.sezwor-picker-overlay {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn 0.2s ease;
}
.sezwor-picker-card {
  background: var(--card); border-radius: 16px; padding: 24px;
  max-width: 400px; width: 90%; text-align: center; color: var(--ink);
  border: 1px solid var(--outline);
}
.sezwor-picker-card p { margin-bottom: 16px; font-size: 16px; }
.sezwor-picker-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.sezwor-picker-btn {
  padding: 10px 18px; border-radius: 10px; border: 2px solid;
  background: rgba(255,255,255,0.06); color: var(--ink); font-size: 15px;
  font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.sezwor-picker-btn:hover { transform: scale(1.05); background: rgba(246,185,59,0.15); }
.sezwor-picker-cancel { margin-top: 8px; }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Sezwor Results Dialog */
.sezwor-results-dialog { max-width: 520px; position: relative; }

/* Drag Handle */
.drag-handle {
  text-align: center;
  cursor: grab;
  padding: 6px 0 4px;
  font-size: 16px;
  color: var(--muted);
  user-select: none;
  letter-spacing: 2px;
  opacity: 0.45;
  transition: opacity 0.2s, background 0.2s;
  border-radius: 8px;
  margin: -8px -8px 4px;
  padding: 8px;
}
.drag-handle:hover {
  opacity: 1;
  background: rgba(255,255,255,0.06);
}
.drag-handle:active { cursor: grabbing; opacity: 1; }

#sezwor-results-dialog.dragging {
  margin: 0;
  inset: unset;
  position: fixed;
  cursor: grabbing;
  z-index: 10001;
}
.sezwor-podium {
  display: flex; align-items: flex-end; justify-content: center;
  gap: 12px; margin: 24px 0 16px; min-height: 220px;
}
.sezwor-podium-col { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.sezwor-podium-avatar {
  width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; border: 3px solid rgba(255,255,255,0.3);
}
.sezwor-podium-name { font-weight: 700; font-size: 14px; color: var(--ink); }
.sezwor-podium-score { font-size: 12px; color: var(--accent); font-weight: 600; }
.sezwor-podium-bar {
  width: 70px; border-radius: 8px 8px 0 0;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 8px; font-weight: 700; font-size: 14px; color: #fff;
  opacity: 0.85;
}
.sezwor-full-results { margin-top: 12px; }
.sezwor-result-row {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-radius: 8px; font-size: 14px; color: var(--ink);
}
.sezwor-result-row:nth-child(odd) { background: rgba(255,255,255,0.03); }
.sezwor-result-score { margin-left: auto; font-weight: 700; color: var(--accent); }

/* ─── Sezwor Countdown Overlay ─────────────────────────────── */
.sezwor-countdown-overlay {
  position: fixed; inset: 0; z-index: 10002;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, rgba(10,16,32,0.95) 0%, rgba(0,0,0,0.98) 100%);
}
.sezwor-countdown-number {
  font-size: 160px; font-weight: 900; color: var(--accent);
  text-shadow: 0 0 40px rgba(246,185,59,0.5), 0 0 80px rgba(246,185,59,0.2);
}
.sezwor-countdown-label {
  font-size: 18px; color: var(--muted); margin-top: 16px; letter-spacing: 4px; text-transform: uppercase;
}
.sezwor-countdown-pop {
  animation: countdownPop 0.8s ease forwards;
}
.sezwor-countdown-go {
  animation: countdownGo 0.6s ease forwards;
  color: #2ecc71 !important;
  font-size: 100px !important;
  text-shadow: 0 0 60px rgba(46,204,113,0.6), 0 0 120px rgba(46,204,113,0.3) !important;
}
.sezwor-countdown-exit {
  animation: countdownExit 0.3s ease forwards;
}
@keyframes countdownPop {
  0% { opacity: 0; transform: scale(2); }
  30% { opacity: 1; transform: scale(0.9); }
  50% { transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes countdownGo {
  0% { opacity: 0; transform: scale(3); }
  50% { opacity: 1; transform: scale(0.95); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes countdownExit {
  0% { opacity: 1; }
  100% { opacity: 0; transform: scale(0.5); }
}

/* ─── Sezwor Auto Toggle & Next Button ─────────────────────── */
.sezwor-auto-toggle {
  display: flex; justify-content: flex-end; padding: 4px 8px 2px;
}
.sezwor-lobby-auto {
  justify-content: flex-start; padding: 8px 0 4px;
}
.sezwor-lobby-auto .sezwor-toggle-label { font-size: 13px; }
.sezwor-toggle-label {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--muted); cursor: pointer; user-select: none;
}
.sezwor-toggle-label input { display: none; }
.sezwor-toggle-slider {
  width: 34px; height: 18px; border-radius: 9px;
  background: rgba(255,255,255,0.15); position: relative;
  transition: background 0.3s;
}
.sezwor-toggle-slider::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted); transition: transform 0.3s, background 0.3s;
}
.sezwor-toggle-label input:checked + .sezwor-toggle-slider {
  background: rgba(46,204,113,0.4);
}
.sezwor-toggle-label input:checked + .sezwor-toggle-slider::after {
  transform: translateX(16px); background: #2ecc71;
}

.sezwor-next-btn {
  display: block; width: 100%; max-width: 320px; margin: 12px auto 0;
  padding: 14px 24px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, var(--accent), #e67e22);
  color: #fff; font-size: 18px; font-weight: 700;
  cursor: pointer; letter-spacing: 1px;
  animation: sezworNextPulse 1.5s ease infinite;
  transition: transform 0.2s;
}
.sezwor-next-btn:hover { transform: scale(1.04); }
@keyframes sezworNextPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(246,185,59,0.4); }
  50% { box-shadow: 0 0 0 8px rgba(246,185,59,0); }
}

/* ─── Sezwor Leaderboard Score Animation ───────────────────── */
.sezwor-lb-row {
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s;
}
.sezwor-lb-bump {
  animation: sezworBump 0.6s ease;
}
@keyframes sezworBump {
  0% { transform: scale(1); }
  30% { transform: scale(1.06); background: rgba(246,185,59,0.15); }
  100% { transform: scale(1); }
}

/* ─── Sezwor Edit Player ──────────────────────────────────── */
/* ─── Sezwor Edit Player (shared styles) ──────────────────── */

.sezwor-edit-overlay {
  position: fixed; inset: 0; z-index: 10003;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  animation: fadeIn 0.2s ease;
}
.sezwor-edit-card {
  background: var(--card); border: 1px solid var(--outline);
  border-radius: 16px; padding: 24px; max-width: 360px; width: 90%;
  color: var(--ink);
}
.sezwor-edit-card h3 { margin: 0 0 16px; font-size: 18px; }
.sezwor-edit-card label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; margin-top: 12px; }
.sezwor-edit-name {
  width: 100%; padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--outline); background: rgba(0,0,0,0.3);
  color: var(--ink); font-size: 15px; box-sizing: border-box;
}
.sezwor-edit-name:focus { outline: 2px solid var(--accent); }
.sezwor-edit-avatars {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; max-height: 140px; overflow-y: auto;
}
.sezwor-avatar-btn {
  width: 42px; height: 42px; border-radius: 50%;
  border: 2px solid transparent; background: rgba(255,255,255,0.05);
  font-size: 22px; cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center;
}
.sezwor-avatar-btn:hover { border-color: var(--accent); background: rgba(246,185,59,0.1); }
.sezwor-avatar-btn.selected { border-color: var(--accent); background: rgba(246,185,59,0.2); box-shadow: 0 0 8px rgba(246,185,59,0.3); }
.sezwor-edit-actions { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }
.sezwor-edit-cancel {
  padding: 8px 20px; border-radius: 8px; border: 1px solid var(--outline);
  background: transparent; color: var(--muted); font-size: 14px; cursor: pointer;
}
.sezwor-edit-cancel:hover { background: rgba(255,255,255,0.05); color: var(--ink); }
.sezwor-edit-save {
  padding: 8px 20px; border-radius: 8px; border: none;
  background: var(--accent); color: #000; font-size: 14px; font-weight: 700; cursor: pointer;
}
.sezwor-edit-save:hover { filter: brightness(1.1); }

/* ─── Sezwor Animated Podium Reveal ────────────────────────── */
.sezwor-podium-hidden {
  opacity: 0; transform: translateY(40px) scale(0.8);
}
.sezwor-podium-enter {
  animation: podiumEnter 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes podiumEnter {
  0% { opacity: 0; transform: translateY(40px) scale(0.8); }
  60% { opacity: 1; transform: translateY(-8px) scale(1.05); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.sezwor-spotlight {
  animation: podiumSpotlight 1.2s ease infinite;
}
@keyframes podiumSpotlight {
  0%, 100% { filter: brightness(1) drop-shadow(0 0 0px transparent); }
  50% { filter: brightness(1.2) drop-shadow(0 0 20px rgba(246,185,59,0.5)); }
}
.sezwor-podium-avatar-big {
  width: 64px !important; height: 64px !important;
  font-size: 36px !important; border-width: 4px !important;
}
.sezwor-podium-reveal .sezwor-podium-avatar-big {
  animation: podiumBounce 1s ease infinite;
  animation-play-state: paused;
}
.sezwor-podium-enter .sezwor-podium-avatar-big {
  animation-play-state: running;
}
@keyframes podiumBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

/* ─── Sezwor Player Edit (on device) ──────────────────────── */
.sezwor-player-edit-btn {
  padding: 10px 20px; border-radius: 10px; border: 1px solid var(--outline);
  background: rgba(255,255,255,0.06); color: var(--ink); font-size: 14px;
  cursor: pointer; transition: all 0.2s; margin-top: 4px;
}
.sezwor-player-edit-btn:hover { background: rgba(246,185,59,0.15); border-color: var(--accent); }
.sezwor-editing-badge {
  font-size: 11px; color: var(--accent); background: rgba(246,185,59,0.12);
  padding: 2px 8px; border-radius: 999px; animation: sezworEditPulse 1.5s ease infinite;
}
@keyframes sezworEditPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.sezwor-edit-field-label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }

/* Sezwor Room Code Display */
.sezwor-code-display { text-align: center; margin: 12px 0; }
.sezwor-room-code {
  font-size: 36px; font-weight: 900; letter-spacing: 8px;
  color: var(--accent); background: rgba(246,185,59,0.08);
  border: 2px dashed var(--accent); border-radius: 12px;
  padding: 12px 24px; display: inline-block; margin-top: 6px;
  font-family: "Courier New", monospace;
}

/* Sezwor Remote Join Screen */
.sezwor-join-screen {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0a1020 0%, #1a1040 50%, #0a1020 100%);
  padding: 20px;
}
.sezwor-join-card {
  background: var(--card); border: 1px solid var(--outline);
  border-radius: 20px; padding: 32px 28px; max-width: 400px;
  width: 100%; text-align: center; color: var(--ink);
}
.sezwor-join-logo { font-size: 56px; margin-bottom: 8px; }
.sezwor-join-logo-link { display: inline-block; margin-bottom: 12px; }
.sezwor-join-logo-img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; transition: transform 0.2s; }
.sezwor-join-logo-img:hover { transform: scale(1.1); }
.sezwor-removed-notice { color: var(--danger, #e74c3c); font-weight: 600; margin-bottom: 8px; }

/* Quit Confirm Dialog */
.quit-confirm-dialog { text-align: center; max-width: 360px; }
.quit-confirm-dialog h3 { font-size: 22px; margin-bottom: 8px; }
.quit-confirm-dialog .subtext { margin-bottom: 20px; }
.quit-confirm-dialog menu { display: flex; gap: 12px; justify-content: center; }
.quit-confirm-dialog .primary { min-width: 120px; }
.sezwor-join-card h2 { font-size: 24px; margin-bottom: 4px; }
.sezwor-join-card .field { text-align: left; margin: 16px 0; }
.sezwor-join-card input {
  width: 100%; padding: 12px 16px; border-radius: 10px;
  border: 1px solid var(--outline); background: rgba(0,0,0,0.3);
  color: var(--ink); font-size: 16px;
}
.sezwor-join-card input:focus { outline: 2px solid var(--accent); }
.sezwor-join-card .primary {
  width: 100%; padding: 14px; font-size: 16px; margin-top: 8px;
}
.sezwor-join-waiting {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-top: 20px; animation: fadeIn 0.5s ease;
}
.sezwor-join-avatar { font-size: 64px; }
.sezwor-join-welcome { font-size: 20px; font-weight: 700; color: var(--accent); }
.sezwor-join-msg { font-size: 14px; color: var(--muted); }
.sezwor-join-spinner {
  width: 32px; height: 32px; border: 3px solid var(--outline);
  border-top-color: var(--accent); border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Player Device: Answer Buttons ─────────────────────────── */
.sezwor-player-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  padding-bottom: 10px; border-bottom: 1px solid var(--outline);
}
.sezwor-player-avatar-small { font-size: 28px; }
.sezwor-player-name-small { font-weight: 700; font-size: 15px; color: var(--ink); flex: 1; }
.sezwor-player-q { font-size: 13px; color: var(--accent); font-weight: 600; }
.sezwor-player-prompt {
  font-size: 16px; font-weight: 600; color: var(--ink);
  line-height: 1.5; margin-bottom: 16px; text-align: center;
}
.sezwor-player-options {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.sezwor-player-btn {
  display: flex; align-items: center; gap: 8px;
  padding: 16px 14px; border-radius: 12px; border: 2px solid transparent;
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: all 0.2s; text-align: left; min-height: 60px;
}
.sezwor-player-btn:hover:not(:disabled) { transform: scale(1.03); filter: brightness(1.15); }
.sezwor-player-btn:active:not(:disabled) { transform: scale(0.97); }
.sezwor-player-btn:disabled { cursor: default; }
.sezwor-btn-icon { font-size: 22px; flex-shrink: 0; }
.sezwor-btn-text { flex: 1; line-height: 1.3; }

/* Player answered state */
.sezwor-player-answered-state {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  margin-top: 16px; animation: fadeIn 0.4s ease;
}
.sezwor-answered-check { font-size: 48px; animation: sezworPop 0.5s ease; }

/* Player reveal state */
.sezwor-player-reveal {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-top: 16px; animation: fadeIn 0.4s ease;
}
.sezwor-reveal-icon { font-size: 56px; }
.sezwor-reveal-icon.reveal-correct { animation: sezworPop 0.5s ease; }
.sezwor-reveal-icon.reveal-wrong { animation: wrongShake 0.5s ease; }
.sezwor-reveal-text { font-size: 22px; font-weight: 700; color: var(--ink); }
.sezwor-reveal-answer { font-size: 14px; color: var(--muted); }
.sezwor-reveal-score {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  margin-top: 8px; padding: 12px 24px; border-radius: 12px;
  background: rgba(246,185,59,0.1); border: 1px solid var(--accent);
}
.sezwor-reveal-score span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.sezwor-reveal-score strong { font-size: 28px; color: var(--accent); }

/* Player final results */
.sezwor-player-final {
  margin-top: 16px; animation: fadeIn 0.5s ease;
}
.sezwor-my-result {
  display: flex; align-items: center; gap: 10px; padding: 14px 16px;
  border-radius: 12px; background: rgba(246,185,59,0.1);
  border: 2px solid var(--accent); margin-bottom: 16px;
}
.sezwor-my-rank { font-size: 24px; }
.sezwor-my-avatar { font-size: 28px; }
.sezwor-my-name { flex: 1; font-weight: 700; font-size: 16px; color: var(--ink); }
.sezwor-my-score { font-weight: 700; font-size: 16px; color: var(--accent); }
.sezwor-winners-title { font-size: 16px; margin: 12px 0 8px; text-align: center; }
.sezwor-winners-list { display: flex; flex-direction: column; gap: 6px; }
.sezwor-winner-row {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: 10px; background: rgba(255,255,255,0.04); font-size: 14px;
}
.sezwor-winner-row.sezwor-winner-me { background: rgba(246,185,59,0.08); border: 1px solid var(--accent); }
.sezwor-winner-medal { font-size: 20px; min-width: 28px; text-align: center; }
.sezwor-winner-avatar { font-size: 20px; }
.sezwor-winner-name { flex: 1; font-weight: 600; color: var(--ink); }
.sezwor-winner-score { font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.sezwor-all-results { margin-top: 12px; }
.sezwor-all-results summary {
  cursor: pointer; font-size: 13px; color: var(--muted); padding: 8px 0;
}

/* Host screen: answer chip improvements */
.sezwor-answer-chip .chip-avatar { font-size: 18px; }
.sezwor-answer-chip .chip-name { font-weight: 600; font-size: 13px; }
.sezwor-answer-chip .chip-status { font-size: 14px; margin-left: 2px; }
.sezwor-answer-chip .chip-answer { font-size: 13px; margin-left: 4px; }

/* Host: display-only option buttons */
.sezwor-option-host { cursor: default; opacity: 0.9; }
.sezwor-option-host:hover { transform: none !important; filter: none !important; }

/* Host: waiting feedback */
.sezwor-waiting-feedback { color: var(--muted); font-style: italic; }

@media (max-width: 480px) {
  .sezwor-player-options { grid-template-columns: 1fr; }
  .sezwor-player-btn { min-height: 50px; padding: 12px; }
  .sezwor-join-card { padding: 20px 16px; }
}

/* ─── Question Editor ─────────────────────────────────────── */
.csv-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.csv-actions .template-link { font-size: 13px; }
#btn-export-csv { font-size: 13px; padding: 4px 10px; }

.question-editor-section { margin-top: 12px; }
.question-editor-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.question-editor-header .field-label { margin: 0; }
.question-editor-list { display: flex; flex-direction: column; gap: 6px; max-height: 400px; overflow-y: auto; }

.q-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--outline);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  transition: border-color 0.2s;
}
.q-card:hover { border-color: var(--accent); }
.q-card-body { flex: 1; min-width: 0; }
.q-card-num { font-size: 12px; color: var(--muted); font-weight: 600; }
.q-card-prompt { font-size: 13px; margin: 2px 0 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-card-options { display: flex; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.q-card-opt { padding: 1px 6px; border-radius: 4px; background: rgba(255,255,255,0.06); }
.q-card-opt.correct { background: rgba(39,174,96,0.25); color: #2ecc71; font-weight: 600; }
.q-card-actions { display: flex; gap: 4px; flex-shrink: 0; }
.q-card-actions button { font-size: 14px; padding: 4px 8px; border: none; background: none; cursor: pointer; border-radius: 6px; }
.q-card-actions button:hover { background: rgba(255,255,255,0.1); }

.question-form {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--accent);
  border-radius: 10px;
  padding: 16px;
  margin-top: 10px;
}
.question-form h4 { margin: 0 0 10px; font-size: 15px; }
.qf-options-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.qf-actions { display: flex; gap: 8px; margin-top: 10px; }

.sezwor-question-count { margin: 8px 0; }
.sezwor-qcount-row { display: flex; gap: 8px; align-items: center; }
.sezwor-qcount-row select { flex: 1; }
.sezwor-qcount-row input { flex: 0 0 80px; }

@media (max-width: 480px) {
  .qf-options-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   COMPREHENSIVE RESPONSIVE OVERRIDES
   ════════════════════════════════════════════════════════════ */

/* ─── Extra-large screens (≥1400px) ─────────────────────── */
@media (min-width: 1400px) {
  .shell {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }

  .topbar {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
  }

  .question {
    font-size: 24px;
  }

  .classic-layout {
    max-width: 1200px;
    margin: 0 auto;
  }

  .hero {
    max-width: 1300px;
    margin: 0 auto;
  }

  .footer-container {
    max-width: 1400px;
  }
}

/* ─── Tablets and small laptops (≤980px) ────────────────── */
@media (max-width: 980px) {
  .footer-new {
    padding: 40px 32px 20px;
  }

  .gameover-prize {
    font-size: 36px;
  }

  .gameover-prize.big-win {
    font-size: 48px;
  }

  .hero > div:first-child {
    padding-left: 20px;
  }
}

/* ─── Small tablets (≤760px) ────────────────────────────── */
@media (max-width: 760px) {
  .footer-new {
    padding: 32px 24px 16px;
  }

  .footer-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 32px;
  }

  .panel {
    border-radius: 20px;
  }

  .card {
    border-radius: 16px;
  }

  .gameover-icon {
    font-size: 60px;
  }

  .gameover-prize {
    font-size: 32px;
  }

  .gameover-prize.big-win {
    font-size: 40px;
  }
}

/* ─── Phones (≤600px) ───────────────────────────────────── */
@media (max-width: 600px) {
  button {
    border-radius: 14px;
    padding: 10px 16px;
  }

  .primary {
    border-radius: 14px;
  }

  .secondary {
    border-radius: 14px;
  }

  .ghost {
    border-radius: 14px;
  }

  .topbar {
    padding: 14px 16px;
    gap: 10px;
  }

  .topbar-nav,
  .topbar-actions {
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .topbar-nav button,
  .topbar-actions button {
    font-size: 13px;
    padding: 8px 12px;
    border-radius: 12px;
  }

  .brand-logo img {
    height: 80px;
  }

  .hero > div:first-child {
    padding-left: 0;
  }

  h1 {
    font-size: 28px;
    margin-bottom: 24px;
  }

  .subtext {
    font-size: 14px;
  }

  .shell {
    padding: 10px 16px 60px;
  }

  .panel {
    padding: 16px;
    border-radius: 18px;
  }

  .card {
    padding: 16px;
    border-radius: 14px;
  }

  .question {
    font-size: 17px;
    padding: 14px;
    border-radius: 14px;
  }

  .options {
    gap: 10px;
  }

  .options button {
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 12px;
  }

  .lifeline-row button {
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 12px;
  }

  .timer {
    font-size: 26px;
    padding: 12px;
    border-radius: 14px;
  }

  .classic-title-row .timer {
    margin-left: 0;
  }

  .phone-countdown {
    font-size: 48px;
  }

  .gameover-icon {
    font-size: 56px;
    margin: 14px 0;
  }

  .gameover-message {
    font-size: 16px;
  }

  .gameover-prize {
    font-size: 28px;
    margin: 16px 0;
  }

  .gameover-prize.big-win {
    font-size: 36px;
  }

  .footer-new {
    padding: 28px 16px 14px;
    margin-top: 40px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form button {
    width: 100%;
  }

  .pricing-button {
    border-radius: 12px;
  }

  .sezwor-option {
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
  }

  .sezwor-podium {
    gap: 8px;
    min-height: 180px;
  }

  .sezwor-podium-bar {
    width: 56px;
  }

  .sezwor-podium-avatar {
    width: 40px;
    height: 40px;
    font-size: 22px;
  }

  .sezwor-room-code {
    font-size: 28px;
    letter-spacing: 6px;
    padding: 10px 20px;
  }

  .sezwor-qr-img {
    width: 100px;
    height: 100px;
  }

  .dialog-card {
    padding: 16px;
    border-radius: 14px;
  }

  .dialog-card menu {
    flex-direction: column;
    gap: 8px;
  }

  .dialog-card menu button {
    width: 100%;
  }

  .mode-select-dialog {
    max-width: calc(100vw - 32px);
  }

  .sezwor-lobby-dialog {
    max-width: calc(100vw - 32px);
  }

  .sezwor-results-dialog {
    max-width: calc(100vw - 32px);
  }

  .account-fields {
    grid-template-columns: 1fr;
  }

  .leaderboard-table td,
  .leaderboard-table th {
    padding: 10px 8px;
    font-size: 13px;
  }

  .leaderboard-table .rank {
    font-size: 16px;
    width: 40px;
  }

  .stat-card {
    padding: 16px 14px;
  }

  .stat-value {
    font-size: 24px;
  }

  .achievements-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
  }

  .achievement-card {
    padding: 18px 14px;
  }

  .achievement-icon {
    font-size: 36px;
  }

  .category-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }

  .ladder-grid {
    grid-template-columns: repeat(2, minmax(60px, 1fr));
  }

  .language-wrap {
    border-radius: 12px;
  }

  .language-select {
    min-width: 60px;
    font-size: 13px;
  }

  .qr-image {
    width: 100px;
    height: 100px;
  }
}

/* ─── Small phones (≤480px) ─────────────────────────────── */
@media (max-width: 480px) {
  button {
    border-radius: 12px;
    font-size: 13px;
    padding: 8px 12px;
  }

  .topbar {
    padding: 12px;
    gap: 8px;
  }

  .topbar-nav button,
  .topbar-actions button {
    font-size: 12px;
    padding: 7px 10px;
    border-radius: 10px;
  }

  .topbar-actions #btn-timed,
  .topbar-actions #btn-live {
    font-size: 13px;
  }

  .brand-logo img {
    height: 68px;
  }

  h1 {
    font-size: 24px;
    margin-bottom: 20px;
  }

  .subtext {
    font-size: 13px;
  }

  .panel {
    padding: 14px;
    border-radius: 16px;
  }

  .card {
    padding: 14px;
    border-radius: 12px;
  }

  .question {
    font-size: 16px;
    padding: 12px;
    border-radius: 12px;
  }

  .question-image {
    max-height: 160px;
    border-radius: 12px;
  }

  .options button {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 10px;
  }

  .lifeline-row button {
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 10px;
  }

  .timer {
    font-size: 22px;
    padding: 10px;
    border-radius: 12px;
  }

  .phone-countdown {
    font-size: 40px;
  }

  .gameover-icon {
    font-size: 48px;
    margin: 10px 0;
  }

  .gameover-message {
    font-size: 14px;
    margin: 10px 0;
  }

  .gameover-prize {
    font-size: 24px;
    margin: 12px 0;
  }

  .gameover-prize.big-win {
    font-size: 30px;
  }

  .footer-new {
    padding: 24px 12px 12px;
    margin-top: 32px;
  }

  .footer-section h3 {
    font-size: 16px;
    margin-bottom: 12px;
  }

  .footer-section p {
    font-size: 13px;
  }

  .footer-bottom {
    font-size: 12px;
    padding-top: 20px;
  }

  .sezwor-room-code {
    font-size: 24px;
    letter-spacing: 4px;
    padding: 8px 16px;
  }

  .sezwor-qr-img {
    width: 90px;
    height: 90px;
  }

  .sezwor-podium {
    min-height: 160px;
    gap: 6px;
  }

  .sezwor-podium-bar {
    width: 48px;
  }

  .sezwor-podium-avatar {
    width: 36px;
    height: 36px;
    font-size: 20px;
  }

  .sezwor-podium-name {
    font-size: 12px;
  }

  .sezwor-podium-score {
    font-size: 11px;
  }

  .sezwor-option {
    padding: 10px 12px;
    font-size: 13px;
  }

  .pricing-card {
    padding: 20px 16px;
  }

  .pricing-header h3 {
    font-size: 20px;
  }

  .price-amount {
    font-size: 32px;
  }

  .pricing-features li {
    font-size: 13px;
    padding: 8px 0;
  }

  .pricing-button {
    padding: 12px 18px;
    font-size: 14px;
    border-radius: 10px;
  }

  .stat-card {
    padding: 14px 10px;
    border-radius: 10px;
  }

  .stat-value {
    font-size: 22px;
  }

  .stat-label {
    font-size: 11px;
  }

  .leaderboard-table .score-value {
    font-size: 14px;
  }

  .achievement-card {
    padding: 14px 10px;
    border-radius: 10px;
  }

  .achievement-icon {
    font-size: 32px;
    margin-bottom: 8px;
  }

  .achievement-name {
    font-size: 14px;
  }

  .achievement-description {
    font-size: 12px;
  }

  .audience-option {
    gap: 8px;
  }

  .audience-bar-container {
    height: 26px;
  }

  .audience-manual {
    grid-template-columns: 1fr;
  }
}

/* ─── Extra-small phones (≤360px) ───────────────────────── */
@media (max-width: 360px) {
  button {
    border-radius: 10px;
    font-size: 12px;
    padding: 7px 10px;
  }

  .topbar {
    padding: 10px 8px;
    gap: 6px;
  }

  .topbar-nav,
  .topbar-actions {
    gap: 3px;
  }

  .topbar-nav button,
  .topbar-actions button {
    font-size: 11px;
    padding: 6px 8px;
    border-radius: 8px;
  }

  .brand-logo img {
    height: 52px;
  }

  .shell {
    padding: 6px 8px 36px;
  }

  h1 {
    font-size: 22px;
    margin-bottom: 16px;
  }

  .subtext {
    font-size: 12px;
  }

  .panel {
    padding: 10px;
    border-radius: 14px;
  }

  .card {
    padding: 10px;
    border-radius: 10px;
  }

  .question {
    font-size: 14px;
    padding: 10px;
    border-radius: 10px;
  }

  .options button {
    padding: 7px 10px;
    font-size: 12px;
    border-radius: 8px;
  }

  .lifeline-row button {
    padding: 5px 8px;
    font-size: 11px;
  }

  .timer {
    font-size: 18px;
    padding: 8px;
  }

  .phone-countdown {
    font-size: 36px;
  }

  .gameover-icon {
    font-size: 40px;
  }

  .gameover-prize {
    font-size: 20px;
  }

  .gameover-prize.big-win {
    font-size: 26px;
  }

  .sezwor-room-code {
    font-size: 20px;
    letter-spacing: 3px;
    padding: 6px 12px;
  }

  .sezwor-qr-img {
    width: 80px;
    height: 80px;
  }

  .sezwor-podium {
    min-height: 140px;
    gap: 4px;
  }

  .sezwor-podium-bar {
    width: 40px;
  }

  .sezwor-podium-avatar {
    width: 32px;
    height: 32px;
    font-size: 18px;
  }

  .sezwor-option {
    padding: 8px 10px;
    font-size: 12px;
    border-radius: 8px;
  }

  .footer-new {
    padding: 20px 10px 10px;
    margin-top: 24px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .dialog-card {
    padding: 12px;
    border-radius: 12px;
  }

  .sezwor-player-btn {
    padding: 10px;
    font-size: 13px;
    min-height: 44px;
  }

  .sezwor-btn-icon {
    font-size: 18px;
  }

  .ladder li {
    font-size: 11px;
    padding: 5px 8px;
  }

  .pricing-card {
    padding: 16px 12px;
  }

  .price-amount {
    font-size: 28px;
  }

  .stat-card {
    padding: 12px 8px;
  }

  .stat-value {
    font-size: 20px;
  }

  .category-grid {
    grid-template-columns: 1fr;
  }
}

/* ─── Ensure hero card scales on all devices ────────────── */
@media (max-width: 600px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .hero-card-inner {
    padding: 16px;
    border-radius: 20px;
    width: 100%;
  }

  .ladder-preview li {
    font-size: 12px;
    padding: 5px 8px;
  }
}

/* ─── Consistent button shapes for nav-like elements ───── */
@media (max-width: 600px) {
  .cta-row button {
    border-radius: 14px;
    width: 100%;
  }

  .filter-button {
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 13px;
  }

  .pack-start {
    border-radius: 10px;
  }

  .mode-card {
    border-radius: 12px;
    padding: 14px 16px;
  }
}

/* ─── Extra-large screens: comfortable max widths ──────── */
@media (min-width: 1600px) {
  .hero {
    max-width: 1400px;
    margin: 0 auto;
  }

  .pricing-grid {
    max-width: 1200px;
  }

  .leaderboard-container {
    max-width: 1200px;
    margin: 0 auto;
  }

  .stats-summary {
    max-width: 900px;
    margin: 0 auto 40px;
  }

  .achievements-grid {
    max-width: 1200px;
    margin: 0 auto 30px;
  }
}
