:root {
  --bg: #07090f;
  --bg-soft: #0d1019;
  --panel: rgba(16, 20, 31, .92);
  --panel-2: #121724;
  --panel-3: #171d2b;
  --text: #f8fafc;
  --muted: #9aa4b6;
  --muted-2: #667085;
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.16);
  --red: #ff315b;
  --red-2: #ff5c7c;
  --violet: #8b5cf6;
  --cyan: #32d8ff;
  --green: #35e3a4;
  --shadow: 0 26px 90px rgba(0,0,0,.45);
  --shell: min(1480px, calc(100% - 40px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(255,49,91,.12), transparent 34%),
    radial-gradient(circle at 100% 24%, rgba(139,92,246,.12), transparent 30%),
    var(--bg);
  overflow-x: hidden;
}
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.shell { width: var(--shell); margin-inline: auto; }
.skip-link { position: fixed; left: 12px; top: -80px; z-index: 9999; padding: 10px 14px; border-radius: 10px; color: #fff; background: #000; }
.skip-link:focus { top: 12px; }
.page-glow { position: fixed; z-index: -1; border-radius: 999px; filter: blur(90px); pointer-events: none; opacity: .35; }
.glow-a { width: 320px; height: 320px; left: -110px; top: 250px; background: rgba(255,49,91,.25); }
.glow-b { width: 390px; height: 390px; right: -150px; top: 650px; background: rgba(50,216,255,.14); }

.site-header { position: sticky; top: 0; z-index: 200; border-bottom: 1px solid var(--line); background: rgba(7,9,15,.82); backdrop-filter: blur(22px); }
.header-inner { min-height: 76px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.brand-symbol { position: relative; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(135deg, var(--red), var(--violet)); box-shadow: 0 12px 34px rgba(255,49,91,.24); }
.brand-symbol::before { content: ""; width: 17px; height: 20px; clip-path: polygon(0 0,100% 50%,0 100%); background: #fff; transform: translateX(2px); }
.brand-symbol span { position: absolute; inset: 4px; border: 1px solid rgba(255,255,255,.3); border-radius: 11px; }
.brand-symbol.large { width: 58px; height: 58px; border-radius: 19px; }
.brand-symbol.large::before { width: 22px; height: 27px; }
.brand-symbol.mini { width: 26px; height: 26px; border-radius: 8px; box-shadow: none; }
.brand-symbol.mini::before { width: 10px; height: 12px; }
.brand-name { display: flex; align-items: baseline; gap: 5px; }
.brand-name strong { font-size: 1.22rem; letter-spacing: .13em; }
.brand-name em { font-style: normal; color: var(--red-2); font-size: .78rem; font-weight: 900; letter-spacing: .08em; }
.top-nav { justify-self: center; display: flex; gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); }
.top-nav button { border: 0; border-radius: 11px; padding: 9px 15px; background: transparent; color: var(--muted); cursor: pointer; font-size: .82rem; font-weight: 800; }
.top-nav button:hover, .top-nav button.is-active { color: #fff; background: rgba(255,255,255,.07); }
.header-actions { display: flex; align-items: center; gap: 9px; }
.header-search-button { min-width: 238px; height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.035); cursor: pointer; }
.header-search-button svg { width: 18px; }
.header-search-button span { flex: 1; text-align: left; font-size: .78rem; }
kbd { border: 1px solid var(--line-strong); border-radius: 6px; padding: 2px 6px; color: var(--muted-2); background: rgba(0,0,0,.22); font-size: .64rem; }
.icon-button { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.035); cursor: pointer; }
.icon-button:hover { background: rgba(255,255,255,.08); }
.icon-button svg { width: 19px; }
.edge-status { height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid rgba(53,227,164,.18); border-radius: 13px; background: rgba(53,227,164,.07); color: #bffbe2; font-size: .67rem; letter-spacing: .1em; }
.edge-status span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(53,227,164,.1); }

.watch-section { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 18px; padding-top: 24px; }
.watch-main { min-width: 0; }
.player-card, .up-next-panel, .browse-console, .platform-note { border: 1px solid var(--line); background: linear-gradient(155deg, rgba(18,23,36,.96), rgba(9,12,20,.96)); box-shadow: var(--shadow); }
.player-card { overflow: hidden; border-radius: 26px; }
.player-topline { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 14px 0 17px; border-bottom: 1px solid var(--line); }
.platform-line { display: flex; align-items: center; gap: 9px; color: #dce3ef; font-size: .74rem; letter-spacing: .03em; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 5px rgba(255,49,91,.1); }
.player-top-actions { display: flex; gap: 6px; }
.player-top-actions button { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.035); cursor: pointer; font-size: 1.15rem; }
.player-top-actions button:hover { background: rgba(255,255,255,.08); }
.player-top-actions svg { width: 17px; }
.player-stage { position: relative; aspect-ratio: 16/9; background: #000; overflow: hidden; }
.player-stage video, .player-stage iframe { width: 100%; height: 100%; border: 0; display: block; object-fit: contain; background: #000; }
.player-poster, .player-loading, .player-error { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px; background:
  radial-gradient(circle at 50% 35%, rgba(255,49,91,.14), transparent 30%),
  linear-gradient(145deg,#080a11,#111629); }
.poster-brand { display: flex; align-items: center; gap: 13px; }
.poster-brand > div { display: flex; align-items: baseline; gap: 5px; }
.poster-brand strong { font-size: 2rem; letter-spacing: .16em; }
.poster-brand em { color: var(--red-2); font-style: normal; font-weight: 900; }
.player-poster h1 { margin: 24px 0 8px; font-size: clamp(1.55rem,3vw,2.7rem); }
.player-poster p { max-width: 610px; margin: 0 0 22px; color: var(--muted); line-height: 1.55; }
.primary-button, .secondary-button, .ghost-button { min-height: 42px; border-radius: 13px; padding: 0 17px; font-weight: 850; cursor: pointer; }
.primary-button { border: 0; color: #fff; background: linear-gradient(135deg,var(--red),var(--violet)); box-shadow: 0 12px 30px rgba(255,49,91,.18); }
.primary-button:hover { filter: brightness(1.08); }
.secondary-button { border: 1px solid var(--line-strong); color: #fff; background: rgba(255,255,255,.055); }
.ghost-button { border: 1px solid var(--line); color: var(--muted); background: transparent; }
.spinner { width: 42px; height: 42px; margin-bottom: 16px; border: 3px solid rgba(255,255,255,.12); border-top-color: var(--red); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.player-loading small { margin-top: 7px; color: var(--muted); }
.player-error .error-mark { width: 52px; height: 52px; display: grid; place-items: center; margin-bottom: 14px; border-radius: 17px; color: #fff; background: linear-gradient(135deg,var(--red),#ff8a4c); font-size: 1.5rem; font-weight: 950; }
.player-error p { max-width: 560px; color: var(--muted); line-height: 1.55; }
.error-actions { display: flex; gap: 9px; }
.senna-corner { position: absolute; right: 14px; top: 14px; z-index: 4; display: flex; align-items: center; gap: 7px; padding: 6px 9px 6px 6px; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; color: #fff; background: rgba(7,9,15,.48); backdrop-filter: blur(10px); pointer-events: none; }
.senna-corner b { font-size: .62rem; letter-spacing: .12em; }
.now-playing-strip { min-height: 91px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 14px 16px; }
.current-logo, .playing-logo { display: grid; place-items: center; overflow: hidden; color: #fff; background: linear-gradient(145deg,#242b3d,#10141f); border: 1px solid var(--line); font-weight: 900; }
.current-logo { width: 58px; height: 58px; border-radius: 17px; }
.current-logo img, .playing-logo img, .card-logo img, .lineup-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.current-info { min-width: 0; }
.current-info > span { display: block; color: var(--red-2); font-size: .62rem; font-weight: 950; letter-spacing: .11em; text-transform: uppercase; }
.current-info h2 { margin: 4px 0 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 1.18rem; }
.current-info p { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: .76rem; }
.current-actions { display: flex; gap: 7px; }
.current-actions button { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); cursor: pointer; }
.current-actions button:hover, .current-actions button.is-active { color: #fff; background: rgba(255,49,91,.15); border-color: rgba(255,49,91,.3); }
.current-actions svg { width: 18px; }
.current-actions #favoriteButton svg { fill: transparent; }
.current-actions #favoriteButton.is-active svg { fill: currentColor; }

.up-next-panel { position: sticky; top: 100px; height: calc(100vh - 124px); min-height: 640px; display: flex; flex-direction: column; padding: 16px; border-radius: 26px; overflow: hidden; }
.panel-head, .lineup-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.section-label { display: block; color: var(--red-2); font-size: .64rem; font-weight: 950; letter-spacing: .13em; }
.panel-head h2 { margin: 4px 0 0; font-size: 1.12rem; }
.edge-chip { padding: 6px 9px; border-radius: 9px; color: #bffbe2; background: rgba(53,227,164,.08); border: 1px solid rgba(53,227,164,.16); font-size: .58rem; font-weight: 950; letter-spacing: .12em; }
.playing-card { display: grid; grid-template-columns: auto 1fr; gap: 11px; align-items: center; margin: 15px 0 12px; padding: 12px; border: 1px solid rgba(255,49,91,.19); border-radius: 17px; background: linear-gradient(135deg,rgba(255,49,91,.09),rgba(139,92,246,.06)); }
.playing-logo { width: 46px; height: 46px; border-radius: 14px; }
.playing-card span { display: flex; align-items: center; gap: 6px; color: var(--red-2); font-size: .56rem; font-weight: 950; letter-spacing: .1em; }
.playing-card span i { width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.playing-card h3 { margin: 5px 0 2px; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.playing-card p { margin: 0; color: var(--muted); font-size: .67rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.panel-search, .main-search { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: rgba(255,255,255,.035); }
.panel-search { min-height: 42px; padding: 0 12px; border-radius: 13px; }
.panel-search svg, .main-search svg { width: 18px; color: var(--muted); }
.panel-search input, .main-search input { width: 100%; border: 0; outline: 0; color: #fff; background: transparent; }
.panel-search input::placeholder, .main-search input::placeholder { color: var(--muted-2); }
.lineup-head { margin: 14px 2px 8px; }
.lineup-head strong { font-size: .76rem; }
.lineup-head span { color: var(--muted); font-size: .65rem; }
.lineup-list { min-height: 0; flex: 1; overflow-y: auto; display: grid; align-content: start; gap: 7px; padding-right: 3px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.16) transparent; }
.lineup-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 8px; border: 1px solid transparent; border-radius: 13px; background: rgba(255,255,255,.025); cursor: pointer; }
.lineup-item:hover { background: rgba(255,255,255,.065); }
.lineup-item.is-active { border-color: rgba(255,49,91,.26); background: rgba(255,49,91,.09); }
.lineup-logo { width: 39px; height: 39px; display: grid; place-items: center; overflow: hidden; border-radius: 11px; color: #fff; background: #1b2130; font-size: .68rem; font-weight: 900; }
.lineup-copy { min-width: 0; }
.lineup-copy strong, .lineup-copy span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lineup-copy strong { font-size: .72rem; }
.lineup-copy span { margin-top: 3px; color: var(--muted); font-size: .59rem; }
.lineup-item > b { color: var(--muted-2); font-size: 1rem; }
.lineup-nav { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px; margin-top: 9px; }
.lineup-nav button { min-height: 34px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255,255,255,.03); cursor: pointer; font-size: .64rem; font-weight: 800; }
.lineup-nav button:last-child { justify-self: stretch; }
.lineup-nav span { color: var(--muted); font-size: .6rem; text-align: center; }
.lineup-nav button:disabled { opacity: .35; cursor: not-allowed; }

.discover-section, .my-tv-section { padding-top: 68px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 21px; }
.section-heading.compact { margin-bottom: 16px; }
.section-heading h2 { margin: 6px 0 6px; font-size: clamp(1.7rem,3.5vw,2.65rem); letter-spacing: -.035em; }
.section-heading p { margin: 0; color: var(--muted); line-height: 1.55; }
.main-search { width: min(430px,100%); min-height: 48px; padding: 0 13px; border-radius: 15px; }
.main-search input { font-size: .84rem; }
.category-dock { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(132px,1fr); gap: 10px; overflow-x: auto; padding: 2px 1px 13px; scroll-snap-type: x proximity; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.category-dock button { min-height: 112px; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; scroll-snap-align: start; padding: 13px; border: 1px solid var(--line); border-radius: 19px; color: #fff; background: linear-gradient(145deg,rgba(255,255,255,.05),rgba(255,255,255,.018)); cursor: pointer; text-align: left; transition: transform .2s ease,border-color .2s ease,background .2s ease; }
.category-dock button:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.category-dock button.is-active { border-color: rgba(255,49,91,.38); background: linear-gradient(145deg,rgba(255,49,91,.17),rgba(139,92,246,.08)); }
.category-dock button > span { width: 38px; height: 38px; display: grid; place-items: center; margin-bottom: auto; border-radius: 12px; background: rgba(255,255,255,.07); font-size: 1rem; font-weight: 950; }
.category-dock strong { font-size: .84rem; }
.category-dock small { margin-top: 3px; color: var(--muted); font-size: .61rem; }
.browse-console { display: grid; grid-template-columns: auto minmax(220px,1fr) auto auto; align-items: end; gap: 12px; margin-top: 8px; padding: 14px; border-radius: 21px; box-shadow: none; }
.browse-modes { display: flex; gap: 5px; padding: 4px; border-radius: 13px; background: rgba(255,255,255,.035); }
.browse-modes button { min-height: 38px; border: 0; border-radius: 10px; padding: 0 13px; color: var(--muted); background: transparent; cursor: pointer; font-size: .72rem; font-weight: 850; }
.browse-modes button.is-active { color: #fff; background: rgba(255,255,255,.09); }
.select-field { display: grid; gap: 6px; }
.select-field span { color: var(--muted); font-size: .62rem; font-weight: 800; }
.select-field select { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 12px; padding: 0 35px 0 12px; color: #fff; background: #111624; outline: none; }
.playable-switch { min-height: 42px; display: flex; align-items: center; gap: 9px; cursor: pointer; }
.playable-switch input { position: absolute; opacity: 0; }
.playable-switch > span { position: relative; width: 39px; height: 22px; border-radius: 999px; background: #2b3344; transition: .2s; }
.playable-switch > span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .2s; }
.playable-switch input:checked + span { background: linear-gradient(90deg,var(--red),var(--violet)); }
.playable-switch input:checked + span::after { transform: translateX(17px); }
.playable-switch b { color: var(--muted); font-size: .67rem; white-space: nowrap; }
.catalog-status { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 15px 2px 12px; }
.catalog-status > div { display: flex; align-items: center; gap: 9px; min-width: 0; }
.catalog-status p { margin: 0; color: var(--muted); font-size: .73rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.catalog-status > strong { color: #dce3ef; font-size: .72rem; }
.status-pulse { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px rgba(53,227,164,.09); }
.channel-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 11px; }
.channel-card { position: relative; overflow: hidden; min-width: 0; border: 1px solid var(--line); border-radius: 19px; background: linear-gradient(155deg,#151a28,#0d111b); cursor: pointer; transition: transform .2s ease,border-color .2s ease,box-shadow .2s ease; }
.channel-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 18px 48px rgba(0,0,0,.28); }
.channel-card.is-active { border-color: rgba(255,49,91,.42); box-shadow: 0 0 0 1px rgba(255,49,91,.14),0 18px 48px rgba(0,0,0,.3); }
.channel-art { position: relative; aspect-ratio: 16/10; display: grid; place-items: center; overflow: hidden; background:
  radial-gradient(circle at 70% 25%,rgba(139,92,246,.22),transparent 32%),
  radial-gradient(circle at 20% 85%,rgba(255,49,91,.2),transparent 33%),
  #111522; }
.card-logo { width: 67px; height: 67px; display: grid; place-items: center; overflow: hidden; border: 1px solid rgba(255,255,255,.1); border-radius: 19px; color: #fff; background: rgba(255,255,255,.06); font-weight: 950; }
.card-live { position: absolute; left: 9px; top: 9px; padding: 5px 7px; border-radius: 7px; color: #fff; background: rgba(255,49,91,.92); font-size: .52rem; font-weight: 950; letter-spacing: .08em; }
.card-play { position: absolute; right: 9px; bottom: 9px; width: 35px; height: 35px; display: grid; place-items: center; border-radius: 12px; color: #fff; background: linear-gradient(135deg,var(--red),var(--violet)); box-shadow: 0 8px 20px rgba(255,49,91,.25); }
.card-play::before { content: ""; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid #fff; transform: translateX(1px); }
.channel-card-body { padding: 12px; }
.channel-card-body .card-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: .57rem; }
.channel-card-body .card-meta span:first-child { color: var(--cyan); font-weight: 850; text-transform: uppercase; }
.channel-card-body h3 { margin: 7px 0 4px; font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.channel-card-body p { margin: 0; color: var(--muted); font-size: .62rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-unavailable { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.7); background: rgba(0,0,0,.5); font-size: .66rem; font-weight: 850; }
.skeleton-card { min-height: 220px; border-radius: 19px; background: linear-gradient(90deg,rgba(255,255,255,.035) 25%,rgba(255,255,255,.075) 50%,rgba(255,255,255,.035) 75%); background-size: 220% 100%; animation: shimmer 1.25s infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }
.empty-state { padding: 54px 20px; text-align: center; border: 1px dashed var(--line); border-radius: 21px; }
.empty-state > span { display: block; font-size: 2rem; }
.empty-state h3 { margin: 10px 0 6px; }
.empty-state p { margin: 0; color: var(--muted); }
.catalog-pagination { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; margin-top: 18px; }
.catalog-pagination > div { display: grid; justify-items: center; gap: 3px; }
.catalog-pagination strong { font-size: .78rem; }
.catalog-pagination span { color: var(--muted); font-size: .64rem; }
.catalog-pagination button:disabled { opacity: .38; cursor: not-allowed; }

.personal-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px,280px); gap: 11px; overflow-x: auto; padding-bottom: 12px; scrollbar-width: thin; }
.personal-empty { min-height: 110px; display: grid; place-items: center; border: 1px dashed var(--line); border-radius: 18px; color: var(--muted); }
.platform-note { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 62px; margin-bottom: 70px; padding: 34px; border-radius: 27px; background: linear-gradient(135deg,rgba(255,49,91,.13),rgba(139,92,246,.1) 48%,rgba(50,216,255,.06)); }
.platform-note h2 { margin: 6px 0 8px; font-size: clamp(1.55rem,3vw,2.4rem); }
.platform-note p { max-width: 780px; margin: 0; color: var(--muted); line-height: 1.6; }
.platform-note a { flex: 0 0 auto; padding: 13px 17px; border: 1px solid var(--line-strong); border-radius: 13px; color: #fff; text-decoration: none; font-weight: 850; }
.site-footer { border-top: 1px solid var(--line); background: rgba(4,6,11,.72); }
.footer-inner { min-height: 110px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 20px; }
.footer-inner p { color: var(--muted); text-align: center; }
.footer-inner > span { color: var(--muted-2); font-size: .72rem; }
.mobile-nav { display: none; }

.link-dialog { width: min(620px,calc(100% - 28px)); padding: 28px; border: 1px solid var(--line-strong); border-radius: 24px; color: var(--text); background: linear-gradient(150deg,#151b2a,#090c14); box-shadow: 0 35px 110px rgba(0,0,0,.65); }
.link-dialog::backdrop { background: rgba(0,0,0,.72); backdrop-filter: blur(8px); }
.dialog-close { position: absolute; right: 15px; top: 15px; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 11px; color: #fff; background: rgba(255,255,255,.04); cursor: pointer; font-size: 1.3rem; }
.link-dialog h2 { margin: 7px 0 8px; }
.link-dialog p { color: var(--muted); line-height: 1.55; }
.link-input-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; margin: 18px 0 10px; }
.link-input-row input { min-width: 0; min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; color: #fff; background: #0c111c; outline: 0; }
.link-dialog small { display: block; color: var(--muted-2); line-height: 1.45; }
.link-dialog small.is-error { color: #ff9bad; }
.toast-region { position: fixed; z-index: 1000; right: 18px; bottom: 18px; display: grid; gap: 8px; width: min(360px,calc(100% - 36px)); }
.toast { display: flex; align-items: center; gap: 9px; padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: 14px; background: rgba(17,22,34,.96); box-shadow: 0 18px 48px rgba(0,0,0,.4); }
.toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.toast.is-error::before { background: var(--red); }
.toast p { margin: 0; font-size: .75rem; }
body.theater .watch-section { width: 100%; max-width: none; grid-template-columns: 1fr; padding-top: 0; }
body.theater .up-next-panel { display: none; }
body.theater .player-card { border-radius: 0; border-inline: 0; }
body.theater .player-stage { max-height: calc(100vh - 124px); }

@media (max-width: 1280px) {
  .channel-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
  .watch-section { grid-template-columns: minmax(0,1fr) 330px; }
  .browse-console { grid-template-columns: 1fr 1fr; align-items: end; }
}
@media (max-width: 1020px) {
  .watch-section { grid-template-columns: 1fr; }
  .up-next-panel { position: static; height: auto; min-height: 0; }
  .lineup-list { max-height: 410px; }
  .channel-grid { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .top-nav { display: none; }
  .header-inner { grid-template-columns: auto 1fr; }
  .header-actions { justify-self: end; }
}
@media (max-width: 760px) {
  :root { --shell: min(100% - 22px,1480px); }
  body { padding-bottom: 82px; }
  .site-header { position: sticky; }
  .header-inner { min-height: 66px; gap: 12px; }
  .brand-symbol { width: 37px; height: 37px; border-radius: 12px; }
  .brand-name strong { font-size: 1rem; }
  .header-search-button, .edge-status { display: none; }
  .icon-button { width: 39px; height: 39px; }
  .watch-section { padding-top: 12px; gap: 12px; }
  .player-card, .up-next-panel { border-radius: 20px; }
  .player-topline { min-height: 43px; }
  .platform-line { font-size: .66rem; }
  .player-top-actions button { width: 30px; height: 30px; }
  .senna-corner { top: 9px; right: 9px; }
  .senna-corner b { display: none; }
  .player-poster { padding: 18px; }
  .poster-brand .brand-symbol.large { width: 47px; height: 47px; }
  .poster-brand strong { font-size: 1.5rem; }
  .player-poster h1 { margin-top: 17px; font-size: 1.35rem; }
  .player-poster p { font-size: .72rem; margin-bottom: 14px; }
  .player-poster .primary-button { min-height: 38px; }
  .now-playing-strip { min-height: 78px; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; padding: 11px; }
  .current-logo { width: 49px; height: 49px; border-radius: 14px; }
  .current-info h2 { font-size: .95rem; }
  .current-info p { font-size: .65rem; }
  .current-actions { gap: 4px; }
  .current-actions button { width: 34px; height: 34px; border-radius: 10px; }
  .current-actions button:nth-child(2) { display: none; }
  .up-next-panel { padding: 14px; }
  .lineup-list { max-height: 300px; }
  .discover-section, .my-tv-section { padding-top: 46px; }
  .section-heading { align-items: stretch; flex-direction: column; gap: 13px; }
  .section-heading h2 { font-size: 1.75rem; }
  .main-search { width: 100%; }
  .category-dock { grid-auto-columns: 118px; }
  .category-dock button { min-height: 100px; border-radius: 16px; }
  .browse-console { grid-template-columns: 1fr; gap: 10px; border-radius: 18px; }
  .browse-modes { overflow-x: auto; }
  .browse-modes button { white-space: nowrap; }
  .playable-switch { justify-content: space-between; }
  .channel-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .channel-card { border-radius: 16px; }
  .card-logo { width: 55px; height: 55px; border-radius: 16px; }
  .channel-card-body { padding: 10px; }
  .channel-card-body h3 { font-size: .76rem; }
  .channel-card-body p { font-size: .58rem; }
  .skeleton-card { min-height: 190px; }
  .catalog-pagination { grid-template-columns: 1fr 1fr; }
  .catalog-pagination > div { grid-column: 1 / -1; grid-row: 1; margin-bottom: 4px; }
  .platform-note { align-items: flex-start; flex-direction: column; padding: 25px 20px; margin-top: 45px; margin-bottom: 36px; border-radius: 21px; }
  .platform-note a { width: 100%; text-align: center; }
  .footer-inner { min-height: 130px; grid-template-columns: 1fr; justify-items: start; gap: 8px; padding-block: 22px; }
  .footer-inner p { margin: 0; text-align: left; }
  .mobile-nav { position: fixed; z-index: 250; left: 11px; right: 11px; bottom: max(9px,env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3,1fr); min-height: 61px; padding: 5px; border: 1px solid var(--line-strong); border-radius: 19px; background: rgba(11,14,23,.93); box-shadow: 0 16px 50px rgba(0,0,0,.5); backdrop-filter: blur(20px); }
  .mobile-nav button { border: 0; border-radius: 14px; color: var(--muted); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .58rem; font-weight: 850; }
  .mobile-nav button.is-active { color: #fff; background: rgba(255,255,255,.07); }
  .mobile-nav svg { width: 19px; height: 19px; }
}
@media (max-width: 410px) {
  .brand-name em { display: none; }
  .channel-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .current-actions button:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}


/* V7 Smart Adaptive Quality */
.adaptive-quality-bar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 15px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, rgba(50,216,255,.055), rgba(53,227,164,.035));
}
.adaptive-quality-info { min-width: 0; display: flex; align-items: center; gap: 11px; }
.adaptive-quality-info strong { display: block; font-size: .76rem; }
.adaptive-quality-info small { display: block; max-width: 560px; margin-top: 3px; color: var(--muted); font-size: .65rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.adaptive-signal { width: 25px; height: 24px; display: flex; align-items: end; gap: 2px; flex: 0 0 auto; }
.adaptive-signal i { width: 4px; border-radius: 3px 3px 1px 1px; background: rgba(255,255,255,.14); transition: background .2s, box-shadow .2s; }
.adaptive-signal i:nth-child(1) { height: 6px; }
.adaptive-signal i:nth-child(2) { height: 10px; }
.adaptive-signal i:nth-child(3) { height: 15px; }
.adaptive-signal i:nth-child(4) { height: 21px; }
.adaptive-signal i.is-active { background: var(--green); box-shadow: 0 0 10px rgba(53,227,164,.28); }
.quality-picker { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.quality-picker > span { color: var(--muted); font-size: .64rem; font-weight: 800; }
.quality-picker select {
  min-width: 178px;
  height: 38px;
  padding: 0 34px 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: #fff;
  background: #131925;
  outline: 0;
  font-size: .68rem;
  font-weight: 800;
  cursor: pointer;
}
.quality-picker select:disabled { opacity: .55; cursor: not-allowed; }

@media (max-width: 760px) {
  .adaptive-quality-bar { min-height: 52px; padding: 8px 11px; gap: 9px; }
  .adaptive-quality-info { gap: 8px; }
  .adaptive-quality-info strong { font-size: .66rem; }
  .adaptive-quality-info small { max-width: 42vw; font-size: .56rem; }
  .quality-picker > span { display: none; }
  .quality-picker select { min-width: 126px; max-width: 38vw; height: 35px; padding-left: 9px; font-size: .6rem; }
}

@media (max-width: 410px) {
  .adaptive-quality-info strong { max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .adaptive-quality-info small { max-width: 34vw; }
  .quality-picker select { min-width: 112px; max-width: 36vw; }
}


/* V8 network guide link and promo */
.top-nav a { border: 0; border-radius: 11px; padding: 9px 15px; background: transparent; color: var(--muted); cursor: pointer; font-size: .82rem; font-weight: 800; text-decoration: none; }
.top-nav a:hover { color: #fff; background: rgba(255,255,255,.07); }
.network-guide-promo { display: grid; grid-template-columns: minmax(0,1fr) 340px; gap: 28px; align-items: center; margin-top: 58px; padding: 34px; border: 1px solid var(--line); border-radius: 27px; background: linear-gradient(135deg,rgba(255,49,91,.16),rgba(139,92,246,.12) 50%,rgba(50,216,255,.08)); box-shadow: var(--shadow); overflow: hidden; }
.network-guide-promo h2 { margin: 7px 0 10px; font-size: clamp(1.55rem,3vw,2.45rem); }
.network-guide-promo p { max-width: 800px; margin: 0; color: var(--muted); line-height: 1.65; }
.network-guide-actions { display: flex; align-items: center; gap: 16px; margin-top: 20px; }
.network-guide-actions a { text-decoration: none; }
.network-guide-actions span { color: var(--muted); font-size: .76rem; line-height: 1.45; }
.network-guide-stack { display: grid; grid-template-columns: repeat(2,1fr); gap: 11px; transform: rotate(-2deg); }
.network-guide-stack span { min-height: 66px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.12); border-radius: 17px; background: rgba(7,10,17,.62); color: #fff; font-size: .76rem; font-weight: 950; letter-spacing: .13em; box-shadow: 0 18px 40px rgba(0,0,0,.18); }
.network-guide-stack span:nth-child(3) { grid-column: span 2; background: linear-gradient(135deg,rgba(255,49,91,.2),rgba(139,92,246,.2)); }
.mobile-nav a { color: inherit; text-decoration: none; }
@media (max-width: 980px) { .network-guide-promo { grid-template-columns: 1fr; } .network-guide-stack { grid-template-columns: repeat(5,1fr); } .network-guide-stack span:nth-child(3) { grid-column: auto; } }
@media (max-width: 720px) { .network-guide-promo { margin-top: 42px; padding: 24px 18px; border-radius: 21px; } .network-guide-actions { align-items: stretch; flex-direction: column; } .network-guide-actions a { text-align: center; } .network-guide-stack { grid-template-columns: repeat(2,1fr); } .network-guide-stack span:nth-child(3) { grid-column: span 2; } .mobile-nav { grid-template-columns: repeat(4,1fr); } .mobile-nav button, .mobile-nav a { border: 0; border-radius: 14px; color: var(--muted); background: transparent; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: .58rem; font-weight: 850; } .mobile-nav a:hover { color:#fff; background:rgba(255,255,255,.07); } .mobile-nav a svg { width:19px; height:19px; } }
