/* ================================================
   VIDEOTUBE — Design System
   Aesthetic: Dark Editorial / Premium Streaming
   Typography: Clash Display + Cabinet Grotesk
   ================================================ */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --accent: #e63c2f;
  --accent-dark: #b52c21;
  --accent-light: rgba(230,60,47,0.12);
  --bg: #080808;
  --bg2: #0f0f0f;
  --bg3: #181818;
  --bg4: #222222;
  --bg5: #2a2a2a;
  --border: rgba(255,255,255,0.07);
  --border2: rgba(255,255,255,0.12);
  --text: #f5f5f5;
  --text2: #999;
  --text3: #555;
  --white: #ffffff;

  /* Typography */
  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Outfit', sans-serif;

  /* Spacing */
  --radius: 8px;
  --radius-sm: 5px;
  --radius-lg: 14px;
  --header-h: 58px;

  /* Effects */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow: 0 4px 20px rgba(0,0,0,0.5);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.6);
  --glow: 0 0 20px rgba(230,60,47,0.3);
}

/* ================================================
   RESET & BASE
   ================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; object-fit: cover; }
button { cursor: pointer; border: none; background: none; font-family: inherit; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 16px; color: inherit; }
::selection { background: var(--accent); color: white; }

/* ================================================
   HEADER
   ================================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(8,8,8,0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
}

.header-inner {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 16px;
  gap: 10px;
  max-width: 1600px;
  margin: 0 auto;
}

.btn-menu {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  flex-shrink: 0;
}
.btn-menu span {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--text2);
  transition: all .3s;
}
.btn-menu:hover span { background: var(--text); }

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-right: 4px;
}
.logo-mark {
  width: 28px;
  height: 28px;
  background: var(--accent);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-mark svg { width: 14px; height: 14px; fill: white; }
.logo-text {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--white);
  line-height: 1;
}

/* Search — hidden mobile, shown on toggle */
.search-wrap {
  display: none;
  flex: 1;
  max-width: 480px;
}
.search-wrap.show {
  display: flex;
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  padding: 12px 16px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  max-width: none;
}
.search-inner {
  display: flex;
  width: 100%;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg3);
}
.search-inner:focus-within { border-color: var(--accent); }
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  padding: 10px 14px;
  color: var(--text);
  font-size: 14px;
  outline: none;
}
.search-input::placeholder { color: var(--text3); }
.search-submit {
  background: var(--accent);
  border: none;
  padding: 0 16px;
  color: white;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: background .2s;
  font-family: var(--font-body);
}
.search-submit:hover { background: var(--accent-dark); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.btn-search-icon {
  padding: 8px;
  color: var(--text2);
  font-size: 18px;
  flex-shrink: 0;
  transition: color .2s;
}
.btn-search-icon:hover { color: var(--text); }
.btn-search-icon svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }

.btn-upload-hd {
  display: none;
  background: var(--accent);
  color: white;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: background .2s, transform .1s;
  white-space: nowrap;
}
.btn-upload-hd:hover { background: var(--accent-dark); transform: translateY(-1px); }

.btn-login-hd {
  padding: 7px 14px;
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text2);
  transition: all .2s;
  white-space: nowrap;
}
.btn-login-hd:hover { color: var(--text); border-color: var(--text3); }

.btn-register-hd { display: none; }

.user-avatar-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid transparent;
  transition: border-color .2s;
  flex-shrink: 0;
  cursor: pointer;
}
.user-avatar-btn:hover { border-color: var(--accent); }
.user-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

.user-menu { position: relative; }
.user-dropdown {
  display: none;
  position: fixed;
  top: var(--header-h);
  right: 0;
  min-width: 200px;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-top: none;
  box-shadow: var(--shadow-lg);
  z-index: 1001;
}
.user-dropdown.open { display: block; }
.user-dropdown a {
  display: block;
  padding: 12px 20px;
  font-size: 14px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  transition: all .15s;
}
.user-dropdown a:last-child { border-bottom: none; }
.user-dropdown a:hover { color: var(--text); background: var(--bg4); padding-left: 24px; }
.user-dropdown .dd-sep { border: none; border-top: 1px solid var(--border); margin: 4px 0; }

/* ================================================
   SIDEBAR
   ================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: 260px;
  height: 100vh;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1100;
  overflow-y: auto;
  scrollbar-width: none;
}
.sidebar::-webkit-scrollbar { display: none; }
.sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--white);
}
.sidebar-close-btn {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text3);
  font-size: 18px;
  border-radius: var(--radius-sm);
  transition: all .2s;
}
.sidebar-close-btn:hover { color: var(--text); background: var(--bg4); }

.sidebar-section { padding: 12px 0; border-bottom: 1px solid var(--border); }
.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  padding: 6px 20px 4px;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  border-left: 2px solid transparent;
  transition: all .15s;
}
.nav-link svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.nav-link:hover { color: var(--text); background: var(--bg3); border-left-color: var(--border2); }
.nav-link.active { color: var(--white); background: var(--accent-light); border-left-color: var(--accent); }

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 1050;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.show { display: block; }

/* ================================================
   LAYOUT
   ================================================ */
.main { padding-top: var(--header-h); min-height: 100vh; }
.container { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
.section { margin: 24px 0; }

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
}
.section-title {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 1px;
  color: var(--white);
}
.section-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  transition: opacity .2s;
}
.section-link:hover { opacity: 0.7; }

/* ================================================
   HERO
   ================================================ */
.hero {
  position: relative;
  height: 240px;
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.03);
  transition: transform 6s ease;
}
.hero:hover .hero-img { transform: scale(1); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(8,8,8,0.95) 0%,
    rgba(8,8,8,0.7) 50%,
    rgba(8,8,8,0.2) 100%
  );
}
.hero-overlay-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 20px 16px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 2px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 8px;
  width: fit-content;
}
.hero-tag::before {
  content: '';
  width: 6px; height: 6px;
  background: white;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}
.hero-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.5px;
  line-height: 1.2;
  margin-bottom: 8px;
  color: white;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.hero-meta span:nth-child(even) { color: var(--text3); }
.btn-play {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: white;
  color: var(--bg);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  width: fit-content;
  transition: all .2s;
  letter-spacing: 0.3px;
}
.btn-play:hover { background: var(--accent); color: white; transform: translateY(-1px); }
.btn-play svg { width: 14px; height: 14px; fill: currentColor; }

/* ================================================
   CATEGORY CHIPS
   ================================================ */
.cats-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.cats-row::-webkit-scrollbar { display: none; }
.cat-pill {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1px solid var(--border2);
  color: var(--text2);
  background: transparent;
  transition: all .2s;
  white-space: nowrap;
}
.cat-pill:hover { color: var(--text); border-color: var(--text3); }
.cat-pill.active { background: var(--accent); border-color: var(--accent); color: white; }

/* ================================================
   VIDEO CARDS — Grid
   ================================================ */
.video-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.v-card {
  background: var(--bg2);
  position: relative;
  transition: background .2s;
}
.v-card:hover { background: var(--bg3); }

.v-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg4);
}
.v-thumb img {
  width: 100%; height: 100%;
  transition: transform .4s ease;
}
.v-card:hover .v-thumb img { transform: scale(1.04); }
.v-dur {
  position: absolute;
  bottom: 7px; right: 7px;
  background: rgba(0,0,0,0.88);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.3px;
  font-family: var(--font-body);
}
.v-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s;
}
.v-card:hover .v-overlay { background: rgba(0,0,0,0.3); }
.v-play-btn {
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.92);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: all .2s;
}
.v-play-btn svg { width: 16px; height: 16px; fill: var(--bg); margin-left: 2px; }
.v-card:hover .v-play-btn { opacity: 1; transform: scale(1); }

.v-info {
  display: flex;
  gap: 10px;
  padding: 12px;
}
.v-avatar {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg4);
}
.v-avatar img { width: 100%; height: 100%; }
.v-meta { flex: 1; min-width: 0; }
.v-title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 3px;
  transition: color .2s;
}
.v-card:hover .v-title { color: var(--white); }
.v-channel {
  font-size: 12px;
  color: var(--text3);
  transition: color .2s;
}
.v-channel:hover { color: var(--text2); }
.v-stats { font-size: 11px; color: var(--text3); margin-top: 2px; }
.v-cat-badge {
  position: absolute;
  top: 8px; left: 8px;
  color: white;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 2px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* ================================================
   VIDEO LIST (compact)
   ================================================ */
.v-list { display: flex; flex-direction: column; }
.v-list-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: opacity .2s;
}
.v-list-item:last-child { border-bottom: none; }
.v-list-item:hover { opacity: 0.85; }
.v-list-thumb {
  flex-shrink: 0;
  width: 130px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg4);
  position: relative;
}
.v-list-thumb img { width: 100%; height: 100%; }
.v-list-dur {
  position: absolute;
  bottom: 4px; right: 4px;
  background: rgba(0,0,0,0.88);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 2px;
}
.v-list-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.v-list-title {
  font-size: 13px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  margin-bottom: 4px;
  color: var(--text);
}
.v-list-channel { font-size: 11px; color: var(--text3); margin-bottom: 2px; }
.v-list-stats { font-size: 11px; color: var(--text3); }

/* ================================================
   AD BANNER
   ================================================ */
.ad-strip {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  margin: 16px 0;
}
.ad-strip img { width: 100%; max-height: 80px; object-fit: cover; }
.ad-badge {
  position: absolute;
  top: 6px; right: 6px;
  background: rgba(0,0,0,0.75);
  color: var(--text3);
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 2px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

/* ================================================
   WATCH PAGE
   ================================================ */
.watch-page { padding-top: var(--header-h); }
.watch-grid {
  display: flex;
  flex-direction: column;
}
.watch-main { flex: 1; }

.player-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
}
.player-box video { width: 100%; height: 100%; display: block; }

/* Ad overlay */
.ad-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  background: #000;
}
.ad-layer video { width: 100%; height: 100%; }
.ad-controls {
  position: absolute;
  bottom: 14px; right: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
.ad-skip-btn {
  background: rgba(0,0,0,0.82);
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,0.2);
  cursor: pointer;
  font-family: var(--font-body);
  transition: background .2s;
}
.ad-skip-btn:hover { background: rgba(255,255,255,0.15); }
.ad-cta-btn {
  background: var(--accent);
  color: white;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
}

.watch-info { padding: 14px 16px; }
.watch-title {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.3px;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--white);
}
.watch-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.watch-views { font-size: 13px; color: var(--text2); }
.watch-btns { display: flex; gap: 6px; flex-wrap: wrap; }

.btn-icon {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  color: var(--text2);
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
  font-family: var(--font-body);
}
.btn-icon svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }
.btn-icon:hover, .btn-icon.active { background: var(--accent); border-color: var(--accent); color: white; }

.channel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.channel-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.channel-pic {
  width: 40px; height: 40px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg4);
  flex-shrink: 0;
}
.channel-pic img { width: 100%; height: 100%; }
.channel-name { font-size: 14px; font-weight: 600; color: var(--white); }
.channel-subs { font-size: 12px; color: var(--text3); }
.btn-sub {
  flex-shrink: 0;
  background: var(--white);
  color: var(--bg);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  transition: all .2s;
  white-space: nowrap;
  font-family: var(--font-body);
}
.btn-sub:hover { background: var(--accent); color: white; }
.btn-sub.subbed { background: var(--bg3); color: var(--text2); border: 1px solid var(--border); }

.desc-box { padding: 14px 0; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.desc-text { font-size: 13px; color: var(--text2); max-height: 56px; overflow: hidden; transition: max-height .3s; line-height: 1.6; }
.desc-text.open { max-height: 400px; }
.desc-more { font-size: 12px; font-weight: 700; color: var(--accent); margin-top: 8px; letter-spacing: 0.5px; cursor: pointer; }

/* Comments */
.comments { padding: 16px 0; }
.comments-heading { font-family: var(--font-display); font-size: 16px; letter-spacing: 0.5px; margin-bottom: 16px; color: var(--white); }
.comment-write { display: flex; gap: 10px; margin-bottom: 20px; }
.comment-avatar { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; background: var(--bg4); flex-shrink: 0; }
.comment-avatar img { width: 100%; height: 100%; }
.comment-field { flex: 1; }
.comment-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-size: 14px;
  padding: 6px 0;
  resize: none;
  outline: none;
  transition: border-color .2s;
  font-family: var(--font-body);
}
.comment-input:focus { border-color: var(--accent); }
.comment-submit {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}
.btn-comment {
  background: var(--accent);
  color: white;
  padding: 7px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-body);
  transition: background .2s;
}
.btn-comment:hover { background: var(--accent-dark); }

.comment-item { display: flex; gap: 10px; margin-bottom: 16px; }
.comment-body { flex: 1; }
.comment-who { display: flex; align-items: center; gap: 6px; margin-bottom: 3px; }
.comment-name { font-size: 13px; font-weight: 600; color: var(--text); }
.comment-when { font-size: 11px; color: var(--text3); }
.comment-text { font-size: 13px; color: var(--text2); line-height: 1.5; }
.comment-acts { display: flex; gap: 10px; margin-top: 5px; }
.comment-act-btn { font-size: 12px; font-weight: 600; color: var(--text3); transition: color .2s; font-family: var(--font-body); }
.comment-act-btn:hover { color: var(--text); }

/* Related sidebar */
.watch-aside { padding: 0 16px 24px; }
.aside-title { font-family: var(--font-display); font-size: 15px; letter-spacing: 0.5px; color: var(--white); margin-bottom: 14px; }
.rel-item { display: flex; gap: 8px; margin-bottom: 12px; }
.rel-thumb {
  flex-shrink: 0;
  width: 112px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg4);
  position: relative;
}
.rel-thumb img { width: 100%; height: 100%; }
.rel-dur {
  position: absolute;
  bottom: 3px; right: 3px;
  background: rgba(0,0,0,0.88);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
}
.rel-info { flex: 1; min-width: 0; }
.rel-title {
  font-size: 12px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 2px;
}
.rel-channel { font-size: 11px; color: var(--text3); }
.rel-stats { font-size: 11px; color: var(--text3); margin-top: 1px; }

/* ================================================
   UPLOAD PAGE
   ================================================ */
.upload-page { padding: var(--header-h) 0 40px; }
.upload-wrap {
  max-width: 680px;
  margin: 28px auto;
  padding: 0 16px;
}
.page-heading {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 1px;
  color: var(--white);
  margin-bottom: 24px;
}
.drop-zone {
  border: 1px dashed var(--border2);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  margin-bottom: 24px;
  background: var(--bg2);
}
.drop-zone:hover, .drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-light);
}
.drop-icon {
  width: 48px; height: 48px;
  margin: 0 auto 14px;
  background: var(--bg4);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
}
.drop-icon svg { width: 22px; height: 22px; stroke: var(--text3); fill: none; stroke-width: 1.5; }
.drop-label { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
.drop-hint { font-size: 12px; color: var(--text3); }

.progress-wrap { margin-bottom: 18px; }
.progress-track { background: var(--bg4); border-radius: 2px; height: 3px; margin-bottom: 5px; overflow: hidden; }
.progress-bar { height: 100%; background: var(--accent); width: 0%; transition: width .3s; }
.progress-label { font-size: 11px; color: var(--text3); }

.form-stack { display: flex; flex-direction: column; gap: 18px; margin-bottom: 24px; }
.form-field { display: flex; flex-direction: column; gap: 5px; }
.form-row { display: flex; flex-direction: column; gap: 18px; }
.field-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text3); }
.field-input, .field-select, .field-textarea {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
  width: 100%;
}
.field-input:focus, .field-select:focus, .field-textarea:focus { border-color: var(--accent); }
.field-select { appearance: none; cursor: pointer; }
.field-textarea { resize: vertical; min-height: 90px; }

.thumb-picker {
  aspect-ratio: 16/9;
  max-width: 220px;
  border: 1px dashed var(--border2);
  border-radius: var(--radius-sm);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: border-color .2s;
}
.thumb-picker:hover { border-color: var(--accent); }
.thumb-picker img { width: 100%; height: 100%; }
.thumb-picker-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--text3);
  font-weight: 600;
  letter-spacing: 0.5px;
  background: rgba(0,0,0,0.5);
}
.check-row { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; color: var(--text2); }
.check-row input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }

.btn-submit {
  width: 100%;
  background: var(--accent);
  color: white;
  padding: 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  transition: background .2s, transform .1s;
  font-family: var(--font-body);
}
.btn-submit:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-submit:disabled { background: var(--bg4); color: var(--text3); transform: none; cursor: not-allowed; }

/* ================================================
   ALERTS
   ================================================ */
.alert { padding: 12px 16px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.alert-error { background: rgba(230,60,47,0.1); border: 1px solid rgba(230,60,47,0.3); color: #f87171; }
.alert-success { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.3); color: #6ee7b7; }

/* ================================================
   AUTH PAGES
   ================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
}
.auth-brand {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo-mark {
  width: 44px; height: 44px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
}
.auth-logo-mark svg { width: 20px; height: 20px; fill: white; }
.auth-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 1px;
  color: var(--white);
  margin-bottom: 4px;
}
.auth-sub { font-size: 13px; color: var(--text3); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-input {
  width: 100%;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 13px 16px;
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color .2s;
  font-family: var(--font-body);
}
.auth-input:focus { border-color: var(--accent); }
.btn-auth {
  width: 100%;
  background: var(--accent);
  color: white;
  padding: 13px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--font-body);
  transition: background .2s;
}
.btn-auth:hover { background: var(--accent-dark); }
.auth-footer { text-align: center; font-size: 13px; color: var(--text3); margin-top: 20px; }
.auth-footer a { color: var(--accent); font-weight: 600; }

/* ================================================
   FOOTER
   ================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 16px;
  margin-top: 40px;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.footer-logo { font-family: var(--font-display); font-size: 18px; letter-spacing: 1px; color: var(--text3); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 12px; color: var(--text3); letter-spacing: 0.5px; transition: color .2s; }
.footer-links a:hover { color: var(--text2); }
.footer-copy { font-size: 11px; color: var(--text3); }

/* ================================================
   TABLET — 640px+
   ================================================ */
@media (min-width: 640px) {
  .hero { height: 320px; }
  .hero-title { font-size: 28px; }
  .hero-content { padding: 28px; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .btn-upload-hd { display: inline-flex; }
  .btn-register-hd {
    display: inline-block;
    padding: 7px 14px;
    background: var(--accent);
    color: white;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 600;
  }
  .search-wrap {
    display: flex;
    position: static;
    padding: 0;
    background: none;
    border: none;
    flex: 1;
    max-width: 400px;
  }
  .btn-search-icon { display: none; }
  .form-row { flex-direction: row; }
  .watch-info { padding: 16px 24px; }
  .watch-aside { padding: 0 24px 24px; }
}

/* ================================================
   DESKTOP — 960px+
   ================================================ */
@media (min-width: 960px) {
  :root { --header-h: 62px; }
  .header-inner { padding: 0 28px; gap: 16px; }
  .hero { height: 440px; }
  .hero-title { font-size: 36px; }
  .hero-content { padding: 48px; }
  .video-grid { grid-template-columns: repeat(3, 1fr); }
  .section-title { font-size: 22px; }
  .container { padding: 0 28px; }
  .watch-grid { flex-direction: row; gap: 28px; align-items: flex-start; }
  .watch-main { flex: 1; min-width: 0; }
  .watch-aside { width: 340px; flex-shrink: 0; padding: 24px 28px 24px 0; }
  .player-box { border-radius: var(--radius); overflow: hidden; }
  .watch-info { padding: 16px 0; }
  .search-wrap { max-width: 480px; }
}

/* ================================================
   WIDE — 1280px+
   ================================================ */
@media (min-width: 1280px) {
  .video-grid { grid-template-columns: repeat(4, 1fr); }
  .watch-aside { width: 380px; }
}
