/* ── Google Fonts ─────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800;900&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ── Design Tokens ────────────────────────────────────────────── */
:root {
  --orange: #F4D03F;      /* Magical Gold */
  --orange-light: #F9E79F;
  --red: #00e5ff;         /* IPL Neon Cyan */
  --navy: #0f0c29;        /* Deep Mystical Indigo */
  --navy-mid: #24243e;
  --navy-card: #302b63;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(244, 208, 63, 0.25); /* Subtle gold border */
  --glass-hover: rgba(255, 255, 255, 0.1);
  --text-primary: #F0F0FF;
  --text-muted: #AAB7CC;
  --glow-orange: 0 0 30px rgba(244, 208, 63, 0.4);
  --glow-red: 0 0 30px rgba(0, 229, 255, 0.4);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--navy);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Animated Background ──────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(244, 208, 63, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 90%, rgba(0, 229, 255, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(15, 12, 41, 0.85) 0%, transparent 80%);
  pointer-events: none;
  z-index: 0;
}

/* Floating orbs */
body::after {
  content: '';
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.06) 0%, transparent 70%);
  top: -200px;
  right: -200px;
  animation: orbFloat 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes orbFloat {
  from {
    transform: translate(0, 0) scale(1);
  }

  to {
    transform: translate(-40px, 60px) scale(1.1);
  }
}

/* ── App Container ────────────────────────────────────────────── */
#app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* ── Screens ──────────────────────────────────────────────────── */
.screen {
  display: none;
  width: 100%;
  max-width: 640px;
  animation: screenIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.screen.active {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Glass Card ───────────────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 32px;
  width: 100%;
}

/* ── TOP NAV ──────────────────────────────────────────────────── */
.top-nav {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
}

.nav-brand {
  font-family: 'Cinzel', serif;
  font-size: 22px;
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange-light), var(--red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.5px;
}

.lang-select {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  outline: none;
  cursor: pointer;
  appearance: none;
}
.lang-select:focus {
  border-color: var(--orange-light);
}
.lang-select option {
  background: var(--navy-card);
  color: var(--text-primary);
}

/* ── SPLASH SCREEN ────────────────────────────────────────────── */
#splash-screen {
  text-align: center;
  gap: 32px;
  padding-top: 60px; /* space for nav */
}

.splash-hero {
  position: relative;
  width: 300px;
  height: 300px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.splash-glow {
  position: absolute;
  inset: -10px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  border-radius: 50%;
  opacity: 0.6;
  filter: blur(25px);
  animation: heroPulse 3s ease-in-out infinite alternate;
}

.splash-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 30px rgba(0,0,0,0.5));
  z-index: 2;
  position: relative;
}

.splash-bubble {
  position: absolute;
  top: -10px;
  right: -80px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  padding: 12px 18px;
  border-radius: 18px 18px 18px 0;
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
  max-width: 180px;
  text-align: center;
  z-index: 10;
  animation: bubbleFloat 4s ease-in-out infinite alternate;
  pointer-events: none;
}

.splash-bubble::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  border-width: 10px 10px 0 0;
  border-style: solid;
  border-color: var(--glass-border) transparent transparent transparent;
  filter: blur(0.5px);
}

@keyframes bubbleFloat {
  from { transform: translateY(0) rotate(2deg); }
  to { transform: translateY(-15px) rotate(-1deg); }
}

@keyframes heroPulse {
  0% { transform: scale(0.9); opacity: 0.4; }
  100% { transform: scale(1.1); opacity: 0.8; }
}

.splash-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(28px, 6vw, 44px);
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange-light), var(--red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.splash-subtitle {
  font-size: 17px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 380px;
  margin: 0 auto;
}

.splash-subtitle span {
  color: var(--orange-light);
  font-weight: 600;
}

.splash-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
}

.stat-pill {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 8px 20px;
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-pill strong {
  color: var(--orange-light);
  font-weight: 700;
}

/* ── GAME SCREEN ──────────────────────────────────────────────── */
#game-screen {
  gap: 20px;
}

.game-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.game-brand {
  font-family: 'Cinzel', serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 1px;
}

.question-counter {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

.question-counter span {
  color: var(--orange-light);
  font-weight: 700;
}

/* Progress bar */
.progress-track {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--red));
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
}

/* Candidates count */
.candidates-bar {
  width: 100%;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.candidates-bar span {
  color: var(--orange-light);
  font-weight: 700;
}

/* ── AI & Question Layout ─────────────────────────────────────── */
.ai-question-wrap {
  position: relative;
  display: flex;
  align-items: flex-start;
  width: 100%;
}

.ai-avatar-col {
  position: absolute;
  left: -250px;
  bottom: -40px;
  z-index: 0;
  pointer-events: none;
}

.question-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  z-index: 1;
  position: relative;
}

.ai-avatar {
  width: 300px;
  height: 300px;
  min-width: 300px;
  object-fit: contain;
  border-radius: 50%;
  /* in case image is square, but transparent PNG works best */
  position: relative;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3));
}

/* Base thinking state */
.ai-avatar.thinking {
  animation: float 2s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-6px);
  }
}

/* Animations triggered by answer clicks */
.ai-avatar.anim-yes {
  animation: nodYes 0.5s ease;
}

@keyframes nodYes {
  0% {
    transform: translateY(0);
  }

  25% {
    transform: translateY(-8px);
  }

  50% {
    transform: translateY(5px);
  }

  75% {
    transform: translateY(-3px);
  }

  100% {
    transform: translateY(0);
  }
}

.ai-avatar.anim-no {
  animation: shakeNo 0.5s ease;
}

@keyframes shakeNo {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-8px) rotate(-5deg);
  }

  50% {
    transform: translateX(8px) rotate(5deg);
  }

  75% {
    transform: translateX(-4px) rotate(-2deg);
  }

  100% {
    transform: translateX(0);
  }
}

.ai-avatar.anim-maybe {
  animation: tiltMaybe 0.6s ease;
}

@keyframes tiltMaybe {
  0% {
    transform: rotate(0);
  }

  30% {
    transform: rotate(12deg) translateY(-4px);
  }

  70% {
    transform: rotate(-8deg);
  }

  100% {
    transform: rotate(0);
  }
}

.ai-avatar.anim-idk {
  animation: shrugIdk 0.6s ease;
}

@keyframes shrugIdk {
  0% {
    transform: scale(1);
  }

  40% {
    transform: scale(0.9) translateY(4px);
  }

  70% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.ai-label {
  font-size: 12px;
  color: var(--orange);
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Question Card ────────────────────────────────────────────── */
.question-card {
  width: 100%;
  animation: questionIn 0.45s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes questionIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.97);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.question-text {
  font-size: clamp(18px, 4vw, 22px);
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-primary);
  min-height: 64px;
}

.thinking-dots {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  height: 22px;
}

.thinking-dots span {
  width: 7px;
  height: 7px;
  background: var(--orange);
  border-radius: 50%;
  animation: dotBounce 1.2s ease-in-out infinite;
}

.thinking-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.thinking-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes dotBounce {

  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }

  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Answer Buttons ───────────────────────────────────────────── */
.answers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
}

.answer-btn {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}

.answer-btn .btn-icon {
  font-size: 20px;
  transition: transform var(--transition);
}

.answer-btn:hover {
  background: var(--glass-hover);
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.15);
}

.answer-btn:active {
  transform: translateY(0) scale(0.97);
}

/* Ripple effect */
.answer-btn::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  width: 0;
  height: 0;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.4s, height 0.4s, opacity 0.4s;
  opacity: 0;
}

.answer-btn:active::after {
  width: 200px;
  height: 200px;
  opacity: 0;
}

/* Per-button colors */
.btn-yes {
  --accent-color: #22C55E;
}

.btn-no {
  --accent-color: #EF4444;
}

.btn-maybe {
  --accent-color: #F59E0B;
}

.btn-idk {
  --accent-color: #8B5CF6;
}

.answer-btn:hover {
  border-color: var(--accent-color);
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.2);
}

.btn-yes:hover {
  box-shadow: 0 4px 24px rgba(34, 197, 94, 0.2);
}

.btn-no:hover {
  box-shadow: 0 4px 24px rgba(239, 68, 68, 0.2);
}

.btn-maybe:hover {
  box-shadow: 0 4px 24px rgba(245, 158, 11, 0.2);
}

.btn-idk:hover {
  box-shadow: 0 4px 24px rgba(139, 92, 246, 0.2);
}

.answer-btn.selected {
  border-color: var(--accent-color);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

/* ── Primary CTA Button ───────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 40px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  color: #fff;
  border: none;
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 24px rgba(255, 107, 0, 0.4);
  letter-spacing: 0.3px;
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity var(--transition);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(255, 107, 0, 0.55);
}

.btn-primary:hover::before {
  opacity: 1;
}

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

/* ── Secondary Button ─────────────────────────────────────────── */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 28px;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--glass-hover);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ── GUESS SCREEN ─────────────────────────────────────────────── */
#guess-screen {
  gap: 24px;
  text-align: center;
}

.guess-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.guess-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.guess-reaction-bubble {
  background: var(--orange);
  color: #fff;
  padding: 10px 20px;
  border-radius: 20px 20px 20px 0;
  font-size: 15px;
  font-weight: bold;
  box-shadow: 0 10px 20px rgba(255, 126, 95, 0.3);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  opacity: 0;
}

@keyframes popIn {
  from { transform: scale(0.5) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

.player-reveal-card {
  width: 100%;
  animation: revealDrama 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(145deg, rgba(15, 12, 41, 0.8), rgba(48, 43, 99, 0.6));
}

.player-photo-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
}

.player-photo-glow {
  position: absolute;
  inset: -8px;
  background: var(--gold);
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(12px);
  animation: pulseGlow 2s ease-in-out infinite;
}

.player-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  position: relative;
  z-index: 2;
  box-shadow: 0 5px 15px rgba(0,0,0,0.5);
}

.player-emoji-wrap {
  width: 100%;
  height: 100%;
  background: var(--glass-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  border: 2px dashed rgba(255, 255, 255, 0.3);
}

@keyframes pulseGlow {
  0%, 100% { transform: scale(1); opacity: 0.2; }
  50% { transform: scale(1.1); opacity: 0.4; }
}

.player-name {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  color: #fff;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
  margin-bottom: 4px;
}

.player-meta {
  font-size: 14px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}

/* ── REASONING SECTION ─────────────────────────────────────────── */
.explanation-container {
  width: 100%;
  margin-bottom: 32px;
  animation: fadeIn 0.8s ease 0.4s forwards;
  opacity: 0;
}

.explanation-title {
  font-family: 'Cinzel', serif;
  font-size: 16px;
  color: var(--orange);
  margin-bottom: 12px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.explanation-box {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
}

.explanation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--text-muted);
}

.explanation-item .check {
  color: #00e5ff;
  font-weight: 900;
}

.explanation-item .cross {
  color: #ff5252;
  font-weight: 900;
}

/* ── DETAILED PLAYER CARD ──────────────────────────────────────── */
.detailed-card-container {
  width: 100%;
  margin: 24px 0 32px;
  animation: revealDrama 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.detailed-card {
  padding: 24px;
  text-align: left;
  border: 1px solid rgba(244, 208, 63, 0.3);
  background: rgba(15, 12, 41, 0.6);
}

.detailed-card h3 {
  font-family: 'Cinzel', serif;
  font-size: 24px;
  margin-bottom: 4px;
  color: var(--gold);
  text-align: center;
}

.detailed-card .player-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 20px;
  display: block;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.stat-value {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 500;
}

.fun-fact-box {
  background: rgba(0, 229, 255, 0.05);
  border-left: 3px solid var(--cyan);
  padding: 12px 16px;
  border-radius: 4px;
}

.fun-fact-label {
  font-size: 12px;
  font-weight: bold;
  color: var(--cyan);
  display: block;
  margin-bottom: 4px;
}

.fun-fact-text {
  font-size: 13px;
  font-style: italic;
  color: var(--text-main);
  line-height: 1.4;
}

/* ── BATTLE MODE CLUES ────────────────────────────────────────── */
.clues-container {
  max-height: 250px;
  overflow-y: auto;
  padding: 4px;
}

.clue-item {
  background: rgba(255, 255, 255, 0.05);
  border-left: 4px solid var(--gold);
  padding: 12px 16px;
  border-radius: 4px 12px 12px 4px;
  font-size: 14px;
  color: var(--text-main);
  animation: clueSlideIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  display: flex;
  align-items: center;
  gap: 12px;
}

.clue-item::before {
  content: '📜';
  font-size: 16px;
}

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

@keyframes revealDrama {
  from {
    opacity: 0;
    transform: scale(0.6) rotate(-5deg);
  }

  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

.player-emoji-wrap {
  width: 140px;
  height: 140px;
  margin: 0 auto 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 70px;
  position: relative;
  animation: revealPulse 2s ease-in-out infinite;
}

.player-emoji-wrap::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange), var(--red), var(--orange));
  z-index: -1;
  animation: borderSpin 3s linear infinite;
}

.player-emoji-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--navy-card);
  z-index: -1;
}

@keyframes borderSpin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes revealPulse {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 0, 0);
  }

  50% {
    box-shadow: 0 0 30px 8px rgba(255, 107, 0, 0.2);
  }
}

.player-name {
  font-family: 'Cinzel', serif;
  font-size: clamp(22px, 5vw, 32px);
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange-light), var(--red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.player-meta {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 20px;
}

.player-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}

.tag {
  padding: 5px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
}

.tag-role {
  background: rgba(255, 107, 0, 0.12);
  border-color: rgba(255, 107, 0, 0.3);
  color: var(--orange-light);
}

.tag-country {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ADE80;
}

.tag-team {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.3);
  color: #A78BFA;
}

.tag-title {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.3);
  color: #FCD34D;
}

.confidence-bar-wrap {
  margin: 16px 0 8px;
}

.confidence-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.confidence-label strong {
  color: var(--orange-light);
}

.confidence-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--orange), var(--red));
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(255, 107, 0, 0.5);
  transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.guess-question {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.guess-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

/* ── RESULT SCREEN ────────────────────────────────────────────── */
#result-screen {
  gap: 24px;
  text-align: center;
}

.result-icon {
  font-size: 80px;
  animation: resultBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes resultBounce {
  from {
    opacity: 0;
    transform: scale(0);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.result-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(20px, 5vw, 28px);
  font-weight: 900;
  background: linear-gradient(135deg, var(--orange-light), var(--red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.result-subtitle {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── CORRECTION SCREEN ────────────────────────────────────────── */
#correction-screen {
  gap: 20px;
}

.correction-title {
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.player-search-wrap {
  position: relative;
  width: 100%;
}

.player-search {
  width: 100%;
  padding: 14px 18px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  outline: none;
  transition: border-color var(--transition);
}

.player-search:focus {
  border-color: var(--orange);
}

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

.player-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--navy-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  max-height: 220px;
  overflow-y: auto;
  z-index: 10;
  display: none;
}

.player-dropdown.open {
  display: block;
}

.dropdown-item {
  padding: 12px 18px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: background var(--transition);
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-item:hover {
  background: var(--glass-hover);
}

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

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

::-webkit-scrollbar-thumb {
  background: rgba(255, 107, 0, 0.3);
  border-radius: 6px;
}

/* ── Utility ──────────────────────────────────────────────────── */
.divider {
  width: 100%;
  height: 1px;
  background: var(--glass-border);
}

.text-muted {
  color: var(--text-muted);
  font-size: 13px;
}

/* ── Fade-out transition ──────────────────────────────────────── */
.fade-out {
  animation: fadeOut 0.3s ease forwards;
}

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

/* ── API Key Card ─────────────────────────────────────────────── */
.api-key-section {
  width: 100%;
}

.api-key-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.api-key-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.api-key-icon {
  font-size: 26px;
}

.api-key-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.optional-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--orange);
  background: rgba(255, 107, 0, 0.12);
  border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: 50px;
  padding: 2px 8px;
}

.api-key-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.api-key-input-wrap {
  display: flex;
  gap: 8px;
}

.api-key-input {
  flex: 1;
  padding: 10px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition);
  letter-spacing: 0.5px;
}

.api-key-input:focus {
  border-color: var(--orange);
}

.api-key-input::placeholder {
  color: var(--text-muted);
  letter-spacing: 0;
}

.api-key-verify-btn {
  padding: 10px 18px;
  background: linear-gradient(135deg, var(--orange), var(--red));
  border: none;
  border-radius: var(--radius-sm);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.api-key-verify-btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.api-key-verify-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.api-key-status {
  font-size: 12px;
  font-weight: 600;
  min-height: 16px;
  transition: all var(--transition);
}

.api-key-status.success {
  color: #4ADE80;
}

.api-key-status.error {
  color: #F87171;
}

.api-key-status.loading {
  color: var(--orange-light);
}

/* ── AI Mode Badge ────────────────────────────────────────────── */
.ai-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.2), rgba(233, 69, 96, 0.2));
  border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  color: var(--orange-light);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 480px) {
  .glass-card {
    padding: 22px 18px;
  }

  .answers-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .answer-btn {
    padding: 14px 10px;
    font-size: 14px;
  }

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

  .btn-primary,
  .btn-secondary {
    width: 100%;
  }
}
