/* ============================================================
   Translate the Trend — TNDS 2026
   style.css  —  Full overhaul with fun mechanics styles
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Noto+Sans+Tamil:wght@400;600;700&display=swap');

/* ---------- CSS Custom Properties — Black & Gold theme ---------- */
:root {
  /* Background layers */
  --bg-base:       #000000;
  --bg-surface:    #0A0A0A;
  --bg-card:       #111111;
  --bg-raised:     #1A1A1A;

  /* Gold palette (from TNDS logo) */
  --gold:          #FFB800;
  --gold-bright:   #FFD700;
  --gold-dark:     #CC8800;
  --gold-light:    #FFE566;
  --gold-muted:    #7A5500;

  /* Accent orange (from "2026 | EDITION 3" in logo) */
  --accent:        #FF6B00;
  --accent-light:  #FF9A4D;

  /* Neutrals */
  --white:         #FFFFFF;
  --gray-light:    #888888;
  --gray:          #555555;
  --gray-dark:     #333333;

  /* State colors */
  --danger:        #FF4D6D;
  --success:       #00C48C;

  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  24px;
  --radius-xl:  36px;
  --shadow-gold: 0 4px 24px rgba(255,184,0,0.25);
  --shadow-md:   0 4px 20px rgba(0,0,0,0.6);
  --shadow-lg:   0 8px 40px rgba(0,0,0,0.8);
  --transition:  0.3s cubic-bezier(0.4,0,0.2,1);

  /* Legacy aliases kept for compatibility */
  --purple:        #111111;
  --purple-mid:    #1A1A1A;
  --purple-light:  #FFB800;
  --purple-dark:   #000000;
  --off-white:     #F0F0F0;
  --gray-light-old:#888888;
  --text-primary:  #000000;
  --text-secondary:#555555;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', 'Noto Sans Tamil', sans-serif;
  background: var(--bg-base);
  color: var(--white);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  overflow-x: hidden;
}

/* ---------- App Shell ---------- */
#app {
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}

/* ---------- Screen System ---------- */
.screen {
  display: none;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  padding: 0 20px 40px;
  animation: slideIn 0.4s var(--transition) both;
  position: relative;
}

.screen.active {
  display: flex;
}

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

/* ---------- Summit Header + Logo ---------- */
/* ---------- Landing 3-section flex layout ---------- */
.landing-flex {
  justify-content: space-between !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.landing-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 40px;
  gap: 20px;
  width: 100%;
}

.landing-mid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.landing-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding-bottom: 36px;
  width: 100%;
}

.landing-hashtags {
  font-size: 11px;
  color: rgba(255,255,255,0.25);
  letter-spacing: 1px;
  text-align: center;
}

/* ---------- Summit Header + Logo ---------- */
.summit-header {
  width: 100%;
  text-align: center;
  overflow: hidden;
}

.summit-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.tnds-logo {
  width: 220px;
  /* Crop transparent padding baked into the PNG */
  margin-top: -28px;
  margin-bottom: -28px;
}

.tnds-logo-sm {
  width: 140px;
}

/* Game screen mini logo in header */
.tnds-logo-xs {
  width: 80px;
  height: auto;
  object-fit: contain;
}

/* Legacy: keep summit-tag for any remaining uses */
.summit-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--gold);
  text-transform: uppercase;
  opacity: 0.9;
}

/* ---------- Game Title ---------- */
.game-title {
  text-align: center;
  margin: 0;
}

.game-title h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.15;
  background: linear-gradient(135deg, var(--gold) 0%, #FFF 60%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}

.game-title .subtitle {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 15px;
  color: var(--gold-light);
  opacity: 0.85;
}

/* ---------- Decorative Wave Divider ---------- */
.divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
  margin: 10px auto;
}

/* ---------- Card ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid rgba(255,184,0,0.25);
  border-radius: var(--radius-lg);
  padding: 20px 20px;
  width: 100%;
  box-shadow: var(--shadow-md);
}

/* ---------- Form Elements ---------- */
.input-group {
  width: 100%;
  margin-bottom: 20px;
}

.input-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.text-input {
  width: 100%;
  padding: 16px 18px;
  background: var(--bg-raised);
  border: 1.5px solid var(--gray-dark);
  border-radius: var(--radius-md);
  color: var(--white);
  font-size: 17px;
  font-family: 'Space Grotesk', sans-serif;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.text-input::placeholder {
  color: var(--gray);
}

.text-input:focus {
  border-color: var(--gold);
  background: #1F1A00;
}

.tamil-input {
  font-family: 'Noto Sans Tamil', 'Inter', sans-serif;
  font-size: 20px;
  min-height: 80px;
  resize: none;
  line-height: 1.5;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  padding: 14px 28px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  width: 100%;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.15s;
}

.btn:active::after {
  background: rgba(255,255,255,0.12);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #FFB800 100%);
  color: var(--purple-dark);
  box-shadow: 0 4px 20px rgba(255,215,0,0.35);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(255,215,0,0.5);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--bg-raised);
  color: var(--white);
  border: 1.5px solid var(--gray-dark);
}

.btn-secondary:hover {
  background: #2A2A2A;
  border-color: var(--gray);
}

.btn-ghost {
  background: transparent;
  color: var(--gold-light);
  font-size: 14px;
  min-height: 40px;
  padding: 8px 16px;
}

/* ---------- Hint Button ---------- */
.hint-btn {
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
  font-size: 14px;
  min-height: 44px;
  border-radius: var(--radius-md);
  letter-spacing: 0.3px;
  transition: all var(--transition);
}

.hint-btn:hover:not(:disabled) {
  background: rgba(255,215,0,0.12);
  box-shadow: 0 0 14px rgba(255,215,0,0.3);
}

.hint-btn.hint-disabled,
.hint-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: rgba(255,215,0,0.3);
  color: rgba(255,215,0,0.4);
}

/* Hint reveal box */
.hint-reveal {
  background: rgba(255,215,0,0.08);
  border: 1px solid rgba(255,215,0,0.3);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 14px;
  color: var(--gold-light);
  text-align: center;
  line-height: 1.8;
  animation: popIn 0.3s cubic-bezier(0.34,1.56,0.64,1) both;
}

/* ---------- Share Buttons ---------- */
.share-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  width: 100%;
}

.share-btn {
  font-size: 11px !important;
  min-height: 52px;
  border-radius: var(--radius-md);
  flex-direction: column;
  gap: 3px;
  padding: 8px 4px;
}

.btn-whatsapp  { background: #25D366; color: var(--white); }
.btn-instagram { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); color: var(--white); }
.btn-facebook  { background: #1877F2; color: var(--white); }
.btn-linkedin  { background: #0077B5; color: var(--white); }

/* ---------- Progress / Timer ---------- */
.timer-block {
  width: 100%;
  margin-bottom: 16px;
}

.timer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.timer-label {
  font-size: 13px;
  color: var(--gold-light);
  font-weight: 600;
}

.timer-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  min-width: 32px;
  text-align: right;
  transition: color 0.3s;
}

.timer-value.urgent {
  color: var(--danger);
  animation: pulse 0.6s ease infinite;
}

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

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: var(--bg-raised);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright));
  transition: width 1s linear, background 0.5s;
}

.progress-bar-fill.urgent {
  background: linear-gradient(90deg, var(--danger), #FF8C00);
}

/* ---------- Round Progress Dots ---------- */
.round-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 16px;
}

.round-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.3);
  transition: all 0.3s;
}

.round-dot.done {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(255,215,0,0.6);
}

.round-dot.current {
  background: var(--gold);
  border-color: var(--white);
  transform: scale(1.2);
}

/* Bonus dot — 5th dot gets a star glow */
.round-dot.bonus-dot {
  border-color: var(--gold);
  box-shadow: 0 0 6px rgba(255,215,0,0.4);
}

/* ---------- Running Score ---------- */
.running-score-display {
  font-size: 20px;
  font-weight: 800;
  color: var(--gold);
  transition: transform 0.2s;
}

.running-score-display.score-jump {
  animation: scoreJump 0.4s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes scoreJump {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.4); }
  100% { transform: scale(1); }
}

/* ---------- Streak Badge ---------- */
.streak-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #FF6B00, #FF4500);
  color: var(--white);
  font-size: 14px;
  font-weight: 800;
  padding: 6px 18px;
  border-radius: 100px;
  margin-bottom: 10px;
  box-shadow: 0 0 16px rgba(255,107,0,0.5);
  animation: streakPulse 1.5s ease-in-out infinite;
  align-self: center;
}

@keyframes streakPulse {
  0%, 100% { box-shadow: 0 0 16px rgba(255,107,0,0.5); }
  50%       { box-shadow: 0 0 28px rgba(255,107,0,0.8); }
}

.streak-badge.streak-pop {
  animation: streakPop 0.5s cubic-bezier(0.34,1.56,0.64,1) both, streakPulse 1.5s ease-in-out 0.5s infinite;
}

@keyframes streakPop {
  0%   { transform: scale(0.7); opacity: 0; }
  60%  { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- Bonus Round Banner ---------- */
.bonus-banner {
  width: 100%;
  background: linear-gradient(135deg, #7B2FFF, #FFD700);
  color: var(--white);
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  margin-top: 12px;
  margin-bottom: 4px;
  box-shadow: 0 0 24px rgba(255,215,0,0.4);
  animation: bonusGlow 1.2s ease-in-out infinite;
}

@keyframes bonusGlow {
  0%, 100% {
    box-shadow: 0 0 24px rgba(255,215,0,0.4);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 40px rgba(255,215,0,0.7);
    transform: scale(1.01);
  }
}

/* ---------- Term Card ---------- */
.term-card {
  width: 100%;
  background: #0F0E00;
  border: 2px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  text-align: center;
  margin-bottom: 20px;
}

/* Fly-in animation */
.term-card.fly-in {
  animation: flyIn 0.5s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes flyIn {
  from { opacity: 0; transform: translateX(60px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}

.term-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.term-text {
  font-family: 'Noto Sans Tamil', 'Space Grotesk', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 6px;
}

.term-hint {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
}

/* ---------- Countdown Overlay ---------- */
#countdown-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(45,0,80,0.75);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 900;
  pointer-events: none;
}

#countdown-number {
  font-size: 120px;
  font-weight: 800;
  color: var(--gold);
  text-shadow: 0 0 40px rgba(255,215,0,0.7);
  line-height: 1;
}

.countdown-pop {
  animation: countdownPop 0.8s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes countdownPop {
  0%   { transform: scale(1.8); opacity: 0; }
  40%  { opacity: 1; }
  80%  { transform: scale(0.95); }
  100% { transform: scale(1); opacity: 1; }
}

/* ---------- Feedback / Score Block ---------- */
.feedback-card {
  width: 100%;
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes popIn {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

.feedback-card.great   { background: rgba(0,196,140,0.15); border: 2px solid rgba(0,196,140,0.5); }
.feedback-card.good    { background: rgba(255,215,0,0.1);  border: 2px solid rgba(255,215,0,0.4); }
.feedback-card.okay    { background: rgba(155,48,255,0.15); border: 2px solid rgba(155,48,255,0.4); }
.feedback-card.partial { background: rgba(155,48,255,0.1);  border: 2px solid rgba(155,48,255,0.3); }
.feedback-card.miss    { background: rgba(255,77,109,0.1);  border: 2px solid rgba(255,77,109,0.4); }

.score-points {
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.score-points.great   { color: var(--success); }
.score-points.good    { color: var(--gold); }
.score-points.okay    { color: var(--purple-light); }
.score-points.partial { color: var(--purple-light); }
.score-points.miss    { color: var(--danger); }

/* Score bounce animation (JS toggles this class) */
.score-bounce {
  animation: scoreBounce 0.6s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes scoreBounce {
  0%   { transform: scale(0.5) rotate(-5deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(2deg); opacity: 1; }
  80%  { transform: scale(0.95); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.feedback-label {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
}

.feedback-ta {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 18px;
  color: var(--gold-light);
}

.feedback-en {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  margin-top: 2px;
}

/* Bonus / streak notes on feedback */
.bonus-note,
.streak-note {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 10px;
}

.bonus-note {
  background: rgba(255,215,0,0.2);
  color: var(--gold);
  border: 1px solid rgba(255,215,0,0.5);
}

.streak-note {
  background: rgba(255,107,0,0.2);
  color: #FF8C42;
  border: 1px solid rgba(255,107,0,0.4);
}

.official-answer {
  background: rgba(0,0,0,0.2);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-top: 14px;
}

.official-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.official-text {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--white);
}

/* ---------- Attempts Indicator ---------- */
.attempts-indicator {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  text-align: center;
  margin: 6px 0 2px;
  letter-spacing: 0.3px;
}

/* ---------- Blocked Screen ---------- */
.blocked-screen {
  width: 100%;
  background: rgba(255,77,109,0.1);
  border: 2px solid rgba(255,77,109,0.4);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  margin-top: 16px;
  animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

.blocked-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.blocked-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 12px;
}

.blocked-msg {
  font-size: 14px;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
  margin-bottom: 16px;
}

.blocked-best {
  display: inline-block;
  background: rgba(255,215,0,0.15);
  border: 1px solid rgba(255,215,0,0.4);
  color: var(--gold);
  font-size: 15px;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: 100px;
}

/* ---------- Results Screen ---------- */
.results-header {
  text-align: center;
  padding: 40px 0 20px;
  width: 100%;
}

.results-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 4px;
}

.total-score-ring {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(var(--gold) var(--pct, 0%), rgba(255,255,255,0.08) 0%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto;
  position: relative;
  box-shadow: 0 0 40px rgba(255,215,0,0.3);
}

.total-score-ring::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--bg-base);
}

.total-score-inner {
  position: relative;
  z-index: 1;
  text-align: center;
}

.total-score-num {
  font-size: 38px;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.total-score-den {
  font-size: 14px;
  color: var(--gray);
  font-weight: 600;
}

/* ---------- Rank Badge ---------- */
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, var(--gold-dark), var(--gold));
  color: var(--purple-dark);
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 10px 0 16px;
  box-shadow: 0 4px 20px rgba(255,215,0,0.4);
}

.rank-icon {
  font-size: 22px;
}

/* ---------- Personality Message ---------- */
.personality-msg {
  text-align: center;
  margin: 4px 0 20px;
}

.personality-ta {
  font-family: 'Noto Sans Tamil', sans-serif;
  font-size: 16px;
  color: var(--gold-light);
  font-weight: 600;
  margin-bottom: 4px;
}

.personality-en {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
}

/* ---------- Fun Stats ---------- */
.fun-stats {
  width: 100%;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 14px;
}

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

.stat-label {
  color: rgba(255,255,255,0.65);
}

.stat-value {
  font-weight: 700;
  color: var(--white);
}

/* ---------- Score Breakdown ---------- */
.score-breakdown {
  width: 100%;
  margin: 4px 0 20px;
}

.breakdown-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-size: 14px;
  color: rgba(255,255,255,0.8);
}

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

.breakdown-term {
  flex: 1;
  font-family: 'Space Grotesk', sans-serif;
}

.breakdown-pts {
  font-weight: 700;
  min-width: 40px;
  text-align: right;
  color: var(--gold);
}

/* ---------- Leaderboard ---------- */
.leaderboard-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.lb-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  margin-bottom: 6px;
  background: transparent;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s;
}

.lb-row:last-child { border-bottom: none; margin-bottom: 0; }

.lb-row.highlight {
  background: rgba(255,184,0,0.07);
  border: 1px solid rgba(255,184,0,0.3);
  border-radius: var(--radius-md);
}

.lb-rank {
  font-size: 16px;
  font-weight: 800;
  min-width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.lb-rank.gold   { color: #FFD700; font-size: 20px; }
.lb-rank.silver { color: #C0C0C0; font-size: 20px; }
.lb-rank.bronze { color: #CD7F32; font-size: 20px; }
.lb-rank.other  { color: var(--gray-light); font-size: 13px; }

.lb-name {
  flex: 1;
  font-size: 15px;
  font-weight: 600;
  color: var(--white);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lb-score {
  font-size: 18px;
  font-weight: 800;
  color: var(--gold);
  flex-shrink: 0;
}

.lb-score-sub {
  font-size: 11px;
  color: var(--gray-light);
  font-weight: 400;
}

/* ---------- Landing screen extras ---------- */
.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0;
}

.pill {
  background: #1A1400;
  border: 1px solid rgba(255,184,0,0.4);
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
}

/* ---------- Share Bonus Message ---------- */
.share-bonus-msg {
  margin-top: 14px;
  background: linear-gradient(135deg, rgba(0,196,140,0.15), rgba(0,196,140,0.05));
  border: 1px solid rgba(0,196,140,0.4);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 700;
  color: #00C48C;
  text-align: center;
  animation: bonusPop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes bonusPop {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

/* ---------- Pre-game Alert Modal ---------- */
.pregame-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pregame-modal {
  background: #0F0E00;
  border: 1.5px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 0 40px rgba(255,184,0,0.25), var(--shadow-lg);
  animation: modalSlideIn 0.35s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(32px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

.pregame-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: 10px;
}

.pregame-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--gold);
  text-align: center;
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.pregame-rules {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.pregame-rule {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: rgba(255,184,0,0.06);
  border: 1px solid rgba(255,184,0,0.18);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

.rule-icon {
  font-size: 22px;
  flex-shrink: 0;
  line-height: 1.3;
}

.pregame-rule strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 3px;
}

.pregame-rule p {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  line-height: 1.5;
  margin: 0;
}

.pregame-btn {
  width: 100%;
  font-size: 16px;
  padding: 16px;
}

/* ---------- Confetti Canvas ---------- */
#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.w-full { width: 100%; }

.emoji-large { font-size: 40px; display: block; margin-bottom: 8px; }
.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 8px;
}

/* ---------- Glow Orbs (decorative) ---------- */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 250px;
  height: 250px;
  background: rgba(255,184,0,0.08);
  top: -80px;
  right: -80px;
}

.orb-2 {
  width: 200px;
  height: 200px;
  background: rgba(255,107,0,0.06);
  bottom: 100px;
  left: -60px;
}

/* All screen children above orbs */
.screen > *:not(.orb) { position: relative; z-index: 1; }

/* ---------- Responsive tweaks ---------- */
@media (max-width: 360px) {
  .game-title h1    { font-size: 26px; }
  .term-text        { font-size: 24px; }
  .total-score-num  { font-size: 32px; }
  #countdown-number { font-size: 88px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
