:root {
  color-scheme: dark;
  --bg-primary: #0d0d0d;
  --bg-secondary: #161616;
  --bg-tertiary: #1e1e1e;
  --accent-green: #00e676;
  --accent-green-soft: rgba(0, 230, 118, 0.14);
  --accent-red: #ff1744;
  --text-primary: #f0f0f0;
  --text-secondary: #c3c3c3;
  --text-muted: #888888;
  --border: #2a2a2a;
  --card-hover: #1f2a1f;
  --card-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  --radius-xl: 28px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --content-width: min(1240px, calc(100vw - 32px));
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
}

button,
input,
iframe {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

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

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.site-nav__link {
  padding: 10px 16px;
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color 160ms ease, background 160ms ease, transform 160ms ease;
}

.site-nav__link:hover,
.site-nav__link:focus-visible,
.site-nav__link.is-active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-1px);
}

.icon-button,
.filters-panel__refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.icon-button:hover,
.icon-button:focus-visible,
.filters-panel__refresh:hover,
.filters-panel__refresh:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(0, 230, 118, 0.45);
  background: rgba(0, 230, 118, 0.12);
}

.search-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(8, 8, 8, 0.82);
}

.search-panel__inner {
  width: var(--content-width);
  margin: 0 auto;
  display: flex;
  gap: 12px;
  padding: 14px 0 18px;
}

.search-input {
  flex: 1;
  min-width: 0;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-primary);
  padding: 14px 18px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease, color 160ms ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn--primary {
  background: linear-gradient(135deg, #00e676, #29ff96);
  color: #04140b;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 20px;
  align-items: stretch;
}

.hero.hero--single {
  grid-template-columns: minmax(0, 1fr) !important;
}

.hero.hero--single > * {
  grid-column: 1 / -1;
}

.hero__content,
.hero__panel,
.filters-panel__inner,
.match-card,
.empty-state,
.site-footer__inner,
.match-shell__main,
.match-shell__sidebar,
.player-shell,
.seo-article,
.not-found__panel {
  background: rgba(22, 22, 22, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--card-shadow);
}

.hero__content,
.hero__panel,
.filters-panel__inner,
.match-shell__main,
.match-shell__sidebar,
.seo-article,
.not-found__panel {
  border-radius: var(--radius-lg);
}

.hero__content {
  padding: 34px;
  position: relative;
  overflow: hidden;
}

.hero__content::after {
  content: "";
  position: absolute;
  inset: auto -16% -34% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 230, 118, 0.26), transparent 70%);
  pointer-events: none;
}

.eyebrow,
.section-heading__eyebrow,
.match-meta__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-green);
}

.hero h1,
.match-meta h1,
.not-found__panel h1 {
  margin: 14px 0 12px;
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  line-height: 1.02;
}

.hero__lede,
.site-footer__seo,
.seo-article p,
.empty-state p,
.match-summary {
  color: var(--text-secondary);
}

.hero__actions,
.section-heading,
.section-heading__actions,
.match-meta__row,
.player-shell__tabs,
.stream-list,
.site-footer__inner,
.match-shell,
.breadcrumbs,
.not-found__actions {
  display: flex;
  gap: 14px;
}

.hero__actions,
.section-heading,
.match-meta__row,
.site-footer__inner,
.breadcrumbs {
  align-items: center;
  justify-content: space-between;
}

.hero__actions,
.stream-list,
.not-found__actions {
  flex-wrap: wrap;
}

.hero__meta,
.site-footer__copy,
.breadcrumbs,
.match-summary,
.hero-stat__label {
  color: var(--text-muted);
}

.hero__panel {
  display: grid;
  gap: 14px;
  padding: 24px;
}

.hero-stat {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.hero-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 1.05rem;
}

.filters-panel {
  position: sticky;
  top: 98px;
  align-self: start;
}

.filters-panel__inner {
  padding: 22px;
}

.filters-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.filters-panel__header h2,
.section-heading h2,
.match-shell__sidebar h2 {
  margin: 0;
  font-size: 1.1rem;
}

.category-list,
.stream-list {
  display: grid;
  gap: 10px;
}

.category-pill,
.status-pill,
.meta-pill,
.channel-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 600;
}

.category-pill {
  width: 100%;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.category-pill:hover,
.category-pill:focus-visible,
.category-pill.is-active {
  color: var(--text-primary);
  background: rgba(0, 230, 118, 0.1);
  border-color: rgba(0, 230, 118, 0.32);
  transform: translateX(2px);
}

.category-pill__count {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.matches-section {
  min-width: 0;
}

.section-heading {
  margin-bottom: 18px;
}

.status-pill,
.meta-pill {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.status-region {
  min-height: 28px;
  margin-bottom: 18px;
}

.status-message {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-secondary);
}

.status-message--error {
  background: rgba(255, 23, 68, 0.12);
  color: #ffc2cf;
}

.match-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  border-radius: var(--radius-md);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  min-height: 220px;
  cursor: pointer;
}

.match-card:hover,
.match-card:focus-within,
.match-card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(0, 230, 118, 0.25);
  background: rgba(31, 42, 31, 0.9);
}

.match-card:focus-visible {
  outline: 2px solid rgba(0, 230, 118, 0.75);
  outline-offset: 2px;
}

.match-card__header,
.match-card__footer,
.stream-list,
.empty-state,
.match-meta__stats,
.match-details__list {
  display: flex;
  align-items: center;
  gap: 12px;
}

.match-card__header,
.match-card__footer,
.match-meta__stats,
.match-details__list {
  justify-content: space-between;
}

.category-badge,
.stream-count,
.match-time,
.match-timecode,
.live-indicator,
.match-card__icon,
.inline-stat {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.category-badge,
.stream-count,
.match-card__icon {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.match-card__title,
.seo-article h2,
.match-details__list dt,
.empty-state h3 {
  margin: 0;
}

.match-card__title {
  font-size: 1.2rem;
  line-height: 1.25;
}

.match-card__footer {
  margin-top: auto;
}

.match-time,
.match-timecode,
.inline-stat {
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.92rem;
}

.btn-watch,
.channel-button {
  background: rgba(0, 230, 118, 0.12);
  color: var(--accent-green);
  border: 1px solid rgba(0, 230, 118, 0.18);
}

.btn-watch {
  padding: 10px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.btn-watch:hover,
.btn-watch:focus-visible,
.channel-button:hover,
.channel-button:focus-visible,
.channel-button.is-active {
  background: rgba(0, 230, 118, 0.18);
  border-color: rgba(0, 230, 118, 0.34);
}

.empty-state,
.not-found__panel {
  flex-direction: column;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 42px 26px;
  border-radius: var(--radius-lg);
}

.empty-state__icon,
.not-found__code {
  font-size: clamp(2.8rem, 10vw, 5.2rem);
  line-height: 1;
  color: var(--accent-green);
}

.site-footer__inner {
  width: var(--content-width);
  margin: 0 auto;
  padding: 28px 30px;
}

.site-footer__inner > * {
  flex: 1;
}

.brand--footer {
  margin-bottom: 12px;
}

.page-match .site-main,
.page-not-found .site-main {
  width: var(--content-width);
  margin: 0 auto;
  padding: 36px 0 56px;
}

.breadcrumbs {
  flex-wrap: wrap;
  margin-bottom: 20px;
  font-size: 0.95rem;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus-visible {
  color: var(--text-primary);
}

.breadcrumbs span:last-child {
  color: var(--text-primary);
}

.match-shell {
  align-items: start;
}

.match-shell__main {
  flex: 1.5;
  min-width: 0;
  padding: 28px;
}

.match-shell__sidebar {
  flex: 0.9;
  min-width: min(320px, 100%);
  padding: 24px;
  position: sticky;
  top: 98px;
}

.match-meta__stats,
.match-details__list {
  flex-wrap: wrap;
  margin: 18px 0 0;
}

.player-shell {
  margin-top: 26px;
  padding: 18px;
  border-radius: var(--radius-md);
  max-width: 900px;
}

.player-shell__frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), rgba(0, 230, 118, 0.08));
  border-radius: var(--radius-md);
  overflow: hidden;
}

.player-shell__frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

.player-shell__placeholder {
  display: grid;
  place-items: center;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: var(--text-secondary);
}

.player-shell__tabs {
  justify-content: flex-start;
  margin-top: 16px;
  flex-wrap: wrap;
}

.seo-article,
.match-shell__sidebar {
  margin-top: 22px;
}

.seo-article,
.match-shell__sidebar {
  padding: 24px;
}

.match-details__list {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  margin-top: 18px;
}

.match-details__list div {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

.match-details__list dt {
  color: var(--text-muted);
  margin-bottom: 6px;
}

.match-details__list dd {
  margin: 0;
}

.not-found__panel {
  max-width: 720px;
  margin: 80px auto 0;
}

.live-indicator {
  color: #ffc6d3;
  font-weight: 700;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff1744;
  animation: pulse-live 1.2s infinite ease-in-out;
  display: inline-block;
}

.skeleton {
  background: linear-gradient(90deg, #1e1e1e 25%, #2a2a2a 50%, #1e1e1e 75%);
  background-size: 400px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 8px;
}

.skeleton-card {
  min-height: 220px;
  padding: 22px;
  border-radius: var(--radius-md);
  background-color: rgba(22, 22, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.skeleton-card__top,
.skeleton-card__title,
.skeleton-card__footer {
  border-radius: 999px;
}

.skeleton-card__top {
  width: 62%;
  height: 18px;
  margin-bottom: 24px;
}

.skeleton-card__title {
  width: 90%;
  height: 22px;
  margin-bottom: 14px;
}

.skeleton-card__title:last-of-type {
  width: 68%;
}

.skeleton-card__footer {
  width: 54%;
  height: 18px;
  margin-top: 36px;
}

@keyframes pulse-live {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.4;
    transform: scale(1.4);
  }
}

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

@media (max-width: 1100px) {
  .hero,
  .site-footer__inner,
  .match-shell {
    flex-direction: column;
  }

  .hero {
    grid-template-columns: 1fr;
  }

  .match-shell {
    display: grid;
  }

  .match-shell__sidebar {
    position: static;
    min-width: 0;
  }
}

@media (max-width: 860px) {
  .site-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
    justify-content: flex-start;
    scrollbar-width: none;
  }

  .site-nav::-webkit-scrollbar,
  .category-list::-webkit-scrollbar {
    display: none;
  }

  .filters-panel {
    position: static;
  }

  .filters-panel__inner {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .filters-panel__header {
    margin-bottom: 12px;
  }

  .category-list {
    display: flex;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .category-pill {
    width: auto;
    white-space: nowrap;
  }

  .match-grid {
    grid-template-columns: 1fr;
  }

  .search-panel__inner {
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .site-header__inner,
  .hero,
  .layout-shell,
  .page-match .site-main,
  .page-not-found .site-main,
  .site-footer__inner {
    width: min(100vw - 24px, 1240px);
  }

  .hero__content,
  .hero__panel,
  .match-shell__main,
  .match-shell__sidebar,
  .seo-article,
  .not-found__panel,
  .player-shell {
    padding: 22px;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .match-card__header,
  .match-card__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer__inner {
    padding: 24px;
  }
}