@layer base {
  :root {
    --brand-red-700: #991b1b;
    --brand-red-600: #dc2626;
    --brand-red-500: #ef4444;
    --brand-amber-400: #fbbf24;
    --brand-amber-300: #fcd34d;
    --brand-ink-950: #0b1220;
    --brand-ink-900: #0f172a;
    --brand-slate-800: #1f2937;
    --brand-slate-600: #475569;
    --brand-surface: #ffffff;
    --brand-surface-2: #f8fafc;
    --brand-ring: rgba(239, 68, 68, 0.35);
    --brand-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
  }

  html {
    scroll-behavior: smooth;
  }

  body {
    color: var(--brand-slate-800);
    background: var(--brand-surface);
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

@layer components {
  .site-brand {
    gap: 0.9rem;
  }

  .site-brand__logo {
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 1.1rem;
    background: radial-gradient(120% 120% at 15% 15%, rgba(252, 211, 77, 0.28) 0%, rgba(252, 211, 77, 0.06) 35%, rgba(255, 255, 255, 0) 70%),
      linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(15, 23, 42, 0));
    border: 1px solid rgba(220, 38, 38, 0.18);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
  }

  .site-brand__logo::after {
    content: "";
    position: absolute;
    inset: -30%;
    background: conic-gradient(from 210deg, rgba(252, 211, 77, 0.35), rgba(239, 68, 68, 0.35), rgba(252, 211, 77, 0.35));
    filter: blur(18px);
    opacity: 0.35;
    animation: brandSheen 10s linear infinite;
  }

  .site-brand__logo > * {
    position: relative;
    z-index: 1;
  }

  .site-brand__title {
    font-weight: 900;
    letter-spacing: -0.02em;
    line-height: 1.05;
    font-size: clamp(1.1rem, 1.05rem + 0.7vw, 1.55rem);
    background: linear-gradient(90deg, var(--brand-ink-900) 0%, var(--brand-ink-900) 45%, rgba(239, 68, 68, 0.95) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .site-brand__tagline {
    color: rgba(220, 38, 38, 0.92);
    font-weight: 800;
    letter-spacing: 0.12em;
    font-size: 0.72rem;
  }

  .site-brand:hover .site-brand__logo {
    box-shadow: 0 14px 34px rgba(239, 68, 68, 0.18), 0 10px 24px rgba(15, 23, 42, 0.12);
    border-color: rgba(220, 38, 38, 0.3);
  }

  .site-brand:hover .site-brand__title {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.98) 0%, var(--brand-ink-900) 55%, var(--brand-ink-900) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }

  .brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 0.95rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
  }

  .section-hero {
    position: relative;
  }

  .section-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(900px circle at 15% 10%, rgba(252, 211, 77, 0.18), transparent 55%),
      radial-gradient(900px circle at 85% 15%, rgba(239, 68, 68, 0.22), transparent 55%),
      linear-gradient(180deg, rgba(15, 23, 42, 0.4), rgba(15, 23, 42, 0));
    opacity: 0.85;
    mix-blend-mode: soft-light;
  }

  .section-surface {
    background: radial-gradient(1200px circle at 15% 0%, rgba(239, 68, 68, 0.06), transparent 45%),
      radial-gradient(1200px circle at 90% 10%, rgba(252, 211, 77, 0.08), transparent 45%),
      linear-gradient(180deg, var(--brand-surface-2), var(--brand-surface));
  }

  .section-surface-alt {
    background: radial-gradient(1200px circle at 20% 0%, rgba(59, 130, 246, 0.06), transparent 45%),
      radial-gradient(1200px circle at 90% 20%, rgba(239, 68, 68, 0.06), transparent 45%),
      linear-gradient(180deg, var(--brand-surface), var(--brand-surface-2));
  }

  .section-ink {
    background: radial-gradient(1200px circle at 10% 0%, rgba(239, 68, 68, 0.22), transparent 45%),
      radial-gradient(1200px circle at 90% 15%, rgba(252, 211, 77, 0.18), transparent 45%),
      linear-gradient(180deg, var(--brand-ink-950), #060a12);
  }

  .section-brand {
    position: relative;
    background: linear-gradient(135deg, var(--brand-red-700) 0%, var(--brand-red-600) 50%, #b91c1c 100%);
  }

  .section-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      radial-gradient(900px circle at 15% 15%, rgba(252, 211, 77, 0.22), transparent 55%),
      radial-gradient(900px circle at 85% 20%, rgba(15, 23, 42, 0.35), transparent 55%);
    opacity: 0.9;
  }

  .section-top-players {
    position: relative;
    background:
      radial-gradient(1200px circle at 10% 0%, rgba(239, 68, 68, 0.28), transparent 55%),
      radial-gradient(1200px circle at 90% 0%, rgba(252, 211, 77, 0.22), transparent 55%),
      linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(88, 28, 28, 0.96));
    overflow: hidden;
    --parallax-offset: 0px;
  }

  .section-top-players::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url("../img/bg-front.png");
    background-size: cover;
    background-position: center calc(50% + var(--parallax-offset));
    opacity: 0.22;
    mix-blend-mode: soft-light;
    pointer-events: none;
  }

  .brand-card {
    border-radius: 1.25rem;
    box-shadow: var(--brand-shadow);
    border: 1px solid rgba(15, 23, 42, 0.06);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
    will-change: transform;
  }

  .brand-card:hover {
    transform: translateY(-6px);
    border-color: rgba(239, 68, 68, 0.18);
    box-shadow: 0 22px 55px rgba(239, 68, 68, 0.12), var(--brand-shadow);
  }

  .motion-fade-up {
    animation: fadeUp 700ms cubic-bezier(0.21, 1, 0.21, 1) both;
  }

  @media (prefers-reduced-motion: reduce) {
    html {
      scroll-behavior: auto;
    }
    .motion-fade-up,
    .site-brand__logo::after {
      animation: none !important;
    }
    .brand-card {
      transition: none;
    }
  }
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes brandSheen {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* --- Added from previous inline styles --- */

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

.animate-pulse-slow {
  animation: pulse-slow 3s infinite ease-in-out;
}

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

.animate-fade-in-up {
  animation: fade-in-up 0.8s ease-out forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: var(--brand-red-700);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-red-600);
}

/* Navigation Link Underline Effect */
.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--brand-red-600);
  transition: width 0.3s ease;
}

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

/* Dropdown Menu Animation */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: white;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  z-index: 50;
  padding: 8px 0;
  border-top: 4px solid var(--brand-red-600);
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.open .dropdown-menu {
  display: block;
  animation: fadeIn 0.2s ease-in-out;
}

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

.tab-btn.active {
  background: linear-gradient(135deg, var(--brand-red-700) 0%, var(--brand-red-600) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
  }
  
  /* Hero Overlay Gradient */
  .hero-gradient {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(153, 27, 27, 0.85) 100%);
  }
  
  .text-gradient {
    background: linear-gradient(to right, var(--brand-red-600), var(--brand-amber-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
