/* ── CSS Variables ─────────────────────────────────────────────────────── */
:root {
  --g1: #00c853;
  --g2: #00e676;
  --g3: #69f0ae;
  --g4: #1b5e20;
  --g5: #2e7d32;
  --g6: #388e3c;
  --bg: #0a0f0a;
  --bg2: #111811;
  --bg3: #162016;
  --bg4: #1e291e;
  --card: #141f14;
  --card-hover: #1a291a;
  --border: #1e3a1e;
  --text: #e8f5e9;
  --text2: #a5d6a7;
  --text3: #81c784;
  --muted: #4a7c4a;
  --red: #ff5252;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,200,83,.08);
  --shadow-lg: 0 8px 40px rgba(0,200,83,.15);
  --nav-h: 60px;
  --sidebar-w: 240px;
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Nunito', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--g5); border-radius: 3px; }

/* ── NAVBAR ─────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(10,15,10,.92);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}

.nav-left { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-center { flex: 1; max-width: 640px; }

.hamburger {
  width: 40px; height: 40px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  border-radius: 50%; transition: background .2s;
}
.hamburger:hover { background: var(--bg3); }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; }

.logo { display: flex; align-items: center; gap: 8px; }
.logo-icon { font-size: 28px; line-height: 1; }
.logo-text {
  font-size: 20px; font-weight: 900; letter-spacing: -0.5px;
  background: linear-gradient(135deg, var(--g1), var(--g3));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.logo-text em { font-style: normal; }

.search-bar {
  display: flex; align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 40px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.search-bar:focus-within {
  border-color: var(--g1);
  box-shadow: 0 0 0 3px rgba(0,200,83,.15);
}
.search-bar input {
  flex: 1; padding: 10px 16px;
  background: none; border: none; outline: none;
  color: var(--text); font-size: 14px; font-family: inherit;
  min-width: 0;
}
.search-bar input::placeholder { color: var(--muted); }
.search-btn {
  padding: 10px 18px;
  background: var(--bg3);
  border-left: 1px solid var(--border);
  color: var(--text3);
  display: flex; align-items: center;
  transition: color .2s, background .2s;
}
.search-btn:hover { background: var(--g4); color: var(--g2); }
.search-btn svg { width: 18px; height: 18px; }

.btn-upload {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: var(--g1); color: #000;
  border-radius: 40px;
  font-weight: 800; font-size: 14px;
  transition: background .2s, transform .15s;
}
.btn-upload:hover { background: var(--g2); transform: translateY(-1px); }

.btn-login {
  padding: 8px 20px;
  border: 2px solid var(--g1); color: var(--g1);
  border-radius: 40px;
  font-weight: 700; font-size: 14px;
  transition: all .2s;
}
.btn-login:hover { background: var(--g1); color: #000; }

.user-menu { position: relative; }
.avatar-btn { width: 38px; height: 38px; border-radius: 50%; overflow: hidden; }
.avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar-placeholder {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--g4), var(--g1));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px; color: #000;
}
.dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 180px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: none; flex-direction: column;
  animation: fadeDown .15s ease;
}
.dropdown.open { display: flex; }
.dropdown-header { padding: 12px 16px; border-bottom: 1px solid var(--border); }
.dropdown-header strong { font-size: 14px; color: var(--g2); }
.dropdown a {
  padding: 10px 16px; font-size: 14px; font-weight: 600;
  transition: background .15s;
}
.dropdown a:hover { background: var(--bg3); }
.dropdown hr { border: none; border-top: 1px solid var(--border); }
.dropdown .logout { color: var(--red); }

/* ── SIDEBAR ─────────────────────────────────────────────────────────────── */
.sidebar {
  position: fixed; top: var(--nav-h); left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg);
  border-right: 1px solid var(--border);
  overflow-y: auto; overflow-x: hidden;
  transition: transform .3s ease;
  z-index: 90;
  padding: 12px 0;
}
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 8px; }
.nav-item {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: 14px; color: var(--text2);
  transition: all .15s;
}
.nav-item:hover { background: var(--bg3); color: var(--g2); }
.nav-item.active { background: var(--g4); color: var(--g1); }
.nav-item svg { flex-shrink: 0; }
.sidebar-divider { border: none; border-top: 1px solid var(--border); margin: 8px 0; }
.sidebar-label { padding: 4px 12px; font-size: 12px; font-weight: 800; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.sidebar-overlay { display: none; }

/* ── MAIN CONTENT ───────────────────────────────────────────────────────── */
.main-content {
  margin-top: var(--nav-h);
  margin-left: var(--sidebar-w);
  min-height: calc(100vh - var(--nav-h));
  padding: 24px;
  transition: margin-left .3s;
}

/* ── FLASH ──────────────────────────────────────────────────────────────── */
.flash-container { display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.flash {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px;
  animation: slideIn .2s ease;
}
.flash-success { background: rgba(0,200,83,.15); border: 1px solid var(--g5); color: var(--g2); }
.flash-error { background: rgba(255,82,82,.1); border: 1px solid rgba(255,82,82,.4); color: var(--red); }
.flash button { background: none; border: none; color: inherit; font-size: 16px; cursor: pointer; opacity: .7; }
.flash button:hover { opacity: 1; }

/* ── SECTION HEADERS ────────────────────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.section-title {
  font-size: 20px; font-weight: 900;
  display: flex; align-items: center; gap: 10px;
}
.section-title::before {
  content: '';
  display: block; width: 4px; height: 22px;
  background: linear-gradient(180deg, var(--g1), var(--g3));
  border-radius: 2px;
}
.see-all {
  font-size: 13px; font-weight: 700; color: var(--g1);
  padding: 6px 14px; border-radius: 40px;
  border: 1px solid var(--border);
  transition: all .15s;
}
.see-all:hover { background: var(--g4); border-color: var(--g1); }

/* ── FILTER TABS ────────────────────────────────────────────────────────── */
.filter-tabs {
  display: flex; gap: 8px; margin-bottom: 24px; flex-wrap: wrap;
}
.filter-tab {
  padding: 8px 18px;
  border-radius: 40px;
  font-weight: 700; font-size: 13px;
  background: var(--bg3);
  color: var(--text2);
  border: 1px solid var(--border);
  transition: all .15s;
}
.filter-tab:hover { border-color: var(--g1); color: var(--g1); }
.filter-tab.active { background: var(--g1); color: #000; border-color: var(--g1); }

/* ── VIDEO GRID ─────────────────────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.video-card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  cursor: pointer;
}
.video-card:hover {
  transform: translateY(-4px);
  border-color: var(--g5);
  box-shadow: var(--shadow-lg);
}
.video-card a { display: block; }

.thumb-wrap {
  position: relative;
  aspect-ratio: 16/9;
  background: var(--bg2);
  overflow: hidden;
}
.thumb-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.video-card:hover .thumb-wrap img { transform: scale(1.05); }
.thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px;
  background: linear-gradient(135deg, var(--bg3), var(--bg4));
  color: var(--g1);
}
.thumb-placeholder .play-icon { font-size: 40px; opacity: .6; }
.thumb-placeholder span { font-size: 12px; color: var(--muted); font-weight: 600; }

.video-badge {
  position: absolute; top: 8px; left: 8px;
  padding: 3px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 800; letter-spacing: .5px;
  background: var(--g1); color: #000;
}
.video-badge.short { background: #ff6d00; color: #fff; }

.play-overlay {
  position: absolute; inset: 0;
  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,.35); }
.play-btn-circle {
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(0,200,83,.9);
  display: flex; align-items: center; justify-content: center;
  transform: scale(0); transition: transform .2s;
  color: #000;
}
.video-card:hover .play-btn-circle { transform: scale(1); }

.card-info { padding: 12px 14px; }
.card-title {
  font-size: 14px; font-weight: 800; line-height: 1.35;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  margin-bottom: 8px;
}
.card-meta {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; color: var(--text3);
}
.card-author { font-weight: 700; color: var(--g1); }
.card-stats { display: flex; gap: 10px; }
.card-stats span { display: flex; align-items: center; gap: 4px; }

/* ── SHORTS ROW ─────────────────────────────────────────────────────────── */
.shorts-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}
.short-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  transition: transform .2s, border-color .2s;
  cursor: pointer;
}
.short-card:hover { transform: translateY(-4px); border-color: var(--g1); }
.short-thumb {
  aspect-ratio: 9/16;
  background: var(--bg2);
  position: relative; overflow: hidden;
}
.short-thumb img { width: 100%; height: 100%; object-fit: cover; }
.short-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, var(--bg3), var(--g4));
  font-size: 48px; opacity: .4;
}
.short-info { padding: 10px; }
.short-title { font-size: 12px; font-weight: 700; color: var(--text); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.short-views { font-size: 11px; color: var(--muted); margin-top: 4px; font-weight: 600; }

/* ── WATCH PAGE ─────────────────────────────────────────────────────────── */
.watch-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 24px;
  max-width: 1400px;
}
.video-player-wrap {
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: var(--video-ratio, 16/9);
  width: 100%;
}
.video-player-wrap video {
  width: 100%; height: 100%;
  display: block;
  object-fit: contain;
}
.shorts-player-wrap {
  max-height: 80vh;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
  display: flex; justify-content: center;
}
.shorts-player-wrap video { height: 80vh; max-width: 100%; }

.video-player-wrap .plyr,
.shorts-player-wrap .plyr {
  width: 100%;
  height: 100%;
}

.video-player-wrap .plyr video,
.shorts-player-wrap .plyr video {
  object-fit: contain;
}

.video-info { margin-top: 16px; }
.video-title { font-size: 20px; font-weight: 900; line-height: 1.3; margin-bottom: 12px; }

.video-meta-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.channel-info { display: flex; align-items: center; gap: 12px; }
.channel-avatar {
  width: 42px; height: 42px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--g4), var(--g1));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 18px; color: #000; flex-shrink: 0;
}
.channel-avatar img { width: 100%; height: 100%; object-fit: cover; }
.channel-name { font-weight: 800; font-size: 15px; }
.channel-date { font-size: 12px; color: var(--muted); font-weight: 600; }

.action-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.action-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px;
  border-radius: 40px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text); font-weight: 700; font-size: 13px;
  transition: all .15s;
}
.action-btn:hover { border-color: var(--g1); color: var(--g1); }
.action-btn.liked { background: rgba(0,200,83,.15); border-color: var(--g1); color: var(--g1); }
.action-btn.danger { color: var(--red); }
.action-btn.danger:hover { border-color: var(--red); background: rgba(255,82,82,.08); }

.video-description {
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 14px;
  font-size: 14px; line-height: 1.7; color: var(--text2);
  white-space: pre-wrap;
}
.video-stats-bar {
  display: flex; gap: 20px; margin-top: 10px; margin-bottom: 12px;
  font-size: 13px; color: var(--muted); font-weight: 600;
}

.tags-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tag {
  padding: 4px 12px;
  background: rgba(0,200,83,.1);
  border: 1px solid var(--g5);
  border-radius: 40px;
  font-size: 12px; font-weight: 700; color: var(--g3);
}

/* Related */
.related-list { display: flex; flex-direction: column; gap: 12px; }
.related-card {
  display: flex; gap: 10px;
  background: var(--card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color .15s;
}
.related-card:hover { border-color: var(--g5); }
.related-thumb {
  width: 120px; flex-shrink: 0;
  aspect-ratio: 16/9;
  background: var(--bg2);
  overflow: hidden;
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-thumb-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: var(--g1); opacity: .4;
}
.related-info { padding: 8px; flex: 1; min-width: 0; }
.related-title { font-size: 12px; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.related-author { font-size: 11px; color: var(--g1); margin-top: 4px; font-weight: 700; }
.related-views { font-size: 11px; color: var(--muted); font-weight: 600; }

/* ── AUTH PAGES ─────────────────────────────────────────────────────────── */
.auth-page {
  min-height: calc(100vh - var(--nav-h));
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 40px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.auth-logo { text-align: center; margin-bottom: 8px; font-size: 40px; }
.auth-title { text-align: center; font-size: 24px; font-weight: 900; margin-bottom: 4px; }
.auth-subtitle { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 32px; font-weight: 600; }

.form-group { margin-bottom: 20px; }
.form-label { display: block; font-size: 13px; font-weight: 800; color: var(--text3); margin-bottom: 6px; letter-spacing: .3px; }
.form-input {
  width: 100%; padding: 12px 14px;
  background: var(--bg2); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text); font-size: 14px; font-family: inherit;
  outline: none; transition: border-color .2s, box-shadow .2s;
}
.form-input:focus {
  border-color: var(--g1);
  box-shadow: 0 0 0 3px rgba(0,200,83,.12);
}
.form-input::placeholder { color: var(--muted); }
textarea.form-input { resize: vertical; min-height: 100px; }

.btn-primary {
  width: 100%; padding: 13px;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  color: #000; border: none;
  border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 800; font-family: inherit;
  cursor: pointer; transition: opacity .2s, transform .15s;
}
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: var(--muted); font-weight: 600; }
.auth-switch a { color: var(--g1); font-weight: 800; }

/* ── UPLOAD PAGE ────────────────────────────────────────────────────────── */
.upload-page { max-width: 720px; margin: 0 auto; }
.page-title { font-size: 28px; font-weight: 900; margin-bottom: 24px; }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 48px;
  text-align: center;
  transition: border-color .2s, background .2s;
  cursor: pointer;
  position: relative;
}
.upload-zone:hover, .upload-zone.dragging {
  border-color: var(--g1);
  background: rgba(0,200,83,.04);
}
.upload-zone input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-zone-icon { font-size: 56px; margin-bottom: 12px; }
.upload-zone-text { font-size: 16px; font-weight: 700; color: var(--text2); }
.upload-zone-sub { font-size: 13px; color: var(--muted); margin-top: 6px; font-weight: 600; }
.upload-zone-selected { margin-top: 10px; font-size: 13px; color: var(--g2); font-weight: 700; }

.form-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 20px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.toggle-wrap { display: flex; align-items: center; gap: 12px; }
.toggle-wrap input[type=checkbox] { display: none; }
.toggle {
  width: 48px; height: 26px; border-radius: 13px;
  background: var(--bg3); border: 1px solid var(--border);
  position: relative; cursor: pointer; transition: background .2s;
}
.toggle::after {
  content: ''; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--muted); transition: transform .2s, background .2s;
}
input:checked + .toggle { background: rgba(0,200,83,.2); border-color: var(--g1); }
input:checked + .toggle::after { transform: translateX(22px); background: var(--g1); }
.toggle-label { font-size: 14px; font-weight: 700; color: var(--text2); }

/* ── CHANNEL PAGE ───────────────────────────────────────────────────────── */
.channel-header {
  background: linear-gradient(135deg, var(--bg3), var(--g4));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  display: flex; align-items: center; gap: 24px;
  margin-bottom: 32px;
}
.channel-big-avatar {
  width: 90px; height: 90px; border-radius: 50%;
  background: linear-gradient(135deg, var(--g4), var(--g1));
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; font-weight: 900; color: #000; flex-shrink: 0;
  overflow: hidden;
}
.channel-big-avatar img { width: 100%; height: 100%; object-fit: cover; }
.channel-header-info h1 { font-size: 28px; font-weight: 900; }
.channel-header-info p { color: var(--text3); font-size: 14px; margin-top: 6px; font-weight: 600; }
.channel-stats { display: flex; gap: 24px; margin-top: 12px; }
.channel-stat { text-align: center; }
.channel-stat .val { font-size: 22px; font-weight: 900; color: var(--g1); }
.channel-stat .lbl { font-size: 11px; color: var(--muted); font-weight: 700; }

.channel-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.ch-tab {
  padding: 12px 24px;
  font-weight: 800; font-size: 14px; color: var(--muted);
  border-bottom: 3px solid transparent;
  transition: all .15s; cursor: pointer;
}
.ch-tab.active { color: var(--g1); border-bottom-color: var(--g1); }

/* ── SHORTS PAGE ────────────────────────────────────────────────────────── */
.shorts-page-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.big-short-card {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--border);
  transition: transform .2s, border-color .2s;
}
.big-short-card:hover { transform: translateY(-4px); border-color: var(--g1); }
.big-short-thumb { aspect-ratio: 9/16; background: var(--bg2); overflow: hidden; position: relative; }
.big-short-thumb img { width: 100%; height: 100%; object-fit: cover; }
.big-short-ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 64px; background: linear-gradient(180deg, var(--bg3), var(--g4)); opacity: .5; }
.big-short-info { padding: 12px; }
.big-short-title { font-size: 13px; font-weight: 800; line-height: 1.3; }
.big-short-author { font-size: 11px; color: var(--g1); margin-top: 5px; font-weight: 700; }
.big-short-views { font-size: 11px; color: var(--muted); margin-top: 3px; font-weight: 600; }

/* Shorts feed (YouTube-like) */
.shorts-feed {
  height: calc(100vh - var(--nav-h) - 20px);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 0;
}

.shorts-item {
  min-height: calc(100vh - var(--nav-h) - 24px);
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
}

.shorts-video-shell {
  width: min(100%, 440px);
  height: 100%;
  max-height: calc(100vh - var(--nav-h) - 24px);
  border-radius: 16px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  position: relative;
  box-shadow: var(--shadow-lg);
}

.shorts-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.shorts-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.72));
}

.shorts-overlay h3 {
  font-size: 16px;
  font-weight: 900;
  margin-top: 8px;
}

.shorts-overlay p {
  color: #d5e8d5;
  font-size: 12px;
  margin-top: 5px;
  font-weight: 700;
}

.shorts-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Shorts list page */
.shorts-list-feed {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.shorts-list-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .2s, border-color .2s;
}

.shorts-list-card:hover {
  transform: translateY(-3px);
  border-color: var(--g5);
}

.shorts-list-video-wrap {
  position: relative;
  display: block;
  aspect-ratio: 9/16;
  background: #000;
}

.shorts-list-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.shorts-list-info {
  padding: 10px;
}

.shorts-list-title {
  font-size: 13px;
  font-weight: 800;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.shorts-list-meta {
  margin-top: 6px;
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
  font-weight: 700;
}

.shorts-list-meta a {
  color: var(--g1);
}

.shorts-list-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── SETTINGS ───────────────────────────────────────────────────────────── */
.settings-page { max-width: 600px; }
.settings-section { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.settings-section-title { font-size: 16px; font-weight: 900; margin-bottom: 20px; color: var(--g2); }

/* ── EMPTY STATE ────────────────────────────────────────────────────────── */
.empty-state { text-align: center; padding: 80px 20px; color: var(--muted); }
.empty-state-icon { font-size: 64px; margin-bottom: 16px; opacity: .5; }
.empty-state h3 { font-size: 20px; font-weight: 800; color: var(--text2); margin-bottom: 8px; }
.empty-state p { font-size: 14px; font-weight: 600; }

/* ── SEARCH RESULTS ─────────────────────────────────────────────────────── */
.search-header { margin-bottom: 20px; }
.search-query { font-size: 22px; font-weight: 900; }
.search-query span { color: var(--g1); }
.search-count { font-size: 13px; color: var(--muted); font-weight: 600; margin-top: 4px; }

/* ── ANIMATIONS ─────────────────────────────────────────────────────────── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(0,200,83,.4); }
  50% { box-shadow: 0 0 0 8px rgba(0,200,83,0); }
}
.pulse { animation: pulse 1.5s infinite; }

/* ── PROGRESS BAR ───────────────────────────────────────────────────────── */
#upload-progress { display: none; margin-top: 16px; }
.progress-bar-wrap { height: 6px; background: var(--bg3); border-radius: 3px; overflow: hidden; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, var(--g1), var(--g2)); width: 0%; transition: width .3s; border-radius: 3px; }
.progress-text { font-size: 12px; color: var(--muted); text-align: center; margin-top: 6px; font-weight: 700; }

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .watch-layout { grid-template-columns: 1fr; }
  .related-section { display: none; }
}
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 89; opacity: 0; pointer-events: none; transition: opacity .3s; }
  .sidebar-overlay.visible { opacity: 1; pointer-events: all; }
  .main-content { margin-left: 0; padding: 16px; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .nav-center { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .shorts-feed {
    height: calc(100vh - var(--nav-h) - 12px);
    gap: 10px;
  }
  .shorts-item {
    min-height: calc(100vh - var(--nav-h) - 12px);
  }
  .shorts-video-shell {
    width: 100%;
    max-height: calc(100vh - var(--nav-h) - 12px);
    border-radius: 12px;
  }
}
@media (max-width: 480px) {
  .video-grid { grid-template-columns: 1fr; }
  .shorts-row { grid-template-columns: repeat(2, 1fr); }
  .channel-header { flex-direction: column; text-align: center; }
  .channel-stats { justify-content: center; }
}