:root{
  --bg:#0b0b0d;
  --panel:#121216;
  --panel2:#16161c;
  --text:#f2f2f2;
  --muted:#a7a7b3;
  --accent:#ff9f1a;
  --accent2:#ff7a00;
  --border:rgba(255,255,255,.08);
  --ok:#22c55e;
  --err:#ef4444;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background: radial-gradient(900px 500px at 20% 0%, #1a1a22 0%, var(--bg) 60%) fixed;
}
a{color:inherit;text-decoration:none}
.wrap{width:min(1180px,92vw);margin:0 auto}

.topbar{
  position:sticky;top:0;z-index:10;
  background:rgba(10,10,12,.78);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--border);
}
.topbar__inner{display:flex;gap:14px;align-items:center;padding:14px 0}
.brand{font-weight:900;font-size:18px;white-space:nowrap}
.brand__b{color:var(--accent)}

.search{flex:1;display:flex;gap:10px}
.search__input{
  width:100%;padding:10px 12px;border-radius:10px;
  background:var(--panel);border:1px solid var(--border);color:var(--text);outline:none;
}
.search__input:focus{border-color:rgba(255,159,26,.55);box-shadow:0 0 0 4px rgba(255,159,26,.12)}
.search__btn{
  border:0;border-radius:10px;padding:10px 14px;
  font-weight:900;background:linear-gradient(135deg,var(--accent),var(--accent2));
  color:#111;cursor:pointer;
}

.nav{display:flex;gap:12px;align-items:center}
.nav__link{color:rgba(255,255,255,.78);font-weight:700}
.nav__link:hover{color:rgba(255,255,255,.95)}
.nav__link--warn{color:rgba(255,159,26,.95)}
.nav__btn{border:1px solid var(--border);background:var(--panel);color:var(--text);padding:8px 10px;border-radius:10px;cursor:pointer}

.section{padding:18px 0 36px}
.section__head{display:flex;justify-content:space-between;gap:14px;align-items:baseline}
h2{margin:0;font-size:18px}
.h1{margin:0 0 10px;font-size:26px}
.muted{color:var(--muted)}
.small{font-size:12px}

.grid{margin-top:14px;display:grid;grid-template-columns:repeat(4,1fr);gap:14px}
@media (max-width:980px){.grid{grid-template-columns:repeat(3,1fr)}}
@media (max-width:720px){.grid{grid-template-columns:repeat(2,1fr)}}

.card{
  background:linear-gradient(180deg,var(--panel2),var(--panel));
  border:1px solid var(--border);border-radius:14px;overflow:hidden;
  transition:transform .12s ease,border-color .12s ease;
}
.card:hover{transform:translateY(-2px);border-color:rgba(255,159,26,.28)}
.card__thumb{position:relative;aspect-ratio:16/9;background-size:cover;background-position:center}
.card__pill{
  position:absolute;right:10px;bottom:10px;
  background:rgba(0,0,0,.65);
  border:1px solid rgba(255,255,255,.12);
  padding:4px 8px;border-radius:999px;font-size:12px;font-weight:900;
}
.card__body{padding:10px 12px 12px}
.card__title{font-weight:900;line-height:1.25}
.card__meta{margin-top:6px}

.player{margin-top:14px;border-radius:16px;overflow:hidden;border:1px solid var(--border);background:#000}
.player__video{width:100%;display:block}

.panel{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:12px}

.btn{
  display:inline-block;
  border-radius:12px;padding:10px 14px;
  border:1px solid var(--border);
  background:var(--panel);color:var(--text);
  font-weight:900;cursor:pointer;
}
.btn--accent{border:0;background:linear-gradient(135deg,var(--accent),var(--accent2));color:#111}
.btn--ghost:hover{border-color:rgba(255,159,26,.25)}

.form{margin-top:14px;display:grid;gap:10px;max-width:720px}
.label{font-weight:900;color:rgba(255,255,255,.88)}
.input{
  width:100%;padding:10px 12px;border-radius:12px;
  border:1px solid var(--border);background:var(--panel);color:var(--text);outline:none;
}
.input:focus{border-color:rgba(255,159,26,.55);box-shadow:0 0 0 4px rgba(255,159,26,.12)}
.check{display:flex;gap:10px;align-items:center;color:rgba(255,255,255,.85)}

.notice{
  margin:12px 0;padding:10px 12px;border-radius:12px;
  border:1px solid rgba(255,159,26,.25);
  background:rgba(255,159,26,.10);
}
.notice--ok{
  border-color:rgba(34,197,94,.25);
  background:rgba(34,197,94,.10);
}
.notice--warn{
  border-color:rgba(255,159,26,.30);
  background:rgba(255,159,26,.10);
}
.notice--err{
  border-color:rgba(239,68,68,.25);
  background:rgba(239,68,68,.10);
}

.footer{border-top:1px solid var(--border);padding:18px 0 30px}
.footer__inner{display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap}

.footer a{
  color: rgba(255,255,255,.80);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer a:hover{
  color: rgba(255,159,26,.95);
}

.flash{padding-top:12px}

.gate{min-height:100vh;display:grid;place-items:center;padding:20px}
.gate__card{
  width:min(560px,96vw);
  background:linear-gradient(180deg,var(--panel2),var(--panel));
  border:1px solid var(--border);border-radius:18px;padding:18px;
}

.row{
  display:flex;justify-content:space-between;align-items:center;
  gap:12px;padding:10px 0;border-bottom:1px solid var(--border);
}
.row:last-child{border-bottom:0}
.row__actions{display:flex;gap:10px;align-items:center; flex-wrap:wrap;}

/* pager */
.pager{
  margin-top:16px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}

/* Progress bar (upload) */
.progress{
  height:12px;
  border-radius:999px;
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.10);
  overflow:hidden;
  margin-top:8px;
}
.progress__bar{
  height:100%;
  width:0%;
  background:linear-gradient(135deg,var(--accent),var(--accent2));
  transition:width .15s ease;
}
button:disabled{
  opacity:.65;
  cursor:not-allowed;
}

/* Shorts */
.shorts-grid .shorts-thumb{
  aspect-ratio: 9/16;
}

#shorts-container{
  position:fixed;
  inset:0;
  z-index:5;
  background:#000;
  overflow:hidden;
}
#shorts-viewport{
  display:flex;
  flex-direction:column;
  height:100%;
  transition:transform .3s ease;
  will-change:transform;
}
.short-slide{
  width:100vw;
  height:100%;
  position:relative;
  flex-shrink:0;
  background:#000;
}
.short-player{
  width:100%;
  height:100%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#000;
}
.short-video-wrap{
  width:100%;
  height:100%;
  max-width:56.25vh;
  position:relative;
  border-radius:14px;
  overflow:hidden;
}
.short-video{
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
  background:#000;
}

/* Right side actions */
.short-actions{
  position:absolute;
  right:8px;
  bottom:160px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:10px;
  z-index:2;
}
.short-action-btn{
  background:rgba(0,0,0,.5);
  backdrop-filter:blur(6px);
  border:0;
  border-radius:999px;
  color:#fff;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
  padding:10px 8px 6px;
  width:54px;
  cursor:pointer;
  transition:all .15s;
  text-align:center;
  line-height:1.2;
}
.short-action-btn:hover{background:rgba(0,0,0,.7)}
.short-action-btn--active{background:rgba(255,159,26,.25)}
.short-action-icon{font-size:22px}
.short-action-count{
  font-size:11px;
  font-weight:700;
  color:rgba(255,255,255,.85);
}

/* Hide comment button in browser fullscreen */
#shorts-container:fullscreen .short-comment-toggle-btn,
#shorts-container:-webkit-full-screen .short-comment-toggle-btn{
  display:none !important;
}

/* Bottom info */
.short-bottom-info{
  position:absolute;
  bottom:125px;
  left:10px;
  right:72px;
  z-index:2;
  pointer-events:none;
}
.short-title{
  font-weight:800;
  font-size:14px;
  color:#fff;
  margin-bottom:2px;
  text-shadow:0 1px 4px rgba(0,0,0,.6);
}
.short-author a{
  pointer-events:auto;
}
.short-author{
  font-size:12px;
  text-shadow:0 1px 4px rgba(0,0,0,.6);
}
.short-author a{color:var(--accent);font-weight:700;}

/* Author bar: views, verify, follow */
.short-author-bar{
  position:absolute;
  bottom:88px;
  left:10px;
  right:72px;
  z-index:2;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.short-stat{
  color:rgba(255,255,255,.75);
  font-size:11px;
  font-weight:600;
  text-shadow:0 1px 4px rgba(0,0,0,.6);
  white-space:nowrap;
}
.short-follow-btn{
  border-radius:999px;
  padding:3px 12px;
  font-weight:700;
  font-size:11px;
  cursor:pointer;
  transition:all .12s;
  border:0;
  background:var(--accent);
  color:#111;
}
.short-follow-btn[data-following]{
  background:transparent;
  color:var(--muted);
  border:1px solid var(--border);
}

/* Bottom custom controls */
.short-controls{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  padding:30px 10px 8px;
  background:linear-gradient(transparent 0%, rgba(0,0,0,.85) 100%);
}
.short-controls-bar{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:4px;
}
.short-spacer{flex:1}
.short-ctrl-btn{
  background:rgba(255,255,255,.25);
  border:1px solid rgba(255,255,255,.15);
  color:#fff;
  font-size:18px;
  width:34px;
  height:34px;
  border-radius:999px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .15s;
  text-decoration:none;
  line-height:1;
  flex-shrink:0;
}
.short-ctrl-btn:hover{background:rgba(255,255,255,.3)}
.short-time{
  color:rgba(255,255,255,.8);
  font-size:12px;
  font-weight:600;
  white-space:nowrap;
  min-width:60px;
}
.short-seek{
  -webkit-appearance:none;
  appearance:none;
  width:100%;
  height:4px;
  border-radius:2px;
  background:rgba(255,255,255,.3);
  outline:0;
  cursor:pointer;
}
.short-seek::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:14px;
  height:14px;
  border-radius:50%;
  background:#ff9f1a;
  border:0;
}
.short-seek::-moz-range-thumb{
  width:14px;
  height:14px;
  border-radius:50%;
  background:#ff9f1a;
  border:0;
}
.short-volume-slider{
  -webkit-appearance:none;
  appearance:none;
  width:60px;
  height:4px;
  border-radius:2px;
  background:rgba(255,255,255,.3);
  outline:0;
  cursor:pointer;
  flex-shrink:0;
}
.short-volume-slider::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:12px;
  height:12px;
  border-radius:50%;
  background:#fff;
  border:0;
}
.short-volume-slider::-moz-range-thumb{
  width:12px;
  height:12px;
  border-radius:50%;
  background:#fff;
  border:0;
}

/* Comments panel (slides from right) */
#short-comments-panel{
  position:fixed;
  inset:0;
  z-index:10;
  display:none;
}
#short-comments-overlay-bg{
  position:absolute;
  inset:0;
  background:rgba(0,0,0,.5);
}
#short-comments-sidebar{
  position:absolute;
  top:0;
  right:0;
  bottom:0;
  width:400px;
  max-width:90vw;
  background:var(--bg);
  border-left:1px solid var(--border);
  display:flex;
  flex-direction:column;
  transform:translateX(100%);
  transition:transform .3s ease;
}
.short-comments-panel--open #short-comments-sidebar{
  transform:translateX(0);
}
.short-comments-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  border-bottom:1px solid var(--border);
  flex-shrink:0;
}
.short-comments-title{
  font-weight:900;
  font-size:16px;
}
#short-comments-close{
  font-size:16px;
}
#short-comments-body{
  flex:1;
  overflow-y:auto;
  padding:12px 16px;
}
.short-comments-loading{
  text-align:center;
  color:var(--muted);
  padding:24px 0;
  font-size:14px;
}
.short-comment-item{
  padding:10px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.short-comment-form-wrap{
  padding-bottom:12px;
  border-bottom:1px solid var(--border);
  margin-bottom:12px;
}
.short-comment-input{
  font-size:14px;
  padding:10px 12px;
  width:100%;
  box-sizing:border-box;
  resize:none;
}
/* (emoji picker uses inline styles, no CSS needed) */

/* Mobile: shorts */
@media (max-width:600px){
  .short-actions{right:4px;bottom:140px;gap:6px}
  .short-action-btn{width:48px;padding:10px 4px 6px}
  .short-action-icon{font-size:20px}
  .short-action-count{font-size:11px}
  .short-bottom-info{bottom:118px;left:8px;right:66px}
  .short-title{font-size:14px}
  .short-author{font-size:12px}
  .short-author-bar{bottom:84px;left:8px;right:66px;gap:6px}
  .short-stat{font-size:11px}
  .short-follow-btn{font-size:11px;padding:4px 12px}
  .short-controls{padding:30px 10px calc(8px + env(safe-area-inset-bottom,0px))}
  .short-ctrl-btn{width:34px;height:34px;font-size:18px}
  .short-time{font-size:12px;min-width:60px}
  #short-comments-sidebar{width:100vw;max-width:100vw}
}
@media (max-width:400px){
  .short-actions{bottom:130px;gap:5px}
  .short-action-btn{width:42px;padding:8px 3px 5px}
  .short-action-icon{font-size:18px}
  .short-action-count{font-size:10px}
  .short-bottom-info{bottom:110px}
  .short-author-bar{bottom:78px}
  .short-controls{padding:28px 8px calc(6px + env(safe-area-inset-bottom,0px))}
  .short-ctrl-btn{width:34px;height:34px;font-size:18px}
}

.sort-bar{display:flex;gap:8px;margin-top:14px}
.sort-link{
  display:inline-block;padding:6px 14px;border-radius:999px;
  border:1px solid var(--border);background:var(--panel);
  font-weight:700;font-size:13px;color:var(--muted);cursor:pointer;
  transition:all .12s;
}
.sort-link:hover{border-color:rgba(255,159,26,.3);color:var(--text)}
.sort-link--active{background:var(--accent);color:#111;border-color:var(--accent)}

.btn--ghost-small{
  display:inline-block;border-radius:999px;padding:4px 12px;
  border:1px solid var(--border);background:transparent;color:var(--muted);
  font-weight:600;cursor:pointer;font-size:12px;transition:all .12s;
}
.btn--ghost-small:hover{border-color:rgba(255,159,26,.3);color:var(--text)}
.btn--accent-small{
  display:inline-block;border-radius:999px;padding:4px 12px;
  border:0;background:var(--accent);color:#111;
  font-weight:600;cursor:pointer;font-size:12px;
}

/* Hamburger */
.hamburger{
  display:none;flex-direction:column;gap:4px;cursor:pointer;
  background:none;border:none;padding:6px;flex-shrink:0;
}
.hamburger span{
  display:block;width:22px;height:2px;border-radius:2px;
  background:var(--text);transition:all .2s;
}
.hamburger--open span:nth-child(1){transform:translateY(6px) rotate(45deg)}
.hamburger--open span:nth-child(2){opacity:0}
.hamburger--open span:nth-child(3){transform:translateY(-6px) rotate(-45deg)}

/* Mobile: <= 860px */
@media (max-width:860px){
  .hamburger{display:flex}
  .topbar__inner{flex-wrap:wrap;gap:8px}
  .search{order:10;flex:1 1 100%}
  .search__input{font-size:14px}
  .nav{
    display:none;order:11;flex:1 1 100%;flex-direction:column;gap:6px;
    padding:10px 0 4px;border-top:1px solid var(--border);margin-top:4px;
  }
  .nav--open{display:flex}
  .nav__link,.nav__btn{width:100%;text-align:left;padding:10px 0;border-radius:0;border:none;background:none}
  .nav__btn{color:var(--muted)}
  .nav__link--warn{color:var(--accent)}

  .grid{grid-template-columns:repeat(2,1fr)}
  .section__head{flex-wrap:wrap}
  .footer__inner{flex-direction:column;text-align:center;gap:6px}
}
@media (max-width:480px){
  .grid{grid-template-columns:1fr}
  .brand{font-size:15px}
  .h1{font-size:20px}
  .sort-link{font-size:12px;padding:5px 10px}
  .search__btn{padding:10px 10px;font-size:13px}
}

/* === Admin panel === */
.panel__header{
  font-weight:900;font-size:16px;margin-bottom:6px;
  display:flex;align-items:center;gap:8px;
}
.panel__icon{font-size:18px}

/* Colored left border per section type */
.panel--stats{border-left:3px solid var(--accent)}
.panel--pending{border-left:3px solid #f59e0b}
.panel--published{border-left:3px solid var(--ok)}
.panel--hidden{border-left:3px solid var(--muted)}
.panel--users{border-left:3px solid #3b82f6}
.panel--comments{border-left:3px solid #a855f7}
.panel--admin{border-left:3px solid var(--accent)}
.panel--reports{border-left:3px solid #ef4444}

/* Stat blocks */
.stat-block{display:flex;flex-direction:column;gap:2px}
.stat-block__label{font-size:11px;color:var(--muted);text-transform:uppercase;letter-spacing:.5px}
.stat-block__value{font-size:18px;font-weight:900}

/* Badges */
.badge{
  display:inline-block;padding:2px 8px;border-radius:999px;
  font-size:11px;font-weight:700;letter-spacing:.3px;
  vertical-align:middle;line-height:1.5;
}
.badge--super{background:rgba(255,159,26,.18);color:var(--accent);border:1px solid rgba(255,159,26,.35)}
.badge--admin{background:rgba(255,159,26,.12);color:var(--accent)}
.badge--banned{background:rgba(239,68,68,.15);color:var(--err)}
.badge--queued{background:rgba(167,167,179,.12);color:#a7a7b3}
.badge--processing{background:rgba(59,130,246,.15);color:#60a5fa}
.badge--pending{background:rgba(245,158,11,.15);color:#f59e0b}
.badge--failed{background:rgba(239,68,68,.15);color:#ef4444}
.badge--published{background:rgba(34,197,94,.12);color:#22c55e}
.badge--hidden{background:rgba(167,167,179,.12);color:#787885}

.btn--warn{
  border:1px solid rgba(239,68,68,.3);background:rgba(239,68,68,.08);color:var(--err);
}
.btn--warn:hover{background:rgba(239,68,68,.15);border-color:rgba(239,68,68,.5)}

/* Emoji grid scrollbar */
.emoji-scroll-grid{scrollbar-width:thin;scrollbar-color:var(--accent) transparent}
.emoji-scroll-grid::-webkit-scrollbar{width:6px}
.emoji-scroll-grid::-webkit-scrollbar-track{background:transparent}
.emoji-scroll-grid::-webkit-scrollbar-thumb{background:var(--accent);border-radius:3px}