/* Modern UFC Pick'em Design System - Awwwards Inspired */

/* ===== CSS VARIABLES & DESIGN TOKENS ===== */
:root {
  /* Colors - Sporty Palette */
  --primary: #FFD700;
  --primary-dark: #DAA520;
  --secondary: #1E3A8A;
  --accent: #00D4FF;
  --success: #16A34A;
  --warning: #F59E0B;
  --error: #DC2626;
  
  /* Neutral Colors */
  --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;
  
  /* Dark Theme */
  --bg-primary: #0A0A0B;
  --bg-secondary: #12131A;
  --bg-tertiary: #1A1B23;
  --bg-card: rgba(26, 27, 35, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.05);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  
  /* Fluid Typography */
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.3vw, 1rem);
  --text-base: clamp(1rem, 0.9rem + 0.4vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.5vw, 1.25rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
  --text-3xl: clamp(2rem, 1.7rem + 1.2vw, 2.5rem);
  --text-4xl: clamp(2.5rem, 2rem + 2vw, 3.5rem);
  
  /* Spacing */
  --space-xs: clamp(0.25rem, 0.2rem + 0.2vw, 0.5rem);
  --space-sm: clamp(0.5rem, 0.4rem + 0.4vw, 0.75rem);
  --space-md: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
  --space-lg: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --space-xl: clamp(2rem, 1.6rem + 1.6vw, 3rem);
  --space-2xl: clamp(3rem, 2.4rem + 2.4vw, 4rem);
  
  /* Borders & Radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  
  /* 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);
  --shadow-glow: 0 0 20px rgb(255 107 53 / 0.3);
  
  /* Transitions */
  --transition-micro: 100ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-spring: 500ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Enhanced Gradients */
  --gradient-gold: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  --gradient-accent: linear-gradient(135deg, #00D4FF 0%, #1E3A8A 100%);
  --gradient-success: linear-gradient(135deg, #16A34A 0%, #059669 100%);
  --gradient-danger: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);

  /* Enhanced Glass Effects */
  --glass-enhanced: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.15);
  --backdrop-blur: blur(20px);
  --backdrop-blur-strong: blur(40px);

  /* Glow Effects */
  --glow-gold: 0 0 20px rgba(255, 215, 0, 0.3);
  --glow-accent: 0 0 20px rgba(0, 212, 255, 0.3);
  --glow-success: 0 0 20px rgba(22, 163, 74, 0.3);
}

/* ===== RESET & BASE STYLES ===== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-100);
  background: var(--bg-primary);
  min-height: 100vh;
  font-feature-settings: 'kern' 1;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===== ENHANCED BACKGROUND SYSTEM ===== */
.background-slideshow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -10;
  overflow: hidden;
  pointer-events: none; /* Ensure background doesn't block clicks */
}

.bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 2s cubic-bezier(0.4, 0, 0.2, 1),
              transform 20s cubic-bezier(0.4, 0, 0.2, 1);
  filter: brightness(0.4) contrast(1.1) saturate(1.2);
  pointer-events: none; /* Ensure background images don't block clicks */
}

.bg-image.active {
  opacity: 1;
  transform: scale(1.08) rotate(0.5deg);
}

.bg-image::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none; /* Ensure overlay doesn't block clicks */
  background: linear-gradient(
    135deg,
    rgba(10, 10, 11, 0.9) 0%,
    rgba(18, 19, 26, 0.8) 30%,
    rgba(26, 27, 35, 0.7) 60%,
    rgba(10, 10, 11, 0.9) 100%
  );
  backdrop-filter: blur(1px);
}

/* ===== MODERN GLASSMORPHISM CONTAINERS ===== */
.glass-container {
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.glass-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

/* ===== MODERN NAVIGATION ===== */
.navbar {
  background: rgba(10, 10, 11, 0.95) !important;
  backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-md) 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition-base);
}

.navbar-brand {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--gray-100) !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  transition: var(--transition-fast);
}

.navbar-brand:hover {
  color: var(--primary) !important;
  transform: translateY(-1px);
}

.navbar-brand .fa-trophy {
  color: var(--primary);
  font-size: var(--text-lg);
  filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.5));
}

.nav-link {
  color: var(--gray-300) !important;
  font-weight: 500;
  padding: var(--space-sm) var(--space-md) !important;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
  transition: var(--transition-base);
}

.nav-link:hover {
  color: var(--primary) !important;
  background: rgba(255, 107, 53, 0.1);
  transform: translateY(-1px);
}

.nav-link:hover::before {
  left: 100%;
}

/* ===== ENHANCED DROPDOWN MENUS ===== */
.dropdown-menu {
  background: var(--bg-card) !important;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: var(--shadow-xl) !important;
  padding: var(--space-sm) !important;
  margin-top: var(--space-xs) !important;
  min-width: 200px;
  animation: slideDown var(--transition-fast) ease-out;
}

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

.dropdown-item {
  color: var(--gray-300) !important;
  padding: var(--space-sm) var(--space-md) !important;
  border-radius: var(--radius-sm) !important;
  transition: var(--transition-fast);
  font-weight: 500;
}

.dropdown-item:hover {
  background: rgba(255, 107, 53, 0.1) !important;
  color: var(--primary) !important;
  transform: translateX(4px);
}

/* ===== HERO SECTION ===== */
.hero-section {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  margin: var(--space-xl) auto;
  text-align: center;
  max-width: 900px;
  position: relative;
  overflow: hidden;
  animation: heroEnter 1s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 107, 53, 0.05),
    transparent
  );
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { transform: translateX(-100%); }
  50% { transform: translateX(100%); }
}

.hero-section h1 {
  font-size: var(--text-4xl);
  font-weight: 800;
  color: var(--primary);
  margin-bottom: var(--space-md);
  line-height: 1.2;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section p {
  font-size: var(--text-lg);
  color: var(--gray-300);
  margin-bottom: var(--space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== MODERN BUTTONS ===== */
.btn-modern {
  background: var(--primary);
  color: var(--bg-primary);
  border: none;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  box-shadow: var(--shadow-md);
}

.btn-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition-base);
  opacity: 0;
}

.btn-modern:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
  color: var(--bg-primary);
  text-decoration: none;
}

.btn-modern:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.btn-modern:hover::before {
  left: 100%;
  opacity: 1;
}

.btn-modern:active {
  transform: translateY(0);
  transition: var(--transition-fast);
}

/* Button Variants */
.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--gray-300);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  text-decoration: none;
}

.btn-secondary:hover {
  background: var(--bg-card);
  color: var(--gray-100);
  border-color: var(--primary);
  text-decoration: none;
}

/* Full Width Button */
.btn-block {
  width: 100%;
  display: flex;
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  transition: var(--transition-base);
  position: relative;
  overflow: hidden;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  box-shadow: var(--shadow-md);
}

.btn-outline:hover {
  background: var(--primary);
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
  text-decoration: none;
}

.btn-outline:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.btn-outline:active {
  transform: translateY(0);
}

/* ===== PRIMARY CTA BUTTON ===== */
.btn-primary-cta {
  background: linear-gradient(135deg, var(--primary), var(--warning));
  color: var(--bg-primary);
  border: none;
  font-weight: 700;
  font-size: var(--text-lg);
  padding: var(--space-lg) var(--space-xl);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  position: relative;
  overflow: hidden;
}

.btn-primary-cta::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: var(--transition-base);
}

.btn-primary-cta:hover {
  background: linear-gradient(135deg, var(--warning), var(--primary));
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(255, 215, 0, 0.4);
}

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

.btn-primary-cta:active {
  transform: translateY(-1px);
}

/* ===== MODERN CARDS ===== */
.card-modern {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

.card-modern:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(255, 107, 53, 0.3);
}

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

/* ===== FIGHT CARDS ===== */
.fight-card {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-bottom: var(--space-md);
  transition: var(--transition-slow);
  position: relative;
  overflow: hidden;
  animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

.fight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(255, 107, 53, 0.3);
}

.fighter-names {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--gray-100);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.vs-separator {
  color: var(--primary);
  font-weight: 800;
  font-size: var(--text-base);
}

/* ===== EVENT SECTIONS ===== */
.event-section {
  margin-bottom: var(--space-xl);
  animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) both;
}

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

.event-toggle {
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--gray-100);
  margin-bottom: var(--space-md);
  position: relative;
  overflow: hidden;
}

.event-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 107, 53, 0.1), transparent);
  transition: var(--transition-base);
}

.event-toggle:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  transform: translateY(-1px);
}

.event-toggle:hover::before {
  left: 100%;
}

.toggle-icon {
  color: var(--primary);
  transition: var(--transition-base);
  font-size: var(--text-lg);
}

.event-toggle.open .toggle-icon {
  transform: rotate(180deg);
}

/* ===== FORMS ===== */
.form-modern {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 500px;
  margin: var(--space-xl) auto;
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: var(--space-lg);
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--gray-300);
  margin-bottom: var(--space-sm);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  padding: var(--space-md);
  background: var(--bg-tertiary);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  color: var(--gray-100);
  font-size: var(--text-base);
  transition: var(--transition-base);
}

.form-input::placeholder {
  color: var(--gray-500);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
  background: var(--bg-card);
}

/* ===== FLASH MESSAGES ===== */
.flash-message {
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin: var(--space-md) auto;
  max-width: 600px;
  animation: slideInDown 0.5s cubic-bezier(0.4, 0, 0.2, 1) both;
  position: relative;
  overflow: hidden;
}

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

.flash-success {
  border-left: 4px solid var(--success);
  color: var(--success);
}

.flash-error {
  border-left: 4px solid var(--error);
  color: var(--error);
}

.flash-warning {
  border-left: 4px solid var(--warning);
  color: var(--warning);
}

.flash-info {
  border-left: 4px solid var(--accent);
  color: var(--accent);
}

/* ===== RESPONSIVE DESIGN ===== */
/* ===== TABLET RESPONSIVE (768px and below) ===== */
@media (max-width: 768px) {
  :root {
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 0.75rem;
    --space-lg: 1rem;
    --space-xl: 1.5rem;
    --space-2xl: 2rem;
  }
  
  .container {
    padding: 0 var(--space-md);
  }
  
  .hero-section {
    padding: var(--space-xl);
    margin: var(--space-lg) var(--space-md);
  }
  
  .card-modern,
  .fight-card {
    padding: var(--space-md);
    margin-left: var(--space-sm);
    margin-right: var(--space-sm);
  }
  
  .glass-container {
    margin: var(--space-md);
    padding: var(--space-md) !important;
  }
  
  /* Navigation improvements */
  .navbar-nav {
    text-align: center;
    gap: var(--space-sm);
  }
  
  .navbar-collapse {
    margin-top: var(--space-md);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(-1 * var(--space-md));
  }
  
  .navbar-nav .nav-link {
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
  }
  
  .navbar-nav .nav-link:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
  }
  
  .dropdown-menu {
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: var(--space-sm);
  }
  
  .fighter-names {
    font-size: var(--text-base);
    flex-direction: column;
    text-align: center;
    gap: var(--space-xs);
  }
  
  .vs-separator {
    order: -1;
  }
  
  .btn-modern {
    width: 100%;
    justify-content: center;
    margin-bottom: var(--space-sm);
  }
  
  /* Typography adjustments */
  .hero-section h1 {
    font-size: var(--text-3xl);
  }
  
  .hero-section p {
    font-size: var(--text-base);
  }
}

/* ===== MOBILE RESPONSIVE (480px and below) ===== */
@media (max-width: 480px) {
  :root {
    --space-xs: 0.2rem;
    --space-sm: 0.4rem;
    --space-md: 0.6rem;
    --space-lg: 0.8rem;
    --space-xl: 1.2rem;
    --space-2xl: 1.6rem;
  }
  
  .container {
    padding: 0 var(--space-sm);
  }
  
  .glass-container {
    margin: var(--space-sm);
    padding: var(--space-sm) !important;
    border-radius: var(--radius-md);
  }
  
  .hero-section {
    padding: var(--space-lg);
    margin: var(--space-md);
  }
  
  .hero-section h1 {
    font-size: var(--text-2xl);
    line-height: 1.1;
  }
  
  .hero-section p {
    font-size: var(--text-sm);
    margin-bottom: var(--space-lg);
  }
  
  /* Compact buttons on small mobile */
  .btn-modern {
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
  }
  
  /* Stack navigation items */
  .navbar-brand {
    font-size: var(--text-lg);
  }
  
  /* Improve table readability on small screens */
  .modern-table-wrapper {
    font-size: var(--text-xs);
  }
  
  /* Better touch targets for mobile */
  .btn-modern,
  .btn-secondary,
  .btn-outline {
    min-height: 44px;
    min-width: 44px;
  }
  
  /* Improve form inputs for mobile */
  input, select, textarea {
    font-size: 16px; /* Prevent zoom on iOS */
    min-height: 44px;
  }
  
  /* Stack form elements */
  .form-group {
    margin-bottom: var(--space-lg);
  }
  
  .filter-row {
    grid-template-columns: 1fr !important;
    gap: var(--space-sm) !important;
  }
}

/* ===== SCROLLBAR STYLING ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-dark);
}

/* ===== LOADING ANIMATIONS ===== */
.loading-shimmer {
  background: var(--bg-tertiary);
  opacity: 0.6;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.8; }
}

/* ===== UTILITY CLASSES ===== */
.text-gradient {
  color: var(--primary);
  font-weight: 800;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.glow {
  filter: drop-shadow(0 0 10px rgba(255, 107, 53, 0.5));
}

/* Mobile-specific utilities */
.mobile-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.mobile-hide {
  display: none;
}

.mobile-center {
  text-align: center;
}

.touch-target {
  min-height: 44px;
  min-width: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Improve tap highlights */
* {
  -webkit-tap-highlight-color: rgba(255, 215, 0, 0.2);
}

/* Better scroll behavior on mobile */
.modern-table-wrapper {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

@media (max-width: 768px) {
  .mobile-stack {
    display: flex;
  }
  
  .mobile-hide {
    display: none;
  }
  
  .mobile-center {
    text-align: center;
  }
  
  .desktop-only {
    display: none !important;
  }
}

.blur-bg {
  backdrop-filter: blur(20px);
}

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

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

.slide-in {
  animation: slideInUp 0.6s ease-out both;
}

/* ===== NEW ANIMATIONS ===== */
@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: var(--glow-gold);
  }
  50% {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.5);
  }
}

@keyframes countUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-5px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(5px);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* ===== PAGE CONTENT & LAYOUT ===== */
.page-content {
  position: relative;
  z-index: 2;
}

.alert {
  z-index: 999;
}

/* ===== MODAL Z-INDEX FIXES ===== */
.modal {
  z-index: 9999 !important;
  pointer-events: auto !important;
}

.modal-backdrop {
  z-index: 9998 !important;
  backdrop-filter: none !important; /* Remove blur from backdrop */
  background-color: rgba(0, 0, 0, 0.5) !important; /* Solid dark backdrop */
  pointer-events: none !important; /* Backdrop doesn't block modal clicks */
}

.modal-dialog {
  pointer-events: auto !important;
  z-index: 10000 !important;
  position: relative;
}

.modal-content {
  backdrop-filter: none !important; /* Remove blur from modal content */
  background: var(--bg-secondary) !important; /* Solid background */
  pointer-events: auto !important; /* Modal content is fully clickable */
}

/* ===== MOBILE DROPDOWN FIXES ===== */
@media (max-width: 991.98px) {
  .navbar-nav .dropdown-menu {
    position: static !important;
    transform: none !important;
    border: none;
    box-shadow: none;
    background: transparent;
    padding-left: 1rem;
  }

  .navbar-nav .dropdown-item {
    padding: 0.5rem 1rem;
  }
}

/* ===== ENHANCED MOBILE RESPONSIVE ===== */
/* Small phones (max-width: 480px) */
@media (max-width: 480px) {
  :root {
    --text-xs: 0.688rem;
    --text-sm: 0.813rem;
    --text-base: 0.938rem;
    --text-lg: 1.063rem;
    --text-xl: 1.188rem;
    --text-2xl: 1.375rem;
    --text-3xl: 1.75rem;
    --text-4xl: 2.125rem;
  }

  /* Ensure minimum touch targets */
  button, .btn, a.btn, .nav-link, .dropdown-item, input[type="checkbox"], input[type="radio"] {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Better form spacing on small screens */
  .form-group-enhanced,
  .form-group {
    margin-bottom: var(--space-lg);
  }

  .form-input-enhanced,
  input, select, textarea {
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: var(--space-md);
  }

  /* Stack elements vertically */
  .event-card-actions,
  .league-card-footer,
  .auth-options {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: var(--space-md) !important;
  }

  /* Full-width buttons on mobile */
  .btn, button, .btn-gradient, .btn-secondary, .btn-outline {
    width: 100%;
  }

  /* Better modal sizing */
  .modal-dialog {
    margin: var(--space-sm);
    max-width: calc(100vw - var(--space-md));
  }

  /* Larger tap targets for icons */
  .btn-icon,
  .toast-close {
    min-width: 44px;
    min-height: 44px;
    padding: var(--space-md);
  }

  /* Password toggle needs constrained size to fit in input */
  .password-toggle {
    min-width: 40px;
    min-height: 40px;
    width: 40px;
    height: 40px;
    padding: 8px;
    right: 8px;
  }
}

/* Medium phones (481px - 767px) */
@media (min-width: 481px) and (max-width: 767px) {
  /* Slightly larger but still compact */
  .container {
    max-width: 100%;
    padding: 0 var(--space-lg);
  }

  /* Two-column grid for cards */
  .leagues-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

/* Tablets (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .leagues-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .dashboard-container {
    padding: var(--space-xl);
  }
}

/* Mobile table improvements */
@media (max-width: 768px) {
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  thead {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
  }

  /* Make table cells more readable on mobile */
  td, th {
    padding: var(--space-md) var(--space-sm) !important;
    font-size: var(--text-sm);
  }

  /* Hide less important columns on mobile */
  .mobile-hide-column {
    display: none;
  }
}

/* Landscape orientation optimizations */
@media (max-height: 600px) and (orientation: landscape) {
  .auth-card {
    margin: var(--space-sm) auto;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-dialog {
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* Accessibility: Reduced motion */
@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;
  }

  .countdown-timer i,
  .event-badge.live,
  .float {
    animation: none !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --bg-tertiary: #2a2a2a;
    --text-primary: #ffffff;
    --border-color: #ffffff;
  }

  .btn, button {
    border: 2px solid currentColor;
  }
}

/* Dark mode (system preference) */
@media (prefers-color-scheme: dark) {
  /* Already dark by default, but ensure consistency */
  :root {
    color-scheme: dark;
  }
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
/* Skip Navigation Link */
.skip-nav {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  padding: var(--space-md) var(--space-xl);
  background: var(--primary);
  color: var(--bg-primary);
  font-weight: 700;
  text-decoration: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  transition: top var(--transition-base);
}

.skip-nav:focus {
  top: var(--space-md);
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

/* Enhanced Focus Styles */
*:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

button:focus-visible,
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

/* Remove default focus outline for mouse users */
*:focus:not(:focus-visible) {
  outline: none;
}

/* Keyboard Navigation Indicators */
.nav-link:focus-visible,
.dropdown-item:focus-visible {
  background: rgba(255, 215, 0, 0.15);
  outline-color: var(--primary);
}

/* Improve focus for form controls */
.form-input-enhanced:focus,
.form-select:focus,
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.1);
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Modal Focus Trap */
.modal.show {
  isolation: isolate;
}

.modal-dialog:focus {
  outline: none;
}

/* Screen Reader Only Text */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

.sr-only-focusable:active,
.sr-only-focusable:focus {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* ARIA Live Regions */
[aria-live="polite"],
[aria-live="assertive"] {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Ensure proper color contrast */
.text-muted {
  color: var(--gray-400) !important;
}

/* Better link visibility */
a:not(.btn):not(.nav-link):not(.navbar-brand) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:not(.btn):not(.nav-link):not(.navbar-brand):hover {
  text-decoration-thickness: 2px;
}

/* Focus visible for card-like elements */
.event-card:focus-within,
.league-card:focus-within,
.fight-item:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}