/* ════════════════════════════════════════
   RedNova — Styles
   ════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ─── VARIABLES ─── */
:root {
  --bg         : #09090b;
  --bg2        : #0f0f12;
  --bg3        : #16161a;
  --bg4        : #1c1c22;
  --border     : #222228;
  --border2    : #2a2a33;
  --accent     : #c0392b;
  --accent2    : #e74c3c;
  --accent-dim : rgba(192,57,43,.15);
  --text       : #eae8e5;
  --text2      : #b0aca7;
  --muted      : #6b6865;
  --card       : #111115;
  --card2      : #171719;
  --radius     : 10px;
  --radius-sm  : 6px;
  --radius-lg  : 14px;
  --shadow     : 0 4px 24px rgba(0,0,0,.45);
  --shadow-lg  : 0 12px 48px rgba(0,0,0,.65);
  --fdisp      : 'DM Serif Display', serif;
  --fbody      : 'DM Sans', sans-serif;
  --header-h   : 58px;
  --cats-h     : 44px;
}

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 15px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--fbody);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: var(--fbody); border: none; background: none; }
input, textarea, select { font-family: var(--fbody); }
img { display: block; max-width: 100%; }
video { display: block; }

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* ════════════════════════════════════════
   AGE GATE
   ════════════════════════════════════════ */
#age-gate {
  position: fixed; inset: 0;
  background: radial-gradient(ellipse at center, #0d0d10 0%, #050507 70%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  padding: 20px;
}
.age-inner {
  text-align: center;
  max-width: 400px;
  width: 100%;
  animation: fadeUp .5s ease both;
}
.age-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 80px; height: 80px;
  background: var(--accent-dim);
  border: 1.5px solid rgba(192,57,43,.4);
  border-radius: 50%;
  font-family: var(--fdisp);
  font-size: 28px;
  font-style: italic;
  color: var(--accent2);
  margin: 0 auto 22px;
}
.age-logo {
  font-family: var(--fdisp);
  font-size: 36px;
  color: var(--accent2);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.age-logo span { color: var(--text); }
.age-inner h2 { font-size: 18px; font-weight: 500; margin-bottom: 10px; }
.age-inner p  { color: var(--muted); font-size: 13px; margin-bottom: 28px; line-height: 1.7; }
.age-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-age-yes {
  background: var(--accent);
  color: #fff;
  padding: 13px 36px;
  border-radius: var(--radius);
  font-size: 14px; font-weight: 600;
  transition: background .2s, transform .15s;
  white-space: nowrap;
}
.btn-age-yes:hover { background: var(--accent2); transform: translateY(-1px); }
.btn-age-no {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border2);
  padding: 13px 28px;
  border-radius: var(--radius);
  font-size: 14px;
  transition: all .2s;
  white-space: nowrap;
}
.btn-age-no:hover { border-color: var(--muted); color: var(--text2); }
.age-fine { font-size: 11px; color: var(--muted); margin-top: 18px; line-height: 1.6; }

/* ════════════════════════════════════════
   MAIN APP
   ════════════════════════════════════════ */
#app { display: none; min-height: 100vh; }

/* ─── HEADER ─── */
header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(9,9,11,.92);
  backdrop-filter: blur(18px) saturate(1.5);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex; align-items: center; gap: 16px;
}
.logo {
  font-family: var(--fdisp);
  font-size: 24px;
  color: var(--accent2);
  letter-spacing: -.5px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  white-space: nowrap;
}
.logo span { color: var(--text); }
.search-wrap {
  flex: 1;
  min-width: 0;
  max-width: 480px;
  position: relative;
}
.search-icon {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  flex-shrink: 0;
}
.search-wrap input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px 8px 38px;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color .2s, background .2s;
}
.search-wrap input:focus { border-color: var(--accent); background: var(--bg4); }
.search-wrap input::placeholder { color: var(--muted); }
.header-right {
  margin-left: auto;
  flex-shrink: 0;
  display: flex; gap: 8px; align-items: center;
}
.btn-header {
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  transition: all .2s;
  white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.btn-header:hover { border-color: var(--accent); color: var(--accent2); }

/* ─── CATEGORIES BAR ─── */
.cats-bar {
  height: var(--cats-h);
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  display: flex; align-items: center; gap: 2px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  position: sticky;
  top: var(--header-h);
  z-index: 90;
}
.cats-bar::-webkit-scrollbar { display: none; }
.cat-btn {
  height: 32px;
  padding: 0 14px;
  border-radius: 6px;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  transition: all .18s;
  flex-shrink: 0;
  display: flex; align-items: center; gap: 5px;
}
.cat-btn:hover { color: var(--text); background: var(--bg4); }
.cat-btn.active {
  color: var(--accent2);
  background: var(--accent-dim);
  border: 1px solid rgba(192,57,43,.25);
}
.cat-btn .cat-count {
  font-size: 10px;
  background: var(--bg4);
  border-radius: 10px;
  padding: 1px 6px;
  color: var(--muted);
}
.cat-btn.active .cat-count { background: rgba(192,57,43,.2); color: var(--accent2); }

/* ─── SORT BAR ─── */
.sort-bar {
  padding: 16px 20px 0;
  max-width: 1480px;
  margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.sort-title {
  font-family: var(--fdisp);
  font-size: 20px; font-weight: 400;
  display: flex; align-items: baseline; gap: 10px;
}
.sort-count { font-size: 13px; color: var(--muted); font-family: var(--fbody); }
.sort-controls { display: flex; gap: 6px; flex-wrap: wrap; }
.sort-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px; font-weight: 500;
  color: var(--muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  transition: all .18s;
  white-space: nowrap;
}
.sort-btn:hover { color: var(--text); border-color: var(--border2); }
.sort-btn.active { color: var(--accent2); border-color: rgba(192,57,43,.4); background: var(--accent-dim); }

/* ─── MAIN ─── */
main { padding: 16px 20px 40px; max-width: 1480px; margin: 0 auto; }

/* ─── VIDEO GRID ─── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 18px;
  margin-top: 16px;
}

/* ─── VIDEO CARD ─── */
.video-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .2s, border-color .2s, box-shadow .2s;
  animation: cardIn .3s ease both;
  position: relative;
}
.video-card:hover {
  transform: translateY(-3px);
  border-color: var(--border2);
  box-shadow: var(--shadow-lg);
}
.thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg3);
  overflow: hidden;
  flex-shrink: 0;
}
.thumb-wrap > img,
.thumb-wrap > video,
.thumb-wrap .preview-media {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.thumb-wrap .preview-media {
  z-index: 2;
  animation: fadeIn .2s ease;
}
.video-card:hover .thumb-wrap > img { transform: scale(1.05); }
.thumb-placeholder {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--bg3) 0%, var(--bg) 100%);
}
.thumb-placeholder svg { opacity: .2; }

/* Badges */
.badge {
  position: absolute;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: .4px;
  z-index: 3;
  line-height: 1.6;
}
.badge-dur  { bottom: 7px; right: 7px; background: rgba(0,0,0,.82); color: #fff; }
.badge-qual { top: 7px; right: 7px; background: var(--accent); color: #fff; }
.badge-new  { top: 7px; left: 7px; background: #16a34a; color: #fff; }

/* Play overlay */
.play-overlay {
  position: absolute; inset: 0; z-index: 3;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0);
  transition: background .2s;
}
.video-card:hover .play-overlay { background: rgba(0,0,0,.28); }
.play-btn {
  width: 48px; height: 48px;
  background: rgba(255,255,255,.14);
  border: 1.5px solid rgba(255,255,255,.22);
  border-radius: 50%;
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.75);
  transition: opacity .2s, transform .2s;
}
.video-card:hover .play-btn { opacity: 1; transform: scale(1); }

/* Card body */
.card-body { padding: 11px 13px 13px; }
.card-title {
  font-size: 13.5px; font-weight: 500;
  line-height: 1.45;
  margin-bottom: 8px;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  display: flex; gap: 6px; align-items: center;
  flex-wrap: wrap;
}
.cat-chip {
  font-size: 11px; font-weight: 500;
  color: var(--accent2);
  background: var(--accent-dim);
  border: 1px solid rgba(192,57,43,.2);
  border-radius: 4px;
  padding: 2px 7px;
  white-space: nowrap;
}
.meta-text { font-size: 11.5px; color: var(--muted); }
.meta-sep  { color: var(--border2); font-size: 10px; }
.views-badge {
  font-size: 11px; color: var(--muted);
  display: flex; align-items: center; gap: 3px;
}

/* ─── EMPTY STATE ─── */
.empty-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty-state svg { margin: 0 auto 16px; opacity: .2; }
.empty-state h3 { font-size: 17px; font-weight: 500; margin-bottom: 6px; color: var(--text2); }
.empty-state p  { font-size: 13px; }

/* ─── PAGINATION ─── */
.pagination {
  display: flex; justify-content: center;
  gap: 5px; margin-top: 36px; flex-wrap: wrap;
}
.pag-btn {
  min-width: 36px; height: 36px; padding: 0 8px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius-sm);
  font-size: 13px;
  transition: all .18s;
  display: flex; align-items: center; justify-content: center;
  white-space: nowrap;
}
.pag-btn:hover:not(:disabled) { border-color: var(--border2); color: var(--text); }
.pag-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pag-btn:disabled { opacity: .3; cursor: default; }
.pag-sep { color: var(--muted); align-self: center; font-size: 13px; padding: 0 4px; }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 22px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 40px;
}
footer a { transition: color .2s; }
footer a:hover { color: var(--text2); }
.footer-links { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-top: 6px; }

/* ════════════════════════════════════════
   VIDEO MODAL
   ════════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.88);
  padding: 16px;
  overflow-y: auto;
  align-items: flex-start;
  justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal-wrap {
  position: relative;
  width: 100%; max-width: 920px;
  margin: auto;
  animation: fadeUp .22s ease both;
}
.modal-close {
  position: absolute; top: -42px; right: 0;
  width: 34px; height: 34px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--text);
  border-radius: 50%;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s;
  z-index: 5;
}
.modal-close:hover { background: rgba(255,255,255,.16); }
.modal-box {
  background: var(--bg2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border2);
  overflow: hidden;
}
.player-wrap {
  background: #000;
  aspect-ratio: 16/9;
  width: 100%;
  position: relative;
}
.player-wrap video,
.player-wrap iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none;
}
.modal-info { padding: 18px 22px 22px; }
.modal-title {
  font-family: var(--fdisp);
  font-size: 21px; font-weight: 400;
  margin-bottom: 10px;
  line-height: 1.35;
}
.modal-meta {
  display: flex; gap: 10px;
  flex-wrap: wrap; align-items: center;
  margin-bottom: 12px;
}
.modal-meta .meta-text { font-size: 13px; }
.modal-desc { font-size: 13.5px; color: var(--text2); line-height: 1.7; }
.modal-url {
  margin-top: 12px;
  font-size: 12px; color: var(--muted);
  display: flex; align-items: center; gap: 6px;
  word-break: break-all;
}
.modal-url a { color: var(--muted); text-decoration: underline; text-decoration-color: var(--border2); }
.modal-url a:hover { color: var(--text2); }

/* ════════════════════════════════════════
   ADMIN LOGIN
   ════════════════════════════════════════ */
.modal-overlay-admin {
  display: none;
  position: fixed; inset: 0; z-index: 400;
  background: rgba(0,0,0,.82);
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay-admin.open { display: flex; }
.login-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  width: 100%; max-width: 360px;
  animation: fadeUp .22s ease both;
}
.login-box h3 {
  font-size: 17px; font-weight: 600;
  margin-bottom: 22px;
  display: flex; align-items: center; gap: 8px;
}
.error-msg {
  background: rgba(231,76,60,.1);
  border: 1px solid rgba(231,76,60,.25);
  color: #e74c3c;
  border-radius: 7px;
  padding: 9px 13px;
  font-size: 13px;
  display: none;
  margin-bottom: 14px;
}
.error-msg.show { display: block; }

/* ════════════════════════════════════════
   ADMIN PANEL
   ════════════════════════════════════════ */
#admin-panel {
  display: none;
  position: fixed; inset: 0; z-index: 300;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: hidden;
}
.admin-header {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  height: 58px;
  display: flex; align-items: center; gap: 12px;
}
.admin-badge {
  background: var(--accent);
  color: #fff; font-size: 10px;
  font-weight: 700; letter-spacing: 1px;
  padding: 3px 8px; border-radius: 4px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.admin-header-right {
  margin-left: auto;
  display: flex; gap: 8px; align-items: center;
  flex-wrap: wrap;
}
.admin-tabs {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
  display: flex; gap: 2px;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-tabs::-webkit-scrollbar { display: none; }
.admin-tab {
  padding: 12px 18px;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: all .18s;
  white-space: nowrap;
  margin-bottom: -1px;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active { color: var(--accent2); border-bottom-color: var(--accent2); }
.admin-content { max-width: 960px; margin: 0 auto; padding: 28px 20px 60px; }
.admin-pane { display: none; }
.admin-pane.active { display: block; }

/* Admin cards */
.admin-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}
.admin-card h3 {
  font-size: 15px; font-weight: 600;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.admin-card h3 .card-badge {
  margin-left: auto;
  font-size: 11px; font-weight: 500;
  color: var(--muted);
  background: var(--bg3);
  border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 10px;
}

/* Stats grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px; margin-bottom: 24px;
}
.stat-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  text-align: center;
}
.stat-num { font-family: var(--fdisp); font-size: 34px; color: var(--accent2); line-height: 1; }
.stat-lbl { font-size: 11px; color: var(--muted); margin-top: 5px; text-transform: uppercase; letter-spacing: .5px; }

/* Forms */
.form-grid { display: grid; gap: 14px; margin-bottom: 16px; }
.form-grid.g2 { grid-template-columns: 1fr 1fr; }
.form-grid.g3 { grid-template-columns: 1fr 1fr 1fr; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label {
  font-size: 11px; font-weight: 600; letter-spacing: .4px;
  text-transform: uppercase; color: var(--muted);
}
.form-label small { font-weight: 400; text-transform: none; font-size: 10.5px; letter-spacing: 0; }
.form-control {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 13px;
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color .2s, background .2s;
  width: 100%;
}
.form-control:focus  { border-color: var(--accent); background: var(--bg4); }
.form-control::placeholder { color: var(--muted); }
textarea.form-control { resize: vertical; min-height: 76px; }
select.form-control option { background: var(--bg3); }
.hint { font-size: 11px; color: var(--muted); margin-top: 3px; }

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  position: relative;
}
.upload-zone:hover { border-color: var(--accent); background: var(--accent-dim); }
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-zone p { color: var(--muted); font-size: 13px; margin-top: 8px; }
.upload-zone strong { color: var(--accent2); }

/* Thumb preview */
.thumb-preview {
  aspect-ratio: 16/9;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  position: relative;
}
.thumb-preview img,
.thumb-preview video { width: 100%; height: 100%; object-fit: cover; }
.thumb-preview-ph { font-size: 12px; color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600;
  transition: all .18s;
  white-space: nowrap;
  border: 1px solid transparent;
  cursor: pointer; font-family: var(--fbody);
  text-decoration: none;
}
.btn-primary   { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover   { background: var(--accent2); border-color: var(--accent2); transform: translateY(-1px); }
.btn-secondary { background: var(--bg3); color: var(--text2); border-color: var(--border2); }
.btn-secondary:hover { border-color: var(--muted); color: var(--text); }
.btn-ghost  { background: transparent; color: var(--muted); border-color: var(--border); }
.btn-ghost:hover  { border-color: var(--border2); color: var(--text2); }
.btn-danger { background: transparent; color: #e74c3c; border-color: rgba(231,76,60,.3); }
.btn-danger:hover { background: rgba(231,76,60,.1); border-color: #e74c3c; }
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-xs { padding: 4px 10px; font-size: 11px; border-radius: 4px; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Category tags */
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; min-height: 32px; }
.tag-item {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 6px 5px 12px;
  font-size: 12.5px;
  display: flex; align-items: center; gap: 5px;
  animation: fadeIn .2s ease both;
}
.tag-item button {
  color: var(--muted); font-size: 13px; line-height: 1;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px;
  transition: color .15s, background .15s;
}
.tag-item button:hover { color: var(--accent2); background: var(--accent-dim); }
.cat-add-row { display: flex; gap: 8px; align-items: flex-start; }
.cat-add-row .form-control { flex: 1; min-width: 0; }

/* Video table */
.vtable-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.vtable {
  width: 100%; border-collapse: collapse;
  font-size: 13px; min-width: 560px;
}
.vtable th {
  text-align: left; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--muted); padding: 0 12px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.vtable td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.vtable tr:last-child td { border-bottom: none; }
.vtable tbody tr:hover td { background: rgba(255,255,255,.015); }
.vtable-thumb {
  width: 76px; height: 43px;
  border-radius: 4px; overflow: hidden;
  background: var(--bg3); flex-shrink: 0;
}
.vtable-thumb img { width: 100%; height: 100%; object-fit: cover; }
.vtable-title-cell { display: flex; gap: 10px; align-items: center; }
.vtable-title-text {
  font-weight: 500; max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.vtable-slug { font-size: 11px; color: var(--muted); margin-top: 2px; font-family: monospace; }
.vtable-actions { display: flex; gap: 6px; align-items: center; }

/* URL slug display */
.slug-preview {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 12px;
  color: var(--muted);
  font-family: monospace;
  margin-top: 5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.slug-preview span { color: var(--accent2); }

/* ─── VIDEO UPLOAD ZONE ─── */
.video-upload-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color .2s, background .2s;
  overflow: hidden;
  position: relative;
  user-select: none;
}
.video-upload-zone:hover,
.video-upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.video-upload-zone.has-file {
  border-style: solid;
  border-color: var(--border2);
  cursor: default;
}
.video-upload-zone.has-file:hover { background: transparent; }
.vuz-idle {
  padding: 36px 20px;
  text-align: center;
  pointer-events: none;
}
.vuz-icon {
  width: 64px; height: 64px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  color: var(--muted);
  transition: border-color .2s, color .2s;
}
.video-upload-zone:hover .vuz-icon,
.video-upload-zone.drag-over .vuz-icon { border-color: rgba(192,57,43,.4); color: var(--accent2); }
.vuz-main { font-size: 14px; font-weight: 500; color: var(--text2); margin-bottom: 5px; }
.vuz-sub  { font-size: 12px; color: var(--muted); }
.vuz-selected { padding: 14px 16px; pointer-events: none; }
.vuz-file-info { display: flex; align-items: center; gap: 12px; }
.vuz-file-icon {
  font-size: 24px; flex-shrink: 0;
  width: 44px; height: 44px;
  background: var(--bg3);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.vuz-file-details { flex: 1; min-width: 0; }
.vuz-file-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.vuz-file-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.vuz-clear-btn {
  pointer-events: all;
  width: 30px; height: 30px; flex-shrink: 0;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--muted); font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  transition: all .18s; cursor: pointer;
}
.vuz-clear-btn:hover { border-color: var(--accent); color: var(--accent2); background: var(--accent-dim); }
.vuz-progress-wrap {
  margin-top: 10px;
  display: flex; align-items: center; gap: 10px;
}
.vuz-progress-bar {
  flex: 1; height: 5px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.vuz-progress-fill {
  height: 100%; width: 0%; background: var(--accent2);
  border-radius: 3px; transition: width .2s;
}
.vuz-progress-label { font-size: 11px; color: var(--muted); flex-shrink: 0; min-width: 34px; text-align: right; }
.dur-auto-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(22,163,74,.12);
  border: 1px solid rgba(22,163,74,.3);
  border-radius: 5px; padding: 3px 9px;
  font-size: 11.5px; color: #4ade80; margin-top: 5px;
}

/* Export/Import */
.export-area {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 12px; font-family: monospace;
  color: var(--text2);
  resize: vertical; min-height: 120px; width: 100%;
  outline: none;
}
.export-area:focus { border-color: var(--accent); }

/* Toast */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  min-width: 220px; max-width: 340px;
  transform: translateY(12px) scale(.96);
  opacity: 0;
  transition: all .28s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
}
.toast.show { transform: translateY(0) scale(1); opacity: 1; }
.toast.success { border-left: 3px solid #16a34a; }
.toast.error   { border-left: 3px solid var(--accent); }
.toast.info    { border-left: 3px solid #3b82f6; }
.toast-icon { font-size: 16px; flex-shrink: 0; }

/* Confirm dialog */
.confirm-box {
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  width: 100%; max-width: 360px;
  animation: fadeUp .2s ease both;
  text-align: center;
}
.confirm-box h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.confirm-box p  { color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.confirm-btns   { display: flex; gap: 10px; justify-content: center; }

/* ─── ANIMATIONS ─── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */
@media (max-width: 900px) {
  .form-grid.g3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  :root { --header-h: 54px; }
  header { padding: 0 12px; gap: 10px; }
  .logo { font-size: 20px; }
  .search-wrap { max-width: none; }
  .btn-header span { display: none; }
  main { padding: 12px 12px 40px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .card-body { padding: 8px 9px 10px; }
  .card-title { font-size: 12px; -webkit-line-clamp: 2; }
  .sort-bar { padding: 12px 12px 0; }
  .form-grid.g2, .form-grid.g3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-content { padding: 16px 12px 50px; }
  .login-box { padding: 24px 20px; }
  .modal-close { top: -38px; }
  .admin-card { padding: 18px 16px; }
  .modal-info { padding: 14px 16px 18px; }
  .modal-title { font-size: 18px; }
}
@media (max-width: 400px) {
  .video-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .age-btns { flex-direction: column; align-items: center; }
  .btn-age-yes, .btn-age-no { width: 100%; max-width: 260px; }
  .admin-header-right .btn-secondary { padding: 6px 10px; font-size: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

/* ─── TOUCH FEEDBACK ─── */
@media (hover: none) {
  .video-card:active { transform: scale(.97); }
  .btn-primary:active { transform: scale(.97); }
}
