/* ========================================
   Ultra-Modern Football Highlights Design
   ======================================== */

:root {
  /* Advanced Color Palette */
  --primary-bg: #050a30;
  --secondary-bg: linear-gradient(135deg, #0a0a24 0%, #1a1325 100%);
  --accent-primary: #00ffff;
  --accent-secondary: #ff6b6b;
  --text-primary: #ffffff;
  --text-secondary: #b794f6;
  --text-muted: #94a3b8;
  --border-color: rgba(139, 92, 246, 0.2);
  --glow-color: rgba(0, 255, 255, 0.6);

  /* Typography Scale */
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;
  --font-size-4xl: 2.25rem;

  /* Spacing System */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;

  /* 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-glow: 0 0 20px var(--glow-color);
}

/* Global Reset & Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-feature-settings: "liga" 1;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Open Sans', 'Helvetica Neue', sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  font-variant-numeric: oldstyle-nums tabular-nums;
  background: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Glassmorphism Utilities */
.backdrop-blur-glass {
  backdrop-filter: blur(16px) saturate(180%);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

/* Text Styles */
.heading-hero {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  font-size: var(--font-size-4xl);
  font-weight: 400;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(0, 255, 255, 0.3);
  margin-bottom: 20px;
}

.heading-secondary {
  font-size: var(--font-size-2xl);
  font-weight: 700;
  color: var(--text-primary);
}

.heading-tertiary {
  font-size: var(--font-size-xl);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
}

/* H2 Links */
.h2-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.h2-link:hover {
  color: #a8ffb2;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 50%, var(--text-secondary) 100%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-glow {
  text-shadow: 0 0 20px currentColor;
}

/* Layout Containers */
.container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Main Navigation */
.main-nav {
  margin-top: var(--space-4);
  margin-bottom: var(--space-3);
}

.nav-container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--space-4);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0; /* No gap between league links */
  flex-wrap: wrap;
}

.nav-link {
  position: relative;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-size-sm);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  transition: all 0.3s ease;
  border: 1px solid transparent;
  overflow: hidden;
}

.nav-link:hover,
.nav-link.active {
  color: #a8ffb2;
  background: rgba(168, 255, 178, 0.1);
  border-color: rgba(168, 255, 178, 0.3);
}

.nav-link.active {
  background: rgba(168, 255, 178, 0.15);
}

/* Responsive Navigation */
@media (max-width: 768px) {
  .nav-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
  }

  .nav-links {
    gap: var(--space-3);
    padding: 0 var(--space-2);
  }

  .nav-link {
    padding: var(--space-1) var(--space-3);
    font-size: var(--font-size-xs);
  }
}

@media (max-width: 480px) {
  .main-nav {
    margin-top: var(--space-3);
    margin-bottom: var(--space-2);
  }

  .nav-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    align-items: center;
  }

  .nav-links {
    gap: var(--space-2);
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-link {
    padding: var(--space-1) var(--space-2);
    font-size: 12px;
  }
}

/* Site Header */
.site-header {
  position: relative;
  margin-bottom: var(--space-2);
  padding: var(--space-8) 0;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 0 40px rgba(0, 255, 255, 0.05);
}

.site-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%);
 
  pointer-events: none;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

@keyframes headerGlow {
  0% {
    opacity: 0.5;
    transform: scale(1);
  }
  100% {
    opacity: 0.8;
    transform: scale(1.02);
  }
}

.brand-section {
  text-align: center;
  margin-bottom: var(--space-6);
}

.brand-title {
  font-size: var(--font-size-4xl);
  font-weight: 900;
  letter-spacing: -0.025em;
  margin: 0;
  position: relative;
  display: inline-block;
}

.brand-accent-line {
  width: 120px;
  height: 3px;
  background: linear-gradient(90deg, #00ffff, #ff6b6b);
  margin: var(--space-4) auto 0;
  border-radius: 2px;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.4);
}

.brand-logo-link {
  text-decoration: none;
  display: inline-block;
}

.brand-logo {
  height: 65px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.3));
  transition: all 0.3s ease;
}

.header-features {
  display: flex;
  justify-content: center;
  gap: var(--space-8);
  flex-wrap: wrap;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--text-muted);
  font-weight: 500;
}

.feature-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

/* Cards Grid */
.cards-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-8);
  margin-bottom: var(--space-12);
}

.card {
  flex: 1 1 300px;
  max-width: 350px;
}

/* Footer */
.footer {
  margin-top: var(--space-12);
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border-color);
  background: var(--secondary-bg);
  border-radius: var(--radius-2xl);
  background: var(--secondary-bg);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.footer__column {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__link {
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  transition: all 0.3s;
  font-weight: 500;
}

.footer__link:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-primary);
  transform: translateY(-2px);
}

.footer__bottom {
  border-top: 1px solid var(--border-color);
  padding-top: var(--space-6);
  color: var(--text-muted);
}

/* Card Components */
.card {
  background: var(--secondary-bg);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
  border-radius: inherit;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: xor;
  -webkit-mask-composite: xor;
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3), 0 0 15px rgba(168, 255, 178, 0.1);
}

.card:hover .card__title {
  color: #a8ffb2;
}

.card__image {
  width: 100%;
  height: 160px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center center;
  background-color: var(--secondary-bg);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.card__content {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  height: 140px; /* Fixed height for consistent card layout */
  justify-content: space-between;
}

.card__title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
  transition: color 0.3s;
  min-height: 52px; /* Ensure consistent height for 3 lines */
  margin-bottom: 0;
}

/* Remove underlines from card content */
.card a {
  text-decoration: none;
}

.card__title,
.card__meta {
  text-decoration: none;
}

.card__meta {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  font-size: var(--font-size-xs);
  font-weight: 500;
  color: var(--text-muted);
  align-self: flex-end; /* Ensures date is at the bottom */
}

.card__meta span:first-child {
  color: var(--accent-primary);
  font-weight: 700;
  background: rgba(0, 255, 255, 0.1);
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 255, 255, 0.2);
}

.card__meta span:last-child {
  color: #00bf63;
  font-weight: 500;
}

/* Ensure card links work properly */
.card {
  z-index: 1;
}

.card a {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Video iframe container */
.video-player {
  position: relative;
  width: 100%;
  max-width: 900px; /* Even larger size */
  margin: 0 auto; /* Center the player */
  height: 0;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  background: var(--secondary-bg);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

/* Responsive video player - smaller on mobile */
@media (max-width: 768px) {
  .video-player {
    max-width: 100%; /* Full width on mobile */
  }
}

.video-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
}

/* Button Components */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-weight: 600;
  font-size: var(--font-size-sm);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  border: none;
  cursor: pointer;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
  opacity: 0;
  transition: opacity 0.3s;
}

.btn:hover::before {
  opacity: 1;
}

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

.btn-primary {
  background: linear-gradient(45deg, var(--accent-primary), var(--accent-secondary));
  color: black;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive Design */
@media (max-width: 768px) {
  .grid-cols-1,
  .grid-cols-2,
  .grid-cols-3,
  .grid-cols-4 { grid-template-columns: repeat(1, 1fr); }

  .nav__menu {
    flex-direction: column;
    gap: var(--space-3);
  }

  .brand-title {
    font-size: var(--font-size-2xl);
  }

  .header-features {
    gap: var(--space-4);
  }

  .feature-item span {
    display: none;
  }

  .video-player {
    border-radius: var(--radius-lg);
  }

  .video-player iframe {
    border-radius: var(--radius-lg);
  }
}

@media (max-width: 480px) {
  .feature-item:nth-child(2) {
    display: none;
  }
}

@media (min-width: 640px) {
  .grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 768px) {
  .grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Form Elements */
.input {
  width: 100%;
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  transition: all 0.3s;
}

.input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.input::placeholder {
  color: var(--text-muted);
}

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

.slide-up {
  animation: slideUp 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Spacing utilities */
.space-y-3 > * + * { margin-top: var(--space-3); }
.space-y-4 > * + * { margin-top: var(--space-4); }
.space-y-6 > * + * { margin-top: var(--space-6); }
.space-y-8 > * + * { margin-top: var(--space-8); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-6 { margin-top: var(--space-6); }
.p-2 { padding: var(--space-2); }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.p-8 { padding: var(--space-8); }
.px-2 { padding-left: var(--space-2); padding-right: var(--space-2); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }
.py-1 { padding-top: var(--space-1); padding-bottom: var(--space-1); }
.py-2 { padding-top: var(--space-2); padding-bottom: var(--space-2); }

/* Flexbox utilities */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }

/* Display utilities */
.block { display: block; }
.inline-block { display: inline-block; }

/* Width utilities */
.w-full { width: 100%; }
.w-32 { width: 8rem; }

/* Text alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Typography utilities */
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.uppercase { text-transform: uppercase; }
.text-accent { color: var(--accent-primary); }
.text-muted { color: var(--text-muted); }

/* Border radius utilities */
.rounded { border-radius: var(--radius-sm); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-xl { border-radius: var(--radius-xl); }
.rounded-2xl { border-radius: var(--radius-2xl); }

/* Background utilities */
.bg-glass { background: rgba(255, 255, 255, 0.05); }
.bg-gradient { background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary)); }

/* Shadow utilities */
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-glow { box-shadow: var(--shadow-glow); }

/* Transform utilities */
.transition { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.transform { transform: translateZ(0); }

/* Container utility */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* Button variants */
.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

/* Form input utility */
.input {
  width: 100%;
  padding: var(--space-4);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: var(--font-size-base);
  transition: all 0.3s;
}

.input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 255, 255, 0.1);
}

.input::placeholder {
  color: var(--text-muted);
}

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

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-secondary);
}

/* Top Teams Navigation - Link Equity Enhancement */
.top-teams-nav {
  border-top: 1px solid var(--border-color);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
}

.top-teams-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.top-team-link {
  color: #a8ffb2;
  text-decoration: none;
  font-weight: 600;
  font-size: var(--font-size-sm);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-lg);
  background: rgba(168, 255, 178, 0.1);
  border: 1px solid rgba(168, 255, 178, 0.3);
  transition: all 0.3s ease;
}

.top-team-link:hover,
.top-team-link.active {
  background: linear-gradient(90deg, #a8ffb2, rgba(168, 255, 178, 0.7));
  color: var(--primary-bg);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(168, 255, 178, 0.3);
}

/* Responsive Top Teams */
@media (max-width: 768px) {
  .top-teams-list {
    gap: var(--space-3);
  }

  .top-team-link {
    font-size: var(--font-size-xs);
    padding: var(--space-1) var(--space-3);
  }
}

@media (max-width: 480px) {
  .top-teams-list {
    justify-content: center;
    gap: var(--space-2);
  }

  .top-team-link {
    font-size: 12px;
    padding: var(--space-1) var(--space-2);
  }
}

/* New Responsive Styles for Logo, Headings, Footer */
@media (max-width: 768px) {
  /* Reduce logo height on tablets */
  .brand-logo {
    height: 50px;
  }

  /* Reduce H1 size on tablets */
  .heading-hero {
    font-size: var(--font-size-3xl);
    margin-bottom: var(--space-6);
  }

  /* Reduce H2 size on tablets */
  .heading-secondary {
    font-size: var(--font-size-xl);
  }
}

@media (max-width: 480px) {
  /* Further reduce logo on phones */
  .brand-logo {
    height: 40px;
  }

  /* Further reduce H1 on phones */
  .heading-hero {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-4);
  }

  /* Further reduce H2 on phones */
  .heading-secondary {
    font-size: var(--font-size-lg);
  }

  /* Reduce footer copyright text */
  .footer__bottom p {
    font-size: var(--font-size-sm);
  }
}

/* Video Page H1 - Fixed size regardless of screen size */
.video-page-h1 {
  font-size: var(--font-size-xl) !important; /* Always 1xl */
  margin-bottom: 1rem; /* Just enough space */
}
