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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--bg-400) transparent;
}

body {
  font-family: var(--font);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--tx-1);
  background: var(--bg-0);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

h1, h2, h3, h4 { font-weight: var(--w-bold); letter-spacing: -0.015em; line-height: 1.15; }
::selection { background: rgba(229,9,20,.35); color: #fff; }
html[data-theme="light"] ::selection { color: #101014; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-400); border-radius: var(--r-full); border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: var(--bg-500); }

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--brand-500);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
html[data-spatial="1"] :focus-visible,
html[data-device="tv"] :focus-visible {
  outline-width: 4px;
  outline-offset: 4px;
  box-shadow: 0 0 34px var(--brand-glow);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed; top: -60px; left: 16px; z-index: calc(var(--z-toast) + 10);
  background: var(--brand-500); color: #fff;
  padding: 10px 18px; border-radius: var(--r-md); font-weight: var(--w-semi);
  transition: top var(--t-fast);
}
.skip-link:focus-visible { top: 12px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 22px;
  font-size: var(--fs-md); font-weight: var(--w-bold);
  border-radius: var(--r-md); white-space: nowrap;
  user-select: none; -webkit-user-select: none;
  transition: transform var(--t-fast), background var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast);
}
.btn svg { flex-shrink: 0; }
.btn:active { transform: scale(.97); }
.btn--white { background: #fff; color: #0d0d0f; }
.btn--white:hover { background: rgba(255,255,255,.86); }
.btn--glass {
  background: rgba(109,110,113,.6);
  color: #fff;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn--glass:hover { background: rgba(130,131,135,.5); }
.btn--brand { background: var(--grad-brand); color: #fff; box-shadow: var(--sh-1); }
.btn--brand:hover { box-shadow: 0 0 26px var(--brand-glow); }
.btn--ghost { background: transparent; color: var(--tx-2); border: 1px solid var(--line); }
.btn--ghost:hover { color: var(--tx-1); border-color: var(--line-strong); background: rgba(255,255,255,.06); }
.btn--lg { min-height: 54px; padding: 0 30px; font-size: var(--fs-lg); border-radius: var(--r-lg); }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: var(--fs-sm); border-radius: var(--r-sm); }
.btn--icon { min-height: 42px; min-width: 42px; padding: 0; border-radius: var(--r-full); }
.btn[disabled] { opacity: .4; pointer-events: none; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: var(--r-full);
  color: var(--tx-1); position: relative;
  transition: background var(--t-fast), transform var(--t-fast);
}
html[data-theme="light"] .icon-btn { text-shadow: none; }
.icon-btn:hover { background: rgba(255,255,255,.12); }
.icon-btn:active { transform: scale(.94); }

/* Chips / badges */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 15px; border-radius: var(--r-full);
  border: 1px solid var(--line); color: var(--tx-2);
  font-size: var(--fs-sm); font-weight: var(--w-med);
  background: rgba(255,255,255,.04);
  white-space: nowrap;
  transition: all var(--t-fast);
}
.chip:hover { color: var(--tx-1); border-color: var(--line-strong); }
.chip.is-on { background: var(--tx-1); color: var(--tx-inv); border-color: var(--tx-1); font-weight: var(--w-semi); }

.tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--r-sm);
  font-size: var(--fs-2xs); font-weight: var(--w-bold);
  letter-spacing: .06em; text-transform: uppercase;
  border: 1px solid var(--line-strong); color: var(--tx-2);
}
.tag--quality { color: #e5c07b; border-color: rgba(229,192,123,.45); }
.tag--live { color: #ff5a68; border-color: rgba(255,90,104,.5); }

.dot-sep { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .55; vertical-align: middle; }

.match { color: var(--ok); font-weight: var(--w-bold); }

.rating-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: rgba(0,0,0,.72);
  border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(4px);
  color: #ffd75e; font-weight: var(--w-bold); font-size: var(--fs-xs);
  padding: 3px 8px; border-radius: var(--r-sm);
}
.rating-chip svg { width: 11px; height: 11px; }

/* Layout containers */
.container { padding-inline: var(--gutter); max-width: 2200px; margin-inline: auto; }

.section { margin-block: clamp(28px, 4vw, 56px); }
.section__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--s4); margin-bottom: 6px; padding-inline: var(--gutter);
}
.section__title { font-size: clamp(var(--fs-xl), 1rem + 1vw, var(--fs-2xl)); font-weight: var(--w-xbold); }
.section__more {
  font-size: var(--fs-sm); font-weight: var(--w-semi); color: var(--tx-3);
  display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0;
  transition: color var(--t-fast);
}
.section__more:hover { color: var(--brand-300); }
.section__more svg { width: 14px; height: 14px; }

/* Empty state */
.empty {
  display: grid; place-items: center; text-align: center;
  padding: clamp(48px, 9vh, 120px) var(--gutter); color: var(--tx-3);
}
.empty__icon { width: 64px; height: 64px; margin-bottom: var(--s4); opacity: .5; }
.empty__title { font-size: var(--fs-xl); color: var(--tx-1); margin-bottom: var(--s2); }
.empty p { max-width: 420px; margin-bottom: var(--s5); }

/* Skeleton */
.sk {
  background: linear-gradient(100deg, var(--bg-200) 40%, var(--bg-300) 50%, var(--bg-200) 60%);
  background-size: 200% 100%;
  animation: sk 1.4s ease-in-out infinite;
  border-radius: var(--r-md);
}
@keyframes sk { from { background-position: 180% 0; } to { background-position: -20% 0; } }
