/* Modern & Decorative Quiz App Styles - 2025 Edition */

/* CSS Variables for Theme */
:root {
  /* Primary Colors */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --secondary: #ec4899;
  --secondary-dark: #db2777;
  --secondary-light: #f472b6;
  
  /* Accent Colors */
  --accent-1: #06b6d4;
  --accent-2: #8b5cf6;
  --accent-3: #f59e0b;
  --accent-4: #10b981;
  
  /* Semantic Colors */
  --success: #10b981;
  --success-light: #d1fae5;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --info: #3b82f6;
  --info-light: #dbeafe;
  
  /* Neutral Colors */
  --dark: #0f172a;
  --dark-800: #1e293b;
  --dark-700: #334155;
  --gray-600: #475569;
  --gray-500: #64748b;
  --gray-400: #94a3b8;
  --gray-300: #cbd5e1;
  --gray-200: #e2e8f0;
  --gray-100: #f1f5f9;
  --white: #ffffff;
  
  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  --gradient-accent: linear-gradient(135deg, var(--accent-1) 0%, var(--accent-2) 100%);
  --gradient-success: linear-gradient(135deg, var(--accent-4) 0%, var(--accent-1) 100%);
  --gradient-warm: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-cool: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --gradient-dark: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: transparent;
  color: var(--dark);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(-45deg, 
    #667eea, 
    #764ba2, 
    #f093fb, 
    #f5576c,
    #06b6d4,
    #8b5cf6
  );
  background-size: 400% 400%;
  animation: gradientShift 20s ease infinite;
  z-index: -2;
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Floating Shapes */
.floating-shapes {
  position: fixed;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(1px);
  animation: float 25s infinite ease-in-out;
}

.shape:nth-child(1) { width: 100px; height: 100px; left: 5%; top: 15%; animation-delay: 0s; }
.shape:nth-child(2) { width: 70px; height: 70px; left: 75%; top: 65%; animation-delay: 3s; }
.shape:nth-child(3) { width: 120px; height: 120px; left: 90%; top: 5%; animation-delay: 6s; }
.shape:nth-child(4) { width: 50px; height: 50px; left: 20%; top: 85%; animation-delay: 9s; }
.shape:nth-child(5) { width: 80px; height: 80px; left: 55%; top: 45%; animation-delay: 12s; }
.shape:nth-child(6) { width: 60px; height: 60px; left: 35%; top: 25%; animation-delay: 15s; }
.shape:nth-child(7) { width: 90px; height: 90px; left: 80%; top: 80%; animation-delay: 18s; }
.shape:nth-child(8) { width: 40px; height: 40px; left: 10%; top: 60%; animation-delay: 21s; }

@keyframes float {
  0%, 100% { 
    transform: translateY(0px) rotate(0deg) scale(1); 
  }
  25% { 
    transform: translateY(-30px) rotate(90deg) scale(1.05); 
  }
  50% { 
    transform: translateY(20px) rotate(180deg) scale(0.95); 
  }
  75% { 
    transform: translateY(-15px) rotate(270deg) scale(1.02); 
  }
}

/* Glass Morphism */
.glass-morphism {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  transition: all var(--transition-base);
}

.glass-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-2xl);
}

/* Navbar Styling */
.navbar {
  background: rgba(255, 255, 255, 0.9) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-lg);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-base);
}

.navbar.scrolled {
  padding: var(--space-sm) 0;
  box-shadow: var(--shadow-xl);
}

.navbar-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.navbar-brand i {
  -webkit-text-fill-color: var(--primary);
  font-size: 1.5rem;
}

.nav-link {
  position: relative;
  font-weight: 500;
  color: var(--gray-600) !important;
  padding: var(--space-sm) var(--space-md) !important;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary) !important;
  background: rgba(99, 102, 241, 0.1);
}

.nav-link.active {
  color: var(--primary) !important;
  background: rgba(99, 102, 241, 0.15);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-success {
  background: var(--gradient-success);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Buttons */
.btn {
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-lg);
  border: none;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s;
}

.btn:hover::before {
  left: 100%;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--gradient-primary);
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-success {
  background: linear-gradient(135deg, var(--accent-4) 0%, var(--accent-1) 100%);
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.5);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-outline-primary {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline-primary:hover {
  background: var(--primary);
  color: white;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

/* Cards */
.card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-base);
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-2xl);
}

.card-header {
  background: var(--gradient-primary);
  color: white;
  border: none;
  padding: var(--space-lg);
  position: relative;
  overflow: hidden;
}

.card-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.card-body {
  padding: var(--space-xl);
}

/* Forms */
.form-control {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1rem;
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  background: white;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
  outline: none;
}

.form-label {
  font-weight: 600;
  color: var(--dark-700);
  margin-bottom: var(--space-sm);
}

/* Quiz Specific Styles */
.quiz-header {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  color: white;
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  margin-bottom: var(--space-xl);
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.quiz-header::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
  border-radius: 50%;
}

.quiz-header h4 {
  color: white;
  position: relative;
  z-index: 1;
}

/* Question Card */
.question-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  padding: var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.question-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
}

.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: var(--gradient-primary);
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  border-radius: var(--radius-full);
  margin-right: var(--space-md);
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* Option Styling */
.option-card {
  background: rgba(255, 255, 255, 0.8);
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  cursor: pointer;
  transition: all var(--transition-base);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.option-card:hover {
  background: rgba(99, 102, 241, 0.05);
  border-color: var(--primary-light);
  transform: translateX(8px);
  box-shadow: var(--shadow-md);
}

.option-card.selected {
  background: rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.option-card input[type="radio"] {
  display: none;
}

.option-indicator {
  width: 24px;
  height: 24px;
  border: 2px solid var(--gray-400);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.option-card:hover .option-indicator {
  border-color: var(--primary);
}

.option-card.selected .option-indicator {
  background: var(--primary);
  border-color: var(--primary);
}

.option-card.selected .option-indicator::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: bold;
}

/* Feedback Styling for Correct/Incorrect Options */
.option-card.correct {
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: var(--success) !important;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.15) !important;
}

.option-card.correct .option-indicator {
  background: var(--success) !important;
  border-color: var(--success) !important;
}

.option-card.correct .option-indicator::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.option-card.incorrect {
  background: rgba(239, 68, 68, 0.1) !important;
  border-color: var(--danger) !important;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15) !important;
}

.option-card.incorrect .option-indicator {
  background: var(--danger) !important;
  border-color: var(--danger) !important;
}

.option-card.incorrect .option-indicator::after {
  content: '✗';
  color: white;
  font-size: 14px;
  font-weight: bold;
}

/* Timer */
.timer-container {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--gradient-accent);
  color: white;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1.25rem;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
  position: relative;
  overflow: hidden;
}

.timer-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

.timer-container i {
  font-size: 1.5rem;
}

/* Progress Bar */
.progress-container {
  margin: var(--space-lg) 0;
}

.progress-bar-custom {
  height: 12px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #10b981, #06b6d4);
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
  position: relative;
  overflow: hidden;
}

.progress-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  animation: shimmer 2s infinite;
}

/* Results Page */
.result-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-2xl);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-2xl);
  padding: var(--space-3xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.result-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: var(--gradient-success);
}

.result-score {
  font-size: 5rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin: var(--space-xl) 0;
}

.result-score span {
  font-size: 2rem;
  opacity: 0.7;
}

.stat-box {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  text-align: center;
  transition: all var(--transition-base);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.stat-box:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.stat-box i {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.stat-box h3 {
  font-size: 2rem;
  margin-bottom: var(--space-xs);
}

/* Badges */
.badge {
  padding: 0.5rem 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.badge-gradient-primary {
  background: var(--gradient-primary);
  color: white;
}

.badge-gradient-success {
  background: var(--gradient-success);
  color: white;
}

/* Table Styling */
.table {
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.table thead th {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  font-weight: 600;
  border: none;
  padding: var(--space-md);
}

.table tbody tr {
  transition: all var(--transition-fast);
}

.table tbody tr:hover {
  background: rgba(99, 102, 241, 0.05);
}

/* Alerts */
.alert {
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.alert-success {
  background: linear-gradient(135deg, var(--success-light) 0%, #ecfdf5 100%);
  color: #065f46;
}

.alert-danger {
  background: linear-gradient(135deg, var(--danger-light) 0%, #fef2f2 100%);
  color: #991b1b;
}

.alert-warning {
  background: linear-gradient(135deg, var(--warning-light) 0%, #fffbeb 100%);
  color: #92400e;
}

.alert-info {
  background: linear-gradient(135deg, var(--info-light) 0%, #eff6ff 100%);
  color: #1e40af;
}

/* Animations */
@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.animate-slide-up {
  animation: slideInUp 0.6s ease-out;
}

.animate-fade-in {
  animation: fadeIn 0.5s ease-out;
}

.animate-scale-in {
  animation: scaleIn 0.5s ease-out;
}

.animate-pulse {
  animation: pulse 2s infinite;
}

/* Decorative Elements */
.decoration-circle {
  position: absolute;
  border-radius: 50%;
  opacity: 0.1;
  pointer-events: none;
}

.decoration-dots {
  background-image: radial-gradient(circle, var(--primary) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0.1;
}

/* Quiz List Cards */
.quiz-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition-base);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.quiz-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-2xl);
}

.quiz-card .card-body {
  flex: 1;
  padding: var(--space-xl);
}

.quiz-card .card-footer {
  background: transparent;
  border-top: 1px solid var(--gray-200);
  padding: var(--space-lg);
}

.quiz-meta-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}

.quiz-meta-item i {
  font-size: 1.1rem;
}

/* Search Box */
.search-box {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

/* Login Card */
.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-2xl);
  border: 1px solid rgba(255, 255, 255, 0.8);
  overflow: hidden;
}

.login-card .card-header {
  background: var(--gradient-primary);
  padding: var(--space-2xl);
  text-align: center;
}

/* Accordion for Results */
.accordion-item {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.accordion-button {
  background: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  padding: var(--space-lg);
}

.accordion-button:not(.collapsed) {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

/* Question text wrap for mobile */
.question-text-wrap {
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-align: left;
  line-height: 1.4;
}

.accordion-button .question-text-wrap {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (max-width: 575.98px) {
  .accordion-button {
    padding: var(--space-md);
    flex-wrap: wrap;
  }
  
  .accordion-button .question-text-wrap {
    display: block;
    -webkit-line-clamp: unset;
    overflow: visible;
    width: 100%;
    margin-top: var(--space-sm);
    padding-left: calc(28px + var(--space-md));
    font-size: 0.9rem;
  }
  
  .accordion-button .question-number {
    width: 24px !important;
    height: 24px !important;
    font-size: 0.75rem !important;
  }
}

/* Responsive Design */
@media (max-width: 1200px) {
  h1 { font-size: 2.25rem; }
  h2 { font-size: 1.875rem; }
  .result-score { font-size: 4rem; }
}

@media (max-width: 992px) {
  .navbar-brand {
    font-size: 1.5rem;
  }
  
  .quiz-header {
    padding: var(--space-lg);
  }
  
  .question-card {
    padding: var(--space-xl);
  }
  
  .result-card {
    padding: var(--space-2xl);
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.625rem; }
  h3 { font-size: 1.375rem; }
  
  .btn {
    padding: 0.625rem 1.25rem;
  }
  
  .btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
  }
  
  .quiz-header {
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
  }
  
  .quiz-header h4 {
    font-size: 1.5rem;
  }
  
  .question-card {
    padding: var(--space-lg);
    border-radius: var(--radius-xl);
  }
  
  .question-number {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  
  .option-card {
    padding: var(--space-md);
  }
  
  .timer-container {
    padding: var(--space-sm) var(--space-md);
    font-size: 1.1rem;
  }
  
  .result-card {
    padding: var(--space-xl);
  }
  
  .result-score {
    font-size: 3rem;
  }
  
  .stat-box {
    padding: var(--space-lg);
    margin-bottom: var(--space-md);
  }
  
  .card-body {
    padding: var(--space-lg);
  }
  
  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
}

@media (max-width: 576px) {
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  
  .navbar-brand {
    font-size: 1.25rem;
  }
  
  .quiz-header h4 {
    font-size: 1.25rem;
  }
  
  .question-card {
    padding: var(--space-md);
  }
  
  .option-card {
    padding: var(--space-sm) var(--space-md);
  }
  
  /* Ensure feedback colors are visible on mobile */
  .option-card.correct {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: var(--success) !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2) !important;
  }
  
  .option-card.incorrect {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
  }
  
  .result-score {
    font-size: 2.5rem;
  }
  
  .result-score span {
    font-size: 1.5rem;
  }
  
  .stat-box h3 {
    font-size: 1.5rem;
  }
  
  .btn-group {
    flex-direction: column;
    gap: var(--space-sm);
  }
  
  .btn-group .btn {
    border-radius: var(--radius-lg) !important;
  }
}

/* Autocomplete Dropdown */
#autocomplete-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  box-shadow: var(--shadow-xl);
  max-height: 350px;
  overflow-y: auto;
  margin-top: var(--space-xs);
}

#autocomplete-dropdown .card {
  border: none;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  box-shadow: none;
  margin: 0;
}

#autocomplete-dropdown .list-group-item {
  border: none;
  padding: var(--space-md) var(--space-lg);
  transition: all var(--transition-fast);
  background: transparent;
}

#autocomplete-dropdown .list-group-item:hover {
  background: rgba(99, 102, 241, 0.1);
  transform: translateX(4px);
}

#autocomplete-dropdown .list-group-item .fw-semibold {
  color: var(--dark);
  font-weight: 600;
}

/* Pagination Enhancement */
.pagination .page-link {
  border: none;
  color: var(--gray-600);
  padding: var(--space-sm) var(--space-md);
  margin: 0 2px;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
}

.pagination .page-link:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.pagination .page-item.active .page-link {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
  transform: translateY(-2px);
}

.pagination .page-item.disabled .page-link {
  color: var(--gray-400);
  opacity: 0.6;
}

/* Print Styles */
@media print {
  .animated-bg,
  .floating-shapes,
  .navbar,
  .btn,
  #autocomplete-dropdown,
  .pagination {
    display: none !important;
  }
  
  body {
    background: white !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}

/* Focus Visible for Accessibility */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* Selection Color */
::selection {
  background: rgba(99, 102, 241, 0.3);
  color: var(--dark);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}

/* Loading Spinner */
.spinner-border {
  width: 3rem;
  height: 3rem;
  border-width: 0.3em;
}

/* Skip Link for Accessibility */
.skip-link {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: var(--space-md) var(--space-xl);
  border-radius: var(--radius-lg);
  z-index: 10000;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.3s ease;
}

.skip-link:focus {
  top: 10px;
}

/* Mobile Navigation */
.mobile-nav {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-lg);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.mobile-nav .navbar-brand {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.25rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.mobile-nav .navbar-brand i {
  -webkit-text-fill-color: var(--primary);
  font-size: 1.25rem;
}

/* Offcanvas Styling */
.offcanvas {
  width: 320px !important;
  max-width: 85vw;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.offcanvas-header {
  background: var(--gradient-primary);
  color: white;
  padding: var(--space-lg);
}

.offcanvas-header .btn-close {
  filter: brightness(0) invert(1);
}

.offcanvas-title {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
}

.offcanvas-title i {
  font-size: 1.5rem;
}

/* Mobile User Section */
.mobile-user-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(236, 72, 153, 0.1) 100%);
}

.mobile-avatar {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Navigation Items */
.mobile-nav-links {
  display: flex;
  flex-direction: column;
}

.mobile-nav-item {
  display: flex;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  color: var(--dark-700);
  text-decoration: none;
  border-bottom: 1px solid var(--gray-200);
  transition: all var(--transition-fast);
  gap: var(--space-md);
}

.mobile-nav-item i:first-child {
  font-size: 1.25rem;
  width: 24px;
  text-align: center;
  color: var(--primary);
}

.mobile-nav-item span {
  flex: 1;
  font-weight: 500;
}

.mobile-nav-item i:last-child {
  color: var(--gray-400);
  font-size: 0.875rem;
}

.mobile-nav-item:hover {
  background: rgba(99, 102, 241, 0.08);
  color: var(--primary);
}

.mobile-nav-item.active {
  background: rgba(99, 102, 241, 0.12);
  color: var(--primary);
  font-weight: 600;
}

.mobile-nav-item.active i:first-child {
  color: var(--primary);
}

.mobile-nav-divider {
  padding: var(--space-sm) var(--space-lg);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-500);
  background: var(--gray-100);
  border-bottom: 1px solid var(--gray-200);
}

/* Mobile Auth Section */
.mobile-auth-section {
  position: sticky;
  bottom: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
}

/* Dropdown Animation */
.dropdown-menu-animate {
  animation: dropdownFadeIn 0.2s ease-out;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer Links */
.footer-links {
  flex-direction: row;
}

.footer-link {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.footer-link:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary) !important;
}

/* Footer */
footer {
  margin-top: auto;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border-top: 1px solid rgba(255, 255, 255, 0.6);
}

/* Utility Classes */
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }
.gap-5 { gap: var(--space-xl); }

.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }

.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

.opacity-75 { opacity: 0.75; }
.opacity-50 { opacity: 0.5; }

.hover-lift {
  transition: transform var(--transition-base);
}

.hover-lift:hover {
  transform: translateY(-4px);
}

/* ============================================
   Contributor Home Page Styles
   ============================================ */

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
  color: white;
  padding: 60px 0;
  margin: -24px -15px 40px -15px;
  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"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
  background-size: 100px 100px;
  opacity: 0.3;
}

.sports-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.rules-card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.rules-card:hover {
  transform: translateY(-5px);
}

.rule-number {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  margin-right: 15px;
  flex-shrink: 0;
}

.cta-section {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 50px 0;
  margin: 40px -15px -24px -15px;
  border-radius: 20px 20px 0 0;
}

.benefit-item {
  padding: 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 10px;
  margin-bottom: 15px;
}

.benefit-item i {
  font-size: 2rem;
  margin-bottom: 10px;
  display: block;
}

/* ============================================
   Dashboard Sidebar Styles
   ============================================ */

.sidebar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-right: 1px solid rgba(255, 255, 255, 0.6);
  min-height: calc(100vh - 200px);
}

.sidebar .nav-link {
  color: var(--gray-600);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-xs);
  transition: all var(--transition-fast);
}

.sidebar .nav-link:hover {
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.sidebar .nav-link.active {
  background: var(--gradient-primary);
  color: white;
}

/* ============================================
   Additional Responsive Improvements
   ============================================ */

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
  .hero-section {
    padding: 40px 0;
    margin: -16px -12px 30px -12px;
  }
  
  .hero-section h1 {
    font-size: 1.75rem;
  }
  
  .hero-section .lead {
    font-size: 1rem;
  }
  
  .sports-icon {
    font-size: 3rem;
  }
  
  .cta-section {
    padding: 30px 0;
    margin: 30px -12px -16px -12px;
    border-radius: 15px 15px 0 0;
  }
  
  .cta-section h2 {
    font-size: 1.5rem;
  }
  
  .benefit-item {
    padding: 15px;
  }
  
  .benefit-item i {
    font-size: 1.5rem;
  }
  
  .footer-links {
    flex-direction: column;
    gap: var(--space-sm) !important;
  }
  
  .footer-link {
    display: block;
    padding: var(--space-sm);
  }
  
  /* Quiz cards on mobile */
  .quiz-card .card-body {
    padding: var(--space-lg);
  }
  
  .quiz-meta-item {
    font-size: 0.875rem;
  }
  
  /* Search box on mobile */
  .search-box {
    padding: var(--space-lg);
  }
  
  /* Result card on mobile */
  .result-card {
    padding: var(--space-xl);
  }
  
  .result-score {
    font-size: 3rem;
  }
  
  /* Question card on mobile */
  .question-card {
    padding: var(--space-lg);
  }
  
  .question-number {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  /* Timer on mobile */
  .timer-container {
    padding: var(--space-sm) var(--space-md);
    font-size: 1rem;
  }
  
  /* Stat boxes on mobile */
  .stat-box {
    padding: var(--space-md);
  }
  
  .stat-box i {
    font-size: 2rem;
  }
  
  .stat-box h3 {
    font-size: 1.5rem;
  }
}

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero-section {
    padding: 50px 0;
  }
  
  .hero-section h1 {
    font-size: 2rem;
  }
  
  .cta-section {
    padding: 40px 0;
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero-section {
    padding: 50px 0;
  }
  
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  /* Dashboard sidebar on tablet */
  .sidebar {
    position: fixed;
    left: -250px;
    top: 0;
    height: 100vh;
    z-index: 1050;
    transition: left 0.3s ease;
  }
  
  .sidebar.show {
    left: 0;
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
  }
  
  .sidebar-overlay.show {
    display: block;
  }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  /* Larger touch targets */
  .btn {
    min-height: 44px;
    min-width: 44px;
  }
  
  .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  
  .mobile-nav-item {
    min-height: 52px;
  }
  
  .option-card {
    min-height: 56px;
    padding: var(--space-md) var(--space-lg);
  }
  
  /* Remove hover effects on touch devices */
  .quiz-card:hover,
  .glass-card:hover,
  .rules-card:hover {
    transform: none;
  }
  
  .btn:hover::before {
    left: -100%;
  }
  
  /* Ensure feedback colors show on mobile/touch devices */
  .option-card.correct,
  .option-card.correct:hover {
    background: rgba(16, 185, 129, 0.15) !important;
    border-color: var(--success) !important;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2) !important;
  }
  
  .option-card.incorrect,
  .option-card.incorrect:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    border-color: var(--danger) !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2) !important;
  }
  
  .option-card.correct .option-indicator {
    background: var(--success) !important;
    border-color: var(--success) !important;
  }
  
  .option-card.incorrect .option-indicator {
    background: var(--danger) !important;
    border-color: var(--danger) !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --primary: #4338ca;
    --primary-dark: #3730a3;
  }
  
  .btn-primary {
    border: 2px solid white;
  }
  
  .card {
    border: 2px solid var(--dark);
  }
  
  .alert {
    border: 2px solid currentColor;
  }
}

/* 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;
  }
  
  .animated-bg {
    animation: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  }
  
  .floating-shapes {
    display: none;
  }
  
  .shape {
    animation: none;
  }
}

/* Dark mode support (optional - for future) */
@media (prefers-color-scheme: dark) {
  /* Add dark mode styles here if needed */
}

/* Print styles */
@media print {
  .animated-bg,
  .floating-shapes,
  .navbar,
  .mobile-nav,
  .offcanvas,
  .btn,
  #autocomplete-dropdown,
  .pagination,
  footer {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    background: white !important;
  }
  
  .container {
    max-width: 100% !important;
    padding: 0 !important;
  }
}
