:root {
  color-scheme: dark;
  --bg: #10151f;
  --panel: #171f2c;
  --panel-strong: #202a39;
  --line: #314050;
  --text: #eef3f8;
  --muted: #aab6c2;
  --accent: #38c172;
  --gold: #ffca3a;
  --red: #e52835;
  --blue: #2f7cff;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(rgba(16, 21, 31, 0.78), rgba(16, 21, 31, 0.98)),
    url("https://images.unsplash.com/photo-1461896836934-ffe607ba8211?auto=format&fit=crop&w=2200&q=80") center / cover fixed;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr auto;
  gap: clamp(26px, 5vw, 52px);
  padding: clamp(18px, 4vw, 44px);
}

.hero {
  display: grid;
  gap: clamp(38px, 7vw, 90px);
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: #f7f8fa;
  color: #111722;
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand small,
.hero-copy p,
.channel-meta,
footer {
  color: var(--muted);
}

.hero-copy {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(54px, 11vw, 148px);
  line-height: 0.9;
}

.hero-copy p:last-child {
  max-width: 520px;
  margin: 18px 0 0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.45;
}

.hub-tools {
  display: grid;
  gap: 12px;
  max-width: 840px;
}

.hub-tools input {
  width: 100%;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(5, 7, 11, 0.72);
  color: var(--text);
  padding: 0 14px;
  outline: none;
}

.hub-tools input:focus {
  border-color: var(--accent);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabs button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(23, 31, 44, 0.78);
  color: var(--text);
  padding: 0 12px;
  cursor: pointer;
}

.tabs button.active {
  border-color: var(--accent);
  background: rgba(56, 193, 114, 0.18);
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 42px);
}

.section-head span {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px;
  align-self: end;
}

.channel-card {
  position: relative;
  display: grid;
  min-height: 180px;
  align-content: end;
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(23, 31, 44, 0.86);
  padding: 18px;
  box-shadow: var(--shadow);
  isolation: isolate;
}

.channel-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0.62;
  transition: transform 180ms ease, opacity 180ms ease;
}

.channel-card:hover,
.channel-card:focus-visible {
  border-color: rgba(255, 255, 255, 0.52);
  outline: none;
}

.channel-card.unverified {
  opacity: 0.58;
}

.channel-card:hover::before,
.channel-card:focus-visible::before {
  opacity: 0.9;
  transform: scale(1.04);
}

.channel-logo {
  display: grid;
  width: 100%;
  min-height: 70px;
  place-items: end start;
  font-size: clamp(28px, 3.2vw, 48px);
  font-weight: 1000;
  line-height: 0.95;
  text-transform: uppercase;
}

.channel-logo img {
  display: block;
  width: min(100%, 190px);
  max-height: 86px;
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, 0.34));
}

.channel-meta {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.channel-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.15;
}

.espn::before {
  background: linear-gradient(135deg, rgba(229, 40, 53, 0.88), rgba(55, 12, 16, 0.6));
}

.espn2::before {
  background: linear-gradient(135deg, rgba(185, 31, 43, 0.86), rgba(24, 44, 71, 0.62));
}

.fox::before {
  background: linear-gradient(135deg, rgba(47, 124, 255, 0.82), rgba(15, 33, 64, 0.76));
}

.fs1::before {
  background: linear-gradient(135deg, rgba(22, 96, 214, 0.88), rgba(18, 24, 35, 0.7));
}

.fs2::before {
  background: linear-gradient(135deg, rgba(43, 140, 255, 0.76), rgba(229, 40, 53, 0.5));
}

.sky::before {
  background: linear-gradient(135deg, rgba(24, 114, 255, 0.82), rgba(218, 38, 54, 0.72));
}

footer {
  font-size: 14px;
}

.watch-shell {
  display: grid;
  min-height: 100vh;
  grid-template-rows: auto 1fr;
  gap: 18px;
  padding: clamp(14px, 2.6vw, 34px);
}

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

.back-link {
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(23, 31, 44, 0.78);
  padding: 10px 14px;
  color: var(--text);
}

.back-link:hover,
.back-link:focus-visible {
  border-color: rgba(255, 255, 255, 0.55);
  outline: none;
}

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
  gap: 18px;
  align-items: stretch;
}

.player-empty,
.player-frame {
  position: relative;
  min-height: min(68vw, calc(100vh - 130px));
  background: #05070b;
  box-shadow: var(--shadow);
}

.player-empty {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--muted);
  text-align: center;
}

.player-empty strong {
  color: var(--text);
  font-size: clamp(36px, 7vw, 96px);
  line-height: 0.95;
}

.player-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
  border: 0;
  background: #05070b;
}

.watch-panel {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(23, 31, 44, 0.86);
  padding: 22px;
  box-shadow: var(--shadow);
}

.watch-logo {
  display: block;
  width: min(100%, 230px);
  max-height: 120px;
  object-fit: contain;
  object-position: left center;
  margin-bottom: auto;
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.38));
}

.watch-panel h1 {
  margin-bottom: 22px;
  font-size: clamp(36px, 5vw, 74px);
  overflow-wrap: anywhere;
}

.watch-badge {
  display: inline-grid;
  width: fit-content;
  min-height: 40px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 14px;
  font-weight: 900;
  text-transform: uppercase;
}

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

  .watch-layout {
    grid-template-columns: 1fr;
  }

  .player-empty,
  .player-frame {
    min-height: 56vw;
  }
}

@media (max-width: 680px) {
  body {
    background-attachment: scroll;
  }

  .shell {
    min-height: auto;
  }

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

  .channel-card {
    min-height: 128px;
  }

  .watch-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .back-link {
    width: 100%;
    text-align: center;
  }

  .player-empty,
  .player-frame {
    min-height: 58vw;
  }
}
