:root {
  --bg: #08090c;
  --panel: rgba(14, 16, 21, .92);
  --panel-solid: #0d0f14;
  --panel-2: #14171d;
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.16);
  --text: #f4f6f8;
  --muted: #9299a5;
  --muted-2: #6f7680;
  --accent: #ff273a;
  --accent-2: #b90e20;
  --good: #56e39f;
  --warning: #f5b84c;
  --danger: #ff5261;
  --focus: #ffffff;
  --shadow: 0 30px 80px rgba(0,0,0,.45);
  --radius: 22px;
  --drawer: 440px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
}

* { box-sizing: border-box; }
html, body { width: 100%; height: 100%; margin: 0; background: var(--bg); color: var(--text); }
html { font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
body { overflow: hidden; overscroll-behavior: none; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; }
button { color: inherit; }
button, a, input, select { outline: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
button { border: 0; }
[hidden] { display: none !important; }
svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; background: #090a0d; z-index: 9999; padding: 2rem; }

.app, .player-stage { width: 100%; height: 100%; }
.player-stage { position: relative; overflow: hidden; background: #030405; }
.video-surface, #video { position: absolute; inset: 0; width: 100%; height: 100%; }
.video-surface { background: radial-gradient(circle at 60% 42%, #1b2028 0, #0b0d11 35%, #050608 72%); }
#video { object-fit: contain; background: #000; z-index: 1; }

.video-vignette { position: absolute; inset: 0; z-index: 2; pointer-events: none; background: linear-gradient(180deg, rgba(0,0,0,.56) 0%, rgba(0,0,0,0) 24%, rgba(0,0,0,0) 60%, rgba(0,0,0,.72) 100%); }
.ambient-grid { position: absolute; inset: 0; z-index: 0; opacity: .18; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(circle at center, black 20%, transparent 75%); }
.player-stage[data-state="playing"] .ambient-grid { opacity: 0; }

.ui-layer { position: absolute; z-index: 10; transition: opacity .28s ease, transform .28s ease; }
.app.ui-hidden .ui-layer { opacity: 0; pointer-events: none; }
.app.ui-hidden .top-overlay { transform: translateY(-14px); }
.app.ui-hidden .control-dock { transform: translateY(16px); }
.app.ui-hidden .status-strip { transform: translateY(-10px); }

.top-overlay { top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: calc(22px + var(--safe-top)) calc(26px + var(--safe-right)) 22px calc(26px + var(--safe-left)); }
.brand-block, .top-actions, .brand { display: flex; align-items: center; }
.brand-block { gap: 14px; }
.brand { gap: 11px; color: inherit; text-decoration: none; }
.brand-symbol { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: linear-gradient(145deg, #ff3144, #b9081a); box-shadow: 0 10px 28px rgba(255,39,58,.24); transform: rotate(-7deg); }
.brand-symbol::before, .brand-symbol::after, .brand-symbol span { content: ""; display: block; position: absolute; width: 5px; border-radius: 4px; background: #fff; transform: rotate(7deg); }
.brand-symbol::before { height: 11px; margin-left: -11px; margin-top: 7px; }
.brand-symbol span { height: 18px; }
.brand-symbol::after { height: 24px; margin-left: 11px; margin-top: -5px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; gap: 4px; }
.brand-text strong { font-size: 1rem; letter-spacing: -.02em; }
.brand-text small { color: var(--muted); font-size: .59rem; font-weight: 800; letter-spacing: .16em; }
.network-state { font-size: .62rem; font-weight: 900; letter-spacing: .12em; padding: 7px 9px; border-radius: 999px; border: 1px solid rgba(86,227,159,.24); color: #8ff0bd; background: rgba(32,117,75,.12); }
.network-state[data-mode="offline"] { color: #ff96a0; border-color: rgba(255,82,97,.25); background: rgba(255,82,97,.08); }
.top-actions { gap: 8px; }
.tv-clock { color: #d9dde2; font-variant-numeric: tabular-nums; font-size: .86rem; font-weight: 750; margin-right: 2px; }

.icon-button, .control-button { display: inline-grid; place-items: center; cursor: pointer; border: 1px solid var(--line); background: rgba(12,14,18,.62); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: border-color .18s ease, background .18s ease, transform .18s ease, color .18s ease; }
.icon-button:hover, .control-button:hover { background: rgba(255,255,255,.11); border-color: var(--line-strong); }
.icon-button:active, .control-button:active { transform: scale(.96); }
.icon-button { width: 42px; height: 42px; border-radius: 13px; }
.icon-button:disabled { opacity: .35; cursor: not-allowed; }
.button { min-height: 44px; border-radius: 14px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; cursor: pointer; font-weight: 800; letter-spacing: -.01em; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:active { transform: scale(.98); }
.button-primary { background: linear-gradient(135deg, var(--accent), #d90f26); color: #fff; box-shadow: 0 12px 34px rgba(255,39,58,.2); }
.button-primary:hover { background: linear-gradient(135deg, #ff4354, #ef1530); }
.button-danger { background: rgba(255,82,97,.09); color: #ff9aa3; border: 1px solid rgba(255,82,97,.22); width: 100%; margin-top: 10px; }
.button-secondary { width: 100%; margin-top: 12px; background: rgba(255,255,255,.055); color: #dbe0e6; border: 1px solid var(--line); }
.button-secondary:hover { background: rgba(255,255,255,.085); }
.privacy-link { display: inline-flex; margin-top: 14px; color: #aeb5bf; font-size: .69rem; font-weight: 750; text-decoration: none; }
.privacy-link:hover { color: #fff; text-decoration: underline; }
.channels-button { min-height: 42px; background: rgba(255,255,255,.92); color: #090a0c; border-radius: 13px; padding-inline: 14px 16px; }
.channels-button svg { width: 19px; }
.channels-button:hover { background: #fff; }

.status-strip { top: calc(86px + var(--safe-top)); left: calc(26px + var(--safe-left)); display: flex; align-items: center; gap: 8px; }
.status-pill { min-height: 28px; display: inline-flex; align-items: center; padding: 0 10px; border-radius: 999px; background: rgba(9,10,13,.66); border: 1px solid var(--line); backdrop-filter: blur(14px); color: #d8dce2; font-size: .63rem; font-weight: 900; letter-spacing: .12em; }
.status-pill[data-mode="live"] { color: #fff; background: rgba(212,13,39,.9); border-color: rgba(255,255,255,.12); }
.status-pill[data-mode="error"] { color: #ffbdc4; border-color: rgba(255,82,97,.25); }
.status-pill[data-mode="warning"] { color: #ffd58d; border-color: rgba(245,184,76,.24); }
.status-pill.subtle { color: var(--muted); }
.status-pill.subtle[data-mode="relay"] { color: #a8c7ff; }
.stream-stats { color: rgba(255,255,255,.58); font-size: .7rem; font-weight: 650; text-shadow: 0 1px 8px #000; }

.control-dock { left: calc(24px + var(--safe-left)); right: calc(24px + var(--safe-right)); bottom: calc(22px + var(--safe-bottom)); min-height: 86px; padding: 13px 15px 13px 13px; display: grid; grid-template-columns: minmax(220px, 1fr) auto minmax(260px, 1fr); align-items: center; gap: 18px; border: 1px solid rgba(255,255,255,.09); border-radius: 23px; background: rgba(11,13,17,.72); box-shadow: var(--shadow); backdrop-filter: blur(22px) saturate(120%); -webkit-backdrop-filter: blur(22px) saturate(120%); }
.now-playing { min-width: 0; display: flex; align-items: center; gap: 12px; }
.now-logo { width: 54px; height: 54px; object-fit: contain; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid var(--line); padding: 8px; flex: 0 0 auto; }
.now-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.now-copy strong { font-size: .95rem; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; letter-spacing: -.02em; }
.now-copy small { font-size: .72rem; color: var(--muted); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.favorite-current { margin-left: 2px; flex: 0 0 auto; width: 36px; height: 36px; border-radius: 11px; }
.favorite-current svg { width: 18px; }
.favorite-current.is-active { color: #ffc64b; background: rgba(255,198,75,.09); border-color: rgba(255,198,75,.18); }
.favorite-current.is-active svg { fill: currentColor; }
.primary-controls { display: flex; align-items: center; justify-content: center; gap: 7px; }
.secondary-controls { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.control-button { width: 40px; height: 40px; border-radius: 13px; color: #e8ebef; }
.control-button svg { width: 19px; height: 19px; }
.play-button { width: 52px; height: 52px; border-radius: 17px; background: #fff; color: #08090c; border-color: transparent; box-shadow: 0 8px 28px rgba(0,0,0,.28); }
.play-button:hover { background: #fff; color: #08090c; }
.icon-pause { display: none; }
.play-button.is-playing .icon-play, .center-play.is-playing .icon-play { display: none; }
.play-button.is-playing .icon-pause, .center-play.is-playing .icon-pause { display: block; }
.sound-off { display: none; }
.is-muted .sound-on { display: none; }
.is-muted .sound-off { display: block; }
.volume-wrap { height: 40px; display: flex; align-items: center; gap: 8px; min-width: 122px; }
.volume-wrap input { width: 78px; accent-color: #fff; cursor: pointer; }
.volume-wrap span { width: 37px; color: var(--muted); font-size: .65rem; font-variant-numeric: tabular-nums; font-weight: 750; }
.quality-wrap { height: 40px; display: flex; align-items: center; gap: 7px; padding: 0 8px 0 11px; border: 1px solid var(--line); border-radius: 12px; background: rgba(12,14,18,.55); }
.quality-wrap > span { color: var(--muted); font-size: .62rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 850; }
.quality-wrap select { max-width: 84px; color: #fff; background: transparent; border: 0; font-size: .72rem; font-weight: 800; cursor: pointer; }
.quality-wrap option { background: #101217; }

.center-state { position: absolute; z-index: 4; left: 50%; top: 48%; transform: translate(-50%,-50%); width: min(620px, calc(100% - 42px)); text-align: center; display: flex; flex-direction: column; align-items: center; }
.empty-state { gap: 10px; }
.empty-state h1 { margin: 0; font-size: clamp(2rem, 4.3vw, 4.6rem); line-height: .98; letter-spacing: -.06em; max-width: 720px; }
.empty-state > p:not(.eyebrow) { color: var(--muted); max-width: 500px; font-size: clamp(.9rem, 1.3vw, 1.05rem); line-height: 1.55; margin: 3px 0 10px; }
.eyebrow { margin: 4px 0 0; font-size: .65rem; font-weight: 900; letter-spacing: .22em; color: #bdc2ca; }
.hero-mark { position: relative; width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg, #ff3144, #b9081a); box-shadow: 0 16px 40px rgba(255,39,58,.18); margin-bottom: 6px; transform: rotate(-7deg); }
.hero-mark::before, .hero-mark::after, .hero-mark span { content: ""; position: absolute; width: 7px; border-radius: 6px; background: #fff; transform: rotate(7deg); }
.hero-mark::before { height: 16px; margin-left: -18px; margin-top: 11px; }
.hero-mark span { height: 28px; }
.hero-mark::after { height: 38px; margin-left: 18px; margin-top: -9px; }
.loading-state { gap: 13px; color: #e7eaee; }
.loading-state strong { font-size: .86rem; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,.16); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-state { max-width: 520px; gap: 10px; background: rgba(8,9,12,.7); border: 1px solid rgba(255,82,97,.18); border-radius: 22px; padding: 24px; backdrop-filter: blur(18px); }
.error-icon { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,82,97,.12); color: #ff9da6; font-weight: 900; }
.error-state strong { font-size: 1.05rem; }
.error-state p { color: #bbc0c8; line-height: 1.45; margin: 0 0 4px; font-size: .86rem; }
.center-play { position: absolute; z-index: 6; left: 50%; top: 48%; transform: translate(-50%,-50%); width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; background: rgba(255,255,255,.94); color: #07080a; box-shadow: 0 20px 60px rgba(0,0,0,.38); backdrop-filter: blur(12px); }
.center-play svg { width: 30px; height: 30px; stroke-width: 2.3; }
.center-play .icon-play { margin-left: 4px; }

.drawer-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.38); opacity: 0; visibility: hidden; transition: opacity .26s ease, visibility .26s ease; backdrop-filter: blur(2px); }
.channel-drawer { position: fixed; z-index: 50; top: 12px; right: 12px; bottom: 12px; width: min(var(--drawer), calc(100vw - 24px)); display: flex; flex-direction: column; padding: 18px; border-radius: 26px; background: rgba(12,14,18,.97); border: 1px solid rgba(255,255,255,.1); box-shadow: -24px 0 70px rgba(0,0,0,.38); transform: translateX(calc(100% + 22px)); transition: transform .3s cubic-bezier(.2,.75,.25,1); backdrop-filter: blur(28px); -webkit-backdrop-filter: blur(28px); }
.app[data-drawer="open"] .channel-drawer { transform: translateX(0); }
.app[data-drawer="open"] .drawer-scrim { opacity: 1; visibility: visible; }
.drawer-head, .modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.drawer-head { padding: 2px 2px 14px; }
.drawer-head h2, .modal-head h2 { margin: 2px 0 0; font-size: 1.5rem; letter-spacing: -.04em; }
.drawer-kicker { color: var(--muted); font-size: .58rem; font-weight: 900; letter-spacing: .18em; }
.search-field { height: 47px; flex: 0 0 auto; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: rgba(255,255,255,.045); border-radius: 14px; padding: 0 13px; }
.search-field:focus-within { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.065); }
.search-field svg { width: 18px; color: var(--muted); }
.search-field input { min-width: 0; flex: 1; border: 0; background: transparent; color: #fff; }
.search-field input::placeholder { color: #6f7680; }
.view-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 10px; }
.view-tab { min-width: 0; min-height: 38px; border-radius: 11px; cursor: pointer; background: transparent; color: #8f96a1; font-size: .7rem; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 6px; }
.view-tab b { color: #636a75; font-size: .62rem; }
.view-tab.is-active { color: #fff; background: rgba(255,255,255,.08); }
.view-tab.is-active b { color: #aab0ba; }
.group-chips { flex: 0 0 auto; display: flex; gap: 7px; overflow-x: auto; padding: 11px 0 8px; scrollbar-width: none; }
.group-chips::-webkit-scrollbar { display: none; }
.chip { white-space: nowrap; min-height: 32px; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: #a8aeb8; cursor: pointer; font-size: .67rem; font-weight: 750; }
.chip b { color: #626975; font-size: .59rem; }
.chip.is-active { background: #f4f6f8; color: #0a0b0e; border-color: #fff; }
.chip.is-active b { color: #535963; }
.drawer-result-row { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 8px; color: #777f8b; font-size: .67rem; }
.text-button { background: transparent; color: #dbe0e6; cursor: pointer; font-size: .68rem; font-weight: 850; padding: 6px; }
.text-button:hover { color: #fff; }
.channel-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 5px; padding-right: 3px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.12) transparent; }
.channel-row { position: relative; width: 100%; min-height: 66px; display: grid; grid-template-columns: 48px minmax(0,1fr) 24px; align-items: center; gap: 11px; text-align: left; cursor: pointer; padding: 8px 10px 8px 8px; border-radius: 15px; background: transparent; border: 1px solid transparent; transition: background .15s ease, border-color .15s ease, transform .15s ease; }
.channel-row:hover { background: rgba(255,255,255,.055); }
.channel-row.is-current { background: rgba(255,255,255,.075); border-color: rgba(255,255,255,.1); }
.channel-row.is-current::before { content: ""; position: absolute; width: 3px; height: 28px; right: 8px; border-radius: 3px; background: var(--accent); box-shadow: 0 0 18px rgba(255,39,58,.5); }
.channel-logo-wrap { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 13px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.06); overflow: hidden; }
.channel-logo { max-width: 38px; max-height: 38px; object-fit: contain; }
.channel-copy { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.channel-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .82rem; letter-spacing: -.015em; }
.channel-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #747c87; font-size: .66rem; }
.channel-actions { display: flex; justify-content: flex-end; }
.favorite-mark { color: #555d68; font-size: 1rem; }
.favorite-mark.is-active { color: #ffc64b; }
.drawer-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 5px; padding: 50px 26px; color: #9da4ae; }
.drawer-empty strong { color: #e8ebef; }
.drawer-empty span { font-size: .73rem; line-height: 1.45; }
.load-more { flex: 0 0 auto; min-height: 38px; margin-top: 6px; border-radius: 11px; cursor: pointer; color: #c3c8d0; background: rgba(255,255,255,.05); border: 1px solid var(--line); font-size: .68rem; font-weight: 800; }
.drawer-footer { flex: 0 0 auto; display: grid; grid-template-columns: 9px 1fr; align-items: center; gap: 10px; padding: 12px 4px 2px; border-top: 1px solid rgba(255,255,255,.06); margin-top: 8px; }
.source-dot { width: 8px; height: 8px; border-radius: 50%; background: #69707a; }
.source-dot[data-mode="ok"] { background: var(--good); box-shadow: 0 0 0 4px rgba(86,227,159,.08); }
.source-dot[data-mode="loading"] { background: var(--warning); animation: pulse 1.1s ease-in-out infinite alternate; }
.source-dot[data-mode="error"] { background: var(--danger); }
@keyframes pulse { to { opacity: .4; } }
.drawer-footer div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.drawer-footer strong { font-size: .68rem; }
.drawer-footer small { color: #6f7680; font-size: .6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 2px 0 5px; }
.filter-select { min-width: 0; min-height: 43px; display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); }
.filter-select > span { color: var(--muted-2); font-size: .54rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.filter-select select { width: 100%; min-width: 0; border: 0; background: transparent; color: #e9edf2; font-size: .69rem; font-weight: 750; cursor: pointer; }
.filter-select option { background: #101217; color: #fff; }
.ad-zone { overflow: hidden; border: 1px solid rgba(255,255,255,.065); background: rgba(255,255,255,.018); border-radius: 12px; }
.ad-label { display: block; color: #5f6670; font-size: .48rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; padding: 5px 8px 0; }
.ad-unit { display: block; width: 100%; min-height: 50px; }
.ad-zone-horizontal { flex: 0 0 auto; min-height: 72px; margin-top: 7px; }
.ad-zone-square { min-height: 130px; margin-top: 14px; }
.ad-rail { display: none; position: fixed; z-index: 45; left: 16px; top: 50%; transform: translateY(-50%); width: 180px; min-height: 300px; max-height: 70vh; opacity: 0; pointer-events: none; transition: opacity .2s ease; }
.app[data-drawer="open"] .ad-rail { opacity: 1; pointer-events: auto; }
@media (min-width: 1480px) { .app[data-drawer="open"] .ad-rail { display: block; } }
@media (max-width: 760px) { .filter-grid { grid-template-columns: 1fr 1fr; } .ad-zone-horizontal { min-height: 66px; } .ad-rail { display: none !important; } }
@media (max-width: 380px) { .filter-grid { grid-template-columns: 1fr; } }
body.is-fullscreen .ad-rail, .app.ui-hidden .ad-rail { display: none !important; }

.modal-backdrop { position: fixed; z-index: 80; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(0,0,0,.64); backdrop-filter: blur(12px); }
.modal-card { width: min(520px, 100%); max-height: min(720px, calc(100dvh - 38px)); overflow-y: auto; border: 1px solid rgba(255,255,255,.1); background: #101217; border-radius: 25px; box-shadow: 0 36px 100px rgba(0,0,0,.55); padding: 21px; }
.wide-card { width: min(690px, 100%); }
.modal-head { margin-bottom: 13px; }
.modal-lead { margin: 0 0 17px; color: #9299a5; font-size: .8rem; line-height: 1.55; }
.modal-lead.compact { margin-top: 16px; margin-bottom: 0; }
.url-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.url-row input { min-width: 0; height: 46px; border-radius: 13px; border: 1px solid var(--line); background: rgba(255,255,255,.045); color: #fff; padding: 0 13px; }
.separator { height: 42px; display: flex; align-items: center; gap: 10px; color: #606773; font-size: .66rem; }
.separator::before, .separator::after { content: ""; height: 1px; background: var(--line); flex: 1; }
.file-drop { min-height: 115px; border: 1px dashed rgba(255,255,255,.18); border-radius: 17px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer; background: rgba(255,255,255,.025); text-align: center; padding: 17px; }
.file-drop:hover { background: rgba(255,255,255,.045); border-color: rgba(255,255,255,.28); }
.file-drop svg { color: #c9ced5; margin-bottom: 3px; }
.file-drop strong { font-size: .78rem; }
.file-drop span { color: #737b86; font-size: .65rem; }
.recent-block { margin-top: 18px; }
.form-label { display: block; color: #717985; font-size: .6rem; font-weight: 900; text-transform: uppercase; letter-spacing: .13em; margin: 0 0 8px 2px; }
.recent-sources { display: flex; flex-direction: column; gap: 6px; }
.recent-source { width: 100%; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); color: #fff; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; cursor: pointer; text-align: left; }
.recent-source:hover { background: rgba(255,255,255,.055); }
.recent-source strong { font-size: .72rem; }
.recent-source small { width: 100%; color: #6f7680; font-size: .6rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.muted-note { color: #6f7680; font-size: .68rem; }
.setting-row, .setting-info { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.07); }
.setting-row > span, .setting-info > span { display: flex; flex-direction: column; gap: 4px; }
.setting-row strong, .setting-info strong { font-size: .79rem; }
.setting-row small, .setting-info small { color: #7a828d; font-size: .67rem; line-height: 1.4; }
.setting-row input[type="checkbox"] { width: 41px; height: 22px; accent-color: var(--accent); }
.setting-info { align-items: flex-start; }
.shortcut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shortcut-grid span { min-height: 48px; display: flex; align-items: center; gap: 10px; border-radius: 12px; border: 1px solid var(--line); padding: 8px 10px; background: rgba(255,255,255,.025); }
kbd { min-width: 45px; min-height: 28px; display: grid; place-items: center; padding: 0 7px; border-radius: 7px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); color: #d9dde2; font-size: .6rem; font-family: inherit; }
.shortcut-grid b { font-size: .68rem; font-weight: 700; color: #aeb4bd; }
.toast { position: fixed; z-index: 110; left: 50%; bottom: max(126px, calc(108px + var(--safe-bottom))); transform: translateX(-50%); max-width: min(520px, calc(100% - 32px)); border-radius: 999px; padding: 11px 15px; background: rgba(22,25,31,.95); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 14px 40px rgba(0,0,0,.32); color: #edf0f3; font-size: .72rem; font-weight: 750; text-align: center; }

@media (max-width: 1100px) {
  .control-dock { grid-template-columns: minmax(180px,1fr) auto auto; gap: 12px; }
  .quality-wrap { display: none; }
  .volume-wrap { min-width: 104px; }
  .volume-wrap input { width: 64px; }
}

@media (max-width: 760px) {
  :root { --drawer: 100vw; }
  .top-overlay { padding: calc(12px + var(--safe-top)) calc(12px + var(--safe-right)) 12px calc(12px + var(--safe-left)); }
  .brand-text small, .network-state, .tv-clock, .desktop-only { display: none !important; }
  .brand-symbol { width: 31px; height: 31px; border-radius: 9px; }
  .channels-button { min-height: 40px; padding-inline: 12px; }
  .channels-button span { display: none; }
  .status-strip { top: calc(64px + var(--safe-top)); left: calc(12px + var(--safe-left)); }
  .stream-stats, .status-pill.subtle { display: none; }
  .control-dock { left: calc(8px + var(--safe-left)); right: calc(8px + var(--safe-right)); bottom: calc(8px + var(--safe-bottom)); min-height: 78px; padding: 9px 10px; border-radius: 20px; grid-template-columns: minmax(0,1fr) auto; grid-template-areas: "now primary"; gap: 10px; }
  .now-playing { grid-area: now; gap: 9px; min-width: 0; }
  .now-logo { width: 46px; height: 46px; border-radius: 12px; padding: 7px; }
  .now-copy strong { font-size: .8rem; }
  .now-copy small { font-size: .61rem; }
  .favorite-current { display: none; }
  .primary-controls { grid-area: primary; }
  .secondary-controls { position: absolute; right: 10px; bottom: calc(100% + 8px); padding: 6px; border-radius: 15px; background: rgba(10,12,15,.72); border: 1px solid var(--line); backdrop-filter: blur(14px); }
  .volume-wrap, .quality-wrap { display: none; }
  .control-button { width: 38px; height: 38px; border-radius: 12px; }
  .play-button { width: 46px; height: 46px; }
  .center-play { width: 68px; height: 68px; }
  .empty-state { top: 44%; }
  .empty-state h1 { font-size: clamp(2rem, 11vw, 3.4rem); }
  .empty-state > p:not(.eyebrow) { font-size: .78rem; max-width: 340px; }
  .channel-drawer { top: 0; right: 0; bottom: 0; width: 100%; border-radius: 0; padding: calc(14px + var(--safe-top)) calc(14px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(14px + var(--safe-left)); }
  .drawer-scrim { display: none; }
  .channel-row { min-height: 64px; }
  .modal-backdrop { padding: 8px; align-items: end; }
  .modal-card { width: 100%; max-height: 88dvh; border-radius: 24px 24px 16px 16px; padding: 18px; }
  .url-row { grid-template-columns: 1fr; }
  .shortcut-grid { grid-template-columns: 1fr; }
  .toast { bottom: max(103px, calc(93px + var(--safe-bottom))); }
}

@media (max-width: 380px) {
  .brand-text { display: none; }
  .top-overlay { padding-inline: calc(9px + var(--safe-left)) calc(9px + var(--safe-right)); }
  .top-actions { margin-left: auto; }
  .top-actions .icon-button { width: 36px; height: 36px; border-radius: 11px; }
  .channels-button { width: 38px; padding: 0; }
  .status-strip { display: none; }
  .control-dock { min-height: 70px; grid-template-columns: minmax(0,1fr) auto; padding: 7px; }
  .now-logo { width: 40px; height: 40px; }
  .now-copy small { display: none; }
  .now-copy strong { font-size: .72rem; }
  .control-button { width: 34px; height: 34px; }
  .play-button { width: 42px; height: 42px; }
  .secondary-controls { right: 7px; }
  .secondary-controls .control-button:first-child { display: grid; }
  .empty-state { width: calc(100% - 28px); top: 42%; }
  .hero-mark { width: 47px; height: 47px; border-radius: 15px; }
  .empty-state h1 { font-size: 1.8rem; }
  .empty-state > p:not(.eyebrow) { font-size: .69rem; }
  .empty-state .button { min-height: 40px; font-size: .72rem; }
  .drawer-head h2 { font-size: 1.25rem; }
  .view-tab { font-size: .62rem; }
  .view-tab b { display: none; }
  .channel-row { min-height: 58px; grid-template-columns: 42px minmax(0,1fr) 20px; gap: 8px; }
  .channel-logo-wrap { width: 42px; height: 42px; }
  .channel-logo { max-width: 33px; max-height: 33px; }
}

body[data-tv="true"] { font-size: 18px; }
body[data-tv="true"] .top-overlay { padding: calc(32px + var(--safe-top)) calc(38px + var(--safe-right)) 28px calc(38px + var(--safe-left)); }
body[data-tv="true"] .brand-symbol { width: 46px; height: 46px; border-radius: 14px; }
body[data-tv="true"] .brand-text strong { font-size: 1.3rem; }
body[data-tv="true"] .brand-text small { font-size: .68rem; }
body[data-tv="true"] .icon-button { width: 54px; height: 54px; border-radius: 16px; }
body[data-tv="true"] .channels-button { min-height: 54px; border-radius: 16px; font-size: .95rem; padding-inline: 18px; }
body[data-tv="true"] .status-strip { top: calc(112px + var(--safe-top)); left: calc(38px + var(--safe-left)); }
body[data-tv="true"] .status-pill { min-height: 34px; font-size: .7rem; }
body[data-tv="true"] .control-dock { left: 34px; right: 34px; bottom: 30px; min-height: 108px; padding: 17px; border-radius: 28px; }
body[data-tv="true"] .now-logo { width: 68px; height: 68px; border-radius: 17px; }
body[data-tv="true"] .now-copy strong { font-size: 1.12rem; }
body[data-tv="true"] .now-copy small { font-size: .79rem; }
body[data-tv="true"] .control-button { width: 54px; height: 54px; border-radius: 16px; }
body[data-tv="true"] .play-button { width: 68px; height: 68px; border-radius: 21px; }
body[data-tv="true"] .channel-drawer { width: min(560px, 42vw); top: 20px; right: 20px; bottom: 20px; padding: 23px; border-radius: 30px; }
body[data-tv="true"] .channel-row { min-height: 82px; grid-template-columns: 58px minmax(0,1fr) 28px; border-radius: 18px; }
body[data-tv="true"] .channel-logo-wrap { width: 58px; height: 58px; border-radius: 15px; }
body[data-tv="true"] .channel-logo { max-width: 46px; max-height: 46px; }
body[data-tv="true"] .channel-copy strong { font-size: .95rem; }
body[data-tv="true"] .channel-copy small { font-size: .73rem; }
body[data-tv="true"] button:focus-visible, body[data-tv="true"] a:focus-visible, body[data-tv="true"] input:focus-visible, body[data-tv="true"] select:focus-visible { outline: 5px solid #fff; outline-offset: 4px; }

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