
/* VOICE: a shipped video app, confident and glossy like the logo
   IDEA: the YouClip badge — red play button on black, white type
   PICTURE: the video grid / player itself is the picture
   COLOUR and TYPE: logo red #e8100f, black #0a0a0a, white; Poppins 800 brand, Roboto UI
   LAYOUT: top bar, collapsible rail, chips, grid; watch page player + up next */
:root{color-scheme:light dark;
--bg:light-dark(#ffffff,#0a0a0a);--bg2:light-dark(#f2f2f2,#1a1a1a);--bg3:light-dark(#e5e5e5,#272727);
--ink:light-dark(#0f0f0f,#f5f5f5);--mut:light-dark(#606060,#aaaaaa);--line:light-dark(#e3e3e3,#2a2a2a);
--red:#e8100f;--red2:#b30000;--hover:light-dark(#0000000d,#ffffff14)}
:root[data-theme=light]{color-scheme:light}:root[data-theme=dark]{color-scheme:dark}
*{box-sizing:border-box;min-width:0}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:14px/1.45 Roboto,system-ui,sans-serif;overflow-x:clip}
button,input,textarea,select{font:inherit;color:inherit}
button{cursor:pointer;background:none;border:0}
:focus-visible{outline:2px solid var(--red);outline-offset:2px}
svg.i{width:24px;height:24px;fill:currentColor;flex:none}
.ib{width:40px;height:40px;border-radius:50%;display:grid;place-items:center}
.ib:hover{background:var(--hover)}
/* top bar */
header{position:sticky;top:0;z-index:30;height:56px;display:flex;align-items:center;gap:8px;padding:0 16px;background:var(--bg)}
.brand{display:flex;align-items:center;gap:6px;text-decoration:none;color:var(--ink);font:900 21px/1 Poppins,sans-serif;letter-spacing:-.5px}
.brand img{width:34px;height:34px}
.brand b{color:var(--red)}
.search{flex:1;max-width:640px;margin:0 auto;display:flex;position:relative}
.search input{flex:1;height:40px;padding:0 16px;font-size:16px;border:1px solid var(--line);border-right:0;border-radius:20px 0 0 20px;background:var(--bg)}
.search input:focus{outline:none;border-color:var(--red)}
.search>button{width:64px;height:40px;border:1px solid var(--line);border-radius:0 20px 20px 0;background:var(--bg2);display:grid;place-items:center}
.sugg{position:absolute;top:44px;left:0;right:64px;background:var(--bg);border:1px solid var(--line);border-radius:12px;padding:8px 0;box-shadow:0 8px 24px #0005;display:none}
.sugg button{display:flex;gap:12px;align-items:center;width:100%;text-align:left;padding:8px 16px;font-weight:500}
.sugg button:hover{background:var(--hover)}
.right{display:flex;gap:4px;align-items:center}
.avatar{width:32px;height:32px;border-radius:50%;display:grid;place-items:center;font-weight:700;color:#fff;flex:none}
.badge{position:absolute;top:4px;right:4px;background:var(--red);color:#fff;font-size:11px;padding:0 5px;border-radius:9px}
.pop{position:absolute;right:16px;top:52px;width:min(380px,calc(100vw - 24px));max-height:70vh;overflow:auto;background:var(--bg);border:1px solid var(--line);border-radius:12px;box-shadow:0 10px 30px #0006;display:none;z-index:40}
.pop h4{margin:0;padding:14px 16px;border-bottom:1px solid var(--line);font-size:16px}
.note{display:flex;gap:12px;padding:12px 16px;cursor:pointer;align-items:flex-start}
.note:hover{background:var(--hover)}
.note img{width:86px;aspect-ratio:16/9;border-radius:6px;object-fit:cover}
.note.new::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--red);margin-top:14px;flex:none}
/* layout */
.wrap{display:flex}
nav.rail{position:sticky;top:56px;height:calc(100vh - 56px);overflow-y:auto;width:240px;padding:12px;flex:none}
nav.rail a{display:flex;align-items:center;gap:22px;padding:0 12px;height:40px;border-radius:10px;color:var(--ink);text-decoration:none;white-space:nowrap}
nav.rail a:hover{background:var(--hover)}
nav.rail a.on{background:var(--bg2);font-weight:500}
nav.rail a.on svg{color:var(--red)}
nav.rail hr{border:0;border-top:1px solid var(--line);margin:12px 0}
nav.rail h5{margin:6px 12px;font-size:16px;font-weight:500}
nav.rail .ch img,nav.rail .ch .avatar{width:24px;height:24px;font-size:11px}
body.mini nav.rail{width:76px;padding:4px}
body.mini nav.rail a{flex-direction:column;gap:4px;height:74px;justify-content:center;font-size:10px;padding:0}
body.mini nav.rail .full{display:none}
main{flex:1;padding:0 24px 40px}
.chips{position:sticky;top:56px;z-index:10;background:var(--bg);display:flex;gap:12px;overflow-x:auto;padding:12px 0;scrollbar-width:none}
.chip{flex:none;height:32px;padding:0 12px;border-radius:8px;background:var(--bg2);font-weight:500;white-space:nowrap}
.chip:hover{background:var(--bg3)}
.chip.on{background:var(--ink);color:var(--bg)}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:40px 16px;padding-top:8px}
.card{cursor:pointer}
.thumb{position:relative;aspect-ratio:16/9;border-radius:12px;overflow:hidden;background:var(--bg2)}
.thumb img,.thumb video{width:100%;height:100%;object-fit:cover;display:block;transition:transform .25s}
.card:hover .thumb img{transform:scale(1.03)}
.dur{position:absolute;right:6px;bottom:6px;background:#000c;color:#fff;font-size:12px;font-weight:500;padding:1px 4px;border-radius:4px}
.dur.live{background:var(--red)}
.prog{position:absolute;left:0;bottom:0;height:4px;background:var(--red)}
.meta{display:flex;gap:12px;margin-top:12px}
.meta h3{margin:0 0 4px;font-size:16px;font-weight:500;line-height:1.35;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.sub{color:var(--mut);font-size:14px}
.sub a{color:inherit;text-decoration:none}.sub a:hover{color:var(--ink)}
h1.page{font:800 28px/1.1 Poppins,sans-serif;margin:24px 0 8px}
.empty{text-align:center;padding:80px 16px;color:var(--mut)}
.empty svg{width:96px;height:96px;color:var(--red);opacity:.9}
/* list rows (search/history) */
.rows{display:flex;flex-direction:column;gap:16px;max-width:1100px;padding-top:12px}
.row{display:grid;grid-template-columns:minmax(0,360px) 1fr auto;gap:16px;cursor:pointer}
.row h3{margin:0 0 6px;font-size:18px;font-weight:400}
.row p{margin:8px 0 0;color:var(--mut);font-size:12px}
/* watch */
.watch{display:grid;grid-template-columns:minmax(0,1fr) 402px;gap:24px;padding-top:24px;max-width:1750px;margin:0 auto}
body.theater .watch{grid-template-columns:minmax(0,1fr)}
body.theater .side{display:none}
.player{position:relative;aspect-ratio:16/9;background:#000;border-radius:12px;overflow:hidden;user-select:none}
.player canvas,.player video{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.ctrls{position:absolute;left:0;right:0;bottom:0;padding:24px 12px 6px;background:linear-gradient(transparent,#000c);color:#fff;transition:opacity .25s}
.player.idle .ctrls{opacity:0}
.player.idle{cursor:none}
.seek{position:relative;height:16px;display:flex;align-items:center;cursor:pointer}
.seek .tr{position:absolute;left:0;right:0;height:3px;background:#ffffff40;transition:height .1s}
.seek:hover .tr{height:5px}
.seek .bf{position:absolute;inset:0 auto 0 0;background:#ffffff60}
.seek .pl{position:absolute;inset:0 auto 0 0;background:var(--red)}
.seek .kn{position:absolute;width:13px;height:13px;border-radius:50%;background:var(--red);margin-left:-6px;transform:scale(0);transition:transform .1s}
.seek:hover .kn{transform:scale(1)}
.seek .tip{position:absolute;bottom:20px;background:#000c;padding:2px 6px;border-radius:4px;font-size:12px;transform:translateX(-50%);display:none}
.seek:hover .tip{display:block}
.cb{display:flex;align-items:center;gap:4px}
.cb .ib{width:40px;height:40px}
.cb .ib:hover{background:#ffffff1f}
.cb .t{font-size:13px;margin-left:6px;white-space:nowrap}
.cb .sp{flex:1}
.vol{width:0;transition:width .2s;accent-color:#fff}
.volw:hover .vol,.vol:focus{width:64px}
.speed{background:#0009;border:0;border-radius:6px;padding:4px;color:#fff;font-size:13px}
.big{position:absolute;inset:0;margin:auto;width:72px;height:72px;border-radius:50%;background:#0008;display:grid;place-items:center;opacity:0;pointer-events:none;color:#fff}
.big.show{animation:pulse .6s}
@keyframes pulse{0%{opacity:1;transform:scale(.8)}100%{opacity:0;transform:scale(1.4)}}
.endcard{position:absolute;inset:0;background:#000d;color:#fff;display:none;place-items:center;text-align:center;padding:16px}
.endcard.show{display:grid}
.endcard button.go{background:var(--red);color:#fff;padding:10px 18px;border-radius:20px;font-weight:700;margin:6px}
.endcard button.no{background:#ffffff26;color:#fff;padding:10px 18px;border-radius:20px;margin:6px}
h2.vt{font-size:20px;font-weight:700;margin:12px 0 8px;line-height:1.3}
.bar{display:flex;flex-wrap:wrap;gap:12px;align-items:center;justify-content:space-between}
.owner{display:flex;align-items:center;gap:12px}
.owner .avatar{width:40px;height:40px;font-size:16px}
.subbtn{height:36px;padding:0 16px;border-radius:18px;background:var(--ink);color:var(--bg);font-weight:500}
.subbtn.on{background:var(--bg2);color:var(--ink)}
.acts{display:flex;gap:8px;flex-wrap:wrap}
.pill{height:36px;padding:0 14px;border-radius:18px;background:var(--bg2);display:flex;align-items:center;gap:6px;font-weight:500;white-space:nowrap}
.pill:hover{background:var(--bg3)}
.pill svg{width:22px;height:22px}
.pill.on svg{color:var(--red)}
.lk{display:flex;border-radius:18px;background:var(--bg2);overflow:hidden}
.lk .pill{border-radius:0;background:none}
.lk .pill:hover{background:var(--bg3)}
.lk .pill+.pill{border-left:1px solid var(--line)}
.desc{background:var(--bg2);border-radius:12px;padding:12px;margin-top:12px;cursor:pointer;white-space:pre-wrap}
.desc:hover{background:var(--bg3)}
.desc b{display:block;margin-bottom:4px}
.desc .more{font-weight:500}
.desc.closed .body{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.comments h3{font-size:20px;margin:24px 0 16px;display:flex;gap:24px;align-items:center}
.comments select{background:none;border:0;font-weight:500;font-size:14px}
.cform{display:flex;gap:16px;margin-bottom:28px}
.cform .in{flex:1}
.cform textarea{width:100%;border:0;border-bottom:1px solid var(--line);background:none;resize:none;font-size:16px;padding:4px 0;min-height:30px}
.cform textarea:focus{outline:none;border-bottom:2px solid var(--ink)}
.cform .btns{display:flex;justify-content:flex-end;gap:8px;margin-top:8px}
.btn{height:36px;padding:0 16px;border-radius:18px;font-weight:500}
.btn.p{background:var(--red);color:#fff}
.btn.p:disabled{background:var(--bg2);color:var(--mut);cursor:default}
.btn:not(.p):hover{background:var(--hover)}
.cm{display:flex;gap:16px;margin-bottom:20px}
.cm .avatar{width:40px;height:40px}
.cm .n{font-weight:500;font-size:13px}.cm .n span{color:var(--mut);font-weight:400;margin-left:4px}
.cm p{margin:2px 0 4px;white-space:pre-wrap;overflow-wrap:anywhere}
.cm .a{display:flex;align-items:center;gap:4px;color:var(--mut);font-size:12px}
.cm .a .ib{width:32px;height:32px}.cm .a svg{width:18px;height:18px}
.cm .a .on{color:var(--red)}
.side{display:flex;flex-direction:column;gap:8px}
.nx{display:grid;grid-template-columns:168px 1fr;gap:8px;cursor:pointer;border-radius:8px}
.nx .thumb{border-radius:8px}
.nx h4{margin:0 0 4px;font-size:14px;font-weight:500;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.nx .sub{font-size:12px}
.auto{display:flex;justify-content:space-between;align-items:center;font-weight:500;margin-bottom:4px}
.sw{width:36px;height:20px;border-radius:10px;background:var(--bg3);position:relative}
.sw::after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;transition:left .15s}
.sw.on{background:var(--red)}.sw.on::after{left:18px}
/* shorts */
.shorts{height:calc(100vh - 56px);overflow-y:auto;scroll-snap-type:y mandatory;display:flex;flex-direction:column;align-items:center;gap:24px;padding:16px 0}
.short{scroll-snap-align:center;flex:none;display:flex;gap:16px;align-items:flex-end}
.short .sc{position:relative;height:min(calc(100vh - 100px),780px);aspect-ratio:9/16;border-radius:14px;overflow:hidden;background:#000}
.short canvas{width:100%;height:100%;display:block}
.short .cap{position:absolute;left:0;right:0;bottom:0;padding:48px 16px 16px;background:linear-gradient(transparent,#000b);color:#fff}
.short .cap b{display:flex;align-items:center;gap:8px;margin-bottom:6px}
.short .cap .subbtn{height:30px;font-size:13px;background:#fff;color:#000}
.short .cap .subbtn.on{background:#ffffff40;color:#fff}
.short .sa{display:flex;flex-direction:column;gap:14px;align-items:center;font-size:12px;font-weight:500}
.short .sa .ib{width:48px;height:48px;background:var(--bg2)}
.short .sa .on{color:var(--red)}
.short .pbar{position:absolute;left:0;bottom:0;height:3px;background:var(--red)}
/* channel */
.banner{height:clamp(110px,16vw,210px);border-radius:16px;margin-top:16px}
.chead{display:flex;gap:24px;align-items:center;margin:20px 0;flex-wrap:wrap}
.chead .avatar{width:clamp(72px,10vw,150px);height:clamp(72px,10vw,150px);font-size:clamp(28px,4vw,60px)}
.chead h1{font:800 clamp(24px,3vw,36px)/1.1 Poppins,sans-serif;margin:0 0 6px}
/* modal + toast */
.modal{position:fixed;inset:0;background:#000a;z-index:60;display:none;place-items:center;padding:16px}
.modal.show{display:grid}
.box{background:var(--bg);border-radius:14px;width:min(560px,100%);max-height:90vh;overflow:auto;padding:24px}
.box h3{margin:0 0 16px;font:800 22px Poppins,sans-serif}
.box label{display:block;font-weight:500;margin:14px 0 6px}
.box input[type=text],.box textarea,.box select{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--bg);font-size:16px}
.drop{border:2px dashed var(--line);border-radius:12px;padding:28px;text-align:center;cursor:pointer}
.drop:hover,.drop.over{border-color:var(--red)}
.drop svg{width:64px;height:64px;color:var(--red)}
.toast{position:fixed;left:24px;bottom:24px;background:var(--ink);color:var(--bg);padding:12px 18px;border-radius:8px;z-index:70;transform:translateY(120px);transition:transform .25s;font-weight:500}
.toast.show{transform:none}
.mob{display:none}
@media(max-width:1100px){.watch{grid-template-columns:minmax(0,1fr)}}
@media(max-width:800px){nav.rail{display:none}body.navopen nav.rail{display:block;position:fixed;left:0;top:56px;z-index:50;background:var(--bg);box-shadow:4px 0 20px #0006;width:240px}body.mini.navopen nav.rail a{flex-direction:row;height:40px;font-size:14px;gap:22px;padding:0 12px}body.mini.navopen nav.rail .full{display:block}}
@media(max-width:600px){header{padding:0 8px;gap:4px}.brand span{display:none}.search{display:none}.search.open{display:flex;position:absolute;inset:8px;background:var(--bg);max-width:none}.mob{display:grid}main{padding:0 12px 32px}.row{grid-template-columns:1fr}.row>:last-child{display:none}.nx{grid-template-columns:140px 1fr}.short .sa{position:absolute;right:8px;bottom:110px;color:#fff}.short .sa .ib{background:#0006}.short .sc{height:calc(100vh - 90px)}.right .hide{display:none}.cb .t{font-size:12px}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

/* ===== app additions ===== */
.menu{width:280px;padding:8px 0}
.menu .who{display:flex;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line);margin-bottom:6px}
.menu a,.menu button.mi{display:flex;gap:16px;align-items:center;width:100%;padding:10px 16px;color:var(--ink);text-decoration:none;text-align:left}
.menu a:hover,.menu button.mi:hover{background:var(--hover)}
.signin{display:flex;gap:6px;align-items:center;height:36px;padding:0 14px;border:1px solid var(--line);border-radius:18px;color:#3ea6ff;font-weight:500;white-space:nowrap}
.avatar img{width:100%;height:100%;border-radius:50%;object-fit:cover}
.avatar{overflow:hidden}
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin:8px 0 16px;overflow-x:auto}
.tabs button,.tabs a{padding:12px 16px;font-weight:500;color:var(--mut);border-bottom:2px solid transparent;white-space:nowrap;text-decoration:none}
.tabs .on{color:var(--ink);border-color:var(--ink)}
.field{margin-bottom:14px}
.field label{display:block;font-weight:500;margin-bottom:6px}
.field input:not([type=checkbox]):not([type=file]),.field textarea,.field select{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:8px;background:var(--bg);font-size:16px}
.field input:focus,.field textarea:focus,.field select:focus{outline:none;border-color:var(--red)}
.chk{display:flex;gap:10px;align-items:center;padding:6px 0}
.chk input{width:18px;height:18px;accent-color:var(--red)}
.btn.full{width:100%;height:44px}
.btn.g{background:var(--bg2);display:flex;gap:10px;align-items:center;justify-content:center}
.btn.danger{color:#fff;background:#b3261e}
.or{display:flex;align-items:center;gap:12px;color:var(--mut);margin:16px 0}.or::before,.or::after{content:"";flex:1;border-top:1px solid var(--line)}
.err{color:#ff5a52;min-height:20px;font-size:13px}
.progress{height:8px;border-radius:4px;background:var(--bg2);overflow:hidden;margin:10px 0}
.progress div{height:100%;background:var(--red);width:0;transition:width .2s}
.skel{background:linear-gradient(90deg,var(--bg2),var(--bg3),var(--bg2));background-size:200% 100%;animation:sh 1.2s infinite;border-radius:12px}
@keyframes sh{to{background-position:-200% 0}}
.skc .thumb{animation:sh 1.2s infinite;background:linear-gradient(90deg,var(--bg2),var(--bg3),var(--bg2));background-size:200% 100%}
.skc .l{height:14px;margin-top:12px;width:80%}.skc .l2{height:12px;margin-top:8px;width:50%}
table.studio{width:100%;border-collapse:collapse}
table.studio th,table.studio td{text-align:left;padding:10px 8px;border-bottom:1px solid var(--line);vertical-align:middle}
table.studio td.n,table.studio th.n{text-align:right;white-space:nowrap}
table.studio img{width:120px;aspect-ratio:16/9;object-fit:cover;border-radius:6px}
.statrow{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:12px 0 24px}
.stat{background:var(--bg2);border-radius:12px;padding:16px}.stat b{display:block;font:800 28px Poppins,sans-serif}
.tag{display:inline-block;padding:2px 8px;border-radius:6px;background:var(--bg2);font-size:12px;margin-right:4px}
.cm .rep{margin-top:8px}
.cm .replies{margin-top:12px}
.linkbtn{color:#3ea6ff;font-weight:500;display:inline-flex;gap:6px;align-items:center;height:32px;padding:0 8px;border-radius:16px}
.linkbtn:hover{background:#3ea6ff22}
.pinned{font-size:12px;color:var(--mut);display:flex;gap:4px;align-items:center;margin-bottom:2px}.pinned svg{width:14px;height:14px}
.short video{width:100%;height:100%;object-fit:cover;display:block;background:#000}
.short .unm{position:absolute;top:12px;left:12px;background:#0008;color:#fff;border-radius:16px;padding:6px 10px;font-size:12px}
.share-row{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}
.share-row a{padding:8px 14px;border-radius:18px;background:var(--bg2);color:var(--ink);text-decoration:none;font-weight:500}
.copy{display:flex;gap:8px}.copy input{flex:1;padding:10px;border:1px solid var(--line);border-radius:8px;background:var(--bg2);font-size:14px}
.plhead{display:grid;grid-template-columns:minmax(0,360px) 1fr;gap:24px;margin:24px 0}
@media(max-width:700px){.plhead{grid-template-columns:1fr}table.studio .hm{display:none}}
.more-btn{display:block;margin:24px auto}
.setup{max-width:640px;margin:60px auto;padding:24px;background:var(--bg2);border-radius:16px}
.setup code{background:var(--bg3);padding:2px 6px;border-radius:4px}
.ccon b{background:#fff;color:#000}
#tabbar{display:none}
@media(max-width:600px){
 #tabbar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:35;height:56px;background:var(--bg);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}
 #tabbar a,#tabbar button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:10px;color:var(--ink);text-decoration:none}
 #tabbar a.on svg{color:var(--red)}
 #tabbar .plus{width:40px;height:30px;border-radius:15px;border:1.5px solid var(--ink);display:grid;place-items:center;font-size:22px;line-height:1}
 main{padding-bottom:72px}
 .shorts{height:calc(100vh - 112px)}.short .sc{height:calc(100vh - 140px)}
 .toast{bottom:72px}
}
