/* ============================================================
   Live TV Tracker — app styles
   ============================================================ */
:root{
  --bg:#0a0a0b; --card:#111113; --card2:#141416;
  --line:#1a1a1e; --line2:#26262b;
  --text:#f2f2f4; --muted:#8a8a90; --muted2:#6a6a70;
  --red:#e5352b; --red-soft:#ff6b62; --green:#5fae7a; --gold:#d4a24a;
  --imdb:#f5c518;
  --maxw:440px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0;background:#050506}
body{
  font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;
  color:var(--text);-webkit-font-smoothing:antialiased;
}
input,button{font-family:inherit}
::-webkit-scrollbar{width:0;height:0}
.hs{scrollbar-width:none;-ms-overflow-style:none}
a{color:inherit;text-decoration:none}

/* Kill accidental text selection on taps across interactive UI */
.no-sel,.ep,.season-head,.lib-row,.cat-row,.news-card,.tab,.chip-filter,
.mark-btn,.season-mark,.seg button,.status-pick,.fab,.btn{
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}

#app{
  max-width:var(--maxw);margin:0 auto;min-height:100vh;
  background:var(--bg);position:relative;overflow-x:hidden;
}

@keyframes scr{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
@keyframes toastIn{from{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%,0)}}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes sheetIn{from{transform:translateY(100%)}to{transform:none}}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.screen{animation:scr .3s ease}

.wordmark{font-weight:800;letter-spacing:-.5px}
.wordmark .accent{color:var(--red)}

/* ---------- buttons ---------- */
.btn{border:none;border-radius:12px;font-weight:700;cursor:pointer;transition:filter .15s}
.btn:active{filter:brightness(.9)}
.btn-red{background:var(--red);color:#fff}
.btn-white{background:#fff;color:#111}
.btn-ghost{background:transparent;border:1px solid var(--line2);color:var(--text)}
.btn-block{width:100%;height:52px;font-size:15.5px}

.field{
  width:100%;height:50px;border-radius:12px;border:1px solid #1f1f23;
  background:var(--card2);color:var(--text);padding:0 16px;font-size:15px;outline:none;
}
.field:focus{border-color:#3a3a40}

/* ---------- auth ---------- */
.auth{min-height:100vh;display:flex;flex-direction:column;padding:0 26px 40px}
.auth-top{flex:1;display:flex;flex-direction:column;justify-content:flex-end;padding-bottom:30px}
.auth-logo{width:44px;height:44px;border-radius:12px;background:var(--red);display:flex;align-items:center;justify-content:center;margin-bottom:22px}
.auth-logo i{width:14px;height:14px;border:3px solid #fff;border-radius:3px;display:block}
.auth-title{font-size:32px;font-weight:800;letter-spacing:-1px;line-height:1}
.auth-title .accent{color:var(--red)}
.auth-sub{color:var(--muted);font-size:16px;margin-top:12px;line-height:1.45;max-width:300px}
.divider{display:flex;align-items:center;gap:14px;margin:20px 0;color:#55555c;font-size:12px}
.divider::before,.divider::after{content:"";flex:1;height:1px;background:#1d1d20}
.google-btn{width:100%;height:52px;border-radius:12px;border:none;background:#fff;color:#111;font-size:15.5px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:11px;cursor:pointer}
.err{color:var(--red-soft);font-size:13px;margin-top:12px;min-height:16px}
.auth-alt{text-align:center;margin-top:18px;color:var(--muted);font-size:14px}
.auth-alt b{color:var(--red);font-weight:600;cursor:pointer}
.remember{display:flex;align-items:center;gap:10px;margin-top:14px;color:#b6b6bc;font-size:13.5px;cursor:pointer;-webkit-user-select:none;user-select:none}
.remember .box{width:20px;height:20px;border-radius:6px;border:2px solid #3a3a40;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:800;color:#fff}
.remember.on .box{background:var(--red);border-color:var(--red)}

/* verification screen */
.verify{min-height:100vh;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:40px 30px}
.verify .ic{width:66px;height:66px;border-radius:50%;background:#e5352b1c;color:var(--red);display:flex;align-items:center;justify-content:center;font-size:30px;margin-bottom:22px}
.verify h1{font-size:24px;font-weight:800}
.verify p{color:var(--muted);font-size:15px;margin-top:12px;line-height:1.5;max-width:320px}
.verify b{color:var(--text)}

/* ---------- top bar ---------- */
.topbar{display:flex;align-items:center;justify-content:space-between;padding:56px 20px 4px}
.avatar{width:34px;height:34px;border-radius:50%;background:#1a1a1d;border:1px solid var(--line2);color:var(--red);font-weight:700;font-size:14px;display:flex;align-items:center;justify-content:center;cursor:pointer;overflow:hidden}
.avatar img{width:100%;height:100%;object-fit:cover}
.page-head{padding:56px 20px 4px;display:flex;align-items:center;justify-content:space-between}
.page-head h1{font-size:26px;font-weight:800;letter-spacing:-.6px}

/* ---------- up next ---------- */
.section-head{padding:22px 20px 8px;display:flex;align-items:baseline;justify-content:space-between}
.section-label{font-size:13px;font-weight:700;letter-spacing:1.4px;color:var(--red)}
.section-count{font-size:12px;color:var(--muted2)}
.upnext-row{display:flex;gap:14px;overflow-x:auto;padding:6px 20px 4px;scroll-snap-type:x mandatory}
.upnext-card{flex:0 0 auto;width:172px;scroll-snap-align:start}
.poster{position:relative;width:100%;aspect-ratio:2/3;border-radius:13px;overflow:hidden;cursor:pointer;border:1px solid #ffffff12;background-size:cover;background-position:center}
.poster .grad{position:absolute;inset:0}
.poster .overlay{position:absolute;inset:0;padding:13px;display:flex;flex-direction:column;justify-content:space-between}
.poster .fallback-title{font-size:15px;font-weight:800;line-height:1.12;text-transform:uppercase;letter-spacing:.3px;text-shadow:0 1px 8px #0009}
.bar{height:4px;border-radius:3px;background:#ffffff26;overflow:hidden;margin-bottom:8px}
.bar i{display:block;height:100%;background:var(--red)}
.progress-text{font-size:10.5px;color:#eee;font-weight:600;letter-spacing:.4px}
.upnext-meta{margin-top:10px}
.upnext-tag{font-size:13px;font-weight:700}
.upnext-line2{font-size:12.5px;color:#a6a6ac;margin-top:2px;line-height:1.3;height:32px;overflow:hidden}
.mark-btn{width:100%;height:38px;margin-top:6px;border-radius:9px;border:1px solid #e5352b40;background:#e5352b18;color:var(--red-soft);font-size:12.5px;font-weight:700;cursor:pointer}
.uptodate{width:100%;height:38px;margin-top:6px;border-radius:9px;background:var(--card2);color:var(--green);font-size:12px;font-weight:600;display:flex;align-items:center;justify-content:center}

.empty{margin:6px 20px;padding:26px 18px;border-radius:14px;background:var(--card);border:1px solid #1c1c20;text-align:center;color:#7a7a80;font-size:13.5px}
.empty b{color:var(--red)}

/* ---------- filters ---------- */
.filters{display:flex;gap:8px;overflow-x:auto;padding:22px 20px 12px}
.chip-filter{flex:0 0 auto;height:34px;padding:0 15px;border-radius:20px;border:1px solid var(--line2);background:transparent;color:#b6b6bc;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}
.chip-filter.on{border-color:var(--red);background:var(--red);color:#fff}
.chip-filter span{opacity:.6;margin-left:2px}

/* ---------- library / catalogue list ---------- */
.lib{padding:0 20px 4px;display:flex;flex-direction:column;gap:10px}
.lib-row,.cat-row{display:flex;gap:13px;align-items:center;padding:13px;background:var(--card);border:1px solid var(--line);border-radius:14px;cursor:pointer}
.lib-poster{position:relative;width:46px;height:68px;border-radius:8px;overflow:hidden;flex:0 0 auto;border:1px solid #ffffff10;background-size:cover;background-position:center}
.lib-poster .flabel{position:absolute;inset:0;padding:5px;font-size:8px;font-weight:800;text-transform:uppercase;line-height:1.05;text-shadow:0 1px 4px #000a}
.lib-title{font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lib-meta{font-size:12px;color:#7f7f86;margin-top:3px}
.lib-status{font-size:12px;color:#9a9aa0;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chip{font-size:11px;font-weight:700;padding:4px 9px;border-radius:20px;white-space:nowrap}
.mini-progress{font-size:11px;color:var(--muted2)}
.cat-add{height:32px;padding:0 14px;border-radius:20px;border:none;background:var(--red);color:#fff;font-size:12.5px;font-weight:700;cursor:pointer;white-space:nowrap}
.cat-added{font-size:11px;font-weight:700;color:var(--green);background:#5fae7a1c;padding:5px 10px;border-radius:20px;white-space:nowrap}

/* ---------- news ---------- */
.news-list{padding:0 20px 4px;display:flex;flex-direction:column;gap:10px}
.news-card{display:flex;gap:13px;align-items:center;padding:13px;background:var(--card);border:1px solid var(--line);border-radius:14px;cursor:pointer}
.nc-poster{width:44px;height:64px;border-radius:8px;flex:0 0 auto;background-size:cover;background-position:center;background-color:#1a1a1d;border:1px solid #ffffff10}
.nc-head{font-size:13px;font-weight:800;letter-spacing:.2px}
.nc-title{font-size:15px;font-weight:700;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nc-sub{font-size:12px;color:#7f7f86;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.news-group{padding:20px 20px 6px;font-size:12px;font-weight:700;letter-spacing:1.2px;text-transform:uppercase;color:var(--muted2)}

/* ---------- detail ---------- */
.hero{position:relative;height:230px;overflow:hidden;background-size:cover;background-position:center}
.hero .grad{position:absolute;inset:0;background:linear-gradient(to bottom,#0a0a0b30 0%,#0a0a0bd0 72%,#0a0a0b 100%)}
.back-btn{position:absolute;top:44px;left:16px;width:38px;height:38px;border-radius:50%;border:none;background:#00000066;backdrop-filter:blur(6px);color:#fff;font-size:20px;cursor:pointer;z-index:2}
.hero-info{position:absolute;left:20px;right:20px;bottom:16px}
.hero-genre{font-size:9px;font-weight:800;letter-spacing:1.5px;text-transform:uppercase}
.hero-title{font-size:27px;font-weight:800;letter-spacing:-.5px;line-height:1.05;margin-top:6px;text-shadow:0 2px 12px #000a}
.hero-sub{font-size:13px;color:#c7c7cc;margin-top:8px}

.seg{display:flex;gap:6px;background:var(--card2);border:1px solid #1e1e22;border-radius:11px;padding:4px;margin:16px 20px 4px}
.seg button{flex:1;height:36px;border-radius:8px;border:none;cursor:pointer;font-size:11.5px;font-weight:700;background:transparent;color:var(--muted)}

.news{margin:14px 20px 4px;border-radius:14px;background:var(--card);border:1px solid #1c1c20;overflow:hidden}
.news-row{display:flex;align-items:center;justify-content:space-between;padding:13px 16px;border-bottom:1px solid #17171a}
.news-row:last-child{border-bottom:none}
.news-label{font-size:12.5px;color:#7f7f86}
.news-value{font-size:13px;font-weight:600;text-align:right}

.episodes-head{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:12px}

/* accordion seasons */
.season{margin-bottom:12px;border:1px solid #17171a;border-radius:14px;overflow:hidden;background:var(--card)}
.season-head{display:flex;align-items:center;gap:12px;padding:15px 16px;cursor:pointer}
.season-chev{width:10px;height:10px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(-45deg);transition:transform .2s;flex:0 0 auto;margin-top:-3px}
.season.open .season-chev{transform:rotate(45deg);margin-top:2px}
.season-title{flex:1;font-size:15px;font-weight:700}
.season-title span{color:var(--muted2);font-weight:500;font-size:12px;margin-left:4px}
.season-mark{height:34px;padding:0 15px;border-radius:9px;border:1px solid var(--line2);background:transparent;color:#b6b6bc;font-size:12.5px;font-weight:700;cursor:pointer;flex:0 0 auto}
.season-mark.on{border-color:#e5352b40;background:#e5352b18;color:var(--red-soft)}
.ep-list{display:none;flex-direction:column;border-top:1px solid #17171a}
.season.open .ep-list{display:flex}
.ep{display:flex;align-items:center;gap:13px;padding:14px 16px;cursor:pointer;border-bottom:1px solid #131316}
.ep:last-child{border-bottom:none}
.ep.unaired{opacity:.5;cursor:default}
.ep-check{width:27px;height:27px;flex:0 0 auto;border-radius:8px;border:2px solid #45454c;background:transparent;display:flex;align-items:center;justify-content:center;font-size:15px;font-weight:800;color:#fff;transition:transform .1s}
.ep:active .ep-check{transform:scale(.9)}
.ep-check.on{border-color:var(--red);background:var(--red)}
.ep-num{font-size:12px;color:var(--muted2);width:26px;flex:0 0 auto;font-weight:700}
.ep-title{flex:1;min-width:0;font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ep-date{font-size:11px;color:#5f5f66;flex:0 0 auto}

/* ---------- generic pages ---------- */
.page{padding:56px 20px 108px}
.page-title{font-size:24px;font-weight:800;letter-spacing:-.5px}
.page-sub{color:#7f7f86;font-size:13.5px;margin-top:8px;line-height:1.5}

/* ---------- add: floating action buttons ---------- */
.fab-layer{position:fixed;left:50%;transform:translateX(-50%);width:100%;max-width:var(--maxw);bottom:92px;display:flex;justify-content:space-between;padding:0 20px;pointer-events:none;z-index:25}
.fab{pointer-events:auto;height:52px;border:none;border-radius:26px;cursor:pointer;display:flex;align-items:center;gap:8px;font-weight:800;box-shadow:0 8px 24px #0007}
.fab-filter{background:var(--imdb);color:#111;padding:0 20px;font-size:14px}
.fab-imdb{background:var(--imdb);color:#111;width:52px;justify-content:center;position:relative;font-size:0}
.fab-imdb .imdb{font-size:15px;font-weight:900;letter-spacing:-.5px}
.fab-imdb .plus{position:absolute;top:-4px;right:-4px;width:22px;height:22px;border-radius:50%;background:var(--red);color:#fff;font-size:15px;font-weight:700;display:flex;align-items:center;justify-content:center;border:2px solid var(--bg)}

/* ---------- bottom sheets ---------- */
.sheet-ov{position:fixed;inset:0;background:#000000b0;z-index:50;animation:fadeIn .2s ease;display:flex;flex-direction:column;justify-content:flex-end}
.sheet{background:#141416;border-top-left-radius:20px;border-top-right-radius:20px;border-top:1px solid #26262b;max-width:var(--maxw);width:100%;margin:0 auto;padding:10px 20px calc(24px + env(safe-area-inset-bottom));animation:sheetIn .28s cubic-bezier(.2,.8,.2,1);max-height:88vh;overflow-y:auto}
.sheet-grip{width:38px;height:4px;border-radius:3px;background:#3a3a40;margin:4px auto 16px}
.sheet h3{font-size:18px;font-weight:800}
.sheet-opt{display:flex;align-items:center;justify-content:space-between;padding:15px 4px;border-bottom:1px solid #1e1e22;cursor:pointer;font-size:15px}
.sheet-opt:last-child{border-bottom:none}
.sheet-opt .dot{width:20px;height:20px;border-radius:50%;border:2px solid #3a3a40}
.sheet-opt.on{color:var(--imdb);font-weight:700}
.sheet-opt.on .dot{border-color:var(--imdb);background:var(--imdb)}

.status-picks{display:flex;gap:7px;flex-wrap:wrap}
.status-pick{height:36px;padding:0 14px;border-radius:20px;border:1px solid var(--line2);background:transparent;color:#b6b6bc;font-size:12.5px;font-weight:700;cursor:pointer}
.badge-found{display:inline-block;margin-top:9px;font-size:11px;font-weight:700;color:var(--green);background:#5fae7a1c;padding:4px 9px;border-radius:20px}

/* ---------- profile ---------- */
.prof-head{display:flex;align-items:center;gap:15px}
.prof-avatar{width:60px;height:60px;border-radius:50%;background:var(--red);color:#fff;font-weight:800;font-size:24px;display:flex;align-items:center;justify-content:center;overflow:hidden}
.prof-avatar img{width:100%;height:100%;object-fit:cover}
.stats{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin-top:26px}
.stat{background:var(--card);border:1px solid #1c1c20;border-radius:14px;padding:18px 16px}
.stat-value{font-size:30px;font-weight:800;letter-spacing:-1px}
.stat-label{font-size:12px;color:var(--muted);margin-top:5px}
.admin-link{display:flex;align-items:center;justify-content:space-between;background:var(--card);border:1px solid #1c1c20;border-radius:14px;padding:16px;margin-top:11px;color:var(--imdb);font-weight:700;font-size:14px}

/* ---------- tab bar ---------- */
.tabs{position:fixed;left:50%;transform:translateX(-50%);bottom:0;width:100%;max-width:var(--maxw);background:#0d0d0ff2;backdrop-filter:blur(12px);border-top:1px solid #1b1b1f;display:flex;padding:10px 0 22px;z-index:20}
.tab{flex:1;display:flex;flex-direction:column;align-items:center;gap:5px;cursor:pointer;color:var(--muted2)}
.tab.on{color:var(--red)}
.tab svg{width:22px;height:22px;display:block}
.tab-label{font-size:10.5px;font-weight:600}

/* ---------- toast / loader ---------- */
.toast{position:fixed;left:50%;bottom:96px;transform:translateX(-50%);background:#1c1c20;border:1px solid #2a2a30;color:#fff;font-size:13px;font-weight:600;padding:12px 20px;border-radius:30px;z-index:60;animation:toastIn .25s ease;white-space:nowrap;box-shadow:0 10px 30px #000a}
.loader{width:20px;height:20px;border:2px solid #ffffff40;border-top-color:#fff;border-radius:50%;animation:spin .7s linear infinite;display:inline-block}
.center-load{display:flex;align-items:center;justify-content:center;padding:60px 0;color:var(--muted)}
