:root {
  /* Vibrant Brand Colors - Modern Purple Theme */
  --brand-50: #F8F6FF;
  --brand-100: #F1ECFF;
  --brand-200: #E4D9FF;
  --brand-300: #D1BBFF;
  --brand-400: #B794FF;
  --brand-500: #6366f1;
  --brand-600: #524CE6;
  --brand-700: #4338CA;
  --brand-800: #3730A3;
  --brand-900: #312E81;

  /* Trivia Night Color Palette */
  --primary: #6366f1;      /* Vibrant Purple */
  --orange: #f59e0b;       /* Energetic Orange */
  --electric: #06b6d4;     /* Electric Blue */
  --pink: #ec4899;         /* Hot Pink */
  --lime: #84cc16;         /* Lime Green */
  
  /* Enhanced Theme Colors */
  --bg: #0a0a0f;
  --bg-gradient: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #16213e 100%);
  --surface: rgba(17, 24, 39, 0.9);
  --surface-2: rgba(15, 23, 42, 0.95);
  --surface-glass: rgba(255, 255, 255, 0.05);
  --text: #f8fafc;
  --text-secondary: #cbd5e1;
  --muted: #94a3b8;
  --success: var(--lime);
  --warning: var(--orange);
  --danger: #ef4444;
  --info: var(--electric);

  /* Modern Layout */
  --radius: 20px;
  --radius-sm: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Enhanced Typography */
  --font-family: 'Inter', 'SF Pro Display', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-black: 900;
  
  /* Modern Shadows & Effects */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.1);
  --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.2), 0 2px 4px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 10px 10px -5px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.4);
  --shadow-glow: 0 0 20px rgb(99 102 241 / 0.3);
  --shadow-orange-glow: 0 0 20px rgb(245 158 11 / 0.3);
  --shadow-pink-glow: 0 0 20px rgb(236 72 153 / 0.3);
  
  /* Animations */
  --transition-fast: 0.15s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.3s ease;
  --bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--pink) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--orange) 0%, var(--electric) 100%);
  --gradient-success: linear-gradient(135deg, var(--lime) 0%, var(--electric) 100%);
  --gradient-rainbow: linear-gradient(135deg, var(--primary) 0%, var(--pink) 25%, var(--orange) 50%, var(--electric) 75%, var(--lime) 100%);
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-modal: 1050;
  --z-toast: 1100;
}/* Modern Typography & Layout */
body {
  font-family: var(--font-family);
  color: var(--text);
  background: var(--bg-gradient);
  background-attachment: fixed;
  min-height: 100vh;
  font-weight: 400;
  line-height: 1.6;
}

/* Animated Background */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(236, 72, 153, 0.1) 0%, transparent 50%),
              radial-gradient(circle at 40% 60%, rgba(245, 158, 11, 0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
  animation: backgroundShift 20s ease-in-out infinite;
}

@keyframes backgroundShift {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(-10px, -10px) rotate(1deg); }
  66% { transform: translate(10px, -5px) rotate(-1deg); }
}

/* Modern Button System */
.btn-primary {
  background: var(--gradient-primary);
  border: none;
  color: white;
  font-weight: var(--font-weight-semibold);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow), var(--shadow-glow);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:hover::before {
  left: 100%;
}

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

.btn-primary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn-secondary {
  background: var(--surface-glass);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  backdrop-filter: blur(10px);
  font-weight: var(--font-weight-medium);
  transition: all var(--transition-base);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
  color: var(--text);
}

.btn-success {
  background: var(--gradient-success);
  border: none;
  color: white;
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow), 0 0 20px rgb(132 204 22 / 0.3);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 25px rgb(132 204 22 / 0.4);
}

.btn-warning {
  background: var(--gradient-secondary);
  border: none;
  color: white;
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow), var(--shadow-orange-glow);
}

.btn-warning:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-orange-glow);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border: none;
  color: white;
  font-weight: var(--font-weight-semibold);
  box-shadow: var(--shadow), 0 0 20px rgb(239 68 68 / 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), 0 0 25px rgb(239 68 68 / 0.4);
}

.btn-outline-primary {
  border: 2px solid var(--primary);
  color: var(--primary);
  background: transparent;
  font-weight: var(--font-weight-semibold);
  transition: all var(--transition-base);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-glow);
}

/* Mobile-first button sizing */
.btn-lg {
  min-height: 48px;
  padding: var(--space-3) var(--space-6);
  font-size: 1.1rem;
  font-weight: 600;
}

@media (min-width: 768px) {
  .btn-lg {
    min-height: 56px;
    padding: var(--space-4) var(--space-8);
  }
}

/* Modern Card System */
.card {
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: var(--shadow-lg);
  position: relative;
  transition: all var(--transition-base);
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--gradient-rainbow);
  opacity: 0.5;
}

.card-hover:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--shadow-xl);
  border-color: rgba(255, 255, 255, 0.2);
}

/* Special Card Variants */
.card-primary {
  border: 1px solid var(--primary);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-success {
  border: 1px solid var(--lime);
  box-shadow: var(--shadow-lg), 0 0 20px rgb(132 204 22 / 0.2);
}

.card-warning {
  border: 1px solid var(--orange);
  box-shadow: var(--shadow-lg), var(--shadow-orange-glow);
}

.card-glass {
  background: var(--surface-glass);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.card-body {
  padding: var(--space-6);
}

@media (min-width: 768px) {
  .card-body {
    padding: var(--space-8);
  }
}

/* Form Controls */
.form-control {
  background: var(--surface-2);
  border-color: rgba(55, 65, 81, 0.5);
  color: var(--text);
  border-radius: var(--radius-sm);
  min-height: 48px;
}

.form-control:focus {
  background: var(--surface-2);
  border-color: var(--brand-500);
  color: var(--text);
  box-shadow: 0 0 0 0.2rem rgba(61, 147, 255, 0.25);
}

.form-control::placeholder {
  color: var(--muted);
}

.form-label {
  color: var(--text);
  font-weight: 500;
  margin-bottom: var(--space-2);
}

/* Layout Utilities */
.stack {
  display: flex;
  gap: var(--space-4);
}

.stack-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.stack-sm {
  gap: var(--space-2);
}

.stack-lg {
  gap: var(--space-6);
}

/* Navigation */
.navbar {
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(55, 65, 81, 0.3);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--brand-400) !important;
}

.nav-link {
  color: var(--text) !important;
  font-weight: 500;
  transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--brand-400) !important;
}

/* Alert Overrides */
.alert {
  border-radius: var(--radius-sm);
  border: none;
  margin-bottom: var(--space-4);
}

.alert-success {
  background: rgba(22, 163, 74, 0.1);
  color: var(--success);
  border-left: 4px solid var(--success);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border-left: 4px solid var(--warning);
}

.alert-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-left: 4px solid var(--danger);
}

/* Focus Styles */
*:focus-visible {
  outline: 2px solid var(--brand-300);
  outline-offset: 2px;
}

/* Interactive States */
.interactive {
  transition: all 0.2s ease;
}

.interactive:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

/* Text Colors */
.text-muted {
  color: var(--muted) !important;
}

.text-brand {
  color: var(--brand-500) !important;
}

/* Badge Overrides */
.badge {
  border-radius: var(--radius-sm);
  font-weight: 500;
  padding: var(--space-1) var(--space-3);
}

/* List Group */
.list-group-item {
  background: var(--surface);
  border-color: rgba(55, 65, 81, 0.3);
  color: var(--text);
}

.list-group-item:hover {
  background: var(--surface-2);
}

/* Game-specific Components */
.question-card {
  background: rgba(17, 24, 39, 0.9);
  border-radius: var(--radius);
  padding: var(--space-6);
  border: 1px solid rgba(55, 65, 81, 0.3);
  margin-bottom: var(--space-4);
}

.choice-btn {
  min-height: 56px;
  text-align: left;
  background: var(--surface);
  border: 2px solid rgba(55, 65, 81, 0.3);
  color: var(--text);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
  transition: all 0.2s ease;
}

.choice-btn:hover {
  border-color: var(--brand-500);
  background: rgba(61, 147, 255, 0.1);
  color: var(--text);
}

.choice-btn:focus-visible {
  outline: 2px solid var(--brand-300);
  outline-offset: 2px;
}

.choice-btn.selected {
  background: var(--brand-500);
  border-color: var(--brand-600);
  color: white;
}

.choice-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Progress Bar */
.progress {
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  height: 8px;
}

.progress-bar {
  background: linear-gradient(90deg, var(--brand-500), var(--brand-400));
  border-radius: var(--radius-sm);
}

/* Responsive Utilities */
@media (max-width: 576px) {
  .container,
  .container-sm,
  .container-md,
  .container-lg,
  .container-xl,
  .container-xxl {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
  
  .card-body {
    padding: var(--space-4);
  }
  
  .btn-lg {
    width: 100%;
    margin-bottom: var(--space-2);
  }
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: var(--space-4);
  right: var(--space-4);
  z-index: var(--z-toast);
}

.toast {
  background: var(--surface);
  color: var(--text);
  border: 1px solid rgba(55, 65, 81, 0.3);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
}

/* Reconnection Banner */
.reconnection-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--warning);
  color: var(--bg);
  padding: var(--space-2);
  text-align: center;
  font-weight: 500;
  z-index: var(--z-modal);
  transform: translateY(-100%);
  transition: transform 0.3s ease;
}

.reconnection-banner.show {
  transform: translateY(0);
}

/* Loading States */
.loading {
  position: relative;
  overflow: hidden;
}

.loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Game Status Indicators */
.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.875rem;
  font-weight: 500;
}

.status-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}

.status-lobby::before { background: var(--warning); }
.status-active::before { background: var(--success); }
.status-completed::before { background: var(--muted); }

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

.slide-up {
  animation: slideUp 0.3s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUp {
  from { 
    opacity: 0; 
    transform: translateY(20px); 
  }
  to { 
    opacity: 1; 
    transform: translateY(0); 
  }
}/* TriviPals Enhanced Design System */

/* Gradient Text Effects */
.text-gradient-primary {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 3s ease-in-out infinite;
}

.text-gradient-secondary {
  background: var(--gradient-secondary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 200% 200%;
  animation: gradientShift 3s ease-in-out infinite;
}

.text-gradient-rainbow {
  background: var(--gradient-rainbow);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-size: 300% 300%;
  animation: rainbowShift 5s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes rainbowShift {
  0%, 100% { background-position: 0% 50%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
}

/* Enhanced Typography */
.display-title {
  font-size: clamp(2.5rem, 8vw, 4rem);
  font-weight: var(--font-weight-black);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.hero-title {
  font-size: clamp(3rem, 10vw, 5rem);
  font-weight: var(--font-weight-black);
  line-height: 0.9;
  letter-spacing: -0.04em;
}

/* Interactive Elements */
.question-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-8);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-slow);
}

.question-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-rainbow);
}

.question-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.answer-option {
  background: var(--surface-glass);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  padding: var(--space-4);
  margin-bottom: var(--space-3);
  cursor: pointer;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.answer-option::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
  transition: left 0.6s ease;
}

.answer-option:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
  transform: translateX(4px);
}

.answer-option:hover::before {
  left: 100%;
}

.answer-option.selected {
  background: var(--gradient-primary);
  border-color: var(--primary);
  color: white;
  box-shadow: var(--shadow-glow);
}

.answer-option.correct {
  background: var(--gradient-success);
  border-color: var(--lime);
  animation: correctPulse 0.6s ease;
}

.answer-option.incorrect {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-color: #ef4444;
  animation: incorrectShake 0.6s ease;
}

@keyframes correctPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes incorrectShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Status Indicators */
.status-indicator {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-weight: var(--font-weight-semibold);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  overflow: hidden;
}

.status-lobby {
  background: linear-gradient(135deg, var(--orange) 0%, #f97316 100%);
  color: white;
  animation: statusPulse 2s ease-in-out infinite;
}

.status-active {
  background: var(--gradient-success);
  color: white;
  animation: statusPulse 2s ease-in-out infinite;
}

.status-completed {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
  color: white;
}

@keyframes statusPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

/* Progress Bars */
.progress {
  height: 8px;
  border-radius: var(--radius);
  background: var(--surface-2);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.progress-bar {
  background: var(--gradient-primary);
  transition: width var(--transition-slow);
  position: relative;
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background: linear-gradient(45deg, 
    transparent 33%, 
    rgba(255,255,255,0.3) 33%, 
    rgba(255,255,255,0.3) 66%, 
    transparent 66%);
  background-size: 20px 20px;
  animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
  0% { background-position: 0 0; }
  100% { background-position: 20px 0; }
}

/* Modern Forms */
.form-section-group {
  background: var(--surface-glass);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin-bottom: var(--space-6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}

.section-title {
  color: var(--text);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-6);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.section-title i {
  color: var(--primary);
  font-size: 1.25em;
}

.field-input, .field-select {
  background: var(--surface-2);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: var(--space-4);
  font-size: 1rem;
  transition: all var(--transition-base);
  width: 100%;
}

.field-input:focus, .field-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
  outline: none;
  background: var(--surface);
}

.field-label {
  color: var(--text);
  font-weight: var(--font-weight-medium);
  margin-bottom: var(--space-2);
  display: block;
}

.field-hint {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: var(--space-1);
}

/* Game Elements */
.game-header-info {
  padding: var(--space-4);
  background: var(--surface-glass);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.team-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: var(--space-6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.team-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gradient-primary);
}

.team-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 255, 255, 0.2);
}

.score-display {
  font-size: 2rem;
  font-weight: var(--font-weight-black);
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Badges and Pills */
.badge {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius);
  font-weight: var(--font-weight-semibold);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-primary {
  background: var(--gradient-primary);
  color: white;
}

.badge-success {
  background: var(--gradient-success);
  color: white;
}

.badge-warning {
  background: var(--gradient-secondary);
  color: white;
}

/* Animations for Trivia Elements */
.bounce-in {
  animation: bounceIn 0.6s var(--bounce);
}

.fade-in {
  animation: fadeIn 0.6s ease;
}

.slide-up {
  animation: slideUp 0.6s ease;
}

@keyframes bounceIn {
  0% { 
    opacity: 0; 
    transform: scale(0.3) translateY(100px); 
  }
  50% { 
    opacity: 1; 
    transform: scale(1.05) translateY(-20px); 
  }
  70% { 
    transform: scale(0.95) translateY(10px); 
  }
  100% { 
    opacity: 1; 
    transform: scale(1) translateY(0); 
  }
}

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

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

/* Responsive Enhancements */
@media (max-width: 768px) {
  .card-body {
    padding: var(--space-4);
  }
  
  .form-section-group {
    padding: var(--space-4);
  }
  
  .question-card {
    padding: var(--space-4);
  }
  
  .display-title {
    font-size: 2rem;
  }
}

/* Loading States */
.loading-shimmer {
  background: linear-gradient(90deg, 
    rgba(255,255,255,0.1) 25%, 
    rgba(255,255,255,0.2) 50%, 
    rgba(255,255,255,0.1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Game Timer */
.timer-display {
  font-size: 1.5rem;
  font-weight: var(--font-weight-bold);
  color: var(--orange);
  background: var(--surface-glass);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.timer-warning {
  animation: timerWarning 1s ease-in-out infinite;
}

@keyframes timerWarning {
  0%, 100% { 
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.3);
  }
  50% { 
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
  }
}

/* ======= CELEBRATION ANIMATIONS ======= */
@keyframes correctPulse {
    0% { transform: scale(1); background-color: inherit; }
    50% { transform: scale(1.05); background-color: rgba(132, 204, 22, 0.2); }
    100% { transform: scale(1); background-color: inherit; }
}

@keyframes incorrectShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes pendingPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes scoreCountUp {
    0% { transform: scale(1.2); color: var(--color-accent); }
    100% { transform: scale(1); color: inherit; }
}

@keyframes slideInRight {
    0% { 
        transform: translateX(100px);
        opacity: 0;
    }
    100% { 
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    0% { 
        transform: translateX(-100px);
        opacity: 0;
    }
    100% { 
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeInUp {
    0% { 
        transform: translateY(30px);
        opacity: 0;
    }
    100% { 
        transform: translateY(0);
        opacity: 1;
    }
}

/* Answer State Classes */
.answer-correct {
    border-color: var(--color-success) !important;
    box-shadow: 0 0 20px rgba(132, 204, 22, 0.3) !important;
}

.answer-incorrect {
    border-color: var(--color-danger) !important;
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3) !important;
}

.answer-pending {
    border-color: var(--color-warning) !important;
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.3) !important;
}

/* Leaderboard Polish */
.leaderboard-item {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.leaderboard-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
    border-left: 4px solid #ffd700;
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), rgba(192, 192, 192, 0.05));
    border-left: 4px solid #c0c0c0;
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1), rgba(205, 127, 50, 0.05));
    border-left: 4px solid #cd7f32;
}

.rank-badge {
    display: inline-block;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-weight: bold;
    font-size: 12px;
    margin-right: 8px;
}

.rank-badge.rank-1 { background: linear-gradient(135deg, #ffd700, #ffed4e); color: #8b5a00; }
.rank-badge.rank-2 { background: linear-gradient(135deg, #c0c0c0, #e5e5e5); color: #666; }
.rank-badge.rank-3 { background: linear-gradient(135deg, #cd7f32, #d4a574); color: #5a3c1a; }

/* Question Animations */
.question-container {
    animation: fadeInUp 0.6s ease-out;
}

.choices-container .choice-item {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

.choices-container .choice-item:nth-child(1) { animation-delay: 0.1s; }
.choices-container .choice-item:nth-child(2) { animation-delay: 0.2s; }
.choices-container .choice-item:nth-child(3) { animation-delay: 0.3s; }
.choices-container .choice-item:nth-child(4) { animation-delay: 0.4s; }

/* Mobile Responsive Animations */
@media (max-width: 768px) {
    @keyframes correctPulse {
        0% { transform: scale(1); }
        50% { transform: scale(1.02); }
        100% { transform: scale(1); }
    }
    
    @keyframes incorrectShake {
        0%, 100% { transform: translateX(0); }
        25% { transform: translateX(-5px); }
        75% { transform: translateX(5px); }
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .question-container,
    .choices-container .choice-item {
        animation: none;
    }
    
    .leaderboard-item {
        transition: none;
    }
    
    .leaderboard-item:hover {
        transform: none;
    }
    
    @keyframes correctPulse,
    @keyframes incorrectShake,
    @keyframes pendingPulse {
        0%, 100% { transform: scale(1); opacity: 1; }
    }
}/*!
 * TriviPals Text Visibility Enhancement
 * Ensures WCAG 2.1 AA compliance (4.5:1 contrast ratio) while preserving brand colors
 */

/* ========================================
   CORE TEXT VISIBILITY IMPROVEMENTS
   ======================================== */

/* Enhanced Text Color Variables */
:root {
    /* High Contrast Text Colors */
    --text-dark: #111827;           /* Tailwind gray-900 for light backgrounds */
    --text-light: #ffffff;          /* White for dark/colored backgrounds */
    --text-muted: #374151;          /* Improved gray-700 for secondary text */
    --text-disabled: #6b7280;       /* Gray-500 for disabled states */
    
    /* Text Shadow for Overlay Text */
    --text-shadow-strong: 0 2px 4px rgba(0, 0, 0, 0.8);
    --text-shadow-medium: 0 1px 3px rgba(0, 0, 0, 0.6);
    --text-shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.4);
    
    /* Dark Overlay for Images */
    --overlay-dark: rgba(0, 0, 0, 0.5);
    --overlay-medium: rgba(0, 0, 0, 0.3);
    --overlay-subtle: rgba(0, 0, 0, 0.15);
}

/* ========================================
   TEXT ON LIGHT BACKGROUNDS
   ======================================== */

/* Ensure dark text on all light backgrounds */
.bg-white,
.bg-light,
.bg-gray-50,
.bg-gray-100,
.card-body,
.modal-body,
.table,
.form-control,
.dropdown-menu {
    color: var(--text-dark) !important;
}

/* Secondary text on light backgrounds */
.text-muted,
.text-secondary,
.small,
.form-text {
    color: var(--text-muted) !important;
}

/* ========================================
   TEXT ON DARK/COLORED BACKGROUNDS
   ======================================== */

/* White text with shadow on dark/gradient backgrounds */
.bg-primary,
.bg-secondary,
.bg-success,
.bg-danger,
.bg-warning,
.bg-info,
.bg-dark,
.navbar-dark,
.card-header,
.alert-primary,
.alert-secondary,
.alert-success,
.alert-danger,
.alert-warning,
.alert-info,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-dark {
    color: var(--text-light) !important;
    text-shadow: var(--text-shadow-medium);
}

/* Enhanced hero section text */
.hero-section,
.hero-title,
.hero-subtitle,
.hero-badge {
    color: var(--text-light) !important;
    text-shadow: var(--text-shadow-strong) !important;
}

/* ========================================
   GRADIENT BACKGROUNDS TEXT ENHANCEMENT
   ======================================== */

/* Text on gradient backgrounds gets strong shadows */
[style*="gradient"],
.gradient-bg,
.bg-gradient-primary,
.bg-gradient-secondary {
    color: var(--text-light) !important;
}

[style*="gradient"] *,
.gradient-bg *,
.bg-gradient-primary *,
.bg-gradient-secondary * {
    color: var(--text-light) !important;
    text-shadow: var(--text-shadow-strong);
}

/* ========================================
   LEADERBOARD TEXT VISIBILITY
   ======================================== */

/* Leaderboard entries */
.leaderboard-item,
.team-score,
.rank-display {
    color: var(--text-dark) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

/* Top 3 special styling with high contrast */
.leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
    color: var(--text-dark) !important;
    font-weight: 700;
}

.leaderboard-item.rank-2 {
    background: linear-gradient(135deg, #d1d5db, #9ca3af) !important;
    color: var(--text-dark) !important;
    font-weight: 600;
}

.leaderboard-item.rank-3 {
    background: linear-gradient(135deg, #fbbf24, #d97706) !important;
    color: var(--text-dark) !important;
    font-weight: 600;
}

/* ========================================
   QUESTION DISPLAY ENHANCEMENTS
   ======================================== */

/* Question text containers */
.question-container,
.question-card,
.trivia-question {
    background: rgba(255, 255, 255, 0.95) !important;
    color: var(--text-dark) !important;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Question text */
.question-text,
.question-content h2,
.question-content h3 {
    color: var(--text-dark) !important;
    font-weight: 600;
    line-height: 1.4;
}

/* Choice buttons with proper contrast */
.choice-btn,
.answer-choice,
.btn-choice {
    background: white !important;
    color: var(--text-dark) !important;
    border: 2px solid #e5e7eb !important;
    font-weight: 500;
    transition: all 0.2s ease;
}

.choice-btn:hover,
.answer-choice:hover,
.btn-choice:hover {
    background: #f9fafb !important;
    color: var(--text-dark) !important;
    border-color: #6366f1 !important;
    transform: translateY(-1px);
}

.choice-btn.selected,
.answer-choice.selected,
.btn-choice.selected {
    background: #6366f1 !important;
    color: var(--text-light) !important;
    border-color: #6366f1 !important;
    text-shadow: var(--text-shadow-medium);
}

/* ========================================
   IMAGE OVERLAYS FOR TEXT
   ======================================== */

/* Semi-transparent dark overlay on images when text is present */
.image-with-text::before,
.hero-image::before,
.banner-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-dark);
    z-index: 1;
}

.image-with-text > *,
.hero-image > *,
.banner-image > * {
    position: relative;
    z-index: 2;
    color: var(--text-light) !important;
    text-shadow: var(--text-shadow-strong);
}

/* Specific overlay for background images */
.bg-image-text {
    position: relative;
}

.bg-image-text::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay-medium);
    z-index: 1;
}

.bg-image-text > * {
    position: relative;
    z-index: 2;
    color: var(--text-light) !important;
    text-shadow: var(--text-shadow-medium);
}

/* ========================================
   BUTTON TEXT ENHANCEMENTS
   ======================================== */

/* Primary button improvements */
.btn-primary {
    background: #6366f1 !important;
    color: var(--text-light) !important;
    border: none !important;
    font-weight: 600;
    text-shadow: var(--text-shadow-subtle);
}

.btn-primary:hover,
.btn-primary:focus {
    background: #4f46e5 !important;
    color: var(--text-light) !important;
    text-shadow: var(--text-shadow-subtle);
}

/* Secondary button improvements */
.btn-secondary {
    background: #374151 !important;
    color: var(--text-light) !important;
    border: none !important;
    font-weight: 600;
    text-shadow: var(--text-shadow-subtle);
}

.btn-outline-primary {
    background: white !important;
    color: #6366f1 !important;
    border: 2px solid #6366f1 !important;
    font-weight: 600;
}

.btn-outline-primary:hover {
    background: #6366f1 !important;
    color: var(--text-light) !important;
    text-shadow: var(--text-shadow-subtle);
}

/* ========================================
   NAVIGATION ENHANCEMENTS
   ======================================== */

/* Navigation text */
.navbar,
.nav-link,
.navbar-brand {
    color: var(--text-light) !important;
    text-shadow: var(--text-shadow-medium);
}

.navbar-light .navbar-nav .nav-link {
    color: var(--text-dark) !important;
    text-shadow: none;
    font-weight: 500;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: #6366f1 !important;
}

/* ========================================
   FORM ENHANCEMENTS
   ======================================== */

/* Form labels and inputs */
.form-label,
label {
    color: var(--text-dark) !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select,
input,
textarea,
select {
    color: var(--text-dark) !important;
    background: white !important;
    border: 2px solid #e5e7eb !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus,
select:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1) !important;
    color: var(--text-dark) !important;
}

/* ========================================
   TABLE ENHANCEMENTS
   ======================================== */

/* Table text visibility */
.table,
.table th,
.table td {
    color: var(--text-dark) !important;
    border-color: #e5e7eb !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(243, 244, 246, 0.5) !important;
}

.table thead th {
    background: #f9fafb !important;
    color: var(--text-dark) !important;
    font-weight: 600;
}

/* ========================================
   TOAST AND ALERT ENHANCEMENTS
   ======================================== */

/* Toast notifications */
.toast,
.alert {
    color: var(--text-dark) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid #e5e7eb !important;
}

.toast-success,
.alert-success {
    background: rgba(34, 197, 94, 0.1) !important;
    color: #166534 !important;
    border-color: #22c55e !important;
}

.toast-error,
.alert-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #991b1b !important;
    border-color: #ef4444 !important;
}

.toast-warning,
.alert-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #92400e !important;
    border-color: #f59e0b !important;
}

/* ========================================
   RESPONSIVE TEXT ADJUSTMENTS
   ======================================== */

/* Mobile-specific improvements */
@media (max-width: 768px) {
    .hero-title,
    .hero-subtitle {
        text-shadow: var(--text-shadow-strong) !important;
    }
    
    .question-text {
        font-size: 1.1rem;
        line-height: 1.5;
    }
    
    .choice-btn,
    .answer-choice {
        font-size: 1rem;
        padding: 0.75rem 1rem;
        margin-bottom: 0.5rem;
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */

/* Focus indicators */
*:focus,
*:focus-visible {
    outline: 3px solid #6366f1 !important;
    outline-offset: 2px !important;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-dark: #000000;
        --text-muted: #1f2937;
    }
    
    .btn,
    .choice-btn,
    .answer-choice {
        border-width: 3px !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .choice-btn:hover,
    .answer-choice:hover,
    .btn:hover {
        transform: none !important;
    }
}

/* ========================================
   OVERRIDE SPECIFICITY ISSUES
   ======================================== */

/* High specificity overrides for problematic elements */
.container .row .col .card .card-body,
.game-container .question-section,
.trivia-game .current-question,
.host-dashboard .game-controls {
    color: var(--text-dark) !important;
}

/* Ensure brand colors are preserved while improving text contrast */
.brand-primary {
    background-color: #6366f1 !important;
    color: var(--text-light) !important;
}

.brand-secondary {
    background-color: #f59e0b !important;
    color: var(--text-dark) !important;
}

.brand-accent {
    background-color: #06b6d4 !important;
    color: var(--text-light) !important;
}

/* ========================================
   LOADING STATES AND DISABLED ELEMENTS
   ======================================== */

/* Loading and disabled text */
.loading,
.disabled,
[disabled] {
    color: var(--text-disabled) !important;
    opacity: 0.6;
}

.loading::after {
    border-color: var(--text-disabled) transparent var(--text-disabled) transparent;
}

/* Ensure proper contrast in all states */
.btn:disabled,
.btn.disabled {
    background-color: #e5e7eb !important;
    color: var(--text-disabled) !important;
    border-color: #e5e7eb !important;
    text-shadow: none !important;
}/* World-Class Homepage Enhancements */

/* Floating Animation Keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(-35px) rotate(180deg); }
    75% { transform: translateY(-20px) rotate(270deg); }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating Shapes Positioning */
.floating-shapes .shape-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-shapes .shape-2 {
    top: 60%;
    right: 15%;
    animation-delay: 2s;
}

.floating-shapes .shape-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

/* Enhanced Hero Section */
.hero-section {
    position: relative;
    background-size: 400% 400%;
    animation: gradientShift 10s ease infinite;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 80%, rgba(255,255,255,0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Enhanced Button Hover Effects */
.btn-hero {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-hero:hover::before {
    left: 100%;
}

/* Improved Card Hover Effects */
.card-float {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.card-float:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

/* Glass Morphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Text Shadow for Better Readability */
.text-shadow {
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Enhanced Gradient Text */
.text-gradient-animated {
    background: linear-gradient(-45deg, #6366f1, #8b5cf6, #ec4899, #06b6d4, #84cc16);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

/* Mobile-First Responsive Design */
@media (max-width: 992px) {
    .hero-section {
        min-height: auto !important;
        padding: 3rem 0 !important;
    }
    
    .hero-content {
        text-align: center !important;
        padding: 0 1rem !important;
    }
    
    .hero-title {
        font-size: clamp(2.5rem, 12vw, 3.5rem) !important;
        line-height: 1.2 !important;
    }
    
    .hero-description {
        font-size: 1.25rem !important;
        margin-bottom: 2rem !important;
    }
    
    .floating-shapes {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-section {
        min-height: auto !important;
        padding: 2rem 0 !important;
    }
    
    .hero-content {
        padding: 0 0.5rem !important;
    }
    
    .hero-title {
        font-size: clamp(2rem, 10vw, 2.8rem) !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-description {
        font-size: 1.1rem !important;
        margin-bottom: 1.5rem !important;
    }
    
    .hero-actions {
        margin-bottom: 2rem !important;
    }
    
    .hero-actions .btn {
        padding: 1rem 2rem !important;
        font-size: 1rem !important;
        width: 100% !important;
        margin-bottom: 0.75rem !important;
    }
    
    .trust-indicators {
        flex-direction: column !important;
        gap: 1rem !important;
        text-align: center !important;
    }
    
    .trust-indicators > div {
        justify-content: center !important;
    }
    
    .hero-stats .stat-item {
        padding: 1rem 0.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-stats .display-6 {
        font-size: 1.5rem !important;
    }
    
    .hero-visual {
        margin-top: 2rem !important;
        padding: 0 0.5rem !important;
    }
    
    .quick-join-card {
        margin-bottom: 2rem !important;
    }
    
    .quick-join-card .card-body {
        padding: 2rem 1.5rem !important;
    }
    
    .quick-join-card .h4 {
        font-size: 1.25rem !important;
    }
    
    .quick-join-input {
        font-size: 1.5rem !important;
        padding: 1.25rem !important;
    }
    
    .feature-cards .col-6 {
        margin-bottom: 1rem !important;
    }
    
    .feature-cards .card-body {
        padding: 2rem 1rem !important;
    }
    
    .social-proof {
        margin-top: 2rem !important;
    }
    
    .social-proof .rounded-pill {
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: auto !important;
        padding: 1.5rem 0 !important;
    }
    
    .hero-content {
        padding: 0 0.25rem !important;
    }
    
    .hero-badge {
        font-size: 0.8rem !important;
        padding: 0.5rem 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-badge span {
        display: none;
    }
    
    .hero-badge::after {
        content: '🎮 Engaging Trivia';
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.2rem) !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-description {
        font-size: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-actions .btn {
        padding: 0.875rem 1.5rem !important;
        font-size: 0.9rem !important;
    }
    
    .trust-indicators {
        font-size: 0.8rem !important;
    }
    
    .trust-indicators span {
        font-size: 0.75rem !important;
    }
    
    .hero-stats .row {
        margin: 0 -0.5rem !important;
    }
    
    .hero-stats .col-4 {
        padding: 0 0.5rem !important;
    }
    
    .hero-stats .stat-item {
        padding: 0.75rem 0.25rem !important;
        border-radius: 12px !important;
    }
    
    .hero-stats .display-6 {
        font-size: 1.25rem !important;
    }
    
    .hero-stats .small {
        font-size: 0.7rem !important;
    }
    
    .quick-join-card .card-body {
        padding: 1.5rem 1rem !important;
    }
    
    .quick-join-card .d-flex {
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .quick-join-card .me-3 {
        margin-right: 0 !important;
        margin-bottom: 1rem !important;
        align-self: center;
    }
    
    .quick-join-card .h4 {
        font-size: 1.1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .quick-join-input {
        font-size: 1.25rem !important;
        padding: 1rem !important;
        letter-spacing: 0.1em !important;
    }
    
    .feature-cards .card-body {
        padding: 1.5rem 0.75rem !important;
    }
    
    .feature-cards .card-body h6 {
        font-size: 0.9rem !important;
    }
    
    .feature-cards .card-body small {
        font-size: 0.75rem !important;
    }
    
    .social-proof .rounded-pill {
        padding: 1rem !important;
    }
    
    .social-proof .rounded-circle {
        width: 24px !important;
        height: 24px !important;
        margin-left: -4px !important;
    }
    
    .social-proof .fw-bold {
        font-size: 0.8rem !important;
    }
    
    .social-proof .text-muted {
        font-size: 0.7rem !important;
    }
}

/* Loading Animation for Stats */
.stat-counter {
    animation: pulse 2s infinite;
}

/* Enhanced Input Focus States */
.form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.25);
    transform: scale(1.02);
    transition: all 0.3s ease;
}

/* Mobile Touch Optimization */
@media (max-width: 768px) {
    .btn, .form-control, .card {
        -webkit-tap-highlight-color: transparent;
    }
    
    .btn {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .card:hover {
        transform: none !important;
    }
    
    .btn:hover {
        transform: none !important;
    }
}

/* Improved Social Proof Styling */
.social-proof {
    animation: slideInUp 0.6s ease-out 1.5s both;
}

/* Additional Mobile Fixes */
@media (max-width: 576px) {
    /* Prevent horizontal scroll */
    .hero-section,
    .container-fluid,
    .row {
        overflow-x: hidden;
    }
    
    /* Fix text wrapping */
    .hero-title div {
        word-break: break-word;
        hyphens: auto;
    }
    
    /* Improve button spacing */
    .hero-actions .d-flex {
        gap: 0.75rem !important;
    }
    
    /* Better input styling */
    .input-group {
        border-radius: 12px !important;
    }
    
    .input-group .form-control {
        border-top-left-radius: 12px !important;
        border-bottom-left-radius: 12px !important;
    }
    
    .input-group .btn {
        border-top-right-radius: 12px !important;
        border-bottom-right-radius: 12px !important;
        min-width: 60px;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}/* Comprehensive Mobile Optimization for All Templates */

/* Base Mobile-First Styles */
* {
    box-sizing: border-box;
}

body {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Touch-Friendly Interactive Elements */
.btn, 
.form-control, 
.nav-link, 
.card,
button,
input,
textarea,
select {
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Minimum Touch Target Sizes (44px per Apple/Google guidelines) */
@media (max-width: 768px) {
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem 1.5rem;
    }
    
    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents iOS zoom */
        padding: 0.75rem 1rem;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
        padding: 0.75rem 1rem;
    }
    
    /* Disable hover effects on mobile */
    .card:hover,
    .btn:hover {
        transform: none !important;
    }
}

/* Mobile Navigation */
@media (max-width: 992px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        border-radius: 12px;
        padding: 1rem;
        margin-top: 1rem;
        box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    }
    
    .navbar-nav .nav-link {
        text-align: center;
        margin: 0.25rem 0;
        border-radius: 8px;
        transition: background-color 0.2s ease;
    }
    
    .navbar-nav .nav-link:hover {
        background-color: rgba(99, 102, 241, 0.1);
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
        font-size: 1.25rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
    }
}

/* Mobile-Optimized Forms */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 1.5rem;
    }
    
    .form-label {
        font-weight: 600;
        margin-bottom: 0.75rem;
        display: block;
    }
    
    .input-group {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .input-group .form-control,
    .input-group .btn {
        border-radius: 12px !important;
        width: 100% !important;
    }
    
    .input-group-lg .form-control {
        font-size: 1.1rem;
        padding: 1rem;
    }
    
    .input-group-lg .btn {
        font-size: 1.1rem;
        padding: 1rem 2rem;
    }
}

/* Mobile Cards and Layout */
@media (max-width: 768px) {
    .card {
        border-radius: 16px;
        margin-bottom: 1.5rem;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    }
    
    .card-body {
        padding: 2rem 1.5rem;
    }
    
    .card-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .card-text {
        line-height: 1.6;
    }
    
    /* Container adjustments */
    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .container-standard {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Row and column spacing */
    .row {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }
    
    .row > * {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Mobile-Specific Game Interface */
@media (max-width: 768px) {
    .game-interface {
        padding: 1rem;
    }
    
    .question-card {
        padding: 2rem 1.5rem;
        border-radius: 16px;
        margin-bottom: 2rem;
    }
    
    .question-title {
        font-size: 1.25rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
    }
    
    .choice-button {
        width: 100%;
        margin-bottom: 1rem;
        padding: 1.25rem;
        font-size: 1.1rem;
        border-radius: 12px;
        text-align: left;
        min-height: 60px;
        display: flex;
        align-items: center;
    }
    
    .game-stats {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .stat-card {
        text-align: center;
        padding: 1.5rem;
        border-radius: 12px;
    }
}

/* Mobile Modal Optimization */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }
    
    .modal-content {
        border-radius: 16px;
    }
    
    .modal-header {
        padding: 1.5rem 1.5rem 1rem;
        border-bottom: 1px solid rgba(0,0,0,0.1);
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .modal-footer {
        padding: 1rem 1.5rem 1.5rem;
        border-top: 1px solid rgba(0,0,0,0.1);
        gap: 0.75rem;
    }
    
    .modal-footer .btn {
        flex: 1;
    }
}

/* Mobile Tables */
@media (max-width: 768px) {
    .table-responsive {
        border-radius: 12px;
        overflow: hidden;
    }
    
    .table {
        font-size: 0.9rem;
    }
    
    .table th,
    .table td {
        padding: 1rem 0.75rem;
        vertical-align: middle;
    }
    
    .table-striped > tbody > tr:nth-of-type(odd) > td {
        background-color: rgba(99, 102, 241, 0.05);
    }
}

/* Mobile-Specific Utilities */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
    
    .show-mobile {
        display: block !important;
    }
    
    .show-mobile-flex {
        display: flex !important;
    }
    
    .text-mobile-center {
        text-align: center !important;
    }
    
    .flex-mobile-column {
        flex-direction: column !important;
    }
    
    .gap-mobile-2 {
        gap: 1rem !important;
    }
    
    .mb-mobile-3 {
        margin-bottom: 2rem !important;
    }
    
    .px-mobile-2 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .py-mobile-3 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Small Mobile Devices (phones in portrait) */
@media (max-width: 576px) {
    .container,
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    .btn {
        font-size: 0.95rem;
        padding: 0.875rem 1.25rem;
    }
    
    .btn-lg {
        font-size: 1rem;
        padding: 1rem 1.5rem;
    }
    
    .form-control {
        font-size: 16px; /* Prevents iOS zoom */
    }
    
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .choice-button {
        padding: 1rem;
        font-size: 1rem;
        min-height: 56px;
    }
    
    /* Typography adjustments */
    .display-1 { font-size: 2.5rem; }
    .display-2 { font-size: 2rem; }
    .display-3 { font-size: 1.75rem; }
    .display-4 { font-size: 1.5rem; }
    .display-5 { font-size: 1.25rem; }
    .display-6 { font-size: 1.1rem; }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    h5 { font-size: 1.1rem; }
    h6 { font-size: 1rem; }
    
    .lead {
        font-size: 1.1rem;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: auto !important;
        padding: 2rem 0 !important;
    }
    
    .modal-dialog {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .navbar-collapse {
        max-height: 70vh;
        overflow-y: auto;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card,
    .btn,
    .form-control {
        border-width: 0.5px;
    }
}

/* Dark mode support for mobile */
@media (prefers-color-scheme: dark) and (max-width: 768px) {
    .navbar-collapse {
        background: rgba(30, 30, 30, 0.98);
        color: white;
    }
    
    .card {
        background-color: #1f1f1f;
        border-color: #333;
        color: white;
    }
    
    .form-control {
        background-color: #2a2a2a;
        border-color: #444;
        color: white;
    }
}