/* ─────────────────────────────────────────
   TOKENS
───────────────────────────────────────── */
:root {
  --bg:           #161C20;
  --orange:       #EC705F;
  --lime:         #DDFB86;
  --white:        #FFFFFF;
  --border:       #37393C;
  --gray-light:   #E4E2E3;
  --card:         #1E2328;
  --muted:        #8A8D90;
  --sidebar:      #141819;
  --font-display: 'Sora', sans-serif;
  --font-mono:    'Noto Sans Mono', monospace;
}

/* ─────────────────────────────────────────
   RESET
───────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--white);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.5;
}
a { text-decoration: none; color: inherit; }
button, input { font-family: inherit; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }

/* ─────────────────────────────────────────
   LAYOUT HELPERS
───────────────────────────────────────── */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 48px;
}
@media (max-width: 1280px) { .container { padding: 0 40px; } }
@media (max-width: 900px)  { .container { padding: 0 24px; } }
@media (max-width: 480px)  { .container { padding: 0 16px; } }

/* ─────────────────────────────────────────
   FLOATING LOGOS BACKGROUND
───────────────────────────────────────── */
.floating-logos {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.floating-logo {
  position: absolute;
  object-fit: contain;
  filter: blur(2px);
  animation: floatDrift linear infinite;
  will-change: transform;
}
@keyframes floatDrift {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  25% {
    transform: translate(var(--drift-x), var(--drift-y)) rotate(5deg);
  }
  50% {
    transform: translate(calc(var(--drift-x) * -0.5), calc(var(--drift-y) * 1.2)) rotate(-3deg);
  }
  75% {
    transform: translate(calc(var(--drift-x) * 0.8), calc(var(--drift-y) * -0.6)) rotate(4deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* Ensure content stays above floating logos */
header, main, footer { position: relative; z-index: 1; }

/* ─────────────────────────────────────────
   NAVIGATION
───────────────────────────────────────── */
.navbar { padding-top: 40px; }

.navbar-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border: 1px solid var(--border);
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: stretch;
}

.logo-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.logo-dots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
}
.logo-dots span {
  width: 8px;
  height: 8px;
  display: block;
}
.logo-dots .dot-lime   { background: var(--lime); }
.logo-dots .dot-orange { background: var(--orange); }

.logo-text-wrap {
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 100%;
  border-right: 1px solid var(--border);
}

.logo-name {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.06em;
  color: var(--white);
  text-transform: uppercase;
}

.nav-right {
  display: flex;
  align-items: center;
  padding: 0 24px;
  background: var(--white);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-transform: uppercase;
  transition: opacity 0.2s;
}
.nav-right:hover { opacity: 0.7; }
.nav-right svg { margin-left: 8px; }

/* Minimal navbar (game, leaderboard) */
.navbar-minimal .navbar-inner {
  justify-content: flex-start;
}

.nav-section {
  display: flex;
  align-items: center;
  padding: 0 20px;
  border-right: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.nav-info {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-info-text {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.nav-info-text strong { color: var(--white); font-weight: 500; }

.nav-score {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  border: 1px solid var(--border);
  margin-left: auto;
}
.nav-score-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: var(--lime);
  text-shadow: 0 0 30px rgba(221, 251, 134, 0.55);
}

.nav-close {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border-left: 1px solid var(--border);
  transition: background 0.2s;
  cursor: pointer;
}
.nav-close:hover { background: var(--card); }

/* Leaderboard back bar */
.nav-back-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  width: 100%;
}
.nav-back-link {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  transition: color 0.2s;
}
.nav-back-link:hover { color: var(--white); }
.nav-live-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--lime);
}


/* ─────────────────────────────────────────
   HERO (index)
───────────────────────────────────────── */
.hero {
  padding-top: 80px;
  padding-bottom: 60px;
  position: relative;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr minmax(0, 520px);
  gap: 32px;
  align-items: start;
}

.hero-left { display: flex; flex-direction: column; }

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 104px;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.title-orange { color: var(--orange); display: block; }
.title-white  { color: var(--white);  display: block; margin-top: 0.05em; }

.hero-tagline {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-top: 36px;
  max-width: 420px;
  background: linear-gradient(180deg, #FFFFFF 22%, rgba(255,255,255,0) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.stat-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--border);
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.stat-badge svg { color: var(--lime); width: 16px; height: 16px; flex-shrink: 0; }

.hero-note {
  margin-top: 20px;
  font-size: 14px;
  color: rgba(255,255,255,0.5);
}

/* ─────────────────────────────────────────
   HERO CENTER (landing page)
───────────────────────────────────────── */
.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  padding: 80px 0;
}
.hero-title-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(56px, 10vw, 120px);
  line-height: 1.05;
  color: var(--white);
}
.hero-tagline-center {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-top: 32px;
  max-width: 520px;
  color: var(--muted);
}
.hero-note-center {
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255,255,255,0.4);
}
.btn-start-game {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 48px;
  height: 64px;
  padding: 0 56px;
  border-radius: 500px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  background: linear-gradient(180deg, #BEE54E 0%, #DDFB86 100%);
  color: var(--bg);
  box-shadow: 0 0 80px -10px rgba(221,251,134,0.4);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
  text-decoration: none;
  border: none;
}
.btn-start-game:hover {
  opacity: 0.9;
  transform: scale(1.02);
}

/* ─────────────────────────────────────────
   REGISTER PAGE
───────────────────────────────────────── */
.register-center {
  max-width: 440px;
  margin: 0 auto;
  padding: 80px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.register-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 36px;
  color: var(--white);
  text-align: center;
  margin-bottom: 12px;
}
.register-description {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 32px;
  width: 100%;
}
.register-subtitle {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 20px;
  color: var(--white);
  text-align: center;
  margin-bottom: 24px;
  width: 100%;
}
.register-error {
  border: 1px solid var(--orange);
  padding: 16px;
  margin-bottom: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--orange);
  text-align: center;
}
.register-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
  text-align: left;
}

/* ─────────────────────────────────────────
   COUNTDOWN CENTER
───────────────────────────────────────── */
.countdown-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  text-align: center;
}
.countdown-label {
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
  margin-bottom: 24px;
}
.countdown-number {
  font-family: var(--font-display);
  font-size: 160px;
  font-weight: 700;
  color: var(--lime);
  text-shadow: 0 0 80px rgba(221, 251, 134, 0.5);
  line-height: 1;
  transition: transform 0.3s, opacity 0.3s;
}
.countdown-player {
  margin-top: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.countdown-player strong { color: var(--white); }

/* Background glow */
.bg-hero {
  background:
    radial-gradient(circle at 80% 20%, rgba(236, 112, 95, 0.18), transparent 55%),
    radial-gradient(circle at 10% 90%, rgba(221, 251, 134, 0.12), transparent 55%),
    var(--bg);
  background-attachment: fixed;
  min-height: 100vh;
}

/* ─────────────────────────────────────────
   LOGIN CARD (index)
───────────────────────────────────────── */
.login-card {
  border: 1px solid var(--border);
  background: rgba(30, 35, 40, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 40px;
}

.login-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.login-step {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}

.login-ready {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--lime);
}
.login-ready-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lime);
  animation: pulse-ring 2s ease-out infinite;
}

.form-group { margin-bottom: 20px; }
.form-group:last-of-type { margin-bottom: 0; }

.form-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 8px;
}

.form-input {
  display: block;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border);
  background: rgba(22, 28, 32, 0.6);
  color: var(--white);
  font-size: 16px;
  font-family: var(--font-display);
  outline: none;
  transition: border-color 0.2s;
}
.form-input::placeholder { color: var(--muted); }
.form-input:focus { border-color: var(--lime); }

.form-checkbox-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--border);
  background: rgba(22, 28, 32, 0.4);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
  margin-top: 20px;
  margin-bottom: 20px;
}
.form-checkbox-wrap:hover { border-color: rgba(221, 251, 134, 0.4); }

.form-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid var(--lime);
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 2px;
  display: grid;
  place-content: center;
}
.form-checkbox:checked {
  background: var(--lime);
}
.form-checkbox:checked::after {
  content: "\2713";
  font-size: 12px;
  line-height: 1;
  color: var(--bg);
}

.form-checkbox-text {
  font-size: 14px;
  line-height: 1.375;
  color: var(--muted);
}

.btn-play {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  border-radius: 500px;
  background: linear-gradient(180deg, #BEE54E 0%, #DDFB86 100%);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  box-shadow: 0 0 60px -10px rgba(221, 251, 134, 0.4);
  border: none;
}
.btn-play:hover { opacity: 0.88; }
.btn-play:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-play svg { margin-left: 8px; transition: transform 0.2s; }
.btn-play:hover svg { transform: translateX(4px); }

.form-hint {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-top: 16px;
}

.admin-link {
  display: block;
  text-align: right;
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  transition: color 0.2s;
}
.admin-link:hover { color: var(--white); }


/* ─────────────────────────────────────────
   GAME PAGE
───────────────────────────────────────── */
.game-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 0 80px;
}

.timer-wrap { width: 100%; max-width: 768px; }

.timer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
}
.timer-label { color: var(--muted); }
.timer-value { color: var(--lime); }
.timer-value.warning { color: var(--orange); }

.timer-track {
  height: 6px;
  width: 100%;
  overflow: hidden;
  background: var(--border);
}
.timer-bar {
  height: 100%;
  background: var(--lime);
  transition: width 1s linear;
}
.timer-bar.warning { background: var(--orange); }

.category-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
}
.category-divider .line { height: 1px; width: 40px; background: var(--border); }
.category-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
}
.category-label strong { color: var(--orange); font-weight: 400; }

.logo-card {
  position: relative;
  width: 100%;
  max-width: 768px;
  margin-top: 32px;
  border: 1px solid var(--border);
  background: rgba(30, 35, 40, 0.4);
  backdrop-filter: blur(8px);
  padding: 32px;
}
.logo-card-glow {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(221, 251, 134, 0.6), transparent);
  pointer-events: none;
}

.logo-silhouette {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 192px;
}
.logo-silhouette svg { height: 144px; width: 144px; color: rgba(255,255,255,0.85); }

.letter-slots {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}
.letter-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 80px;
  border: 2px solid var(--border);
  background: rgba(22, 28, 32, 0.6);
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.3s;
}
.letter-slot.revealed {
  border-color: var(--lime);
  background: rgba(221, 251, 134, 0.1);
  color: var(--lime);
  text-shadow: 0 0 30px rgba(221, 251, 134, 0.55);
}
.letter-slot .placeholder { opacity: 0.3; }

/* Interactive typing into slots */
.letter-slots.interactive .letter-slot { cursor: pointer; }
.letter-slot.active-slot {
  border-color: var(--white);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}
.letter-slot.user-typed {
  border-color: var(--white);
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
}
.letter-slots.correct .letter-slot {
  border-color: var(--lime);
  color: var(--lime);
}
.letter-slots.wrong .letter-slot.user-typed {
  border-color: var(--orange);
  color: var(--orange);
}

/* Player name in game header */
.nav-player-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--white);
}

.answer-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  max-width: 576px;
  margin: 32px auto 0;
  border: none;
  background: none;
  padding: 0;
}
.answer-input {
  flex: 1;
  background: transparent;
  padding: 12px 0;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.4em;
  outline: none;
  color: var(--white);
  min-width: 0;
}
.answer-input::placeholder { color: rgba(138, 141, 144, 0.6); }

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  border-radius: 500px;
  background: linear-gradient(180deg, #BEE54E 0%, #DDFB86 100%);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
  flex-shrink: 0;
}
.btn-submit:hover { opacity: 0.88; }
.btn-submit:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-submit svg { width: 16px; height: 16px; }

.hints-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.hints-row span { display: flex; align-items: center; gap: 8px; }
.hints-row svg { width: 14px; height: 14px; flex-shrink: 0; }
.hints-row .icon-lime { color: var(--lime); }
.hints-row .icon-orange { color: var(--orange); }
.hints-row .text-orange { color: var(--orange); }


/* ─────────────────────────────────────────
   LEADERBOARD PAGE
───────────────────────────────────────── */
.lb-header {
  padding-top: 64px;
  padding-bottom: 56px;
  max-width: 768px;
}
.lb-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--orange);
}
.lb-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 72px;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-top: 16px;
}
.lb-title .t-orange { color: var(--orange); }
.lb-title .t-white  { color: var(--white); }
.lb-subtitle {
  margin-top: 24px;
  max-width: 28rem;
  font-family: var(--font-mono);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(180deg, #FFFFFF 22%, rgba(255,255,255,0) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Podium */
.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 48px;
}
@media (min-width: 768px) { .podium { gap: 24px; } }

.podium-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.podium-col svg { margin-bottom: 12px; width: 28px; height: 28px; }
.podium-col .icon-orange { color: var(--orange); }
.podium-col .icon-lime   { color: var(--lime); }
.podium-col .icon-muted  { color: var(--muted); }

.podium-rank {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-align: center;
}
.podium-name {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  text-align: center;
}
.podium-name.glow-orange { color: var(--orange); text-shadow: 0 0 30px rgba(236, 112, 95, 0.55); }
.podium-name.glow-lime   { color: var(--lime);   text-shadow: 0 0 30px rgba(221, 251, 134, 0.55); }
.podium-pts {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.podium-bar {
  margin-top: 16px;
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(30, 35, 40, 0.4);
}
.podium-bar.h-1st { height: 208px; }
.podium-bar.h-2nd { height: 144px; }
.podium-bar.h-3rd { height: 112px; }

/* Leaderboard table */
.lb-table {
  border: 1px solid var(--border);
  background: rgba(30, 35, 40, 0.3);
  backdrop-filter: blur(8px);
}
.lb-table-head {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(22, 28, 32, 0.4);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.lb-table-head .col-right { width: 96px; text-align: right; }

.lb-row {
  display: grid;
  grid-template-columns: 60px 1fr auto auto;
  gap: 16px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.lb-row:last-child { border-bottom: none; }
.lb-row.highlight-lime   { background: rgba(221, 251, 134, 0.05); }
.lb-row.highlight-orange { background: rgba(236, 112, 95, 0.05); }
.lb-row.highlight-gold   { background: rgba(255, 215, 0, 0.08); }
.lb-row.highlight-silver { background: rgba(192, 192, 192, 0.06); }
.lb-row.highlight-bronze { background: rgba(205, 127, 50, 0.06); }

.lb-rank {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--muted);
}
.trophy {
  font-size: 22px;
  filter: none;
}
.trophy-gold   { filter: hue-rotate(0deg) saturate(1.5); }
.trophy-silver { filter: grayscale(1) brightness(1.8); }
.trophy-bronze { filter: hue-rotate(-20deg) saturate(0.6) brightness(0.9); }
.lb-player {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
}
.lb-rounds {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.lb-score {
  width: 96px;
  text-align: right;
  font-family: var(--font-mono);
  font-size: 14px;
}
.lb-score.s-lime   { color: var(--lime); }
.lb-score.s-orange { color: var(--orange); }
.lb-score.s-white  { color: var(--white); }


/* ─────────────────────────────────────────
   ADMIN PAGE
───────────────────────────────────────── */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  display: none;
  width: 256px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  background: var(--sidebar);
  padding: 24px;
}
@media (min-width: 768px) { .sidebar { display: block; } }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--white);
}
.sidebar-brand .logo-dots { gap: 1.5px; }
.sidebar-brand .logo-dots span { width: 6px; height: 6px; }

.sidebar-subtitle {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}

.sidebar-nav { margin-top: 40px; }
.sidebar-nav button {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  color: var(--muted);
  text-align: left;
}
.sidebar-nav button:hover { background: var(--card); color: var(--white); }
.sidebar-nav button.active {
  background: var(--lime);
  color: var(--bg);
  font-weight: 600;
}
.sidebar-nav button svg { width: 16px; height: 16px; flex-shrink: 0; }

.sidebar-event {
  margin-top: 40px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 16px;
}
.sidebar-event-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.sidebar-event-name {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
}
.sidebar-event-meta {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted);
}

.btn-launch {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 16px;
  height: 32px;
  border-radius: 500px;
  background: linear-gradient(180deg, #BEE54E 0%, #DDFB86 100%);
  color: var(--bg);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
}
.btn-launch:hover { opacity: 0.88; }
.btn-launch svg { width: 14px; height: 14px; }

/* Admin main content */
.admin-main {
  flex: 1;
  padding: 24px;
}
@media (min-width: 768px) { .admin-main { padding: 40px; } }

.admin-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.admin-breadcrumb {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--muted);
}

.admin-title {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.admin-title .t-orange { color: var(--orange); }

.admin-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-wrap {
  position: relative;
}
.search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--muted);
  pointer-events: none;
}
.search-input {
  height: 40px;
  width: 256px;
  padding: 0 12px 0 36px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--white);
  font-size: 14px;
  outline: none;
}
.search-input::placeholder { color: var(--muted); }
.search-input:focus { border-color: var(--lime); }

.btn-new {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 500px;
  background: linear-gradient(180deg, #BEE54E 0%, #DDFB86 100%);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
}
.btn-new:hover { opacity: 0.88; }
.btn-new svg { width: 16px; height: 16px; }

/* Admin panels */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.panel-grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 1024px) { .panel-grid.two-col { grid-template-columns: 2fr 1fr; } }
@media (min-width: 768px)  { .panel-grid.half { grid-template-columns: repeat(2, 1fr); } }

.card {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 24px;
}

.card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 8px;
}

.card-input {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--white);
  font-size: 16px;
  font-family: var(--font-display);
  outline: none;
}
textarea.card-input {
  height: auto;
  padding: 12px;
  line-height: 1.5;
}
.card-input:focus { border-color: var(--lime); }

.card-row-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px;
  border-radius: 500px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--white);
  font-size: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-add:hover { background: var(--border); }
.btn-add svg { width: 14px; height: 14px; }

.logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 12px;
  margin-bottom: 8px;
}
.logo-row:last-child { margin-bottom: 0; }
.logo-row svg.drag { width: 16px; height: 16px; color: var(--muted); flex-shrink: 0; }
.logo-row .row-num {
  width: 32px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
}
.logo-row .row-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--card);
}
.logo-row .row-thumb svg { width: 16px; height: 16px; color: var(--muted); }
.logo-row .row-info { flex: 1; }
.logo-row .row-name {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}
.logo-row .row-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  cursor: pointer;
  transition: background 0.2s;
  color: var(--muted);
}
.btn-icon:hover { background: var(--card); color: var(--white); }
.btn-icon svg { width: 16px; height: 16px; }

.card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 24px;
}

.btn-secondary {
  height: 36px;
  padding: 0 16px;
  border-radius: 500px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-secondary:hover { background: var(--border); }

.btn-primary-sm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 500px;
  background: linear-gradient(180deg, #BEE54E 0%, #DDFB86 100%);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
  border: none;
  box-shadow: 0 0 60px -10px rgba(221, 251, 134, 0.4);
}
.btn-primary-sm:hover { opacity: 0.88; }
.btn-primary-sm svg { width: 16px; height: 16px; }

/* Stat cards */
.stat-card {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 20px;
}
.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stat-card-label {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.stat-card-badge {
  padding: 2px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
}
.stat-card-badge.lime   { color: var(--lime);   background: rgba(221, 251, 134, 0.1); }
.stat-card-badge.orange { color: var(--orange); background: rgba(236, 112, 95, 0.1); }
.stat-card-value {
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 600;
}

.rules-card {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 20px;
}
.rules-card h4 {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
  font-weight: 400;
}
.rules-card h4 svg { display: inline; vertical-align: middle; margin-right: 8px; width: 14px; height: 14px; }
.rules-card ul {
  margin-top: 12px;
  list-style: none;
  padding: 0;
}
.rules-card li {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 8px;
}
.rules-card li:last-child { margin-bottom: 0; }
.rules-card li::before { content: "\2022 "; margin-right: 4px; }

/* Admin table */
.admin-table {
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}
.admin-table-head {
  display: grid;
  gap: 16px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(30, 35, 40, 0.4);
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.admin-table-row {
  display: grid;
  gap: 16px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.admin-table-row:last-child { border-bottom: none; }

.cols-logo  { grid-template-columns: 1fr 1fr 120px 120px; }
.cols-user  { grid-template-columns: 1fr 1.5fr 100px 140px 120px; }

.table-name {
  display: flex;
  align-items: center;
  gap: 12px;
}
.table-thumb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--card);
  flex-shrink: 0;
}
.table-thumb svg { width: 16px; height: 16px; color: var(--muted); }
.table-name-text {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
}
.table-meta { font-size: 14px; color: var(--muted); }
.table-mono { font-family: var(--font-mono); font-size: 14px; }
.table-actions { display: flex; justify-content: flex-end; gap: 4px; }

.badge {
  display: inline-block;
  padding: 4px 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}
.badge.lime   { color: var(--lime);  background: rgba(221, 251, 134, 0.1); }
.badge.muted  { color: var(--muted); background: var(--card); }

/* Settings */
.settings-grid {
  display: grid;
  gap: 24px;
}
@media (min-width: 768px) { .settings-grid { grid-template-columns: repeat(2, 1fr); } }

.settings-card {
  border: 1px solid var(--border);
  background: var(--card);
  padding: 24px;
}
.settings-card h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}
.settings-field { margin-bottom: 16px; }
.settings-field:last-child { margin-bottom: 0; }
.settings-field label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}


/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.footer {
  padding-bottom: 0;
}
.footer-inner {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  border: 1px solid var(--border);
  height: 64px;
}
.footer-logo {
  display: flex;
  align-items: stretch;
}
.footer-right {
  display: flex;
  align-items: center;
  padding: 0 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--muted);
}
.footer-bottom {
  padding: 20px 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.footer-copy {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}
.footer-copy a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-copy a:hover { opacity: 0.8; }

.footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 24px;
}
.footer-link {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer-link:hover { color: var(--white); }
.footer-link-icon { margin-left: 4px; }
.consent-link {
  color: var(--lime);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.consent-link:hover { opacity: 0.8; }

/* ─────────────────────────────────────────
   ANIMATIONS
───────────────────────────────────────── */
@keyframes pulse-ring {
  0%, 100% { box-shadow: 0 0 0 0 rgba(221, 251, 134, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(221, 251, 134, 0); }
}

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */

/* Tablet */
@media (max-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero-title {
    font-size: clamp(48px, 7vw, 80px);
    text-align: center;
  }
  .hero-tagline { text-align: center; max-width: 100%; }
  .hero-stats { justify-content: center; }
  .hero-note { text-align: center; }
  .login-card { padding: 32px; }

  .navbar-inner {
    height: auto;
    flex-wrap: wrap;
  }
  .nav-logo { height: 64px; }
  .nav-right {
    width: 100%;
    font-size: 12px;
    padding: 10px 20px;
    border-top: 1px solid var(--border);
    justify-content: center;
    text-align: center;
  }

  .lb-title { font-size: clamp(48px, 7vw, 72px); }

  .footer-inner {
    height: auto;
    flex-wrap: wrap;
  }
  .footer-logo {
    width: 100%;
    height: 52px;
    border-bottom: 1px solid var(--border);
  }
  .footer-right {
    width: 100%;
    justify-content: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
  }
}

/* Mobile */
@media (max-width: 640px) {
  .navbar { padding-top: 20px; }
  .nav-logo { height: 52px; }
  .logo-icon-wrap { width: 52px; }
  .logo-name { font-size: 8.5px; }
  .nav-right { font-size: 10px; padding: 10px 14px; }

  .hero { padding-top: 40px; padding-bottom: 40px; }
  .hero-title { font-size: clamp(38px, 11vw, 60px); }
  .hero-tagline { font-size: 11px; }
  .login-card { padding: 24px; }

  .letter-slots { gap: 8px; }
  .letter-slot { width: 48px; height: 64px; font-size: 28px; }
  .answer-pill { padding: 0; }

  .lb-title { font-size: clamp(38px, 11vw, 60px); }
  .podium-name { font-size: 18px; }
  .podium-bar.h-1st { height: 140px; }
  .podium-bar.h-2nd { height: 100px; }
  .podium-bar.h-3rd { height: 72px; }

  .footer-logo { height: 52px; }
  .footer-logo .logo-icon-wrap { width: 52px; }
  .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
  .footer-copy { font-size: 11px; }

  .nav-score { display: none; }
}

@media (max-width: 480px) {
  .stat-badge { padding: 8px 12px; font-size: 10px; }
  .hero-stats { gap: 8px; }
  .hints-row { font-size: 9px; }
}
