:root {
  --bg: #0b0b0b;
  --panel: #121212;
  --card: #171717;
  --text: #f5f5f5;
  --muted: #8f8f8f;
  --line: rgba(255, 255, 255, 0.08);
  --red: #ef3340;
  --gold: #d99a00;
}

* {
  box-sizing: border-box;
  margin: 0;
}

body {
  min-height: 100vh;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #000;
  color: var(--text);
}

main {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
}

.header {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 24px;
}

.logo {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: lowercase;
}

.nav {
  display: flex;
  gap: 28px;
}

.nav button {
  background: none;
  border: 0;
  color: var(--muted);
  cursor: pointer;
  font: inherit;
  font-weight: 650;
}

.nav .active {
  color: var(--text);
}

main {
  padding-bottom: 72px;
}

.hidden {
  display: none;
}

/* Schedule controls */
.filters {
  display: grid;
  grid-template-columns: auto minmax(150px, 220px);
  gap: 8px;
  width: min(420px, 100%);
  margin: 22px auto;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.filter-pill,
.filter-select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #141414;
  color: var(--text);
  padding: 0 14px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
}

.filter-pill {
  border-radius: 999px;
}

.filter-pill.active {
  background: #292929;
}

.filter-pill.danger {
  background: var(--red);
  border-color: var(--red);
}

.filter-select {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

/* Live sport nav */
.sport-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
}

.sport-pill {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #111;
  color: var(--muted);
  padding: 0 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.sport-pill:hover,
.sport-pill.active {
  background: #1b1b1b;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.16);
}

.sport-pill span {
  line-height: 1;
}

/* Schedule layout */
.schedule-layout {
  display: grid;
  grid-template-columns: 70px 1fr;
  gap: 20px;
}

.schedule-layout--plain {
  display: block;
}

.schedule-day {
  margin-bottom: 34px;
}

.date-rail {
  position: sticky;
  top: 20px;
  align-self: start;
  text-align: center;
  color: var(--red);
  font-weight: 900;
  text-transform: uppercase;
  z-index: 2;
}

.date-rail span {
  display: block;
  font-size: 13px;
}

.date-rail strong {
  display: block;
  font-size: 34px;
  line-height: 1;
}

.match-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px 16px;
}

.match-tile {
  cursor: pointer;
}

.match-tile__media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: #151515;
}

.match-tile__media::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.match-tile__media > :not(.match-actions):not(.match-chip) {
  overflow: hidden;
}

.match-tile__poster,
.match-tile__badges,
.match-tile__fallback {
  width: 100%;
  height: 100%;
  border-radius: inherit;
}

.match-tile__poster {
  display: block;
  object-fit: cover;
  transition: transform 0.2s ease;
}

.match-tile:hover .match-tile__poster {
  transform: scale(1.03);
}

.match-tile__badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  background: linear-gradient(135deg, #171717, #080808);
}

.match-tile__badges img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.match-tile__fallback {
  display: grid;
  place-items: center;
  font-size: 34px;
  background: #151515;
}

.match-chip {
  position: absolute;
  z-index: 2;
  top: 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.match-chip {
  left: 10px;
  background: #292929;
  padding: 7px 12px;
}

.match-chip.live {
  background: var(--red);
}

.match-tile__body {
  margin-top: 9px;
}

.match-tile h3 {
  margin-bottom: 3px;
  font-size: 15px;
  line-height: 1.18;
  letter-spacing: -0.04em;
}

.match-tile p,
.meta {
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

/* Stream detail view */
.stream-detail {
  padding-top: 12px;
}

.stream-detail h1 {
  max-width: 980px;
  margin: 0 auto 12px;
  text-align: center;
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.stream-intro {
  max-width: 960px;
  margin: 0 auto 36px;
  text-align: center;
  color: var(--text);
  font-size: 21px;
  line-height: 1.35;
}

.back-card {
  width: 100%;
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 30px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0f0f0f;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  font-size: 24px;
  font-weight: 750;
  text-align: left;
}

.back-card span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
}

.stream-countdown {
  margin: 18px 0 36px;
  text-align: center;
  font-size: 28px;
  font-weight: 800;
}

.stream-summary {
  margin-bottom: 24px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 650;
}

.source-list {
  display: grid;
  gap: 24px;
}

.source-card {
  overflow: hidden;
  border: 1px solid rgba(239, 51, 64, 0.75);
  border-radius: 10px;
  background: #090909;
}

.source-card--admin {
  border-color: rgba(217, 154, 0, 0.95);
}

.source-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.source-card__header h2 {
  margin-bottom: 8px;
  font-size: 28px;
  line-height: 1;
}

.source-card__header p {
  color: #ffd333;
  font-weight: 750;
}

.source-card__header span {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(239, 51, 64, 0.12);
  color: #ff3d3d;
  font-weight: 800;
  white-space: nowrap;
}

.stream-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.stream-row {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #101010;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.stream-row:hover {
  background: #171717;
}

.quality-badge {
  min-width: 38px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(239, 51, 64, 0.15);
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.quality-badge.sd {
  background: #222;
  color: #ddd;
}

.stream-row__meta {
  color: var(--text);
  font-weight: 650;
}

#back-btn {
  margin-bottom: 16px;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

@media (max-width: 1024px) {
  .match-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .header,
  main {
    width: min(100% - 32px, 1120px);
  }

  .filters {
    grid-template-columns: auto 1fr;
    width: 100%;
  }

  .schedule-layout {
    display: block;
  }

  .date-rail {
    display: none;
  }

  .match-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }

  .stream-row {
    grid-template-columns: auto 1fr;
  }

  .stream-row__meta {
    grid-column: 2;
  }

  .sport-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .sport-pill {
    white-space: nowrap;
  }
}

/* Match actions */
.match-actions {
  position: absolute;
  right: 10px;
  bottom: 10px;
  display: flex;
  gap: 6px;
  z-index: 3;
}

.match-action {
  position: relative;
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.72);
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.match-action:hover,
.match-action.active {
  background: var(--red);
  border-color: var(--red);
}

.match-action:hover {
  transform: translateY(-1px);
}

.tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 180px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #f5f5f5;
  color: #111;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  white-space: nowrap;
  z-index: 100;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: #f5f5f5;
  transform: translate(-50%, -4px) rotate(45deg);
}

.match-action:hover .tooltip,
.match-action:focus-visible .tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Saved views */
.saved-list {
  display: grid;
  gap: 12px;
}

.saved-card,
.empty-view {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #101010;
  padding: 18px;
}

.saved-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.saved-card h3,
.empty-view h2 {
  margin-bottom: 4px;
  font-size: 18px;
  line-height: 1.2;
}

.saved-card p,
.empty-view p {
  color: var(--muted);
  font-size: 14px;
}

.saved-card button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
}

.saved-card button:hover {
  background: #171717;
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.modal {
  position: relative;
  width: min(420px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #101010;
  padding: 22px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.modal h2 {
  margin-bottom: 6px;
  font-size: 22px;
  letter-spacing: -0.04em;
}

.modal p {
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.favorite-options {
  display: grid;
  gap: 10px;
}

.favorite-option {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #151515;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.favorite-option:hover {
  background: #1b1b1b;
  border-color: rgba(255, 255, 255, 0.18);
}

.favorite-option strong {
  font-size: 15px;
}

.favorite-option span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 60;
  transform: translateX(-50%) translateY(10px);
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f5f5f5;
  color: #111;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 700px) {
  .match-actions {
    right: 8px;
    bottom: 8px;
  }

  .match-action {
    width: 28px;
    height: 28px;
    font-size: 15px;
  }

  .tooltip {
    display: none;
  }
}


/* Peacock-style polish */
:root {
  --peacock-yellow: #ffd02f;
  --peacock-blue: #1569ff;
  --peacock-purple: #8b4dff;
}

body {
  background:
    radial-gradient(circle at 70% 0%, rgba(255, 208, 47, 0.08), transparent 32rem),
    radial-gradient(circle at 20% 12%, rgba(21, 105, 255, 0.09), transparent 28rem),
    #000;
}

.header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.86), rgba(0, 0, 0, 0.62));
}

.nav .active {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--peacock-yellow);
}

.hero,
.match-hero-detail {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border-radius: 0 0 18px 18px;
  margin: 28px 0;
  background: #080808;
}

.hero__bg,
.match-hero-detail__media {
  position: absolute;
  inset: 0;
}

.hero__bg img,
.match-hero-detail__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.82;
}

.hero__badges,
.match-hero-detail__media .hero__badges {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  background: linear-gradient(135deg, #111, #020202);
}

.hero__badges img {
  width: 112px;
  height: 112px;
  object-fit: contain;
}

.hero__badges span {
  color: rgba(255, 255, 255, 0.5);
  font-size: 64px;
  font-weight: 200;
}

.hero__fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-size: 88px;
  background: linear-gradient(135deg, #151515, #020202);
}

.hero__overlay,
.match-hero-detail__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.72) 34%, rgba(0,0,0,0.2) 70%),
    linear-gradient(0deg, #000 0%, transparent 46%);
}

.hero__content,
.match-hero-detail__content {
  position: relative;
  z-index: 2;
  max-width: 520px;
  padding: 72px 34px 56px;
}

.hero__eyebrow,
.match-hero-detail__content p {
  color: var(--peacock-yellow);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.hero h2,
.match-hero-detail h1 {
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  margin-bottom: 12px;
}

.hero__content > p:not(.hero__eyebrow),
.match-hero-detail__content span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 14px;
  font-weight: 700;
}

.hero__button,
.detail-back {
  margin-top: 22px;
  border: 0;
  border-radius: 999px;
  background: var(--peacock-yellow);
  color: #080808;
  padding: 12px 18px;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.detail-back {
  margin: 0 0 28px;
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 34px;
  bottom: 24px;
  display: flex;
  gap: 8px;
}

.hero-dot {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.hero-dot.active {
  width: 22px;
  background: var(--peacock-yellow);
}

.match-grid {
  gap: 26px 18px;
}

.match-tile h3 {
  font-size: 14px;
  line-height: 1.22;
}

.match-tile p,
.meta {
  font-size: 12px;
}

.match-tile__media {
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}

.match-chip.live {
  background: #e50914;
}

.sport-nav {
  margin: 0 0 24px;
}

.sport-pill.active {
  color: #050505;
  background: var(--peacock-yellow);
  border-color: var(--peacock-yellow);
}

.loading-view {
  min-height: 360px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 14px;
  color: var(--muted);
}

.spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(255,255,255,0.16);
  border-top-color: var(--peacock-yellow);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.stream-detail {
  padding-top: 18px;
}

.source-list {
  gap: 12px;
}

.source-card {
  border-color: var(--line);
  background: #0e0e0e;
}

.source-card__header {
  padding: 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.source-card__header h2 {
  font-size: 20px;
  margin-bottom: 5px;
}

.source-card__header p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.stream-list {
  padding: 0;
}

.stream-row {
  min-height: auto;
  display: inline-flex;
  align-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--peacock-yellow);
  color: #050505;
  padding: 11px 14px;
  white-space: nowrap;
}

.stream-row:hover {
  background: #ffe16a;
}

.stream-row strong {
  font-size: 12px;
  text-transform: uppercase;
}

@media (max-width: 700px) {
  .hero,
  .match-hero-detail {
    min-height: 360px;
  }

  .hero__content,
  .match-hero-detail__content {
    padding: 80px 20px 54px;
  }

  .source-card__header {
    grid-template-columns: 1fr;
  }
}
/* Hero/layout refinement pass */
main {
  width: min(100% - 56px, 1480px);
}

main.app {
  padding-bottom: 96px;
}

.hero,
.match-hero-detail {
  min-height: 460px;
  margin: 44px 0;
  border-radius: 24px;
}

.hero__bg img,
.match-hero-detail__media img {
  filter: blur(24px);
  opacity: 0.5;
}

.hero__bg .hero__badges,
.hero__bg .hero__fallback,
.match-hero-detail__media .hero__badges,
.match-hero-detail__media .hero__fallback {
  filter: blur(18px);
  opacity: 0.38;
}

.hero__poster,
.match-hero-detail__poster {
  position: absolute;
  top: 50%;
  right: 48px;
  z-index: 2;
  width: min(42vw, 560px);
  aspect-ratio: 16 / 9;
  transform: translateY(-50%);
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255,255,255,0.06);
  box-shadow: 0 24px 80px rgba(0,0,0,0.45);
}

.hero__poster img,
.match-hero-detail__poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__poster .hero__badges,
.hero__poster .hero__fallback,
.match-hero-detail__poster .hero__badges,
.match-hero-detail__poster .hero__fallback {
  width: 100%;
  height: 100%;
}

.hero__poster .hero__badges img,
.match-hero-detail__poster .hero__badges img {
  width: 84px;
  height: 84px;
}

.hero__overlay,
.match-hero-detail__overlay {
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.96) 0%, rgba(0,0,0,0.76) 34%, rgba(0,0,0,0.42) 62%, rgba(0,0,0,0.62) 100%),
    linear-gradient(0deg, #000 0%, transparent 52%);
}

.hero__content,
.match-hero-detail__content {
  max-width: 560px;
  padding: 86px 44px 70px;
}

.sport-nav {
  margin: 0 0 38px;
  gap: 10px;
}

.sport-pill {
  min-height: 38px;
  padding-inline: 14px;
}

.match-grid {
  gap: 40px 28px;
}

.schedule-shell {
  padding-bottom: 64px;
}

.match-tile__body {
  margin-top: 12px;
}

.match-tile h3 {
  margin-bottom: 5px;
}

.match-hero-detail {
  margin-bottom: 32px;
}

.stream-detail {
  width: min(980px, 100%);
  margin-inline: auto;
  padding-top: 0;
}

@media (max-width: 1100px) {
  .hero__poster,
  .match-hero-detail__poster {
    width: min(38vw, 420px);
  }

  .hero__content,
  .match-hero-detail__content {
    max-width: 500px;
  }
}

@media (max-width: 900px) {
  .header,
  main {
    width: min(100% - 32px, 1480px);
  }

  .hero__poster,
  .match-hero-detail__poster {
    display: none;
  }

  .hero,
  .match-hero-detail {
    min-height: 400px;
  }

  .hero__content,
  .match-hero-detail__content {
    padding: 78px 28px 62px;
  }

  .match-grid {
    gap: 30px 18px;
  }
}

@media (max-width: 700px) {
  .sport-nav {
    margin-bottom: 28px;
  }
}

/* Full-bleed hero background, container-aligned content */
.hero,
.match-hero-detail {
  width: 100vw;
  margin-top: 0;
  margin-bottom: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
}

.hero__content,
.match-hero-detail__content,
.hero-dots {
  margin-left: calc((100vw - min(100vw - 56px, 1480px)) / 2);
}

.hero__poster,
.match-hero-detail__poster {
  right: calc((100vw - min(100vw - 56px, 1480px)) / 2);
}

/* Hero spacing + background fade refinement */
.hero,
.match-hero-detail {
  overflow: visible;
  margin-bottom: 72px;
}

.hero__bg,
.match-hero-detail__media {
  bottom: -180px;
  height: auto;
  pointer-events: none;
}

.hero__bg::after,
.match-hero-detail__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.2) 48%, #000 100%);
  pointer-events: none;
}

.hero__overlay,
.match-hero-detail__overlay {
  display: none;
}

.hero-dots {
  bottom: -34px;
}

.sport-nav,
.schedule-layout--plain,
.schedule-day,
.match-grid {
  position: relative;
  z-index: 4;
}

.sport-nav {
  margin-top: 24px;
}

@media (max-width: 700px) {
  .hero,
  .match-hero-detail {
    margin-bottom: 56px;
  }

  .hero-dots {
    bottom: -28px;
  }
}
.hero--animated .hero__bg,
.hero--animated .hero__poster,
.hero--animated .hero__content {
  animation-duration: 700ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-fill-mode: both;
}

.hero--animated .hero__bg {
  animation-name: heroBgDrift;
}

.hero--animated .hero__poster {
  animation-name: heroPosterSlide;
}

.hero--animated .hero__content {
  animation-name: heroContentSlide;
}

@keyframes heroBgDrift {
  from {
    opacity: 0;
    transform: scale(1.04) translateX(18px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateX(0);
  }
}

@keyframes heroPosterSlide {
  from {
    opacity: 0;
    transform: translateY(-50%) translateX(42px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) translateX(0) scale(1);
  }
}

@keyframes heroContentSlide {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.hero-dot {
  transition: width 240ms ease, background 240ms ease, opacity 240ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .hero--animated .hero__bg,
  .hero--animated .hero__poster,
  .hero--animated .hero__content,
  .spinner {
    animation: none;
  }
}

.hero-arrows {
  position: absolute;
  z-index: 5;
  right: calc((100vw - min(100vw - 56px, 1480px)) / 2);
  bottom: 28px;
  display: flex;
  gap: 10px;
}

.hero-arrow {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 30px;
  line-height: 1;
  backdrop-filter: blur(12px);
}

.hero-arrow:hover {
  background: var(--peacock-yellow);
  border-color: var(--peacock-yellow);
  color: #050505;
}


/* Peacock-style hero navigation placement */
.hero-arrows {
  inset: 0;
  z-index: 6;
  right: auto;
  bottom: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 28px;
  pointer-events: none;
}

.hero-arrow {
  pointer-events: auto;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  font-size: 34px;
  font-weight: 300;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}

.hero-arrow:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.24);
  color: #fff;
  transform: scale(1.04);
}

.hero-dots {
  left: 50%;
  bottom: 30px;
  z-index: 7;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-left: 0;
  transform: translateX(-50%);
}

.hero-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  opacity: 1;
}

.hero-dot.active {
  width: 28px;
  background: var(--peacock-yellow);
}

@media (max-width: 900px) {
  .hero-arrows {
    padding-inline: 16px;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
    font-size: 30px;
  }

  .hero-dots {
    bottom: 24px;
  }
}

@media (max-width: 700px) {
  .hero-arrow {
    width: 36px;
    height: 36px;
    font-size: 28px;
  }

  .hero-dots {
    bottom: 22px;
    gap: 9px;
  }
}
/* Match detail hero overlap fix */
.match-hero-detail {
  overflow: hidden;
  margin-bottom: 42px;
}

.match-hero-detail__media {
  bottom: 0;
  height: 100%;
}

.match-hero-detail__media::after {
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.38) 62%, #000 100%);
}

.match-hero-detail__content,
.match-hero-detail__poster {
  z-index: 3;
}

.stream-detail {
  position: relative;
  z-index: 8;
  margin-top: 0;
}

.hero__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero__buttons .hero__button {
  margin-top: 0;
}

.hero__button--secondary {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(12px);
}

.hero__button--secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}
/* Flush side hero arrows */
.hero-arrows {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 0;
  pointer-events: none;
}

.hero-arrow {
  pointer-events: auto;
  transform: none;
}

.hero-arrow:first-child {
  margin-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.hero-arrow:last-child {
  margin-right: 0;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.hero-arrow:hover {
  transform: none;
}

/* Hero root separation after JS refactor */
#hero-root {
  position: relative;
  z-index: 1;
}

#hero-root:empty {
  display: none;
}

#matches {
  position: relative;
  z-index: 3;
}

#hero-root + #matches .schedule-shell {
  padding-top: 42px;
}

#hero-root:empty + #matches .schedule-shell {
  padding-top: 0;
}

#hero-root .hero {
  margin-bottom: 0;
}

#hero-root .hero-dots {
  bottom: 28px;
}

#hero-root + #matches .sport-nav {
  margin-top: 0;
}

#hero-root + #matches .schedule-layout--plain,
#hero-root + #matches .schedule-day,
#hero-root + #matches .match-grid {
  position: relative;
  z-index: 4;
}

/* Keep match detail separate from homepage hero behavior */
#matches .match-hero-detail {
  margin-top: 0;
  margin-bottom: 42px;
}

@media (max-width: 700px) {
  #hero-root + #matches .schedule-shell {
    padding-top: 32px;
  }

  #hero-root .hero-dots {
    bottom: 22px;
  }
}

/* Inline stream player */
.embed-player {
  width: min(980px, 100%);
  aspect-ratio: 16 / 9;
  margin: 0 auto 24px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #050505;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.embed-player iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
  background: #050505;
}

.stream-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.stream-actions .stream-row {
  width: auto;
}

.stream-row--secondary {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.stream-row--secondary:hover {
  background: rgba(255, 255, 255, 0.14);
}

@media (max-width: 700px) {
  .embed-player {
    border-radius: 12px;
    margin-bottom: 18px;
  }

  .stream-actions {
    justify-content: stretch;
  }

  .stream-actions .stream-row {
    width: 100%;
    justify-content: center;
  }
}

/* Theater-mode inline player */
.embed-player {
  width: 100vw;
  max-width: none;
  aspect-ratio: 16 / 9;
  margin: 0 0 48px calc(50% - 50vw);
  border: 0;
  border-radius: 0;
  background: #000;
  box-shadow: none;
}

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

@media (min-width: 900px) {
  .embed-player {
    height: min(78vh, calc(100vw * 0.5625));
    aspect-ratio: auto;
  }
}

@media (max-width: 700px) {
  .embed-player {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-bottom: 32px;
    border-radius: 0;
  }
}

/* Inline player placement + shorter theater height */
.embed-player {
  margin-top: 0;
  margin-bottom: 36px;
}

@media (min-width: 900px) {
  .embed-player {
    height: min(62vh, calc(100vw * 0.48));
  }
}