/* ==========================================================
   FESTIVE PARTY & GARDEN QUEST - DESIGN SYSTEM & STYLES
   ========================================================== */

:root {
  --bg-dark: #0d0e15;
  --bg-card: rgba(26, 29, 45, 0.75);
  --bg-card-hover: rgba(35, 40, 62, 0.9);
  --bg-modal: #161926;
  --border-card: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(245, 158, 11, 0.4);
  
  --primary-pink: #ec4899;
  --primary-purple: #8b5cf6;
  --accent-gold: #f59e0b;
  --accent-emerald: #10b981;
  --accent-red: #ef4444;
  --accent-blue: #3b82f6;

  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.5), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  --shadow-gold: 0 0 25px rgba(245, 158, 11, 0.25);
  --shadow-pink: 0 0 25px rgba(236, 72, 153, 0.25);

  --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-accent: 'Yanone Kaffeesatz', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-dark);
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  line-height: 1.5;
}

/* Ambient Animated Glows */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.glow-1 {
  top: -100px;
  left: -50px;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--primary-pink), transparent 70%);
}
.glow-2 {
  bottom: -50px;
  right: -50px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--primary-purple), transparent 70%);
}
.glow-3 {
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, var(--accent-gold), transparent 70%);
  opacity: 0.15;
}

/* Typography & General Utilities */
.gradient-text {
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 40%, #fbbf24 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hidden {
  display: none !important;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  width: 92%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: rgba(22, 25, 38, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: var(--text-main);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
  animation: slideDownToast 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}
.toast.toast-gold {
  border-color: var(--accent-gold);
  background: linear-gradient(135deg, rgba(35, 30, 20, 0.95), rgba(22, 25, 38, 0.95));
}
.toast.toast-key {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(15, 30, 45, 0.95), rgba(22, 25, 38, 0.95));
}
.toast.toast-burn {
  border-color: var(--accent-red);
}
.toast-title {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.toast-msg {
  font-size: 0.85rem;
  color: var(--text-muted);
}

@keyframes slideDownToast {
  from { opacity: 0; transform: translateY(-30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Screen Management */
.screen {
  display: none;
  position: relative;
  z-index: 1;
  min-height: 100vh;
}
.screen.active {
  display: block;
}

/* ==========================================================
   SCREEN 1: ONBOARDING & PRE-PARTY
   ========================================================== */
#onboarding-screen {
  padding: 24px 16px 40px;
  display: none;
}
#onboarding-screen.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.onboarding-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-card);
  text-align: center;
  animation: fadeIn 0.4s ease-out;
}

.party-badge {
  display: inline-block;
  background: rgba(236, 72, 153, 0.15);
  border: 1px solid rgba(236, 72, 153, 0.3);
  color: #f472b6;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.main-title {
  font-size: 2.2rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.teaser-box {
  background: rgba(245, 158, 11, 0.08);
  border: 1px dashed rgba(245, 158, 11, 0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  text-align: left;
}
.teaser-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.teaser-icon {
  font-size: 1.2rem;
}
.teaser-label {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.teaser-content {
  font-size: 0.92rem;
  color: #fde68a;
  line-height: 1.4;
}

.form-label {
  display: block;
  text-align: left;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.input-group {
  margin-bottom: 20px;
}

input[type="text"] {
  width: 100%;
  background: rgba(15, 18, 28, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  outline: none;
  transition: all 0.2s ease;
}
input[type="text"]:focus {
  border-color: var(--primary-pink);
  box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
}

.avatar-selector {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

.avatar-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  font-size: 1.8rem;
  padding: 10px 0;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.avatar-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: scale(1.08);
}
.avatar-btn.selected {
  background: rgba(236, 72, 153, 0.2);
  border-color: var(--primary-pink);
  box-shadow: var(--shadow-pink);
  transform: scale(1.1);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px 24px;
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
  border: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, #f43f5e 0%, #ec4899 100%);
  color: #fff;
}
.btn-primary:active {
  transform: scale(0.98);
}
.btn-glow {
  box-shadow: 0 10px 25px -5px rgba(236, 72, 153, 0.5);
}
.btn-gold {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #1e1b18;
  font-weight: 900;
}
.btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Lock Section */
.lock-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.lock-card {
  background: rgba(15, 18, 28, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 24px 18px;
}
.lock-icon-wrapper {
  margin-bottom: 12px;
}
.lock-icon {
  font-size: 2.5rem;
  display: inline-block;
  animation: bounceLock 2s infinite ease-in-out;
}
@keyframes bounceLock {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.lock-card h3 {
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 6px;
}
.lock-card p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.input-with-btn {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}
.input-with-btn input {
  flex: 1;
}
.input-with-btn .btn {
  width: auto;
  padding: 0 20px;
}

.irl-note-hint {
  font-size: 0.78rem;
  color: var(--accent-gold);
  line-height: 1.3;
  margin-top: 6px;
  text-align: left;
}

.gps-block {
  margin-top: 16px;
}
.gps-status-text {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 8px;
}

/* ==========================================================
   SCREEN 2: MAIN QUEST HUD & BOARD
   ========================================================== */
#game-screen {
  padding-bottom: 60px;
}

.game-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 14, 21, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-card);
  padding: 12px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header-left {
  display: flex;
  align-items: center;
}
.player-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.06);
  padding: 6px 14px 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.player-avatar-badge {
  font-size: 1.4rem;
  line-height: 1;
}
.player-meta {
  display: flex;
  flex-direction: column;
}
.player-name-text {
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.1;
}
.player-rank-text {
  font-size: 0.72rem;
  color: var(--accent-gold);
  font-weight: 700;
}

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

.score-badge {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(217, 119, 6, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 6px 14px;
  border-radius: 999px;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.score-val {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fbbf24;
}
.score-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.btn-icon {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.game-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px;
}

.status-banner {
  background: rgba(26, 29, 45, 0.6);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.status-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 800;
}
.pulse-dot {
  width: 10px;
  height: 10px;
  background-color: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulseGreen 1.5s infinite;
}
@keyframes pulseGreen {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}
.rule-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* DRINKS GRID */
.drinks-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

/* DRINK CARD */
.drink-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
  user-select: none;
}
.drink-card:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px) scale(1.02);
}
.drink-card:active {
  transform: translateY(-2px) scale(0.98);
}

/* BIG DRINK VARIANT */
.drink-card.card-big {
  grid-column: span 2;
  background: linear-gradient(135deg, rgba(35, 30, 20, 0.8), rgba(26, 29, 45, 0.8));
  border: 1.5px solid var(--border-gold);
  box-shadow: var(--shadow-gold);
  padding: 24px 20px;
}
.drink-card.card-big::before {
  content: "★ VIP БОЛЬШОЙ НАПИТОК ★";
  position: absolute;
  top: 8px;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 1.5px;
  color: #fbbf24;
  opacity: 0.85;
}

/* NUMBER BADGE & ICON */
.card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-bottom: 12px;
}
.drink-number-pill {
  font-family: var(--font-accent);
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.drink-pts-tag {
  font-size: 0.82rem;
  font-weight: 800;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 4px 10px;
  border-radius: 999px;
  transition: all 0.2s ease;
}
.drink-pts-tag.points-dropped {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.drink-illustration {
  font-size: 2.8rem;
  margin: 6px 0 10px;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,0.4));
  transition: transform 0.25s ease;
}
.card-big .drink-illustration {
  font-size: 3.4rem;
  margin: 12px 0 12px;
}
.drink-card:hover .drink-illustration {
  transform: scale(1.15) rotate(-5deg);
}

.drink-card-title {
  font-size: 0.95rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.2;
}
.card-big .drink-card-title {
  font-size: 1.15rem;
}

/* Card Status Badges */
.card-status-badge {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.status-available {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.status-searching {
  background: rgba(59, 130, 246, 0.2);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.4);
}
.status-eliminated {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.status-claimed {
  background: rgba(100, 116, 139, 0.25);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.3);
}

/* CLAIMED STATE OVERLAY */
.drink-card.card-claimed {
  opacity: 0.6;
  filter: grayscale(0.5);
  cursor: default;
}
.drink-card.card-claimed:hover {
  transform: none;
}

/* ELIMINATED STATE OVERLAY */
.drink-card.card-eliminated {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(30, 15, 20, 0.7);
}

/* ==========================================================
   MODALS
   ========================================================== */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.modal-card {
  position: relative;
  background: var(--bg-modal);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 28px 22px;
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal-backdrop.active .modal-card {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-muted);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}
.modal-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.modal-badge-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.drink-num-badge {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
}
.drink-pts-badge {
  font-size: 0.85rem;
  font-weight: 900;
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  padding: 2px 10px;
  border-radius: 999px;
}

.modal-drink-title {
  font-size: 1.4rem;
  font-weight: 900;
  margin-bottom: 16px;
}

/* QUIZ STYLES */
.quiz-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 16px;
}
.quiz-label {
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--primary-pink);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.quiz-question {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 12px;
}
.quiz-warning-text {
  font-size: 0.78rem;
  color: #f87171;
  background: rgba(239, 68, 68, 0.1);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  line-height: 1.3;
}

.quiz-options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.quiz-option-btn:hover:not(:disabled) {
  background: rgba(236, 72, 153, 0.15);
  border-color: var(--primary-pink);
  transform: translateX(4px);
}
.quiz-option-btn:active:not(:disabled) {
  transform: scale(0.98);
}

/* BURNED / ELIMINATED OPTION */
.quiz-option-btn.burned {
  opacity: 0.4;
  text-decoration: line-through;
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
  cursor: not-allowed;
}
.burned-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #f87171;
  text-decoration: none;
}

/* HINT BOX */
.hint-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 78, 59, 0.2));
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg);
  padding: 20px 18px;
  text-align: center;
}
.hint-success-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}
.hint-icon {
  font-size: 1.5rem;
}
.hint-success-header h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #34d399;
}
.hint-body {
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
}
.hint-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ecfdf5;
  line-height: 1.4;
}

.claim-action-box {
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.claim-guide-text {
  font-size: 0.88rem;
  color: #ecfdf5;
  margin-bottom: 16px;
  line-height: 1.4;
}

/* ELIMINATED / CLAIMED BOXES */
.eliminated-box, .claimed-box {
  text-align: center;
  padding: 30px 16px;
}
.eliminated-icon, .claimed-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}
.eliminated-box h3 {
  color: #f87171;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.claimed-box h3 {
  color: var(--text-muted);
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 8px;
}
.claimed-box p, .eliminated-box p {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.claimed-photo-preview {
  margin-top: 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  max-height: 200px;
}
.claimed-photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ==========================================================
   MODAL 2: AI SCANNER MODAL
   ========================================================== */
.ai-modal-card {
  text-align: center;
}
.ai-modal-title {
  font-size: 1.3rem;
  font-weight: 900;
  margin-bottom: 16px;
}
.ai-preview-container {
  position: relative;
  width: 100%;
  height: 240px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
  margin-bottom: 18px;
}
.ai-preview-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ai-scanner-line {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, transparent, #38bdf8, #ec4899, transparent);
  box-shadow: 0 0 15px #38bdf8;
  animation: scanMove 2s infinite ease-in-out;
}
@keyframes scanMove {
  0% { top: 0%; opacity: 0.8; }
  50% { top: 95%; opacity: 1; }
  100% { top: 0%; opacity: 0.8; }
}

.ai-status-box {
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 18px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.ai-loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--primary-pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.ai-status-message {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
}

/* ==========================================================
   MODAL 3: LEADERBOARD DRAWER
   ========================================================== */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.drawer-header h2 {
  font-size: 1.4rem;
  font-weight: 900;
}
.leaderboard-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leaderboard-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  transition: all 0.2s ease;
}
.leaderboard-item.top-1 {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(22, 25, 38, 0.6));
  border-color: rgba(245, 158, 11, 0.4);
}
.leaderboard-item.is-me {
  border-color: var(--primary-pink);
  background: rgba(236, 72, 153, 0.1);
}

.lb-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lb-rank {
  font-weight: 900;
  font-size: 1.1rem;
  width: 24px;
  text-align: center;
}
.lb-avatar {
  font-size: 1.5rem;
}
.lb-player-info {
  display: flex;
  flex-direction: column;
}
.lb-name {
  font-weight: 800;
  font-size: 0.95rem;
}
.lb-stats {
  font-size: 0.75rem;
  color: var(--text-dim);
}
.lb-score {
  font-size: 1.15rem;
  font-weight: 900;
  color: #fbbf24;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
