:root {
  --bg: #070a0f;
  --panel: #0e131b;
  --panel-2: #141b25;
  --text: #f5f7fb;
  --muted: #98a3b3;
  --line: rgba(255,255,255,.1);
  --blue: #45a7ff;
  --blue-2: #1478ff;
  --green: #58e2a3;
  --focus: #ffffff;
  --radius: 22px;
  --header: 92px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--bg); scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background:
  radial-gradient(circle at 75% 2%, rgba(27,111,218,.17), transparent 28rem),
  linear-gradient(180deg, #080b11 0%, #070a0f 55%, #080b11 100%); }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
svg { display: block; fill: currentColor; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }

.skip-link { position: fixed; left: 12px; top: -80px; z-index: 1000; padding: 12px 18px; background: white; color: black; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.topbar { position: sticky; top: 0; z-index: 50; height: var(--header); padding: 0 clamp(24px, 5vw, 80px); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 28px; background: rgba(7,10,15,.84); border-bottom: 1px solid rgba(255,255,255,.06); backdrop-filter: blur(20px); }
.brand { width: max-content; display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; border-radius: 11px; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg, var(--blue), var(--blue-2)); box-shadow: 0 10px 30px rgba(20,120,255,.28); transform: rotate(-4deg); }
.brand-mark span { width: 0; height: 0; border-top: 8px solid transparent; border-bottom: 8px solid transparent; border-left: 13px solid white; margin-left: 3px; }
.brand-copy { display: flex; flex-direction: column; line-height: 1; }
.brand-copy strong { font-size: 21px; letter-spacing: .08em; }
.brand-copy small { margin-top: 5px; color: #78bbff; font-size: 8px; letter-spacing: .3em; font-weight: 800; }
.primary-nav { display: flex; align-items: center; gap: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.025); }
.nav-button { appearance: none; border: 0; border-radius: 9px; padding: 10px 18px; color: var(--muted); background: transparent; cursor: pointer; font-size: 14px; font-weight: 700; }
.nav-button.is-active { color: white; background: rgba(255,255,255,.09); }
.safety-pill { justify-self: end; display: flex; align-items: center; gap: 9px; color: #b7c2cf; font-size: 13px; font-weight: 700; }
.safety-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(88,226,163,.1), 0 0 18px rgba(88,226,163,.5); }

main { min-height: calc(100vh - var(--header)); }
.view { animation: view-in .3s ease both; }
@keyframes view-in { from { opacity: 0; transform: translateY(8px); } }
.hero { position: relative; min-height: min(690px, calc(100vh - var(--header))); padding: clamp(64px, 8vw, 118px) clamp(24px, 7vw, 112px); display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr); align-items: center; gap: clamp(54px, 8vw, 150px); overflow: hidden; border-bottom: 1px solid rgba(255,255,255,.07); }
.hero-glow { position: absolute; width: 580px; height: 580px; right: -60px; top: 30px; border-radius: 50%; background: radial-gradient(circle, rgba(22,117,255,.17), rgba(22,117,255,0) 69%); pointer-events: none; }
.hero-copy { position: relative; z-index: 2; max-width: 760px; }
.eyebrow { margin: 0 0 17px; color: #66b5ff; text-transform: uppercase; letter-spacing: .18em; font-size: 12px; font-weight: 900; }
.hero h1, .page-heading h1 { margin: 0; font-size: clamp(48px, 6vw, 92px); line-height: .98; letter-spacing: -.055em; }
.hero h1 span { color: #8b95a4; }
.hero-text { max-width: 630px; margin: 27px 0 0; color: #aeb7c5; font-size: clamp(17px, 1.55vw, 22px); line-height: 1.55; }
.stream-form { margin-top: 42px; max-width: 730px; }
.stream-label-row { margin-bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.stream-label-row label { color: #d4dbe5; font-weight: 800; font-size: 14px; }
.stream-label-row span { color: #6f7d8f; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stream-controls { display: grid; grid-template-columns: minmax(210px,.7fr) minmax(250px,1fr) auto; gap: 9px; padding: 7px; border: 1px solid rgba(255,255,255,.13); border-radius: 17px; background: rgba(255,255,255,.055); box-shadow: 0 18px 45px rgba(0,0,0,.25); }
.select-wrap { position: relative; min-width: 0; }
.select-wrap::after { content: ""; position: absolute; right: 15px; top: 50%; width: 8px; height: 8px; border-right: 2px solid #8e9aac; border-bottom: 2px solid #8e9aac; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.stream-controls select, .stream-controls input { width: 100%; min-width: 0; min-height: 50px; border: 1px solid rgba(255,255,255,.08); outline: 0; color: white; background: rgba(4,7,11,.48); font-size: 15px; }
.stream-controls select { appearance: none; padding: 0 40px 0 15px; border-radius: 11px; cursor: pointer; }
.stream-controls select option { color: white; background: #111822; }
.stream-controls input { padding: 0 16px; border-radius: 11px; }
.stream-controls input[readonly] { color: #9ccfff; }
.stream-controls input::placeholder { color: #778292; }
.field-help { margin: 11px 3px 0; color: #738092; font-size: 12px; }
.privacy-help { margin: 7px 3px 0; color: #5f6d7e; font-size: 11px; line-height: 1.45; }
.add-recent-button { margin: 7px 3px 0; font-size: 12px; }
.form-error { margin: 12px 3px 0; color: #ff9c9c; font-size: 13px; font-weight: 700; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 0 20px; border: 1px solid transparent; border-radius: 11px; cursor: pointer; font-weight: 850; text-decoration: none; }
.button svg { width: 19px; height: 19px; }
.button-primary { color: white; background: linear-gradient(145deg, #329cff, #176dff); box-shadow: 0 9px 24px rgba(20,112,255,.24); }
.button-secondary { color: white; background: rgba(255,255,255,.07); border-color: var(--line); }

.hero-visual { position: relative; z-index: 1; perspective: 1000px; }
.screen-card { position: relative; width: min(100%, 620px); aspect-ratio: 1.45; border: 1px solid rgba(255,255,255,.15); border-radius: 24px; background: linear-gradient(145deg, rgba(23,31,44,.92), rgba(8,12,19,.94)); box-shadow: -30px 45px 90px rgba(0,0,0,.45), 0 0 90px rgba(34,126,255,.11); transform: rotateY(-8deg) rotateX(3deg); overflow: visible; }
.screen-card::after { content: ""; position: absolute; inset: 9px; border: 1px solid rgba(255,255,255,.05); border-radius: 17px; pointer-events: none; }
.screen-top { height: 54px; display: flex; align-items: center; gap: 7px; padding: 0 20px; border-bottom: 1px solid rgba(255,255,255,.07); }
.screen-top i { width: 7px; height: 7px; border-radius: 50%; background: #394453; }
.screen-top span { margin-left: auto; color: var(--green); font-size: 9px; letter-spacing: .15em; font-weight: 900; }
.screen-content { height: calc(100% - 54px); display: grid; place-items: center; background: radial-gradient(circle, rgba(28,109,221,.26), transparent 44%), linear-gradient(145deg, rgba(42,68,97,.25), transparent 60%); }
.play-orb { width: 76px; height: 76px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: white; background: rgba(255,255,255,.09); box-shadow: 0 0 0 14px rgba(255,255,255,.025); }
.play-orb svg { width: 34px; height: 34px; }
.blocked-chip { position: absolute; right: -20px; bottom: 34px; display: flex; align-items: center; gap: 9px; padding: 13px 17px; border: 1px solid rgba(255,255,255,.13); border-radius: 13px; color: #d8dee7; background: rgba(14,19,27,.94); box-shadow: 0 15px 35px rgba(0,0,0,.4); font-size: 12px; font-weight: 800; }
.blocked-chip span { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; color: #ff8f8f; background: rgba(255,90,90,.15); }

.content-section { padding: 75px clamp(24px, 7vw, 112px) 60px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 28px; margin-bottom: 27px; }
.section-heading .eyebrow { margin-bottom: 8px; }
.section-heading h2, .notice-card h2 { margin: 0; font-size: clamp(25px, 2.5vw, 38px); letter-spacing: -.035em; }
.section-heading > p { margin: 0 0 3px; color: var(--muted); font-size: 13px; }
.source-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 18px; }
.source-card { position: relative; min-height: 220px; padding: 28px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; border: 1px solid var(--line); border-radius: var(--radius); color: white; background: linear-gradient(145deg, rgba(21,28,39,.96), rgba(12,17,24,.96)); overflow: hidden; cursor: pointer; }
.source-card::before { content: ""; position: absolute; width: 220px; height: 220px; right: -80px; top: -100px; border-radius: 50%; background: var(--card-glow, rgba(62,154,255,.18)); filter: blur(2px); }
.source-card[data-accent="violet"] { --card-glow: rgba(145,88,255,.24); }
.source-card[data-accent="amber"] { --card-glow: rgba(255,174,52,.2); }
.source-badge { position: relative; color: #8bc8ff; font-size: 9px; letter-spacing: .16em; font-weight: 900; }
.source-icon { position: relative; width: 46px; height: 46px; margin-top: 25px; display: grid; place-items: center; border-radius: 14px; color: #cfe7ff; background: rgba(76,164,255,.13); }
.source-card[data-accent="violet"] .source-icon { color: #dccbff; background: rgba(145,88,255,.14); }
.source-card[data-accent="amber"] .source-icon { color: #ffddb2; background: rgba(255,174,52,.13); }
.source-icon svg { width: 25px; height: 25px; }
.source-card h3 { position: relative; margin: 21px 0 7px; font-size: 20px; }
.source-card p { position: relative; margin: 0; color: #8995a6; font-size: 13px; line-height: 1.5; }
.source-skeleton { min-height: 220px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(110deg, #0d131c 20%, #131c28 35%, #0d131c 50%); background-size: 240% 100%; animation: shimmer 1.5s linear infinite; }
@keyframes shimmer { to { background-position-x: -240%; } }

.notice-card { margin: 0 clamp(24px, 7vw, 112px) 90px; padding: 30px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 25px; border: 1px solid rgba(255,194,94,.18); border-radius: var(--radius); background: linear-gradient(105deg, rgba(255,172,45,.07), rgba(255,255,255,.025)); }
.notice-icon { width: 54px; height: 54px; display: grid; place-items: center; border-radius: 16px; color: #ffc775; background: rgba(255,174,52,.1); }
.notice-icon svg { width: 30px; height: 30px; }
.notice-card .eyebrow { margin-bottom: 7px; color: #ffc775; }
.notice-card h2 { font-size: 22px; }
.notice-card p:last-child { max-width: 850px; margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }

.content-view { padding: clamp(55px, 7vw, 100px) clamp(24px, 8vw, 128px) 110px; }
.page-heading { max-width: 900px; margin-bottom: 54px; }
.page-heading h1 { font-size: clamp(45px, 5.5vw, 76px); }
.page-heading > p:last-child { max-width: 700px; margin: 22px 0 0; color: var(--muted); font-size: 18px; line-height: 1.6; }
.help-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; }
.help-card { padding: 31px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.help-card > span { color: #5caeff; font-size: 12px; font-weight: 900; letter-spacing: .15em; }
.help-card h2 { margin: 27px 0 11px; font-size: 21px; }
.help-card p { margin: 0; color: var(--muted); line-height: 1.62; font-size: 14px; }
.compatibility-card { margin-top: 22px; padding: 0 28px; display: grid; grid-template-columns: repeat(4,1fr); border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.025); }
.compatibility-card div { padding: 26px 18px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--line); }
.compatibility-card div:last-child { border: 0; }
.compatibility-card strong { font-size: 14px; }
.compatibility-card small { color: var(--muted); font-size: 12px; }

.library-view { padding-top: clamp(48px, 6vw, 82px); }
.library-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; }
.library-heading .page-heading { margin-bottom: 34px; }
.library-provider { flex: 0 0 auto; margin-top: 10px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 999px; color: #c5cfdb; background: rgba(255,255,255,.035); font-size: 12px; font-weight: 800; }
.library-search { max-width: 940px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 9px; padding: 7px; border: 1px solid rgba(255,255,255,.13); border-radius: 17px; background: rgba(255,255,255,.055); box-shadow: 0 18px 45px rgba(0,0,0,.2); }
.library-search-field { position: relative; min-width: 0; }
.library-search input { width: 100%; min-width: 0; min-height: 52px; padding: 0 18px; border: 1px solid rgba(255,255,255,.08); border-radius: 11px; outline: 0; color: white; background: rgba(4,7,11,.48); }
.library-search input::placeholder { color: #778292; }
.library-suggestions { position: absolute; z-index: 20; top: calc(100% + 10px); left: 0; right: 0; max-height: min(420px, 56vh); padding: 7px; overflow-y: auto; border: 1px solid rgba(112,183,255,.32); border-radius: 15px; background: rgba(10,15,23,.98); box-shadow: 0 22px 55px rgba(0,0,0,.48); }
.library-suggestion { width: 100%; padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 0; border-radius: 10px; color: white; background: transparent; cursor: pointer; text-align: left; }
.library-suggestion:hover, .library-suggestion[aria-selected="true"] { background: rgba(69,167,255,.16); }
.library-suggestion strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.library-suggestion span { flex: 0 0 auto; color: #8290a1; font-size: 10px; }
.library-sources { margin-top: 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: #6f7c8d; font-size: 10px; font-weight: 850; letter-spacing: .11em; text-transform: uppercase; }
.source-chip { min-height: 34px; padding: 0 13px; border: 1px solid var(--line); border-radius: 999px; color: #94a2b2; background: rgba(255,255,255,.025); cursor: pointer; font-size: 10px; font-weight: 800; letter-spacing: 0; text-transform: none; }
.source-chip.is-active { border-color: rgba(111,200,163,.48); color: white; background: rgba(111,200,163,.12); }
.library-categories { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 9px; }
.category-chip { min-height: 42px; padding: 0 17px; border: 1px solid var(--line); border-radius: 999px; color: #9eabba; background: rgba(255,255,255,.025); cursor: pointer; font-size: 12px; font-weight: 800; }
.category-chip.is-active { border-color: rgba(69,167,255,.55); color: white; background: rgba(69,167,255,.16); }
.category-chip:disabled, .source-chip:disabled, .library-search input:disabled, .library-more-wrap .button:disabled { opacity: .58; cursor: wait; }
.library-toolbar { margin: 31px 0 18px; display: flex; justify-content: space-between; gap: 24px; color: #7f8b9b; font-size: 11px; }
.library-toolbar span:first-child { color: #b9c6d5; font-weight: 750; }
.library-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.library-card { min-width: 0; padding: 0; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-align: left; color: white; background: linear-gradient(145deg, rgba(21,28,39,.98), rgba(11,16,23,.98)); cursor: pointer; transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
.library-card:hover { transform: translateY(-3px); border-color: rgba(69,167,255,.35); box-shadow: 0 18px 40px rgba(0,0,0,.24); }
.library-artwork { position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 35%, rgba(69,167,255,.28), transparent 43%), #101722; }
.library-artwork img { width: 100%; height: 100%; object-fit: cover; }
.library-artwork::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(3,6,10,.75)); pointer-events: none; }
.library-artwork.is-missing::before { content: "KBTV"; color: rgba(255,255,255,.2); font-size: 24px; font-weight: 900; letter-spacing: .12em; }
.library-play { position: absolute; z-index: 2; right: 15px; bottom: 14px; width: 43px; height: 43px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: white; background: linear-gradient(145deg, #329cff, #176dff); box-shadow: 0 9px 24px rgba(20,112,255,.34); }
.library-play svg { width: 22px; height: 22px; }
.library-card-body { min-width: 0; padding: 18px 19px 21px; display: flex; flex-direction: column; flex: 1; }
.library-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #8290a1; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; }
.library-card-meta b { color: #6fc8a3; font-size: 9px; }
.library-card-body > strong { margin-top: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 17px; }
.library-card-body > small { margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #8c98a8; font-size: 11px; }
.library-rating { align-self: flex-start; margin-top: 10px; padding: 5px 8px; border: 1px solid rgba(255,197,86,.24); border-radius: 999px; color: #ffd778; background: rgba(255,183,40,.08); font-size: 10px; font-weight: 850; letter-spacing: .01em; }
.library-description { margin-top: 13px; display: -webkit-box; overflow: hidden; color: #778496; font-size: 11px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 3; }
.movie-skeleton { min-height: 330px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(110deg, #0d131c 20%, #15202d 35%, #0d131c 50%); background-size: 240% 100%; animation: shimmer 1.5s linear infinite; }
.library-empty { grid-column: 1 / -1; }
.library-more-wrap { padding-top: 28px; display: flex; justify-content: center; }

.recent-list { display: grid; gap: 12px; max-width: 1000px; }
.recent-toolbar { max-width: 1000px; margin: -30px 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 12px; }
.recent-toolbar .text-button { margin: 0; }
.recent-item { width: 100%; padding: 20px 22px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; border: 1px solid var(--line); border-radius: 16px; text-align: left; color: white; background: var(--panel); cursor: pointer; }
.recent-item-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; color: #92c9ff; background: rgba(69,167,255,.11); }
.recent-item-icon svg { width: 22px; height: 22px; }
.recent-item strong, .recent-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-item small { margin-top: 5px; color: var(--muted); }
.recent-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.recent-meta b { color: #8fc8ff; font-size: 11px; font-weight: 800; }
.recent-item time { color: #7e8a9a; font-size: 12px; }
.empty-state { padding: 45px; border: 1px dashed rgba(255,255,255,.15); border-radius: var(--radius); color: var(--muted); text-align: center; }
.text-button { margin-top: 20px; padding: 10px 0; border: 0; color: #9acbff; background: transparent; cursor: pointer; font-weight: 800; }

.player-shell { position: fixed; inset: 0; z-index: 200; display: grid; grid-template-rows: 74px 1fr; background: #020304; }
.player-bar { padding: 0 22px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; border-bottom: 1px solid rgba(255,255,255,.09); background: #090d13; }
.player-bar > .icon-button { justify-self: start; }
.player-title { text-align: center; }
.player-title strong, .player-title small { display: block; }
.player-title strong { font-size: 14px; }
.player-title small { margin-top: 4px; color: var(--green); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.player-actions { justify-self: end; display: flex; gap: 8px; }
.icon-button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: white; background: rgba(255,255,255,.055); cursor: pointer; }
.icon-button svg { width: 23px; height: 23px; }
.player-stage { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; }
.player-stage video, .player-stage iframe { width: 100%; height: 100%; border: 0; background: black; }
.player-stage video { object-fit: contain; }
.player-loading { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 16px; color: var(--muted); background: #030405; }
.player-loading span { width: 38px; height: 38px; border: 3px solid rgba(255,255,255,.14); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
.player-loading p { margin: 0; font-size: 13px; }
@keyframes spin { to { transform: rotate(360deg); } }

.modal { width: min(650px, calc(100vw - 40px)); padding: 0; border: 1px solid rgba(255,255,255,.14); border-radius: 24px; color: white; background: #101620; box-shadow: 0 35px 100px rgba(0,0,0,.7); }
.modal::backdrop { background: rgba(0,0,0,.78); backdrop-filter: blur(6px); }
.modal-inner { position: relative; padding: 43px; }
.modal-close { position: absolute; right: 18px; top: 18px; font-size: 24px; }
.modal-icon { width: 48px; height: 48px; margin-bottom: 25px; display: grid; place-items: center; border-radius: 14px; color: #ffc775; background: rgba(255,174,52,.12); font-size: 22px; font-weight: 900; }
.modal h2 { margin: 0; font-size: 31px; letter-spacing: -.035em; }
.modal p:not(.eyebrow) { margin: 18px 0 0; color: #a7b1bf; line-height: 1.65; }
.modal-actions { margin-top: 30px; display: flex; gap: 10px; }
.toast { position: fixed; z-index: 500; left: 50%; bottom: 30px; max-width: calc(100vw - 40px); padding: 13px 18px; border: 1px solid var(--line); border-radius: 12px; color: white; background: #16202c; box-shadow: 0 18px 50px rgba(0,0,0,.45); opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.focusable:focus-visible, .source-card:focus-visible, .recent-item:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; box-shadow: 0 0 0 8px rgba(69,167,255,.22); }
.source-card:focus-visible { transform: scale(1.025); }
[hidden] { display: none !important; }

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

@media (max-width: 980px) {
  :root { --header: 78px; }
  .topbar { grid-template-columns: auto 1fr auto; padding-inline: 22px; }
  .primary-nav { justify-self: center; }
  .hero { min-height: auto; grid-template-columns: 1fr; padding-top: 70px; }
  .hero-visual { display: none; }
  .stream-controls { grid-template-columns: 1fr auto; }
  .select-wrap { grid-column: 1 / -1; }
  .source-grid, .help-grid { grid-template-columns: 1fr; }
  .source-card { min-height: 180px; }
  .notice-card { grid-template-columns: auto 1fr; }
  .notice-card .button { grid-column: 2; justify-self: start; }
  .compatibility-card { grid-template-columns: 1fr 1fr; }
  .compatibility-card div:nth-child(2) { border-right: 0; }
  .compatibility-card div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .library-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 670px) {
  .topbar { grid-template-columns: auto 1fr auto; gap: 9px; padding-inline: 20px; }
  .brand-copy { display: none; }
  .primary-nav { position: static; justify-self: center; gap: 2px; padding: 5px; }
  .nav-button { padding-inline: 12px; }
  .safety-pill { font-size: 0; }
  .hero { padding: 55px 20px 65px; }
  .hero h1 { font-size: clamp(43px, 13vw, 65px); }
  .stream-controls { grid-template-columns: 1fr; }
  .select-wrap { grid-column: auto; }
  .stream-controls input { min-height: 52px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 10px; }
  .content-section, .content-view { padding-inline: 20px; }
  .notice-card { margin-inline: 20px; grid-template-columns: 1fr; }
  .notice-card .button { grid-column: 1; }
  .compatibility-card { grid-template-columns: 1fr; }
  .compatibility-card div { border-right: 0; border-bottom: 1px solid var(--line); }
  .library-heading, .library-toolbar { display: block; }
  .library-provider { width: max-content; margin: -15px 0 28px; }
  .library-search { grid-template-columns: 1fr; }
  .library-categories { flex-wrap: nowrap; margin-inline: -20px; padding: 2px 20px 8px; overflow-x: auto; scrollbar-width: none; }
  .library-categories::-webkit-scrollbar { display: none; }
  .category-chip { flex: 0 0 auto; }
  .library-toolbar span { display: block; }
  .library-toolbar span:last-child { margin-top: 7px; }
  .library-grid { grid-template-columns: 1fr; }
  .movie-skeleton { min-height: 360px; }
  .recent-item { grid-template-columns: auto minmax(0,1fr); }
  .recent-meta { grid-column: 2; align-items: flex-start; flex-direction: row; }
  .player-title { display: none; }
  .player-bar { grid-template-columns: 1fr 1fr; }
  .modal-inner { padding: 35px 25px 27px; }
  .modal-actions { flex-direction: column; }
  body { padding-bottom: 0; }
}

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