/* ============================================
   GeoQuest - Main Stylesheet
   Design System & Core Styles
   ============================================ */

/* CSS Custom Properties (Design Tokens) */
:root {
  /* Colors - Background */
  --bg-deep: #0c1222;
  --bg-panel: #151d30;
  --bg-card: #1a2540;
  --bg-card-hover: #1f2d4d;
  --bg-input: rgba(15, 23, 42, 0.8);
  
  /* Colors - Primary Gradient */
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-primary-hover: linear-gradient(135deg, #818cf8, #a78bfa);
  
  /* Colors - Success */
  --success-400: #34d399;
  --success-500: #10b981;
  --gradient-success: linear-gradient(135deg, #10b981, #34d399);
  
  /* Colors - Danger */
  --danger-400: #f472b6;
  --danger-500: #ef4444;
  --gradient-danger: linear-gradient(135deg, #ef4444, #f472b6);
  
  /* Colors - Warning/Gold */
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gradient-gold: linear-gradient(135deg, #f59e0b, #fbbf24);
  
  /* Colors - Text */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #818cf8;
  
  /* Colors - Border */
  --border-subtle: rgba(148, 163, 184, 0.15);
  --border-default: rgba(148, 163, 184, 0.25);
  --border-accent: rgba(99, 102, 241, 0.4);
  
  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 20px 40px rgba(8, 15, 40, 0.6);
  --glow-primary: 0 0 30px rgba(99, 102, 241, 0.4);
  --glow-success: 0 0 30px rgba(16, 185, 129, 0.4);
  --glow-danger: 0 0 30px rgba(239, 68, 68, 0.4);
  
  /* Typography */
  --font-heading: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'Outfit', 'Inter', system-ui, sans-serif;
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Border Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
  --transition-slow: 400ms ease;
  
  /* Z-Index Scale */
  --z-base: 1;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-modal: 1000;
  --z-toast: 1100;
  --z-confetti: 1200;
}

/* Light Theme Override */
[data-theme="light"] {
  /* Colors - Background */
  --bg-deep: #f8fafc;
  --bg-panel: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: rgba(255, 255, 255, 0.9);
  
  /* Colors - Primary Gradient (keep vibrant) */
  --primary-400: #818cf8;
  --primary-500: #6366f1;
  --primary-600: #4f46e5;
  --gradient-primary: linear-gradient(135deg, #6366f1, #8b5cf6);
  --gradient-primary-hover: linear-gradient(135deg, #4f46e5, #7c3aed);
  
  /* Colors - Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-accent: #4f46e5;
  
  /* Colors - Border */
  --border-subtle: rgba(148, 163, 184, 0.25);
  --border-default: rgba(148, 163, 184, 0.4);
  --border-accent: rgba(99, 102, 241, 0.4);
  
  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.1);
  --glow-primary: 0 0 20px rgba(99, 102, 241, 0.15);
  --glow-success: 0 0 20px rgba(16, 185, 129, 0.15);
  --glow-danger: 0 0 20px rgba(239, 68, 68, 0.15);
}

/* Light theme specific element overrides */
[data-theme="light"] .app {
  background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
}

[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .hero {
  background: linear-gradient(135deg, #ffffff, #f1f5f9);
  border: 1px solid rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .game-card,
[data-theme="light"] .stats-preview,
[data-theme="light"] .achievements-preview,
[data-theme="light"] .question-area,
[data-theme="light"] .score-display,
[data-theme="light"] .game-header {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .stat-item {
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.15);
}

[data-theme="light"] .answer-option {
  background: #ffffff;
  border: 2px solid rgba(148, 163, 184, 0.3);
  color: #0f172a;
}

[data-theme="light"] .answer-option:hover:not(:disabled):not(.selected) {
  background: #f8fafc;
  border-color: var(--primary-500);
}

[data-theme="light"] .option-text {
  color: #0f172a;
}

[data-theme="light"] .option-key {
  background: rgba(99, 102, 241, 0.15);
  color: #4f46e5;
}

[data-theme="light"] .progress-container {
  background: #e2e8f0;
}

[data-theme="light"] .nav-btn {
  background: rgba(99, 102, 241, 0.08);
  color: #475569;
}

[data-theme="light"] .nav-btn:hover {
  background: rgba(99, 102, 241, 0.15);
  color: #0f172a;
}

[data-theme="light"] .back-btn {
  background: rgba(99, 102, 241, 0.08);
  color: #475569;
}

[data-theme="light"] .modal {
  background: #ffffff;
}

[data-theme="light"] .toast {
  background: #ffffff;
}

[data-theme="light"] .speed-banner {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.05));
}

[data-theme="light"] .particles {
  opacity: 0.2;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* App Container */
.app {
  position: relative;
  min-height: 100vh;
  background: 
    radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    var(--bg-deep);
}

/* Particle Background */
.particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

/* ============================================
   Header
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-xl);
  background: rgba(12, 18, 34, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: transform var(--transition-fast);
}

.header-brand:hover {
  transform: scale(1.02);
}

.logo {
  font-size: 2rem;
  filter: drop-shadow(0 0 10px rgba(99, 102, 241, 0.5));
}

.brand-text {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header-nav {
  display: flex;
  gap: var(--space-sm);
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.nav-btn:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--border-accent);
  color: var(--text-primary);
}

.nav-icon {
  font-size: 1.1rem;
}

/* ============================================
   Main Content
   ============================================ */
.main-content {
  position: relative;
  z-index: var(--z-base);
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: fadeIn 0.3s ease;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  padding: var(--space-2xl);
  background: linear-gradient(135deg, var(--bg-panel), var(--bg-card));
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--space-2xl);
  overflow: hidden;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  display: inline-block;
  padding: var(--space-xs) var(--space-md);
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-full);
  color: var(--text-accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: var(--space-md);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

.gradient-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 500px;
  line-height: 1.7;
}

.hero-globe {
  position: relative;
  flex-shrink: 0;
}

.globe-emoji {
  font-size: 8rem;
  animation: float 4s ease-in-out infinite;
  filter: drop-shadow(0 20px 40px rgba(99, 102, 241, 0.3));
}

/* ============================================
   Section Headers
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ============================================
   Game Cards Grid
   ============================================ */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.game-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  overflow: hidden;
  min-height: 220px;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

.game-card:hover {
  transform: translateY(-4px);
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-md), var(--glow-primary);
}

.game-card:hover::before {
  transform: scaleX(1);
}

.game-card-icon {
  font-size: 3rem;
  margin-bottom: var(--space-md);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.game-card-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.game-card-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
  flex: 1;
}

.game-card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.difficulty-badge {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.difficulty-badge.easy {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success-400);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.difficulty-badge.medium {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold-400);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.difficulty-badge.hard {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger-400);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.game-time {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.game-card-btn {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: var(--gradient-primary);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.game-card-btn:hover {
  background: var(--gradient-primary-hover);
  box-shadow: var(--glow-primary);
}

/* ============================================
   Speed Challenge Banner
   ============================================ */
.speed-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-xl);
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-normal);
  margin-bottom: var(--space-xl);
}

.speed-banner:hover {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(251, 191, 36, 0.15));
  border-color: rgba(245, 158, 11, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(245, 158, 11, 0.2);
}

.speed-banner-content {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.speed-icon {
  font-size: 2.5rem;
  animation: pulse 2s ease-in-out infinite;
}

.speed-text h3 {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--gold-400);
  margin-bottom: var(--space-xs);
}

.speed-text p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.speed-btn {
  padding: var(--space-sm) var(--space-lg);
  background: var(--gradient-gold);
  border: none;
  border-radius: var(--radius-md);
  color: #0c1222;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.speed-btn:hover {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.5);
  transform: scale(1.05);
}

/* ============================================
   Stats Preview
   ============================================ */
.stats-preview {
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}

.stats-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: var(--space-md);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-md);
  background: rgba(15, 23, 42, 0.5);
  border-radius: var(--radius-md);
  text-align: center;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-accent);
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: var(--space-xs);
}

/* ============================================
   Achievements Preview
   ============================================ */
.achievements-preview {
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.achievements-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: var(--space-md);
}

.achievements-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  align-items: center;
}

.achievement {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--bg-panel);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.achievement.locked {
  filter: grayscale(1) opacity(0.4);
}

.achievement.unlocked {
  border-color: var(--gold-400);
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.3);
  animation: achievementPop 0.5s ease;
}

.achievement-more {
  padding: var(--space-sm) var(--space-md);
  background: rgba(99, 102, 241, 0.1);
  border: 1px dashed var(--border-accent);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-md) var(--space-lg);
  border: none;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
}

.btn-primary:hover {
  background: var(--gradient-primary-hover);
  box-shadow: var(--glow-primary);
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid var(--border-accent);
  color: var(--text-accent);
}

.btn-secondary:hover {
  background: rgba(99, 102, 241, 0.25);
}

.btn-success {
  background: var(--gradient-success);
  color: white;
}

.btn-danger {
  background: var(--gradient-danger);
  color: white;
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: 1.1rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  .header {
    padding: var(--space-sm) var(--space-md);
  }
  
  .nav-label {
    display: none;
  }
  
  .main-content {
    padding: var(--space-md);
  }
  
  .hero {
    flex-direction: column;
    text-align: center;
    padding: var(--space-lg);
  }
  
  .hero-subtitle {
    max-width: 100%;
  }
  
  .globe-emoji {
    font-size: 5rem;
  }
  
  .speed-banner {
    flex-direction: column;
    text-align: center;
  }
  
  .speed-banner-content {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .brand-text {
    font-size: 1.2rem;
  }
  
  .hero-title {
    font-size: 1.75rem;
  }
  
  .game-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Online Indicator
   ============================================ */
/* ============================================
   Online Indicator
   ============================================ */
.online-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1px solid transparent;
}

.online-indicator:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
}

.online-indicator.online {
  color: var(--success-400);
}

.online-indicator.online .indicator-dot {
  animation: pulse 2s infinite;
  box-shadow: 0 0 8px rgba(74, 222, 128, 0.4);
  border-radius: 50%;
}

.online-indicator.offline {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
}

/* Body mode styles */
body.mode-online {
  /* Subtle green tint for online mode */
}

body:not(.mode-online) .online-only-feature {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(1);
}

/* ============================================
   Game Mode Themes
   ============================================ */
#game-screen[data-mode="flags"] {
  --mode-primary: #6366f1;
  --mode-accent: #818cf8;
  --mode-bg: linear-gradient(135deg, rgba(30, 27, 75, 0.95), rgba(49, 46, 129, 0.9));
}

#game-screen[data-mode="capitals"] {
  --mode-primary: #f59e0b;
  --mode-accent: #fbbf24;
  --mode-bg: linear-gradient(135deg, rgba(69, 26, 3, 0.95), rgba(120, 53, 15, 0.9));
}

#game-screen[data-mode="shapes"] {
  --mode-primary: #10b981;
  --mode-accent: #34d399;
  --mode-bg: linear-gradient(135deg, rgba(2, 44, 34, 0.95), rgba(6, 78, 59, 0.9));
}

#game-screen[data-mode="facts"] {
  --mode-primary: #8b5cf6;
  --mode-accent: #a78bfa;
  --mode-bg: linear-gradient(135deg, rgba(46, 16, 101, 0.95), rgba(76, 29, 149, 0.9));
}

#game-screen[data-mode="speed"] {
  --mode-primary: #ef4444;
  --mode-accent: #f87171;
  --mode-bg: linear-gradient(135deg, rgba(69, 10, 10, 0.95), rgba(127, 29, 29, 0.9));
}

#game-screen[data-mode] {
  background: var(--mode-bg, var(--bg-deep));
  transition: background 0.5s ease;
}

#game-screen[data-mode] .game-mode-label {
  color: var(--mode-accent, var(--text-accent));
}

#game-screen[data-mode] .progress-bar {
  background: var(--mode-primary, var(--primary-500));
}

/* ============================================
   Flag Display (Real Images)
   ============================================ */
.flag-display {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  background: var(--bg-panel);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-lg);
}

.flag-display img {
  max-width: 280px;
  max-height: 180px;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-normal);
}

.flag-display img:hover {
  transform: scale(1.05);
}

/* Emoji flag fallback */
.flag-display .flag-emoji {
  font-size: 8rem;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
}

/* ============================================
   Shape Shifter Styles
   ============================================ */
.shape-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-xl);
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-lg);
  min-height: 250px;
}

.country-silhouette {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 200px;
  height: 200px;
  position: relative;
}

.silhouette-image {
  max-width: 180px;
  max-height: 180px;
  width: auto;
  height: auto;
  transition: filter 0.5s ease;
}

.hint-indicators {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.hint-dot {
  width: 10px;
  height: 10px;
  background: rgba(16, 185, 129, 0.3);
  border-radius: 50%;
  transition: all var(--transition-fast);
}

.hint-dot.used {
  background: var(--success-400);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.hints-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.hint-btn {
  padding: var(--space-sm) var(--space-lg);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: var(--radius-md);
  color: var(--success-400);
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.hint-btn:hover:not(:disabled) {
  background: rgba(16, 185, 129, 0.25);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.2);
}

.hint-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.revealed-hints {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: 100%;
  max-width: 400px;
}

.hint-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.hint-icon {
  font-size: 1.1rem;
}

/* ============================================
   Capital Cities Type Input Styles
   ============================================ */
.capital-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-xl);
  font-size: 1.5rem;
  font-weight: 600;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(251, 191, 36, 0.1));
  border: 2px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-xl);
  margin-bottom: var(--space-lg);
}

.capital-display img {
  width: 60px;
  height: auto;
  border-radius: var(--radius-sm);
}

/* ============================================
   Loading State
   ============================================ */
.hero.loading::after {
  content: "Loading countries...";
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  padding: var(--space-sm) var(--space-md);
  background: rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-md);
  color: var(--text-accent);
  font-size: 0.85rem;
  animation: pulse 1.5s ease-in-out infinite;
}
