/* video.pookiie.com — YouTube layout, POOKIIE branding.
   Mobile first: one-column video grid on the phone, more columns as the
   screen widens; sidebar on desktop, bottom nav on mobile. The watch page
   is the YouTube watch layout exactly (player, title, channel + Subscribe,
   actions, description, comments, Up next). Dark by default — the look in
   the approved mobile preview picture. The masthead switch flips dark /
   light and the choice persists; the theme also follows the system
   (prefers-color-scheme, which battery saver drives) and re-syncs when
   the system changes. Brand green #00E436; pink #ff5da2. Logo: Logo #2, the
   app-icon mark, small in the masthead (28px) — never large, never redrawn. */
:root{
  --green:#00e436; --green-dark:#00b82e; --pink:#ff5da2;
  --bg:#ffffff; --surface:#ffffff; --surface-2:#f2f2f2; --text:#0f0f0f;
  --text-2:#606060; --border:#e5e5e5; --chip:#f2f2f2; --shadow:0 1px 2px rgba(0,0,0,.12);
  --red:#ff0000; --red-dark:#cc0000;
  --mast-h:56px; --nav-h:56px; --side-w:240px; --side-mini-w:72px;
}
[data-theme="dark"]{
  --bg:#0f0f0f; --surface:#212121; --surface-2:#272727; --text:#f1f1f1;
  --text-2:#aaaaaa; --border:rgba(255,255,255,.1); --chip:#272727;
  --shadow:0 1px 2px rgba(0,0,0,.5);
}
*{box-sizing:border-box;margin:0;padding:0}
html{scrollbar-width:thin}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  background:var(--bg); color:var(--text); -webkit-font-smoothing:antialiased;
}
button{font:inherit;color:inherit;background:none;border:0;cursor:pointer}
img,video{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
input,textarea{font:inherit;color:inherit}

/* ---- masthead (YouTube top bar) ---- */
.masthead{
  position:sticky;top:0;z-index:50;display:flex;align-items:center;gap:8px;
  height:var(--mast-h);padding:0 12px;background:var(--bg);
}
.masthead .menu-btn{display:none;width:40px;height:40px;border-radius:50%;font-size:20px}
.masthead .menu-btn:hover{background:var(--surface-2)}
.masthead .logo{display:flex;align-items:center;gap:6px;flex:0 0 auto}
.masthead .logo-box{width:28px;height:28px;border-radius:8px;overflow:hidden;
  background:#0b3d1a;display:flex;align-items:center;justify-content:center}
.masthead .logo-box img{width:28px;height:28px;object-fit:cover}
.masthead .wordmark{font-weight:900;letter-spacing:.02em;font-size:17px;white-space:nowrap}
.masthead .wordmark span{font-weight:400;font-size:11px;letter-spacing:.14em;color:var(--text-2);margin-left:2px}
.masthead .search{flex:1;display:flex;align-items:center;justify-content:center;min-width:0}
.masthead .search-box{display:flex;flex:1;max-width:640px}
.masthead .search-box input{flex:1;min-width:0;border:1px solid var(--border);border-right:0;
  border-radius:20px 0 0 20px;padding:0 16px;height:40px;font-size:15px;
  background:var(--bg);outline:0}
.masthead .search-box input:focus{border-color:#1c62b9}
.masthead .search-go{width:64px;height:40px;border:1px solid var(--border);border-radius:0 20px 20px 0;
  background:var(--surface-2);font-size:17px;flex:0 0 auto}
.masthead .mic-btn{width:40px;height:40px;border-radius:50%;background:var(--surface-2);
  font-size:17px;margin-left:10px;flex:0 0 auto}
.masthead .spacer{flex:1}
.masthead .icon-btn{width:40px;height:40px;border-radius:50%;display:flex;align-items:center;
  justify-content:center;font-size:19px;flex:0 0 auto;position:relative}
.masthead .icon-btn:hover{background:var(--surface-2)}
.masthead .create-btn{display:flex;align-items:center;gap:6px;height:36px;padding:0 12px;
  border-radius:18px;background:var(--surface-2);font-size:14px;font-weight:600;flex:0 0 auto}
.masthead .create-btn:hover{background:var(--border)}
.masthead .avatar{width:32px;height:32px;border-radius:50%;background:var(--green);color:#04140a;
  display:flex;align-items:center;justify-content:center;font-weight:800;font-size:14px;flex:0 0 auto}
.masthead .search-icon-btn{display:none}

/* ---- theme switch (masthead): a real switch, not an icon ----
   Knob right + moon = dark (on); knob left + sun = light (off). The
   knob position always shows the current theme — JS sets aria-checked
   on every theme change, including system re-syncs. */
.theme-switch{flex:0 0 auto;padding:0}
.theme-switch .track{width:48px;height:28px;border-radius:14px;background:var(--surface-2);
  border:1px solid var(--border);display:flex;align-items:center;padding:2px;
  transition:background .2s,border-color .2s}
.theme-switch .knob{width:22px;height:22px;border-radius:50%;background:#fff;color:#0f0f0f;
  display:flex;align-items:center;justify-content:center;font-size:12px;line-height:1;
  transform:translateX(0);transition:transform .2s}
.theme-switch[aria-checked="true"] .track{background:var(--green);border-color:var(--green)}
.theme-switch[aria-checked="true"] .knob{transform:translateX(20px)}

/* mobile search: full-width bar that opens over the masthead */
.search-overlay{position:fixed;inset:0;z-index:60;background:var(--bg);display:none;
  align-items:flex-start;padding:10px 12px;gap:8px}
.search-overlay.show{display:flex}
.search-overlay input{flex:1;height:40px;border:1px solid var(--border);border-radius:20px;
  padding:0 16px;font-size:15px;background:var(--bg);outline:0}
.search-overlay .search-go{width:52px;height:40px;border:1px solid var(--border);border-radius:20px;
  background:var(--surface-2);font-size:17px}

/* ---- page shell: sidebar + content ---- */
.shell{display:flex;align-items:flex-start}
.sidebar{position:sticky;top:var(--mast-h);height:calc(100vh - var(--mast-h));height:calc(100dvh - var(--mast-h));
  width:var(--side-w);flex:0 0 var(--side-w);overflow-y:auto;padding:10px 12px;display:none}
.sidebar a{display:flex;align-items:center;gap:18px;padding:0 12px;height:40px;border-radius:10px;
  font-size:14px;white-space:nowrap}
.sidebar a:hover{background:var(--surface-2)}
.sidebar a.active{background:var(--surface-2);font-weight:700}
.sidebar a .ico{font-size:19px;width:24px;text-align:center}
body.sidebar-collapsed .sidebar{display:none}
.sidebar hr{border:0;border-top:1px solid var(--border);margin:10px 0}
.sidebar h4{font-size:15px;padding:8px 12px 4px}
.sidebar .sub{font-size:12px;color:var(--text-2);padding:0 12px 8px;line-height:1.4}
.content{flex:1;min-width:0;padding:0 12px 76px}
@media (min-width:800px){
  .masthead .menu-btn{display:block}
  .sidebar{display:block;width:var(--side-mini-w);flex-basis:var(--side-mini-w);padding:10px 4px}
  .sidebar a{flex-direction:column;gap:4px;height:64px;justify-content:center;font-size:10px;padding:0 2px}
  .sidebar a .ico{font-size:20px}
  .sidebar hr,.sidebar h4,.sidebar .sub,.sidebar .wide-only{display:none}
}
@media (min-width:1100px){
  .sidebar{width:var(--side-w);flex-basis:var(--side-w);padding:10px 12px}
  .sidebar a{flex-direction:row;gap:18px;height:40px;justify-content:flex-start;font-size:14px;padding:0 12px}
  .sidebar a .ico{font-size:19px}
  .sidebar hr,.sidebar h4,.sidebar .sub{display:block}
  .sidebar .wide-only{display:flex}
}
@media (max-width:799px){
  .masthead .search{display:none}
  .masthead .search-icon-btn{display:flex}
  .masthead .create-btn{display:none}
  .masthead .mic-btn{display:none}
}

/* ---- chip row ---- */
.chips{display:flex;gap:8px;overflow-x:auto;padding:10px 0;scrollbar-width:none;
  position:sticky;top:var(--mast-h);z-index:30;background:var(--bg)}
.chips::-webkit-scrollbar{display:none}
.chip{flex:0 0 auto;padding:7px 12px;border-radius:8px;background:var(--chip);
  font-size:13px;font-weight:600;color:var(--text);white-space:nowrap}
.chip.active{background:var(--text);color:var(--bg)}
.chip .dot{color:var(--pink);margin-right:4px}

/* ---- video grid (home) ---- */
.grid{display:grid;grid-template-columns:1fr;gap:20px 16px;margin-top:4px}
@media (min-width:600px){.grid{grid-template-columns:repeat(2,1fr)}}
@media (min-width:1000px){.grid{grid-template-columns:repeat(3,1fr)}}
@media (min-width:1400px){.grid{grid-template-columns:repeat(4,1fr)}}
.video-card{cursor:pointer}
.video-card .thumb{position:relative;aspect-ratio:16/9;background:#000;border-radius:12px;overflow:hidden}
.video-card .thumb img,.video-card .thumb video{width:100%;height:100%;object-fit:cover}
.video-card .thumb .dur{position:absolute;right:8px;bottom:8px;background:rgba(0,0,0,.8);color:#fff;
  font-size:11px;font-weight:700;border-radius:4px;padding:2px 6px}
.video-card .thumb .live-badge{position:absolute;left:8px;bottom:8px;background:var(--red);color:#fff;
  font-size:11px;font-weight:800;border-radius:4px;padding:2px 6px}
.video-card .thumb .demo-tag{position:absolute;left:8px;top:8px;background:rgba(0,0,0,.65);color:#fff;
  font-size:10px;font-weight:700;border-radius:4px;padding:2px 6px;letter-spacing:.06em}
.video-card .info{display:flex;gap:10px;padding:10px 2px 0}
.video-card .info .avatar{width:36px;height:36px;border-radius:50%;background:var(--green);
  color:#04140a;display:flex;align-items:center;justify-content:center;font-weight:800;flex:0 0 36px;
  overflow:hidden}
.video-card .info .avatar img{width:100%;height:100%;object-fit:cover}
.video-card .info h4{font-size:14px;line-height:1.35;flex:1}
.video-card .info .sub{font-size:12px;color:var(--text-2);margin-top:3px}
.video-card .info .menu{font-size:18px;line-height:1;color:var(--text-2)}

/* ---- watch page ---- */
.watch{display:block}
@media (min-width:1000px){
  .watch{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:24px;align-items:start}
}
.watch .player-wrap{position:relative;aspect-ratio:16/9;background:#000;border-radius:12px;
  overflow:hidden;margin-top:4px}
.watch .player-wrap video{width:100%;height:100%;object-fit:contain}
.watch .player-wrap .no-video{position:absolute;inset:0;display:flex;align-items:center;
  justify-content:center;color:#fff;font-weight:700;padding:16px;text-align:center;
  background:linear-gradient(135deg,#0b3d1a,#ff5da2)}
.watch .player-wrap .preview-badge{position:absolute;top:10px;right:10px;z-index:2;
  background:#f5c518;color:#0f0f0f;font-size:11px;font-weight:800;border-radius:6px;padding:4px 8px}
.title-row{display:flex;align-items:flex-start;gap:10px;margin-top:12px}
.title-row h1{flex:1;min-width:0;font-size:18px;line-height:1.4}
.title-row .btn-subscribe{flex:0 0 auto;margin-top:2px}
@media (min-width:1000px){.title-row h1{font-size:20px}}
.channel-row{display:flex;align-items:center;gap:12px;margin-top:12px;flex-wrap:wrap}
.channel-row .avatar{width:40px;height:40px;border-radius:50%;background:var(--green);color:#04140a;
  display:flex;align-items:center;justify-content:center;font-weight:800;font-size:16px;overflow:hidden}
.channel-row .avatar img{width:100%;height:100%;object-fit:cover}
.channel-row .who{flex:1;min-width:120px}
.channel-row .who b{font-size:15px;display:block}
.channel-row .who span{font-size:12px;color:var(--text-2)}
.btn-subscribe{background:var(--red);color:#fff;font-weight:700;border-radius:20px;
  padding:9px 18px;font-size:14px}
.btn-subscribe:hover{background:var(--red-dark)}
.btn-subscribe.subscribed{background:var(--surface-2);color:var(--text)}
.actions-row{display:flex;gap:8px;margin-top:14px;flex-wrap:wrap}
.channel-row .actions-row{margin-top:0}
.action-pill{display:flex;align-items:center;gap:6px;border-radius:20px;padding:8px 14px;
  background:var(--surface-2);font-size:14px;font-weight:600}
.action-pill.liked{color:#d1005f}
.action-pill .sep{width:1px;height:20px;background:var(--border);margin:0 4px}
.desc-box{margin-top:14px;background:var(--surface-2);border-radius:12px;padding:12px;
  font-size:14px;line-height:1.5;white-space:pre-wrap}
.desc-box .stats{font-weight:700}
.desc-box .tags{color:#065fd4;font-weight:600}
[data-theme="dark"] .desc-box .tags{color:#3ea6ff}
.desc-box .more{font-weight:700;cursor:pointer}

/* comments (watch page, inline like YouTube) */
.comments{margin-top:20px}
.comments h3{font-size:16px;display:flex;align-items:center;gap:16px}
.comments h3 .sort{font-size:13px;color:var(--text-2);font-weight:600}
.comment-add{display:flex;gap:10px;margin-top:16px}
.comment-add .avatar{width:36px;height:36px;border-radius:50%;background:var(--green);color:#04140a;
  display:flex;align-items:center;justify-content:center;font-weight:800;flex:0 0 36px}
.comment-add input{flex:1;border:0;border-bottom:1px solid var(--border);outline:0;padding:6px 2px;
  font-size:14px;background:transparent}
.comment-add input:focus{border-bottom-color:var(--text)}
.comment-list{margin-top:18px}
.comment{margin-bottom:18px}
.comment .head{display:flex;gap:10px;align-items:center}
.comment .head .avatar{width:36px;height:36px;border-radius:50%;background:var(--green);
  color:#04140a;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px}
.comment .head b{font-size:13px}
.comment .head time{font-size:12px;color:var(--text-2)}
.comment p{font-size:14px;margin:6px 0 6px 46px;line-height:1.45}
.comment .c-actions{margin-left:46px;display:flex;gap:14px;font-size:12px;color:var(--text-2);
  font-weight:600;align-items:center}
.comment .c-actions .hearted{color:#d1005f}
.comment .replies{margin:10px 0 0 46px;border-left:2px solid var(--border);padding-left:12px}
.comment .reply-box{display:none;margin:10px 0 0 46px}
.comment .reply-box.show{display:flex;gap:8px}
.comment .reply-box input{flex:1;border:1px solid var(--border);border-radius:18px;
  padding:7px 12px;font-size:13px;background:var(--surface);color:var(--text);outline:0}

/* Up next */
.upnext{margin-top:20px}
@media (min-width:1000px){.upnext{margin-top:4px}}
.upnext h3{font-size:16px;margin-bottom:12px}
.upnext .chips{position:static;padding:0 0 12px}
.upnext-item{display:flex;gap:8px;margin-bottom:10px;cursor:pointer}
.upnext-item .thumb{position:relative;width:168px;flex:0 0 168px;aspect-ratio:16/9;background:#000;
  border-radius:8px;overflow:hidden}
.upnext-item .thumb img{width:100%;height:100%;object-fit:cover}
.upnext-item .thumb .dur{position:absolute;right:4px;bottom:4px;background:rgba(0,0,0,.8);color:#fff;
  font-size:10px;font-weight:700;border-radius:4px;padding:1px 4px}
.upnext-item .thumb .live-badge{position:absolute;left:4px;bottom:4px;background:var(--red);color:#fff;
  font-size:10px;font-weight:800;border-radius:4px;padding:1px 4px}
.upnext-item h4{font-size:13px;line-height:1.35}
.upnext-item .sub{font-size:12px;color:var(--text-2);margin-top:3px}

/* ---- bottom nav (mobile) ---- */
.bottomnav{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;background:var(--bg);
  border-top:1px solid var(--border);height:var(--nav-h)}
.bottomnav button{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:2px;font-size:10px;color:var(--text-2)}
.bottomnav button.active{color:var(--text);font-weight:700}
.bottomnav button .ico{font-size:20px}
.bottomnav .plus{font-size:26px;line-height:1}
.bottomnav .nav-avatar{width:24px;height:24px;border-radius:50%;background:var(--green);
  color:#04140a;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:11px}
@media (min-width:800px){.bottomnav{display:none}.content{padding-bottom:24px}}

/* ---- upload dialog ---- */
.dialog-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:70;display:none}
.dialog-backdrop.show{display:block}
.dialog{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);z-index:71;width:min(92vw,480px);
  background:var(--bg);border-radius:16px;padding:20px;display:none;box-shadow:0 12px 40px rgba(0,0,0,.35)}
.dialog.show{display:block}
.dialog h3{font-size:17px;margin-bottom:12px}
.dialog label{display:block;font-size:13px;font-weight:700;margin:10px 0 4px}
.dialog input[type=text]{width:100%;border:1px solid var(--border);border-radius:8px;padding:9px 12px;
  font-size:14px;background:var(--surface);color:var(--text);outline:0}
.dialog .hint{font-size:12px;color:var(--text-2);margin-top:8px;line-height:1.5}
.dialog .row{display:flex;gap:10px;justify-content:flex-end;margin-top:16px}
.btn-green{background:var(--green);color:#04140a;font-weight:700;border-radius:20px;
  padding:8px 18px;font-size:14px}
.btn-green:disabled{opacity:.5;cursor:default}
.btn-ghost{border:1px solid var(--border);border-radius:20px;padding:7px 14px;font-size:13px}

/* ---- setup notice / empty states ---- */
.notice{margin:12px 0;border:1px dashed var(--green);border-radius:12px;padding:12px;font-size:13px;
  line-height:1.5;background:rgba(0,228,54,.06)}
.notice b{color:var(--green-dark)}
.empty{text-align:center;color:var(--text-2);font-size:13px;padding:28px 16px}

/* ---- preview pill (demo mode): the green pill at the bottom of the
   approved mobile preview picture ---- */
.preview-pill{margin:18px auto 0;max-width:560px;text-align:center;background:#0b3d1a;color:#b9ffd0;
  border:1px solid rgba(0,228,54,.35);border-radius:20px;padding:10px 16px;font-size:13px;
  font-weight:700;line-height:1.45}

/* ---- coming soon (index.html) ---- */
.hero{min-height:100dvh;display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;padding:24px 20px;position:relative;overflow:hidden;
  background:radial-gradient(120% 90% at 50% 0%,#0b3d1a 0%,#071f0d 55%,#04140a 100%);color:#fff}
.hero .hero-img{width:min(92vw,560px);border-radius:20px;overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.14)}
.hero .hero-img img{width:100%;height:auto;display:block}
.hero .hero-fallback{width:min(92vw,560px);aspect-ratio:16/9;border-radius:20px;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;
  background:linear-gradient(135deg,#00e436 0%,#0b3d1a 55%,#ff5da2 130%);
  box-shadow:0 20px 60px rgba(0,0,0,.55);border:1px solid rgba(255,255,255,.14)}
.hero .hero-fallback .hero-mark{width:28px;height:28px}
.hero h1{font-size:clamp(34px,8vw,58px);font-weight:900;letter-spacing:.04em;margin-top:22px}
.hero h1 em{color:var(--green);font-style:normal}
.hero .soon{display:inline-block;margin-top:12px;border:1px solid var(--green);color:#b9ffd0;
  border-radius:20px;padding:6px 16px;font-size:13px;font-weight:700;letter-spacing:.14em}
.hero p{max-width:520px;color:#d8ffe4;font-size:15px;line-height:1.6;margin-top:14px}
.hero .cta-row{display:flex;gap:10px;margin-top:22px;flex-wrap:wrap;justify-content:center}
.hero .cta-row .btn-green{padding:12px 26px;font-size:15px;border-radius:26px}
.hero .cta-row .btn-outline{border:1px solid rgba(255,255,255,.5);color:#fff;border-radius:26px;
  padding:12px 22px;font-size:15px;font-weight:700}
.hero .foot{margin-top:26px;font-size:12px;color:#9adbb0}
.hero .logo-row{margin-top:18px;display:flex;align-items:center;gap:8px;font-size:12px;color:#9adbb0}
.hero .logo-row img{width:26px;height:26px;border-radius:6px}
