
/* TriviPals Design System Tokens */
:root {
  /* Brand Colors */
  --brand-1: #6C5CE7;
  --brand-2: #00C2FF;
  --brand-3: #00D28F;
  
  /* Text Colors */
  --text-1: #0F172A;
  --text-2: #475569;
  
  /* Background Colors */
  --bg-1: #FFFFFF;
  --bg-2: #F8FAFC;
  
  /* Border Colors */
  --border-1: #E2E8F0;
  
  /* Semantic Colors */
  --warning: #F59E0B;
  --danger: #EF4444;
  --success: var(--brand-3);
  
  /* Typography */
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Noto Sans", Arial, "Apple Color Emoji", "Segoe UI Emoji";
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  
  /* Border Radius */
  --radius: 12px;
  
  /* Shadows */
  --shadow-1: 0 6px 20px rgba(2, 6, 23, 0.06);
  --shadow-2: 0 10px 25px rgba(2, 6, 23, 0.1);
}

/* Base Typography Scale */
html {
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  color: var(--text-1);
  background: var(--bg-2);
  line-height: 1.6;
}

h1, .display-1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2, .display-2 { font-size: clamp(2rem, 4vw, 3rem); }
h3, .display-3 { font-size: clamp(1.75rem, 3vw, 2.25rem); }
h4, .display-4 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
h5, .display-5 { font-size: clamp(1.25rem, 2vw, 1.75rem); }
h6, .display-6 { font-size: clamp(1.125rem, 1.5vw, 1.5rem); }

.lead {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  font-weight: 400;
  color: var(--text-2);
}
/* 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, .choice-button {
  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); 
  }
}

/* Answer feedback overlay animation */
@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    20% {
        opacity: 1;
        transform: scale(1);
    }
    80% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
}

.answer-feedback-overlay {
    animation: fadeInOut 2.5s forwards;
}

/* Add this at the end of the file if not present *//**
 * TriviPals UI Component Styles
 * Clean, consistent design system for polished appearance
 */

/* ==================== BRAND BUTTONS ==================== */

.btn-brand {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-brand:hover {
    background: linear-gradient(135deg, #5855eb 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
    color: white;
}

.btn-brand:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.btn-brand:disabled {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* ==================== SOFT BUTTONS ==================== */

.btn-soft {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: #6366f1;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.btn-soft:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: #5855eb;
    transform: translateY(-1px);
}

.btn-soft:active {
    transform: translateY(0);
    background: rgba(99, 102, 241, 0.2);
}

/* ==================== GHOST BUTTONS ==================== */

.btn-ghost {
    background: transparent;
    border: none;
    color: #6b7280;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-ghost:hover {
    background: rgba(107, 114, 128, 0.1);
    color: #374151;
}

.btn-ghost:active {
    background: rgba(107, 114, 128, 0.15);
}

/* ==================== CHOICE BUTTONS ==================== */

.choice-button {
    background: white;
    border: 2px solid #e5e7eb;
    color: #374151;
    font-weight: 500;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
    min-height: 44px; /* Touch-friendly */
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
}

.choice-button:hover {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.05);
    color: #6366f1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.choice-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.choice-button.selected {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #6366f1;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25);
}

/* ==================== CARDS & PANELS ==================== */

.card-clean {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease;
}

.card-clean:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
}

.panel-primary {
    background: rgba(99, 102, 241, 0.05);
    border-color: rgba(99, 102, 241, 0.2);
}

.panel-success {
    background: rgba(34, 197, 94, 0.05);
    border-color: rgba(34, 197, 94, 0.2);
}

.panel-warning {
    background: rgba(251, 191, 36, 0.05);
    border-color: rgba(251, 191, 36, 0.2);
}

.panel-danger {
    background: rgba(239, 68, 68, 0.05);
    border-color: rgba(239, 68, 68, 0.2);
}

/* ==================== TIMER BADGE ==================== */

.timer-badge {
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    animation: pulse-timer 2s infinite;
}

@keyframes pulse-timer {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
    }
    50% { 
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
    }
}

.timer-badge.timer-warning {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    animation: pulse-urgent 1s infinite;
}


/* ==================== PLAYER PAGE ENHANCEMENTS ==================== */

/* Answer input improvements */
#playerTextAnswer {
    padding-right: 80px; /* Space for character counter */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#playerTextAnswer:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

#answerCharCount {
    pointer-events: none;
    transition: color 0.3s ease;
}

#playerTextAnswer:focus ~ #answerCharCount {
    color: var(--primary-500) !important;
}

/* Answer tips styling */
#answerTips {
    border-left: 3px solid var(--warning);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Choice button enhancements */
.choice-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.choice-button::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.5s ease;
}

.choice-button:hover::before {
    left: 100%;
}

.choice-button.selected {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.choice-button.selected .choice-number {
    background: white;
    color: var(--primary-500);
}

.choice-button:active {
    transform: scale(0.98);
}

/* Selected answer confirmation */
#selectedAnswerConfirm {
    animation: fadeInUp 0.4s ease;
    border-left: 4px solid var(--primary-500);
}

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

/* Submit button states */
.btn-brand .submit-text,
.btn-brand .submit-loading {
    transition: opacity 0.2s ease;
}

/* Answer status improvements */
.answer-status {
    animation: slideIn 0.3s ease;
    border-left: 4px solid currentColor;
}

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

/* Loading state for buttons */
.btn-brand:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-brand .spinner-border {
    animation: spin 1s linear infinite;
}

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

/* Mobile optimizations */
@media (max-width: 768px) {
    #playerTextAnswer {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .choice-button {
        min-height: 60px; /* Larger touch targets */
    }
    
    #selectedAnswerConfirm {
        position: sticky;
        bottom: 0;
        z-index: 10;
        background: white;
        margin: 0 -1rem;
        padding: 1rem;
        border-radius: 0;
    }
}

/* Accessibility improvements */
.choice-button:focus-visible {
    outline: 3px solid var(--primary-300);
    outline-offset: 2px;
}

#playerTextAnswer:focus-visible {
    outline: 3px solid var(--primary-300);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .choice-button.selected {
        border: 3px solid currentColor;
    }
    
    #answerTips {
        border-width: 4px;
    }
}


@keyframes pulse-urgent {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ==================== RESPONSIVE DESIGN ==================== */

/* Mobile-first approach */
@media (min-width: 576px) {
    .btn-brand {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    .choice-button {
        padding: 1.25rem 1.75rem;
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) {
    .card-clean {
        padding: 2rem;
        border-radius: 20px;
    }
}

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

/* High contrast for better readability */
@media (prefers-contrast: high) {
    .btn-brand {
        background: #000;
        border: 2px solid #fff;
    }
    
    .choice-button {
        border-width: 3px;
    }
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for keyboard navigation */
.btn-brand:focus,
.btn-soft:focus,
.choice-button:focus {
    outline: 3px solid #93c5fd;
    outline-offset: 2px;
}

/* ==================== TYPOGRAPHY ==================== */

.text-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

.text-muted {
    color: #6b7280;
}

.text-brand {
    color: #6366f1;
}

/* ==================== SPACING & LAYOUT ==================== */

.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.gap-lg { gap: 1.5rem; }
.gap-xl { gap: 2rem; }

.p-xs { padding: 0.5rem; }
.p-sm { padding: 0.75rem; }
.p-md { padding: 1rem; }
.p-lg { padding: 1.5rem; }
.p-xl { padding: 2rem; }

.m-xs { margin: 0.5rem; }
.m-sm { margin: 0.75rem; }
.m-md { margin: 1rem; }
.m-lg { margin: 1.5rem; }
.m-xl { margin: 2rem; }

/* ==================== INTERACTIVE STATES ==================== */

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid #e5e7eb;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.success-state {
    background: rgba(34, 197, 94, 0.1);
    color: #059669;
    border-color: rgba(34, 197, 94, 0.3);
}

.error-state {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.3);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

/* Table Responsive Wrapper - Prevents horizontal overflow on mobile */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Text Ellipsis - Truncates long text with ellipsis */
.text-ellipsis {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

/* Choice Button Compatibility - Unified selector */
.choice-btn, .choice-button {
  /* Shared styles for both legacy and new button names */
}
/*!
 * TriviPals Unified Design System
 * Consolidates all fragmented CSS into a cohesive, performance-optimized bundle
 * Mobile-first, accessible, world-class trivia platform
 */

/* ========================================
   DESIGN TOKENS - SINGLE SOURCE OF TRUTH
   ======================================== */
:root {
  /* Primary Brand Colors - Vibrant Purple Focus */
  --primary: #6366f1;
  --primary-hover: #5855eb;
  --primary-light: #e0e7ff;
  --primary-dark: #4338ca;
  
  /* Secondary Palette - Energetic Multi-Gradient */
  --secondary: #f59e0b;    /* energetic orange */
  --accent-blue: #06b6d4;   /* electric blue */
  --accent-pink: #ec4899;   /* hot pink */
  --accent-green: #84cc16;  /* lime green */
  
  /* Semantic Colors */
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  
  /* Neutral Scale - High Contrast */
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  --gray-700: #334155;
  --gray-800: #1e293b;
  --gray-900: #0f172a;
  
  /* Typography Scale - Inter Font System */
  --font-family: 'Inter', 'SF Pro Display', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;   /* 14px */
  --font-size-base: 1rem;     /* 16px */
  --font-size-lg: 1.125rem;   /* 18px */
  --font-size-xl: 1.25rem;    /* 20px */
  --font-size-2xl: 1.5rem;    /* 24px */
  --font-size-3xl: 1.875rem;  /* 30px */
  --font-size-4xl: 2.25rem;   /* 36px */
  --font-size-5xl: 3rem;      /* 48px */
  --font-size-6xl: 4rem;      /* 64px */
  
  /* Font Weights */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  /* Spacing Scale - 8px Base */
  --space-0: 0;
  --space-1: 0.25rem;   /* 4px */
  --space-2: 0.5rem;    /* 8px */
  --space-3: 0.75rem;   /* 12px */
  --space-4: 1rem;      /* 16px */
  --space-5: 1.25rem;   /* 20px */
  --space-6: 1.5rem;    /* 24px */
  --space-8: 2rem;      /* 32px */
  --space-10: 2.5rem;   /* 40px */
  --space-12: 3rem;     /* 48px */
  --space-16: 4rem;     /* 64px */
  --space-20: 5rem;     /* 80px */
  
  /* Border Radius - Consistent Curves */
  --radius-none: 0;
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.5rem;     /* 8px */
  --radius-lg: 0.75rem;    /* 12px */
  --radius-xl: 1rem;       /* 16px */
  --radius-2xl: 1.5rem;    /* 24px */
  --radius-full: 9999px;   /* pill shape */
  
  /* Shadows - Depth System */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
  
  /* Motion & Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Focus Ring - Accessibility */
  --focus-ring: 0 0 0 3px rgb(99 102 241 / 0.5);
  --focus-ring-offset: 2px;
  
  /* Touch Targets - Mobile Optimized */
  --touch-target: 44px;  /* Minimum 44px for accessibility */
  
  /* Breakpoints - Mobile First */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* Dark Mode Tokens */
[data-theme="dark"], 
.dark {
  --primary: #818cf8;
  --primary-hover: #6366f1;
  --primary-light: #1e1b4b;
  
  --white: #0f172a;
  --gray-50: #1e293b;
  --gray-100: #334155;
  --gray-200: #475569;
  --gray-300: #64748b;
  --gray-400: #94a3b8;
  --gray-500: #cbd5e1;
  --gray-600: #e2e8f0;
  --gray-700: #f1f5f9;
  --gray-800: #f8fafc;
  --gray-900: #ffffff;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-family: var(--font-family);
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -moz-tab-size: 4;
  tab-size: 4;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: 1.5;
  color: var(--gray-900);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   ACCESSIBILITY FOUNDATION
   ======================================== */
/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus Styles - WCAG 2.2 AA Compliant */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: var(--focus-ring-offset);
  border-radius: var(--radius-sm);
}

/* Skip Link for Screen Readers */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary);
  color: var(--white);
  padding: 8px;
  text-decoration: none;
  border-radius: var(--radius-md);
  z-index: 1000;
  font-weight: var(--font-weight-semibold);
}

.skip-link:focus {
  top: 6px;
}

/* ========================================
   COMPONENT SYSTEM - BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: var(--touch-target);
  position: relative;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Button Variants */
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-secondary {
  background: var(--white);
  color: var(--primary);
  border-color: var(--primary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-success {
  background: var(--success);
  color: var(--white);
  border-color: var(--success);
}

.btn-danger {
  background: var(--danger);
  color: var(--white);
  border-color: var(--danger);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  min-height: 36px;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
  min-height: 56px;
}

.btn-xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--font-size-xl);
  min-height: 64px;
}

/* ========================================
   COMPONENT SYSTEM - CARDS
   ======================================== */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-normal);
}

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

.card-header {
  padding: var(--space-6);
  border-bottom: 1px solid var(--gray-200);
  background: var(--gray-50);
}

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

.card-footer {
  padding: var(--space-6);
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
}

/* ========================================
   COMPONENT SYSTEM - FORMS
   ======================================== */
.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-lg);
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: 1.5;
  color: var(--gray-900);
  background-color: var(--white);
  transition: all var(--transition-fast);
  min-height: var(--touch-target);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(99 102 241 / 0.1);
}

.form-input:invalid,
.form-select:invalid,
.form-textarea:invalid {
  border-color: var(--danger);
}

/* ========================================
   LAYOUT SYSTEM
   ======================================== */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-4);
  padding-right: var(--space-4);
}

@media (min-width: 640px) {
  .container {
    max-width: 640px;
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 768px;
  }
}

@media (min-width: 1024px) {
  .container {
    max-width: 1024px;
  }
}

@media (min-width: 1280px) {
  .container {
    max-width: 1280px;
  }
}

/* ========================================
   NAVIGATION SYSTEM
   ======================================== */
.navbar {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) 0;
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
  z-index: 1030;
}

.navbar-brand {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.navbar-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .navbar-nav {
    flex-direction: row;
    gap: var(--space-6);
  }
}

.nav-link {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  font-weight: var(--font-weight-medium);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  min-height: var(--touch-target);
  display: flex;
  align-items: center;
}

.nav-link:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
/* Spacing */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-1); }
.p-2 { padding: var(--space-2); }
.p-3 { padding: var(--space-3); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }

.m-0 { margin: 0; }
.m-1 { margin: var(--space-1); }
.m-2 { margin: var(--space-2); }
.m-3 { margin: var(--space-3); }
.m-4 { margin: var(--space-4); }
.m-6 { margin: var(--space-6); }
.m-8 { margin: var(--space-8); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }

/* Typography */
.text-xs { font-size: var(--font-size-xs); }
.text-sm { font-size: var(--font-size-sm); }
.text-base { font-size: var(--font-size-base); }
.text-lg { font-size: var(--font-size-lg); }
.text-xl { font-size: var(--font-size-xl); }
.text-2xl { font-size: var(--font-size-2xl); }
.text-3xl { font-size: var(--font-size-3xl); }

.font-normal { font-weight: var(--font-weight-normal); }
.font-medium { font-weight: var(--font-weight-medium); }
.font-semibold { font-weight: var(--font-weight-semibold); }
.font-bold { font-weight: var(--font-weight-bold); }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Colors */
.text-primary { color: var(--primary); }
.text-secondary { color: var(--secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-gray-500 { color: var(--gray-500); }
.text-gray-700 { color: var(--gray-700); }
.text-gray-900 { color: var(--gray-900); }
.text-white { color: var(--white); }

/* Flexbox */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

/* Responsive Design */
.hidden { display: none; }

@media (min-width: 640px) {
  .sm\\:block { display: block; }
  .sm\\:flex { display: flex; }
  .sm\\:hidden { display: none; }
}

@media (min-width: 768px) {
  .md\\:block { display: block; }
  .md\\:flex { display: flex; }
  .md\\:hidden { display: none; }
}

@media (min-width: 1024px) {
  .lg\\:block { display: block; }
  .lg\\:flex { display: flex; }
  .lg\\:hidden { display: none; }
}

/* ========================================
   GAME-SPECIFIC COMPONENTS
   ======================================== */

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 25%, var(--accent-pink) 50%, var(--accent-blue) 75%, var(--accent-green) 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero-content {
  z-index: 2;
  position: relative;
}

.hero-title {
  font-size: clamp(2rem, 8vw, 5rem);
  font-weight: var(--font-weight-extrabold);
  line-height: 1.1;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-6);
}

.hero-description {
  font-size: clamp(1rem, 3vw, 1.25rem);
  margin-bottom: var(--space-8);
  opacity: 0.95;
}

/* Question Cards */
.question-card {
  background: var(--white);
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--gray-200);
  transition: all var(--transition-normal);
}

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

.question-text {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--gray-900);
  margin-bottom: var(--space-6);
  line-height: 1.4;
}

/* Answer Choices */
.answer-choice {
  display: block;
  width: 100%;
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-3);
  background: var(--white);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-xl);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-medium);
  color: var(--gray-700);
  text-align: left;
  cursor: pointer;
  transition: all var(--transition-fast);
  min-height: var(--touch-target);
}

.answer-choice:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.answer-choice.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

.answer-choice.correct {
  border-color: var(--success);
  background: var(--success);
  color: var(--white);
}

.answer-choice.incorrect {
  border-color: var(--danger);
  background: var(--danger);
  color: var(--white);
}

/* Timer Component */
.timer-ring {
  width: 80px;
  height: 80px;
  position: relative;
}

.timer-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.timer-ring .timer-circle {
  fill: none;
  stroke: var(--gray-200);
  stroke-width: 8;
}

.timer-ring .timer-progress {
  fill: none;
  stroke: var(--primary);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dashoffset var(--transition-fast);
}

.timer-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--gray-900);
}

/* Loading States */
.skeleton {
  background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius-md);
}

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

.skeleton-text {
  height: 1em;
  margin-bottom: var(--space-2);
}

.skeleton-title {
  height: 2em;
  margin-bottom: var(--space-4);
}

.skeleton-button {
  height: var(--touch-target);
  width: 120px;
}

/* ========================================
   PRESENTER MODE (TV/PROJECTOR)
   ======================================== */
.presenter-mode .navbar,
.presenter-mode .sidebar,
.presenter-mode .host-controls {
  display: none !important;
}

.presenter-mode .question-text {
  font-size: clamp(28px, 5vw, 64px);
  font-weight: var(--font-weight-extrabold);
  text-align: center;
  line-height: 1.2;
  margin: var(--space-8) 0;
}

.presenter-mode body {
  background: var(--gray-900);
  color: var(--white);
}

/* ========================================
   RESPONSIVE OPTIMIZATIONS
   ======================================== */
@media (max-width: 768px) {
  .hero-section {
    min-height: auto;
    padding: var(--space-12) 0;
  }
  
  .hero-title {
    font-size: clamp(1.8rem, 8vw, 2.5rem);
    margin-bottom: var(--space-4);
  }
  
  .hero-description {
    font-size: var(--font-size-base);
    margin-bottom: var(--space-6);
  }
  
  .question-card {
    padding: var(--space-6);
  }
  
  .question-text {
    font-size: var(--font-size-lg);
  }
  
  .answer-choice {
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-base);
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .btn {
    border-width: 2px;
  }
  
  .card {
    border-width: 2px;
  }
  
  .form-input,
  .form-select,
  .form-textarea {
    border-width: 2px;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .sidebar,
  .btn {
    display: none !important;
  }
  
  .question-card {
    box-shadow: none;
    border: 2px solid var(--gray-900);
  }
}/*!
 * TriviPals World-Class Design System
 * Complete modern redesign with premium aesthetics
 */

/* ========================================
   1. RESET & FOUNDATION
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-primary, #111827);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ========================================
   HOMEPAGE TEXT VISIBILITY FIXES
   ======================================== */

/* Ensure all homepage text is dark and readable */
.main-content p,
.main-content span,
.main-content div,
.lead,
.text-secondary {
    color: var(--text-secondary, #374151) !important;
}

.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4,
.main-content h5,
.main-content h6,
.display-1,
.display-4 {
    color: var(--text-primary, #111827) !important;
}

/* Card content text */
.card-body p,
.card-body span,
.card-body div,
.card-text {
    color: var(--text-primary, #111827) !important;
}

/* Feature section text */
.features-section p,
.features-section span,
.features-section div {
    color: var(--text-secondary, #374151) !important;
}

/* Stat text */
.stat-item .h2,
.stat-item small {
    color: var(--text-primary, #111827) !important;
}

/* Step text */
.step-number + h3,
.step-number ~ p {
    color: var(--text-primary, #111827) !important;
}

/* Override any webkit text fill issues */
.main-content * {
    -webkit-text-fill-color: unset !important;
}

/* ========================================
   2. WORLD-CLASS COLOR SYSTEM
   ======================================== */

:root {
    /* Primary Brand Colors */
    --primary-50: #f0f4ff;
    --primary-100: #e0edff;
    --primary-500: #6366f1;
    --primary-600: #4f46e5;
    --primary-700: #4338ca;
    
    /* Secondary Colors */
    --secondary-500: #f59e0b;
    --secondary-600: #d97706;
    
    /* Accent Colors */
    --accent-blue: #06b6d4;
    --accent-pink: #ec4899;
    --accent-green: #10b981;
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Text Colors - Ensure high contrast */
    --text-primary: #111827;
    --text-secondary: #374151;
    --text-muted: #6b7280;
    
    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --info: #06b6d4;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* ========================================
   3. PREMIUM LAYOUT SYSTEM
   ======================================== */

.site-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* Container Sizes */
.container-sm { max-width: 640px; margin: 0 auto; padding: 0 1rem; }
.container-md { max-width: 768px; margin: 0 auto; padding: 0 1rem; }
.container-lg { max-width: 1024px; margin: 0 auto; padding: 0 1rem; }
.container-xl { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
.container-2xl { max-width: 1536px; margin: 0 auto; padding: 0 1rem; }

/* ========================================
   4. PREMIUM NAVIGATION HEADER
   ======================================== */

.premium-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Brand */
.brand-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.brand-logo:hover {
    transform: translateY(-1px);
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--secondary-500) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    box-shadow: var(--shadow-md);
}

.brand-icon i {
    color: white;
    font-size: 1.5rem;
}

.brand-text {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.025em;
}

/* Navigation Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    color: var(--gray-700);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-600);
    background: rgba(99, 102, 241, 0.05);
    transform: translateY(-1px);
}

.nav-link.active {
    color: white;
    background: var(--primary-500);
    box-shadow: var(--shadow-md);
}

/* CTA Button */
.btn-cta {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    border: none;
    cursor: pointer;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: white;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.user-menu:hover {
    background: rgba(99, 102, 241, 0.1);
    transform: translateY(-1px);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.user-name {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}

/* Mobile Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.toggle-bar {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ========================================
   5. HERO SECTION REDESIGN
   ======================================== */

.hero-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-weight: 500;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.hero-title {
    font-size: clamp(3rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    color: white;
    margin-bottom: 1.5rem;
    letter-spacing: -0.025em;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 3rem;
    line-height: 1.6;
    font-weight: 400;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

.btn-primary {
    background: white;
    color: var(--primary-600);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: var(--primary-600);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    font-size: 1rem;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    color: white;
}

/* Hero Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 600px;
    margin: 0 auto;
}

.stat-item {
    text-align: center;
    color: white;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, white 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
}

/* ========================================
   6. FEATURE SECTIONS
   ======================================== */

.features-section {
    padding: 6rem 0;
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.feature-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-100);
    transition: all 0.3s ease;
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--secondary-500) 100%);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--gray-600);
    line-height: 1.6;
}

/* ========================================
   7. SECTION HEADERS
   ======================================== */

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--gray-800);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    line-height: 1.6;
}

/* ========================================
   8. RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .hero-section {
        padding: 4rem 0;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        min-width: 200px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .feature-card {
        padding: 2rem;
    }
    
    .nav-container {
        padding: 0 1rem;
    }
}

/* ========================================
   9. ANIMATIONS & TRANSITIONS
   ======================================== */

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }

/* ========================================
   10. UTILITY CLASSES
   ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }

.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }

/* ========================================
   11. FOOTER STYLES
   ======================================== */

.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 2rem;
    margin-top: auto;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--secondary-500) 100%);
}

.footer-brand .brand-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.footer-text {
    color: var(--gray-400);
    margin: 0;
}

.footer-link {
    color: var(--primary-400);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-300);
}

/* ========================================
   ADMIN NAVIGATION STYLES
   ======================================== */

.admin-link {
    color: var(--orange) !important;
    font-weight: 600;
}

.admin-badge {
    background: linear-gradient(135deg, var(--orange), #ff6b35);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-right: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-menu-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 8px 0;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.user-menu-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--purple);
    text-decoration: none;
}

.dropdown-item.admin-item {
    color: var(--orange);
}

.dropdown-item.admin-item:hover {
    background: rgba(245, 158, 11, 0.1);
    color: var(--orange);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

/* ========================================
   12. AUTHENTICATION PAGES
   ======================================== */

.auth-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.1) 0%, 
        rgba(245, 158, 11, 0.1) 100%);
}

.auth-container {
    max-width: 480px;
    width: 100%;
    margin: 0 auto;
    padding: 0 1rem;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--gray-600);
    font-size: 1rem;
}

.auth-form {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    color: var(--gray-800);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-500);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    background: white;
}

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

.password-input {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: var(--primary-500);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.forgot-link {
    color: var(--primary-500);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-link:hover {
    color: var(--secondary-500);
}

.full-width {
    width: 100%;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 2rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(99, 102, 241, 0.2);
}

.auth-divider span {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 1rem;
    color: var(--gray-500);
    font-size: 0.9rem;
}

.auth-footer {
    text-align: center;
}

.auth-footer-text {
    color: var(--gray-500);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.guest-access {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

.guest-text {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.guest-link {
    color: var(--primary-500);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.guest-link:hover {
    color: var(--secondary-500);
}

.features-preview {


/* Player Game Enhancements */
.question-progress-banner {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.timer-display {
    animation: fadeIn 0.3s ease-in;
}

.timer-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.timer-badge.low-time {
    background: rgba(239, 68, 68, 0.9);
    animation: pulse 1s infinite;
}

.score-display .badge {
    font-size: 1.1rem;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.game-completion-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.5s ease-in;
}

.completion-content {
    max-width: 600px;
    width: 90%;
    animation: slideUp 0.5s ease-out;
}

.final-standings {
    margin: 2rem 0;
}

.final-standings .list-group-item {
    font-size: 1.1rem;
    padding: 1rem;
}

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

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

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

    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
}

.features-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
}

.features-preview .features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    padding: 0;
    max-width: none;
    margin: 0;
}

.feature-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.feature-item .feature-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
    margin: 0;
}

.feature-text {
    font-size: 0.85rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Form validation styles */
.invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--error);
}

.was-validated .form-control:invalid ~ .invalid-feedback {
    display: block;
}

.was-validated .form-control:invalid {
    border-color: var(--error);
}

.was-validated .form-control:valid {
    border-color: var(--success);
}

/* Alert styles for flash messages */
.alert {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-dismissible .btn-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 2;
    padding: 0.75rem 1rem;
    color: inherit;
    background: transparent;
    border: 0;
    opacity: 0.5;
}

.alert-dismissible .btn-close:hover {
    opacity: 1;
}

/* Password requirements text */
.password-requirements {
    margin-top: 0.25rem;
}

.password-requirements small {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Game code input styling */
.game-code-input {
    font-family: 'Courier New', monospace;
    font-size: 1.5rem !important;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.form-helper {
    margin-top: 0.5rem;
}

.form-helper small {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Auth actions for multiple buttons */
.auth-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.auth-actions .btn-secondary,
.auth-actions .btn-outline {
    flex: 1;
    min-width: 120px;
}

/* Host CTA section */
.host-cta {
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    color: white;
    margin-top: 2rem;
}

.host-cta-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.host-cta-text {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.btn-gradient {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-500);
    color: var(--primary-500);
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-outline:hover {
    background: var(--primary-500);
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* ========================================
   13. DASHBOARD PAGES
   ======================================== */

.dashboard-section {
    min-height: 100vh;
    padding: 2rem 0;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.05) 0%, 
        rgba(245, 158, 11, 0.05) 100%);
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.user-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    flex-shrink: 0;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    color: var(--gray-600);
    font-size: 1.1rem;
    margin: 0;
}

.stats-section {
    margin-bottom: 3rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
}

.actions-section,
.activity-section,
.achievements-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 1.5rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.action-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
}

.action-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-bottom: 1rem;
}

.action-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.action-description {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.activity-list {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    font-size: 1.25rem;
}

.activity-title {
    font-weight: 600;
    color: var(--gray-800);
}

.activity-meta {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.achievements-preview {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.achievement-badge {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.achievement-badge:hover {
    transform: translateY(-2px);
}

.achievement-badge.locked {
    opacity: 0.5;
    filter: grayscale(100%);
}

.achievement-text {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
}

.achievement-more {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-500);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Host Dashboard Specific Styles */
.dashboard-container {
    background: var(--gray-50);
    min-height: 100vh;
    padding: 2rem 1rem;
}

.dashboard-header {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.dashboard-title {
    color: var(--gray-900);
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

.dashboard-subtitle {
    color: var(--gray-600);
    margin: 0.5rem 0 0 0;
    font-size: 1rem;
}

.host-avatar {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
    color: white;
    width: 4rem;
    height: 4rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
}

.header-actions .btn-primary,
.header-actions .btn-secondary {
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
}

.stats-section {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: white;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

.stat-icon.success {
    background: linear-gradient(135deg, #10b981, #059669);
}

.stat-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.stat-icon.info {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.875rem;
    margin: 0;
}

.actions-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    color: var(--gray-900);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
}

.status-filter {
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    background: white;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.game-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.game-title {
    color: var(--gray-900);
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.game-status {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-waiting {
    background: #fef3c7;
    color: #92400e;
}

.status-completed {
    background: #dbeafe;
    color: #1e40af;
}

.game-code {
    font-family: 'SF Mono', 'Monaco', monospace;
    background: var(--gray-100);
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.game-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.game-meta span {
    display: flex;
    align-items: center;
}

.game-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.game-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.game-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.game-date {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: right;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.empty-title {
    color: var(--gray-900);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-description {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        padding: 1rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .header-actions {
        margin-left: 0;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.status-filter {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--gray-800);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.game-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.2;
}

.game-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.status-waiting {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.status-completed {
    background: rgba(6, 182, 212, 0.1);
    color: #155e75;
}

.game-info {
    margin-bottom: 1rem;
}

.game-code {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-500);
    margin-bottom: 0.5rem;
}

.game-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.game-timer,
.game-review,
.game-category {
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}

.game-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.game-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.game-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.game-date {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-align: right;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1.5rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.empty-description {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* Form Page Styles */
.form-section {
    padding: 2rem 0 4rem;
    min-height: 100vh;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1rem;
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.header-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.page-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 8px 32px rgba(99, 102, 241, 0.3);
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-800);
    margin: 0;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    margin: 0;
}

.form-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.1);
}

.modern-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-section-group {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.section-header {
    display: flex;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.1);
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
}

.section-title i {
    color: var(--primary-500);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-field.col-span-2 {
    grid-column: 1 / -1;
}

.field-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.25rem;
}

.field-input,
.field-select {
    padding: 0.75rem 1rem;
    border: 2px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    font-size: 1rem;
    background: white;
    transition: all 0.3s ease;
    outline: none;
}

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

.field-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin: 0;
}

.field-hint.success {
    color: var(--green-600);
}

.required {
    color: var(--red-500);
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-free {
    background: rgba(16, 185, 129, 0.1);
    color: var(--green-700);
}

.badge-premium {
    background: linear-gradient(135deg, var(--secondary-500), var(--primary-500));
    color: white;
}

.premium-upgrade-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(99, 102, 241, 0.1));
    border: 2px solid rgba(245, 158, 11, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
}

.upgrade-content {
    text-align: center;
}

.upgrade-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--secondary-500), var(--primary-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin: 0 auto 1rem;
}

.upgrade-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.upgrade-description {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.upgrade-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-premium {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--secondary-500), var(--primary-500));
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.3);
    color: white;
    text-decoration: none;
}

.question-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.question-type-option {
    position: relative;
}

.type-radio {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.type-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: white;
    border: 2px solid rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.type-label:hover {
    border-color: var(--primary-500);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.type-radio:checked + .type-label {
    border-color: var(--primary-500);
    background: rgba(99, 102, 241, 0.05);
}

.type-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.type-content {
    text-align: center;
}

.type-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.25rem;
}

.type-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin: 0;
}

.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.field-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 0.125rem;
    accent-color: var(--primary-500);
}

.checkbox-label {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    cursor: pointer;
}

.checkbox-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
}

.checkbox-description {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

@media (max-width: 640px) {
    .form-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    
    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .question-type-grid {
        grid-template-columns: 1fr;
    }
    
    .upgrade-actions {
        flex-direction: column;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .auth-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .features-preview .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .feature-item {
        flex-direction: row;
        justify-content: flex-start;
        text-align: left;
    }
    
    .auth-actions {
        flex-direction: column;
    }
    
    .auth-actions .btn-secondary,
    .auth-actions .btn-outline {
        width: 100%;
    }
    
    .game-code-input {
        font-size: 1.25rem !important;
    }
    
    .host-cta {
        padding: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
    
    .achievements-preview {
        justify-content: center;
    }
}

/* Host Dashboard Bootstrap Override */
/* This ensures Bootstrap design system takes precedence over custom dashboard styles */
.page-wrapper .main-content .container-standard {
    max-width: none !important;
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    min-height: auto !important;
}

/* Host Dashboard specific overrides - disable all custom dashboard styles */
.main-content .dashboard-container,
.main-content .dashboard-header,
.main-content .header-content,
.main-content .user-avatar,
.main-content .dashboard-title,
.main-content .dashboard-subtitle,
.main-content .stats-section,
.main-content .stats-grid,
.main-content .stat-card,
.main-content .stat-icon,
.main-content .stat-value,
.main-content .stat-label,
.main-content .actions-section,
.main-content .section-header,
.main-content .section-title,
.main-content .status-filter,
.main-content .games-grid,
.main-content .game-card,
.main-content .empty-state,
.main-content .empty-icon,
.main-content .empty-title,
.main-content .empty-description {
    all: unset !important;
    display: revert !important;
}

/* Force Bootstrap styling on host dashboard */
.main-content .dashboard-section {
    background: none !important;
    padding: 0 !important;
    min-height: auto !important;
}

/* ========================================
   HOST DASHBOARD CONSISTENT STYLING
   ======================================== */

.dashboard-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, 
        rgba(99, 102, 241, 0.05) 0%, 
        rgba(245, 158, 11, 0.05) 100%);
    min-height: 100vh;
}

.dashboard-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.host-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    flex-shrink: 0;
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.dashboard-subtitle {
    color: var(--gray-600);
    font-size: 1.1rem;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 0.75rem;
    margin-left: auto;
    flex-wrap: wrap;
}

.stats-section {
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-600));
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success), #059669);
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
}

.stat-icon.info {
    background: linear-gradient(135deg, var(--info), #0891b2);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-800);
    line-height: 1;
}

.stat-label {
    color: var(--gray-600);
    font-size: 0.9rem;
    font-weight: 500;
}

.actions-section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(99, 102, 241, 0.1);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
    display: flex;
    align-items: center;
}

.status-filter {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    color: var(--gray-800);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.game-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.game-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.game-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.2;
    margin: 0;
}

.game-status {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: #065f46;
}

.status-waiting {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.status-completed {
    background: rgba(6, 182, 212, 0.1);
    color: #155e75;
}

.game-info {
    margin-bottom: 1rem;
}

.game-code {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-500);
    margin-bottom: 0.5rem;
}

.game-meta {
    display: flex;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--gray-600);
    flex-wrap: wrap;
}

.game-timer,
.game-review,
.game-category {
    background: rgba(99, 102, 241, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}

.game-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.game-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: var(--gray-600);
}

.game-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 8px;
}

.game-date {
    font-size: 0.8rem;
    color: var(--gray-500);
    text-align: right;
}

.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.empty-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-500), var(--secondary-500));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    margin: 0 auto 1.5rem;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 0.5rem;
}

.empty-description {
    color: var(--gray-600);
    margin-bottom: 2rem;
}

/* Updated stat card animation */
.stat-card.updated {
    background: rgba(99, 102, 241, 0.1);
    animation: pulse-update 2s ease;
}

@keyframes pulse-update {
    0%, 100% { background: rgba(99, 102, 241, 0.1); }
    50% { background: rgba(99, 102, 241, 0.2); }
}

/* Responsive Design for Host Dashboard */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .header-actions {
        margin-left: 0;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .games-grid {
        grid-template-columns: 1fr;
    }
    
    .game-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .game-actions {
        justify-content: center;
    }
}/**
 * TriviPals Visual Polish 2025
 * Targeted fixes for identified design issues
 * - Homepage gradient text contrast
 * - Modern card styling
 * - Typography hierarchy improvements
 */

/* ====================
   HOMEPAGE CONTRAST FIXES
   ==================== */

/* Ensure hero title has proper white color with text shadow for readability */
/* Override gradient text effects that make text transparent */
.hero-title,
.hero-title > div,
.hero-title div,
.hero-section .hero-title,
.hero-section .hero-title div {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.6), 
                 0 2px 10px rgba(0, 0, 0, 0.5),
                 0 0 60px rgba(0, 0, 0, 0.3) !important;
}

/* Keep colored text elements */
.hero-title .text-warning,
.hero-title [style*="color: #fbbf24"] {
    color: #fbbf24 !important;
    -webkit-text-fill-color: #fbbf24 !important;
}

.hero-title .text-info,
.hero-title [style*="color: #67e8f9"],
.hero-title [style*="color: #22d3ee"] {
    color: #67e8f9 !important;
    -webkit-text-fill-color: #67e8f9 !important;
}

/* Hero description with better contrast */
.hero-description {
    color: rgba(255, 255, 255, 0.95) !important;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2) !important;
}

/* Hero badge with better visibility */
.hero-badge {
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Trust indicators */
.trust-indicators {
    color: #ffffff !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.15) !important;
}

/* ====================
   MODERN CARD STYLING
   ==================== */

/* Enhanced card shadows and borders */
.card {
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 
                0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover,
.card-hover:hover {
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 12px 24px rgba(99, 102, 241, 0.12), 
                0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

/* Card headers with better visual hierarchy */
.card-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-bottom: none;
    padding: 1.5rem;
}

.card-header h2,
.card-header h3 {
    color: #ffffff !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Pricing cards specific styling */
.pricing-card-button .card {
    border-radius: 1rem;
}

.pricing-card-button .card-body {
    padding: 2rem 1.5rem;
}

/* ====================
   TYPOGRAPHY IMPROVEMENTS
   ==================== */

/* Enhanced heading hierarchy */
h1 {
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
}

h2 {
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h3 {
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3;
}

/* Better body text readability */
p {
    line-height: 1.7;
    color: var(--text, #374151);
}

/* Improved link contrast */
a:not(.btn):not(.nav-link) {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:not(.btn):not(.nav-link):hover {
    color: #4f46e5;
    text-decoration: underline;
}

/* Feature list items with better spacing */
.feature-item {
    padding: 0.75rem 0;
    font-size: 1rem;
    line-height: 1.6;
}

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

/* Hero buttons with better shadows */
.btn-hero-primary {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3),
                0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

.btn-hero-primary:hover {
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4),
                0 3px 8px rgba(0, 0, 0, 0.15) !important;
}

.btn-hero-outline {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: #ffffff !important;
    backdrop-filter: blur(10px);
}

.btn-hero-outline:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ====================
   RESPONSIVE IMPROVEMENTS
   ==================== */

@media (max-width: 768px) {
    .hero-title,
    .hero-title > div {
        text-shadow: 0 3px 10px rgba(0, 0, 0, 0.35),
                     0 6px 20px rgba(0, 0, 0, 0.2) !important;
    }
    
    .card {
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    }
    
    .feature-item {
        font-size: 0.95rem;
    }
}

/* ====================
   ENHANCED BUTTON STYLES
   ==================== */

/* Primary brand button with delightful hover */
.btn-brand {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    border: none !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    padding: 0.875rem 1.5rem !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.btn-brand:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4) !important;
    background: linear-gradient(135deg, #5855eb 0%, #7c3aed 100%) !important;
}

.btn-brand:active {
    transform: translateY(0) scale(0.98) !important;
}

/* Soft outline button */
.btn-soft {
    background: rgba(99, 102, 241, 0.1) !important;
    border: 2px solid rgba(99, 102, 241, 0.3) !important;
    color: #6366f1 !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
}

.btn-soft:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: #6366f1 !important;
    transform: translateY(-1px) !important;
}

/* ====================
   GLASSMORPHISM CARDS
   ==================== */

/* Modern glassmorphism effect */
.card.shadow-brand {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08),
                0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.card.shadow-brand:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.12),
                0 8px 16px rgba(0, 0, 0, 0.08) !important;
}

/* Enhanced card header gradient */
.card-header {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
    border-bottom: none !important;
    padding: 1.25rem 1.5rem !important;
    border-radius: 1rem 1rem 0 0 !important;
}

.card-header h2,
.card-header h3,
.card-header .section-title {
    color: #ffffff !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

/* ====================
   INPUT FIELD ENHANCEMENTS
   ==================== */

/* Modern input styling */
.form-control {
    border: 2px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 0.875rem 1rem !important;
    transition: all 0.3s ease !important;
    font-size: 1rem !important;
}

.form-control:focus {
    border-color: #6366f1 !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1) !important;
    outline: none !important;
}

.form-control::placeholder {
    color: #9ca3af !important;
}

/* Input group styling */
.input-group-text {
    border: 2px solid #e5e7eb !important;
    background: #f9fafb !important;
    transition: all 0.3s ease !important;
}

.input-group:focus-within .input-group-text {
    border-color: #6366f1 !important;
    background: #f0f0ff !important;
}

.input-group:focus-within .form-control {
    border-color: #6366f1 !important;
}

/* ====================
   MICRO-INTERACTIONS
   ==================== */

/* Link hover effects */
a:not(.btn):not(.nav-link):not(.navbar-brand) {
    transition: color 0.2s ease, transform 0.2s ease !important;
}

a:not(.btn):not(.nav-link):not(.navbar-brand):hover {
    color: #4f46e5 !important;
}

/* Icon animations */
.bi {
    transition: transform 0.2s ease !important;
}

.btn:hover .bi {
    transform: translateX(2px) !important;
}

/* Feature cards hover */
.feature-cards .card:hover {
    transform: translateY(-8px) scale(1.02) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15) !important;
}

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

/* Focus states for keyboard navigation */
.btn:focus-visible,
.card:focus-visible,
a:focus-visible {
    outline: 2px solid #6366f1 !important;
    outline-offset: 2px !important;
}

.form-control:focus-visible {
    outline: none !important;
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {
    .btn-brand {
        border: 2px solid #ffffff !important;
    }
    
    .form-control {
        border-width: 3px !important;
    }
}

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

/* ====================
   ABOUT/FEATURES PAGE HERO TEXT CONTRAST
   ==================== */

/* Fix text gradient on non-homepage hero sections */
.bg-gradient-primary h1.text-white,
.bg-gradient-primary .text-white,
.hero-section.bg-gradient-primary h1,
.hero-section.bg-gradient-primary p.lead {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background: none !important;
    background-clip: unset !important;
    -webkit-background-clip: unset !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3) !important;
}

/* Text gradient that's actually visible */
.text-gradient-primary {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
}

/* ====================
   PAGE LOAD ANIMATIONS
   ==================== */

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

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

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

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

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

/* Apply animations to page sections */
.hero-section {
    animation: fadeIn 0.6s ease-out;
}

.content-section,
.features-section,
.cta-section {
    animation: fadeInUp 0.6s ease-out;
}

/* Staggered card animations */
.card {
    animation: fadeInUp 0.5s ease-out backwards;
}

.row .card:nth-child(1) { animation-delay: 0.1s; }
.row .card:nth-child(2) { animation-delay: 0.2s; }
.row .card:nth-child(3) { animation-delay: 0.3s; }
.row .card:nth-child(4) { animation-delay: 0.4s; }
.row .card:nth-child(5) { animation-delay: 0.5s; }
.row .card:nth-child(6) { animation-delay: 0.6s; }

/* ====================
   ENHANCED CARD HOVER EFFECTS
   ==================== */

/* Feature cards with lift effect */
.feature-card,
.card.shadow-sm,
.card.shadow-lg {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 16px !important;
}

.feature-card:hover,
.card.shadow-sm:hover,
.card.shadow-lg:hover {
    transform: translateY(-8px) !important;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15),
                0 8px 16px rgba(0, 0, 0, 0.1) !important;
}

/* Add subtle glow on hover */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.feature-card:hover::before {
    opacity: 1;
}

/* ====================
   PRICING PAGE ENHANCEMENTS
   ==================== */

/* Pricing card premium styling */
.pricing-card {
    border-radius: 20px !important;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.pricing-card:hover {
    transform: translateY(-10px) scale(1.02) !important;
    box-shadow: 0 25px 50px rgba(99, 102, 241, 0.2) !important;
}

/* Pricing header gradients */
.pricing-card .card-header {
    padding: 2rem 1.5rem !important;
}

/* Feature list styling */
.pricing-card .list-unstyled li {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pricing-card .list-unstyled li:last-child {
    border-bottom: none;
}

/* Pricing button styling */
.pricing-card .btn {
    padding: 1rem 2rem !important;
    font-weight: 600 !important;
    border-radius: 12px !important;
}

/* ====================
   404 ERROR PAGE POLISH
   ==================== */

.error-page {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.error-icon {
    font-size: 6rem;
    color: #f59e0b;
    animation: pulse 2s infinite;
}

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

.error-code {
    font-size: 8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* ====================
   FOOTER ENHANCEMENTS
   ==================== */

footer {
    background: linear-gradient(180deg, #1e1b4b 0%, #0f0e24 100%) !important;
    padding: 3rem 0 !important;
}

footer a {
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease !important;
}

footer a:hover {
    color: #ffffff !important;
    transform: translateX(3px);
}

footer h5,
footer h6 {
    color: #ffffff !important;
    font-weight: 600 !important;
    margin-bottom: 1.5rem !important;
}

/* Social links styling */
.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    margin-right: 0.5rem;
    transition: all 0.3s ease !important;
}

.social-links a:hover {
    background: rgba(99, 102, 241, 0.5);
    transform: translateY(-3px);
}

/* ====================
   NAVBAR POLISH
   ==================== */

.navbar {
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.navbar .nav-link {
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    position: relative;
}

.navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
    width: 100%;
}

/* ====================
   BADGE ENHANCEMENTS
   ==================== */

.badge {
    font-weight: 600 !important;
    padding: 0.5em 1em !important;
    border-radius: 999px !important;
}

.badge.bg-primary-subtle {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.1) 100%) !important;
    color: #6366f1 !important;
}

.badge.bg-success-subtle {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15) 0%, rgba(16, 185, 129, 0.1) 100%) !important;
    color: #16a34a !important;
}

/* ====================
   STAT CARDS POLISH
   ==================== */

.stats-grid .card {
    border-radius: 16px !important;
    transition: all 0.3s ease !important;
}

.stats-grid .card:hover {
    transform: scale(1.05) !important;
}

.stats-grid .display-6 {
    font-weight: 800 !important;
    letter-spacing: -0.02em;
}

/* ====================
   PROCESS STEPS STYLING
   ==================== */

.process-step {
    position: relative;
}

.step-icon {
    transition: all 0.4s ease !important;
}

.process-step:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.3);
}

/* ====================
   BENEFIT ITEMS STYLING
   ==================== */

.benefit-item {
    padding-left: 1rem;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    border-left-color: #22c55e;
    background: rgba(34, 197, 94, 0.05);
    padding-left: 1.5rem;
}

/* ====================
   SCROLL REVEAL CLASSES
   ==================== */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ====================
   DARK MODE SUPPORT
   ==================== */

@media (prefers-color-scheme: dark) {
    .card {
        background: rgba(30, 27, 75, 0.8) !important;
        border-color: rgba(99, 102, 241, 0.2) !important;
    }
    
    .form-control {
        background: rgba(30, 27, 75, 0.6) !important;
        border-color: rgba(99, 102, 241, 0.3) !important;
        color: #ffffff !important;
    }
}
