/* =================================================
   BHARATVIDEO – Design System
   India's Own Video Platform
   Clean · Modern · YouTube-Inspired
   ================================================= */

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

/* ─── CSS Custom Properties ─── */
:root {
  /* Brand */
  --brand:        #FF5722;
  --brand-dark:   #E64A19;
  --brand-light:  #FFF3E0;
  --brand-alpha:  rgba(255, 87, 34, 0.12);

  /* Backgrounds */
  --bg:           #FFFFFF;
  --bg-2:         #F9F9F9;
  --bg-hover:     #F2F2F2;
  --bg-active:    #E8E8E8;

  /* Text */
  --tx-1:         #0F0F0F;
  --tx-2:         #606060;
  --tx-3:         #AAAAAA;

  /* Border */
  --border:       #E5E5E5;

  /* Layout */
  --nav-h:        56px;
  --sb-w:         240px;
  --sb-mini:      72px;

  /* Spacing (4px base) */
  --s1:  4px;
  --s2:  8px;
  --s3:  12px;
  --s4:  16px;
  --s5:  20px;
  --s6:  24px;
  --s7:  28px;
  --s8:  32px;
  --s10: 40px;
  --s12: 48px;
  --s16: 64px;

  /* Radius */
  --r-xs:   4px;
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-2xl:  24px;
  --r-full: 9999px;

  /* Shadows */
  --sh-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --sh-md: 0 4px 12px rgba(0,0,0,0.08);
  --sh-lg: 0 8px 24px rgba(0,0,0,0.10);
  --sh-xl: 0 20px 40px rgba(0,0,0,0.12);

  /* Transitions */
  --t-fast: 150ms ease;
  --t-base: 250ms ease;
  --t-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Font */
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ─── Reset ─── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--tx-1);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

a { text-decoration: none; color: inherit; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--brand);
  border-radius: var(--r-full);
  opacity: 0.5;
}
::-webkit-scrollbar-thumb:hover { background: var(--brand-dark); }
* { scrollbar-width: thin; scrollbar-color: var(--brand) transparent; }

/* ─── Focus visible ─── */
:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* ─── Utility ─── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}


/* =================================================
   NAVBAR
   ================================================= */

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 var(--s4);
  gap: var(--s3);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--t-base);
}

.navbar.scrolled {
  box-shadow: var(--sh-md);
}

/* — Nav Left — */
.nav-left {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-shrink: 0;
  min-width: 0;
}

/* Hamburger */
.hamburger {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--r-full);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  transition: background var(--t-fast);
}
.hamburger:hover { background: var(--bg-hover); }
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--tx-1);
  border-radius: var(--r-full);
  transition: var(--t-base);
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: clamp(18px, 2.5vw, 22px);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--tx-1);
  text-decoration: none;
  white-space: nowrap;
}
.logo-icon {
  width: 30px;
  height: 30px;
  background: var(--brand);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.logo-icon svg { width: 16px; height: 16px; color: #fff; }
.logo-text span { color: var(--brand); }

/* — Nav Center (Search) — */
.nav-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 580px;
  margin: 0 auto;
}

.search-wrap {
  display: flex;
  width: 100%;
  max-width: 560px;
}

.search-input {
  flex: 1;
  height: 40px;
  padding: 0 var(--s4);
  border: 1.5px solid var(--border);
  border-right: none;
  border-radius: var(--r-full) 0 0 var(--r-full);
  background: var(--bg-2);
  color: var(--tx-1);
  font-size: 15px;
  outline: none;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.search-input::placeholder { color: var(--tx-3); }
.search-input:focus {
  border-color: var(--brand);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.search-btn {
  height: 40px;
  padding: 0 var(--s5);
  border: 1.5px solid var(--border);
  border-radius: 0 var(--r-full) var(--r-full) 0;
  background: var(--bg-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
  flex-shrink: 0;
}
.search-btn:hover { background: var(--bg-active); }
.search-btn svg { width: 20px; height: 20px; color: var(--tx-1); }

/* Search clear button */
.search-clear {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--tx-3);
  border-radius: var(--r-full);
  align-items: center;
  justify-content: center;
  transition: color var(--t-fast), background var(--t-fast);
  flex-shrink: 0;
  z-index: 1;
}
.search-clear:hover { color: var(--tx-1); background: var(--bg-hover); }
.search-clear svg { width: 16px; height: 16px; }
.search-clear.visible { display: flex; }

/* Mobile search icon */
.mobile-search-btn {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--r-full);
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
  flex-shrink: 0;
  color: var(--tx-1);
}
.mobile-search-btn:hover { background: var(--bg-hover); }
.mobile-search-btn svg { width: 22px; height: 22px; }

/* — Nav Right — */
.nav-right {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-shrink: 0;
}

/* Icon buttons */
.nav-icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tx-1);
  transition: background var(--t-fast);
}
.nav-icon-btn:hover { background: var(--bg-hover); }
.nav-icon-btn svg { width: 22px; height: 22px; }
.nav-icon-btn .notif-badge {
  position: absolute;
  top: 6px; right: 6px;
  width: 14px; height: 14px;
  background: var(--brand);
  border-radius: var(--r-full);
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg);
}

/* Login / Sign Up */
.btn-login {
  height: 36px;
  padding: 0 var(--s4);
  border: 1.5px solid var(--brand);
  border-radius: var(--r-full);
  background: none;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--s2);
  transition: background var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}
.btn-login:hover { background: var(--brand-light); }
.btn-login svg { width: 16px; height: 16px; }

.btn-signup {
  height: 36px;
  padding: 0 var(--s4);
  border: none;
  border-radius: var(--r-full);
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background var(--t-fast), transform var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}
.btn-signup:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

/* Mobile search expansion */
.navbar.search-mode .nav-left .logo-text,
.navbar.search-mode .nav-right { display: none; }
.navbar.search-mode .nav-center { display: flex; }
.navbar.search-mode .nav-center .search-close {
  display: flex;
  margin-left: var(--s2);
}
.search-close {
  display: none;
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--r-full);
  align-items: center;
  justify-content: center;
  color: var(--tx-1);
  flex-shrink: 0;
  transition: background var(--t-fast);
}
.search-close:hover { background: var(--bg-hover); }
.search-close svg { width: 20px; height: 20px; }


/* =================================================
   SIDEBAR
   ================================================= */

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 89;
  opacity: 0;
  transition: opacity var(--t-slow);
}
.sidebar-overlay.visible {
  opacity: 1;
}

.sidebar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  bottom: 0;
  width: var(--sb-mini);
  background: var(--bg);
  z-index: 90;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--s2) 0 var(--s8);
  transition: width var(--t-slow);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Mini mode – icons only */
.sidebar .item-label,
.sidebar .sb-section-label,
.sidebar .sb-divider { 
  opacity: 0;
  pointer-events: none;
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  transition: opacity var(--t-slow), max-width var(--t-slow);
}

/* Full mode */
body.sb-open .sidebar {
  width: var(--sb-w);
}
body.sb-open .sidebar .item-label,
body.sb-open .sidebar .sb-section-label {
  opacity: 1;
  pointer-events: auto;
  max-width: 200px;
}
body.sb-open .sidebar .sb-divider {
  opacity: 1;
  max-width: 100%;
}

/* Main content offset */
.main-wrap {
  margin-left: var(--sb-mini);
  padding-top: var(--nav-h);
  min-height: 100vh;
  transition: margin-left var(--t-slow);
}
body.sb-open .main-wrap {
  margin-left: var(--sb-w);
}

/* Sidebar structure */
/*
 * Horizontal inset is owned by the SECTION (padding: 0 var(--s2)),
 * so every child — whether <a> or <button> — gets identical width:100%.
 * This is the only way to guarantee pixel-perfect alignment across
 * different element types without relying on browser-specific width math.
 */
.sb-section {
  padding: var(--s1) var(--s2);   /* 8 px left + right inset for ALL items */
}
.sb-divider {
  height: 1px;
  background: var(--border);
  margin: var(--s2) var(--s2);    /* match section's horizontal padding */
  transition: opacity var(--t-slow);
}
.sb-section-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--tx-3);
  padding: var(--s3) var(--s3) var(--s1);  /* left-aligns with icon edge */
  text-transform: uppercase;
  letter-spacing: 0.7px;
  white-space: nowrap;
  overflow: hidden;
}

/* ── Single reusable sidebar item ── */
.sb-item {
  /* Layout */
  display: flex;
  align-items: center;
  justify-content: center;          /* icon-centred in mini mode */
  gap: var(--s4);                   /* 16 px between icon and label */
  height: 40px;

  /* Sizing – 100 % of .sb-section's content area (already inset 8 px each side) */
  width: 100%;
  box-sizing: border-box;           /* identical for <a> and <button> */
  margin: 1px 0;                    /* only vertical micro-gap between items */
  padding: 0 var(--s3);             /* 12 px left/right keeps icon readable in mini mode */

  /* Appearance */
  border-radius: var(--r-sm);
  cursor: pointer;
  color: var(--tx-1);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;             /* reset browser button font */
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-decoration: none;
  text-align: left;
  -webkit-appearance: none;        /* remove Safari/Chrome button chrome */
  appearance: none;
  border: none;
  background: none;
  transition: background var(--t-fast);
}
body.sb-open .sidebar .sb-item { justify-content: flex-start; }
.sb-item:hover  { background: var(--bg-hover); }
.sb-item.active { background: var(--bg-active); font-weight: 600; }
.sb-item svg    { width: 20px; height: 20px; flex-shrink: 0; }
.item-label     { flex: 1; min-width: 0; }


/* =================================================
   CATEGORY CHIPS BAR
   ================================================= */

.chips-bar {
  position: sticky;
  top: var(--nav-h);
  z-index: 80;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: var(--s3) var(--s5);
  display: flex;
  gap: var(--s2);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.chips-bar::-webkit-scrollbar { display: none; }

.chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 var(--s4);
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  background: var(--bg-active);
  color: var(--tx-1);
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
  flex-shrink: 0;
}
.chip:hover {
  background: var(--tx-1);
  color: var(--bg);
  transform: translateY(-1px);
}
.chip.active {
  background: var(--tx-1);
  color: var(--bg);
}


/* =================================================
   FEED / PAGE CONTENT
   ================================================= */

.feed { padding: var(--s4) var(--s5); }

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s4);
  margin-top: var(--s8);
}
.section-row:first-child { margin-top: var(--s4); }

.section-title {
  font-size: clamp(16px, 1.8vw, 19px);
  font-weight: 700;
  color: var(--tx-1);
}
.section-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
  text-decoration: none;
  flex-shrink: 0;
}
.section-link:hover { text-decoration: underline; }


/* =================================================
   VIDEO GRID
   ================================================= */

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
  gap: var(--s5) var(--s4);
}


/* =================================================
   VIDEO CARD
   ================================================= */

.v-card {
  cursor: pointer;
  border-radius: var(--r-md);
  overflow: visible;
  transition: transform var(--t-base);
  background: none;
  border: none;
  text-align: left;
  width: 100%;
  text-decoration: none;
  color: inherit;
  display: block;
}
.v-card:hover { transform: translateY(-3px); }
.v-card:hover .v-thumb { box-shadow: var(--sh-lg); }
.v-card:hover .v-thumb-bg { transform: scale(1.04); }

/* Thumbnail */
.v-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--bg-active);
  transition: box-shadow var(--t-base);
}
.v-thumb-bg {
  position: absolute;
  inset: 0;
  transition: transform 0.4s ease;
}
.v-duration {
  position: absolute;
  bottom: var(--s2);
  right: var(--s2);
  background: rgba(0,0,0,0.82);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--r-xs);
  letter-spacing: 0.2px;
  font-variant-numeric: tabular-nums;
}

/* Card body */
.v-body {
  display: flex;
  gap: var(--s3);
  padding: var(--s3) var(--s1) 0;
}
.v-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-top: 2px;
  text-decoration: none;
}
.v-ch-link {
  color: var(--tx-2);
  text-decoration: none;
  transition: color var(--t-fast);
}
.v-ch-link:hover { color: var(--tx-1); }
.v-info { flex: 1; min-width: 0; }
.v-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--tx-1);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 4px;
}
.v-channel {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--tx-2);
  margin-bottom: 2px;
}
.v-verified {
  width: 13px;
  height: 13px;
  color: var(--tx-2);
  flex-shrink: 0;
}
.v-meta { font-size: 13px; color: var(--tx-2); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.v-lang {
  display: inline-flex;
  align-items: center;
  height: 17px;
  padding: 0 6px;
  border-radius: var(--r-full);
  background: var(--bg-active);
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 600;
  color: var(--tx-2);
  letter-spacing: 0.2px;
  white-space: nowrap;
}


/* =================================================
   FEATURED (large 2-col grid)
   ================================================= */

.featured-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s4);
}
.f-card {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  display: block;                  /* anchor reset */
  text-decoration: none;           /* anchor reset */
  color: inherit;                  /* anchor reset */
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.f-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sh-xl);
}
.f-bg { position: absolute; inset: 0; }
.f-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 35%,
    rgba(0,0,0,0.85) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: var(--s5) var(--s5) var(--s4);
  color: #fff;
}
.f-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--r-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--s2);
  width: fit-content;
}
.f-title {
  font-size: clamp(13px, 1.4vw, 17px);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--s2);
}
.f-meta {
  font-size: 12px;
  opacity: 0.80;
  display: flex;
  gap: var(--s3);
  flex-wrap: wrap;
}
.f-duration {
  position: absolute;
  top: var(--s3);
  right: var(--s3);
  background: rgba(0,0,0,0.80);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--r-xs);
}


/* =================================================
   CREATORS STRIP
   ================================================= */

.creators-strip {
  display: flex;
  gap: var(--s5);
  overflow-x: auto;
  padding-bottom: var(--s2);
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.creators-strip::-webkit-scrollbar { display: none; }

.cr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  cursor: pointer;
  flex-shrink: 0;
  width: 80px;
  transition: transform var(--t-base);
  text-align: center;
  text-decoration: none;
  color: inherit;
}
.cr-card:hover { transform: translateY(-3px); }
.cr-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  box-shadow: var(--sh-md);
  flex-shrink: 0;
  border: 3px solid var(--bg);
  outline: 2px solid var(--border);
}
.cr-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--tx-1);
  max-width: 76px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cr-subs { font-size: 11px; color: var(--tx-2); }


/* =================================================
   FOOTER  – minimal two-line centred design
   ================================================= */

.site-footer {
  margin-top: var(--s10);
  padding: var(--s8) var(--s5) var(--s7);
  border-top: 1px solid var(--border);
  text-align: center;
}

/* Line 1 – Made with ❤️ · Created by Faizan Ali */
.footer-credit-line {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  font-size: 13px;
  color: var(--tx-2);
  margin-bottom: var(--s2);
  line-height: 1.6;
}

/* Line 2 – © 2026 */
.footer-copy-line {
  font-size: 12px;
  color: var(--tx-3);
  line-height: 1.4;
}

/* Creator hyperlink */
.creator-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--brand);
  font-weight: 700;
  text-decoration: none;
  vertical-align: middle;
  transition: color var(--t-fast), transform var(--t-fast);
}
.creator-link:hover {
  color: var(--brand-dark);
  transform: translateY(-1px);
}
.creator-link svg { width: 13px; height: 13px; flex-shrink: 0; }


/* =================================================
   EMPTY STATE
   ================================================= */

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--s16) var(--s5);
  text-align: center;
  gap: var(--s4);
}
.empty-icon {
  width: 72px;
  height: 72px;
  background: var(--bg-active);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tx-3);
}
.empty-icon svg { width: 36px; height: 36px; }
.empty-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--tx-1);
}
.empty-sub {
  font-size: 14px;
  color: var(--tx-2);
  max-width: 320px;
  line-height: 1.6;
}
.empty-action {
  height: 38px;
  padding: 0 var(--s6);
  border-radius: var(--r-full);
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}
.empty-action:hover { background: var(--brand-dark); transform: translateY(-1px); }


/* =================================================
   BACK TO TOP
   ================================================= */

.btt-btn {
  position: fixed;
  bottom: var(--s8);
  right: var(--s6);
  z-index: 300;
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  border: none;
  background: var(--tx-1);
  color: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--sh-lg);
  opacity: 0;
  transform: translateY(12px) scale(0.85);
  pointer-events: none;
  transition: opacity var(--t-base), transform var(--t-base), background var(--t-fast);
}
.btt-btn.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.btt-btn:hover { background: var(--brand); transform: translateY(-2px) scale(1.05); }
.btt-btn svg { width: 20px; height: 20px; }


/* =================================================
   LOGIN DIALOG
   ================================================= */

.dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-base);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.dialog-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.dialog-box {
  background: var(--bg);
  border-radius: var(--r-2xl);
  padding: var(--s8);
  width: 100%;
  max-width: 400px;
  box-shadow: var(--sh-xl);
  text-align: center;
  transform: scale(0.92) translateY(16px);
  transition: transform var(--t-base);
  position: relative;
}
.dialog-overlay.open .dialog-box {
  transform: scale(1) translateY(0);
}

.dialog-close-btn {
  position: absolute;
  top: var(--s3);
  right: var(--s3);
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tx-2);
  transition: background var(--t-fast), color var(--t-fast);
}
.dialog-close-btn:hover { background: var(--bg-hover); color: var(--tx-1); }
.dialog-close-btn svg { width: 18px; height: 18px; }

.dialog-logo {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: var(--s5);
}
.dialog-logo span { color: var(--brand); }

.dialog-icon-wrap {
  width: 56px;
  height: 56px;
  background: var(--brand-light);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--s4);
}
.dialog-icon-wrap svg { width: 28px; height: 28px; color: var(--brand); }

.dialog-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: var(--s2);
}
.dialog-body {
  font-size: 14px;
  color: var(--tx-2);
  line-height: 1.6;
  margin-bottom: var(--s6);
}

.dialog-actions {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}
.d-btn-primary {
  width: 100%;
  height: 44px;
  border-radius: var(--r-full);
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast);
}
.d-btn-primary:hover { background: var(--brand-dark); transform: translateY(-1px); }

.d-btn-secondary {
  width: 100%;
  height: 44px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--border);
  background: none;
  color: var(--tx-1);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--t-fast);
}
.d-btn-secondary:hover { background: var(--bg-hover); }


/* =================================================
   AUTH PAGES
   ================================================= */

.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
}

.auth-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 var(--s5);
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.auth-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s8) var(--s4);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg);
  border-radius: var(--r-2xl);
  padding: var(--s8);
  box-shadow: var(--sh-lg);
  border: 1px solid var(--border);
}

.auth-logo {
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  margin-bottom: var(--s6);
  display: block;
  text-decoration: none;
  color: var(--tx-1);
}
.auth-logo span { color: var(--brand); }

.auth-title {
  font-size: clamp(20px, 3vw, 24px);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--s1);
}
.auth-sub {
  font-size: 14px;
  color: var(--tx-2);
  text-align: center;
  margin-bottom: var(--s6);
}

/* — Form Elements — */
.form-group { margin-bottom: var(--s4); }

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--tx-1);
  margin-bottom: var(--s2);
}

.input-wrap { position: relative; }

.form-input {
  width: 100%;
  height: 46px;
  padding: 0 var(--s4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--tx-1);
  font-size: 15px;
  outline: none;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-input::placeholder { color: var(--tx-3); }
.form-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-alpha);
}
.form-input.has-btn { padding-right: 48px; }
.form-input.is-error { border-color: #E53935; box-shadow: 0 0 0 3px rgba(229,57,53,0.10); }
.form-input.is-ok    { border-color: #43A047; }

/* Toggle button inside input */
.input-action {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tx-3);
  border-radius: var(--r-sm);
  padding: 0;
  transition: color var(--t-fast);
}
.input-action:hover { color: var(--tx-1); }
.input-action svg { width: 18px; height: 18px; }

/* Error message */
.field-error {
  font-size: 12px;
  color: #E53935;
  margin-top: 5px;
  display: none;
}
.field-error.show { display: block; }

/* Password strength meter */
.pw-strength { margin-top: var(--s2); display: none; }
.pw-strength.show { display: block; }
.strength-bars {
  display: flex;
  gap: 4px;
  margin-bottom: 5px;
}
.s-bar {
  flex: 1;
  height: 3px;
  border-radius: var(--r-full);
  background: var(--border);
  transition: background var(--t-base);
}
.s-bar.weak   { background: #E53935; }
.s-bar.fair   { background: #FB8C00; }
.s-bar.good   { background: #7CB342; }
.s-bar.strong { background: #43A047; }
.strength-text { font-size: 12px; color: var(--tx-2); }

/* Select */
.form-select {
  width: 100%;
  height: 46px;
  padding: 0 40px 0 var(--s4);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23606060' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  appearance: none;
  -webkit-appearance: none;
  color: var(--tx-1);
  font-size: 15px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.form-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-alpha);
}
.form-select.is-error { border-color: #E53935; }

/* Remember / Forgot row */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--s4);
}
.remember-me {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: 14px;
  color: var(--tx-2);
  cursor: pointer;
  user-select: none;
}
.remember-me input[type="checkbox"] {
  accent-color: var(--brand);
  width: 15px;
  height: 15px;
  cursor: pointer;
}
.link-accent {
  font-size: 14px;
  font-weight: 500;
  color: var(--brand);
  text-decoration: none;
  transition: opacity var(--t-fast);
}
.link-accent:hover { opacity: 0.8; text-decoration: underline; }

/* Primary button */
.btn-submit {
  width: 100%;
  height: 48px;
  border-radius: var(--r-full);
  border: none;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: var(--s2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  transition: background var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.btn-submit:hover:not(:disabled) {
  background: var(--brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255,87,34,0.30);
}
.btn-submit:active { transform: translateY(0); }
.btn-submit:disabled { opacity: 0.60; cursor: not-allowed; transform: none; }
.btn-submit.loading .btn-label { display: none; }
.btn-submit .btn-spinner { display: none; }
.btn-submit.loading .btn-spinner { display: block; }

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: var(--r-full);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Divider */
.or-divider {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin: var(--s5) 0;
}
.or-divider::before, .or-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.or-divider span {
  font-size: 13px;
  color: var(--tx-3);
}

/* Auth footer text */
.auth-footer-text {
  text-align: center;
  margin-top: var(--s5);
  font-size: 14px;
  color: var(--tx-2);
}


/* =================================================
   OTP PAGE
   ================================================= */

.otp-box { text-align: center; }

.otp-hint {
  font-size: 14px;
  color: var(--tx-2);
  margin-bottom: var(--s6);
  line-height: 1.6;
}
.otp-hint strong { color: var(--tx-1); }

.otp-inputs {
  display: flex;
  gap: var(--s3);
  justify-content: center;
  margin-bottom: var(--s5);
}
.otp-digit {
  width: 52px;
  height: 58px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border: 2px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  color: var(--tx-1);
  outline: none;
  caret-color: var(--brand);
  transition: border-color var(--t-fast), box-shadow var(--t-fast), transform var(--t-fast);
}
.otp-digit:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-alpha);
  transform: scale(1.05);
}
.otp-digit.filled {
  border-color: #43A047;
  background: #F1F8E9;
}
.otp-digit.is-error {
  border-color: #E53935;
  background: #FFEBEE;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.otp-timer {
  font-size: 14px;
  color: var(--tx-2);
  margin-bottom: var(--s5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
}
.countdown-val { font-weight: 700; color: var(--brand); }
.resend-btn {
  display: none;
  background: none;
  border: none;
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
}
.resend-btn.show { display: inline; }


/* =================================================
   ANIMATIONS
   ================================================= */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}

.fade-up { animation: fadeUp 0.4s ease both; }

/* Stagger for grids */
.stagger > * { animation: fadeUp 0.4s ease both; }
.stagger > *:nth-child(1)  { animation-delay: 0.04s; }
.stagger > *:nth-child(2)  { animation-delay: 0.08s; }
.stagger > *:nth-child(3)  { animation-delay: 0.12s; }
.stagger > *:nth-child(4)  { animation-delay: 0.16s; }
.stagger > *:nth-child(5)  { animation-delay: 0.20s; }
.stagger > *:nth-child(6)  { animation-delay: 0.24s; }
.stagger > *:nth-child(7)  { animation-delay: 0.28s; }
.stagger > *:nth-child(8)  { animation-delay: 0.32s; }
.stagger > *:nth-child(9)  { animation-delay: 0.36s; }
.stagger > *:nth-child(10) { animation-delay: 0.40s; }
.stagger > *:nth-child(11) { animation-delay: 0.44s; }
.stagger > *:nth-child(12) { animation-delay: 0.48s; }


/* =================================================
   RESPONSIVE BREAKPOINTS
   ================================================= */

/* ── Sidebar: Mobile (<1024px) ── */
@media (max-width: 1023px) {
  .sidebar {
    width: var(--sb-w) !important;
    transform: translateX(-100%);
    border-right: 1px solid var(--border);
  }
  body.sb-open .sidebar { transform: translateX(0); }

  body.sb-open .sidebar-overlay {
    display: block;
    opacity: 1;
  }

  .main-wrap { margin-left: 0 !important; }

  /* Always show labels on mobile sidebar */
  body.sb-open .sidebar .item-label,
  body.sb-open .sidebar .sb-section-label,
  body.sb-open .sidebar .sb-divider {
    opacity: 1;
    pointer-events: auto;
    max-width: 200px;
  }
  body.sb-open .sidebar .sb-item { justify-content: flex-start; }
}

/* ── Tablet (768–1279px): hide signup button text ── */
@media (max-width: 1279px) {
  .btn-signup-text { display: none; }
}

/* ── Mobile (≤639px) ── */
@media (max-width: 639px) {
  .nav-center      { display: none; }
  .mobile-search-btn { display: flex; }
  .btn-signup      { display: none; }

  .feed { padding: var(--s3); }

  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr));
    gap: var(--s3);
  }
  .v-avatar { width: 28px; height: 28px; font-size: 10px; }
  .v-title  { font-size: 13px; }
  .v-channel, .v-meta { font-size: 12px; }

  .featured-grid { grid-template-columns: 1fr; }

  .auth-card { padding: var(--s5) var(--s4); border-radius: var(--r-xl); }

  .otp-digit { width: 44px; height: 50px; font-size: 20px; }
  .otp-inputs { gap: var(--s2); }

  .chips-bar { padding: var(--s2) var(--s3); }
  .chip { font-size: 13px; height: 30px; padding: 0 12px; }

  /* Hide language badges in grid cards on mobile to save space */
  .v-lang { display: none; }
}

/* ── Small phones (≤419px) ── */
@media (max-width: 419px) {
  .logo-text { display: none; }
  .otp-digit { width: 40px; height: 46px; font-size: 18px; }
  .otp-inputs { gap: var(--s1); }
  /* Hide language badge in watch stats bar on tiny screens */
  .lang-badge { display: none; }
}

/* ── Large screens (≥1536px) ── */
@media (min-width: 1536px) {
  .video-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

/* ── Search mode (mobile expanded) ── */
.navbar.search-mode {
  gap: 0;
}
.navbar.search-mode .nav-center {
  display: flex;
  flex: 1;
  max-width: none;
  margin: 0;
}
.navbar.search-mode .nav-left .logo-text,
.navbar.search-mode .nav-right,
.navbar.search-mode .mobile-search-btn { display: none; }
.navbar.search-mode .search-close { display: flex; }

/* ── Scrollbar for sidebar ── */
.sidebar::-webkit-scrollbar { display: none; }


/* =================================================
   SEARCH SUGGESTIONS DROPDOWN
   ================================================= */

.search-suggest-wrap {
  position: relative;
  flex: 1;
  display: flex;
}
.search-suggest-wrap .search-input { width: 100%; }

.suggest-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xl);
  z-index: 150;
  overflow: hidden;
  display: none;
  animation: fadeUp 0.15s ease;
}
.suggest-dropdown.open { display: block; }

.suggest-item {
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  cursor: pointer;
  text-decoration: none;
  color: var(--tx-1);
  transition: background var(--t-fast);
}
.suggest-item:hover { background: var(--bg-hover); }
.suggest-item svg { width: 16px; height: 16px; color: var(--tx-3); flex-shrink: 0; }
.suggest-item span { font-size: 14px; }
.suggest-trending {
  font-size: 11px;
  color: var(--brand);
  font-weight: 700;
  margin-left: auto;
  flex-shrink: 0;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}


/* =================================================
   WATCH PAGE
   ================================================= */

.watch-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 402px;
  gap: var(--s5);
  padding: var(--s5);
  align-items: start;
}
.watch-col { min-width: 0; }

/* ─ Real HTML5 video player ─ */
.player-container {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: #000;
  -webkit-user-select: none;
  user-select: none;
}

.bv-video-el {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* Watermark floats over the video */
.player-wm {
  position: absolute;
  bottom: 48px;           /* above native controls bar */
  right: var(--s4);
  font-size: 13px;
  font-weight: 800;
  color: rgba(255,255,255,0.45);
  letter-spacing: -0.3px;
  pointer-events: none;
  z-index: 1;
}
.player-wm span { color: var(--brand); opacity: 0.85; }

/* — Watch info — */
.watch-title {
  font-size: clamp(16px, 2vw, 22px);
  font-weight: 700;
  line-height: 1.35;
  margin: var(--s4) 0 var(--s3);
}
.watch-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding-bottom: var(--s3);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--s4);
  flex-wrap: wrap;
}
.watch-views-date { font-size: 14px; color: var(--tx-2); display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }

/* Language badge on watch page */
.lang-badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--r-full);
  background: var(--bg-active);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--tx-2);
  letter-spacing: 0.2px;
  white-space: nowrap;
  vertical-align: middle;
}

.watch-pills { display: flex; gap: var(--s2); flex-wrap: wrap; }
.w-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 var(--s4);
  border-radius: var(--r-full);
  border: none;
  background: var(--bg-active);
  color: var(--tx-1);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast), transform var(--t-fast), color var(--t-fast);
}
.w-pill:hover { background: var(--bg-hover); transform: translateY(-1px); }
.w-pill.active { background: var(--brand-alpha); color: var(--brand); }
.w-pill svg { width: 18px; height: 18px; flex-shrink: 0; }

/* — Channel row — */
.watch-ch-row {
  display: flex;
  align-items: center;
  gap: var(--s3);
  margin-bottom: var(--s4);
  flex-wrap: wrap;
}
.watch-ch-av {
  width: 44px; height: 44px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700; color: #fff;
  flex-shrink: 0;
  text-decoration: none;
  transition: transform var(--t-fast);
}
.watch-ch-av:hover { transform: scale(1.05); }
.watch-ch-meta { flex: 1; min-width: 0; }
.watch-ch-name {
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 4px;
  color: var(--tx-1); text-decoration: none;
  margin-bottom: 2px;
}
.watch-ch-name:hover { text-decoration: underline; }
.watch-ch-subs { font-size: 13px; color: var(--tx-2); }
.watch-ch-actions { display: flex; gap: var(--s2); align-items: center; }

.btn-sub {
  height: 36px;
  padding: 0 var(--s5);
  border-radius: var(--r-full);
  border: none;
  background: var(--tx-1);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}
.btn-sub:hover { transform: translateY(-1px); }
.btn-sub.subbed { background: var(--bg-active); color: var(--tx-1); }
.btn-sub.subbed:hover { background: var(--bg-hover); }

/* — Description — */
.watch-desc-box {
  background: var(--bg-2);
  border-radius: var(--r-md);
  padding: var(--s4);
  margin-bottom: var(--s5);
  cursor: pointer;
  transition: background var(--t-fast);
}
.watch-desc-box:hover { background: var(--bg-active); }
.watch-desc-text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--tx-1);
  white-space: pre-wrap;
  overflow: hidden;
  max-height: 4.4em;
  transition: max-height 0.4s ease;
}
.watch-desc-box.open .watch-desc-text { max-height: 400px; }
.watch-desc-toggle {
  font-size: 13px;
  font-weight: 700;
  color: var(--tx-1);
  margin-top: var(--s2);
  display: block;
}

/* — Comments — */
.comments-wrap { margin-top: var(--s5); }
.comments-count { font-size: 18px; font-weight: 700; margin-bottom: var(--s4); }
.comment-add-row {
  display: flex;
  gap: var(--s3);
  margin-bottom: var(--s5);
  align-items: flex-start;
}
.me-av {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
}
.comment-field {
  flex: 1;
  border: none;
  border-bottom: 1.5px solid var(--border);
  background: transparent;
  font-size: 14px;
  color: var(--tx-1);
  padding: var(--s2) 0;
  outline: none;
  font-family: var(--font);
  transition: border-color var(--t-fast);
}
.comment-field:focus { border-color: var(--tx-1); }
.comment-field::placeholder { color: var(--tx-3); }

.cmnt-item { display: flex; gap: var(--s3); margin-bottom: var(--s5); }
.cmnt-av {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}
.cmnt-body { flex: 1; }
.cmnt-header { display: flex; align-items: baseline; gap: var(--s2); margin-bottom: 4px; }
.cmnt-name  { font-size: 13px; font-weight: 600; }
.cmnt-time  { font-size: 12px; color: var(--tx-3); }
.cmnt-text  { font-size: 14px; line-height: 1.55; margin-bottom: var(--s2); }
.cmnt-acts  { display: flex; gap: var(--s3); }
.cmnt-btn {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--tx-2);
  background: none; border: none; cursor: pointer; padding: 0;
  transition: color var(--t-fast);
}
.cmnt-btn:hover { color: var(--tx-1); }
.cmnt-btn svg { width: 14px; height: 14px; }

/* — Suggested sidebar — */
.watch-aside-col { min-width: 0; }
.watch-aside-head { font-size: 16px; font-weight: 700; margin-bottom: var(--s4); }

.sug-card {
  display: flex;
  gap: var(--s3);
  margin-bottom: var(--s3);
  cursor: pointer;
  border-radius: var(--r-sm);
  padding: var(--s2);
  text-decoration: none;
  color: inherit;
  transition: background var(--t-fast);
}
.sug-card:hover { background: var(--bg-hover); }
.sug-thumb-wrap {
  position: relative;
  width: 168px;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.sug-thumb-bg { position: absolute; inset: 0; }
.sug-dur {
  position: absolute; bottom: 4px; right: 4px;
  background: rgba(0,0,0,0.82); color: #fff;
  font-size: 11px; font-weight: 600;
  padding: 1px 5px; border-radius: var(--r-xs);
}
.sug-info { flex: 1; min-width: 0; padding-top: 2px; }
.sug-title {
  font-size: 13px; font-weight: 600; line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; margin-bottom: 4px; color: var(--tx-1);
}
.sug-channel { font-size: 12px; color: var(--tx-2); margin-bottom: 2px; }
.sug-meta    { font-size: 12px; color: var(--tx-2); }


/* =================================================
   SHORTS PAGE
   ================================================= */

.shorts-page-wrap { padding: var(--s5); }
.shorts-page-head {
  display: flex; align-items: center;
  gap: var(--s3); margin-bottom: var(--s5);
}
.shorts-logo {
  width: 38px; height: 38px;
  background: var(--brand); border-radius: var(--r-sm);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.shorts-logo svg { width: 22px; height: 22px; color: #fff; }
.shorts-page-title { font-size: clamp(20px, 3vw, 28px); font-weight: 800; }

.shorts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s4);
}
.short-card {
  aspect-ratio: 9 / 16;
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  text-decoration: none;
  display: block;
  transition: transform var(--t-base), box-shadow var(--t-base);
}
.short-card:hover { transform: translateY(-4px) scale(1.01); box-shadow: var(--sh-xl); }
.short-bg { position: absolute; inset: 0; }
.short-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 45%, rgba(0,0,0,0.88) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--s4); color: #fff;
}
.short-title {
  font-size: 14px; font-weight: 600; line-height: 1.3; margin-bottom: var(--s1);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.short-ch  { font-size: 12px; opacity: 0.85; margin-bottom: 2px; }
.short-v   { font-size: 12px; opacity: 0.70; }

.short-play {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 50px; height: 50px;
  background: rgba(255,255,255,0.88);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity var(--t-base), transform var(--t-base);
}
.short-play svg { width: 22px; height: 22px; color: #111; margin-left: 3px; }
.short-card:hover .short-play { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }


/* =================================================
   SHORTS PREVIEW (Homepage section)
   ================================================= */

.shorts-preview {
  display: flex; gap: var(--s3);
  overflow-x: auto; padding-bottom: var(--s2);
  scrollbar-width: none; -ms-overflow-style: none;
}
.shorts-preview::-webkit-scrollbar { display: none; }

.sprev-card {
  flex-shrink: 0; width: 150px;
  aspect-ratio: 9 / 16;
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  display: block;
  text-decoration: none;
  transition: transform var(--t-base);
}
.sprev-card:hover { transform: translateY(-3px) scale(1.02); }
.sprev-bg { position: absolute; inset: 0; }
.sprev-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(transparent 50%, rgba(0,0,0,0.85) 100%);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--s3); color: #fff;
}
.sprev-title {
  font-size: 12px; font-weight: 600; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sprev-views { font-size: 11px; opacity: 0.75; margin-top: 2px; }


/* =================================================
   CHANNEL PAGE
   ================================================= */

.channel-page { max-width: 1280px; margin: 0 auto; }

.ch-banner-wrap {
  height: clamp(100px, 16vw, 210px);
  overflow: hidden;
}
.ch-banner { width: 100%; height: 100%; }

.ch-header {
  display: flex; align-items: flex-end;
  gap: var(--s5); padding: 0 var(--s5) var(--s5);
  flex-wrap: wrap;
}
.ch-avatar {
  width: clamp(72px, 10vw, 100px);
  height: clamp(72px, 10vw, 100px);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(24px, 4vw, 38px); font-weight: 800; color: #fff;
  flex-shrink: 0;
  box-shadow: var(--sh-lg);
  border: 4px solid var(--bg);
  margin-top: -40px;
}
.ch-info { flex: 1; min-width: 180px; }
.ch-name-row { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s2); }
.ch-name { font-size: clamp(20px, 3vw, 28px); font-weight: 800; }
.ch-name-row .v-verified { width: 20px; height: 20px; }
.ch-handle  { font-size: 14px; color: var(--tx-2); margin-bottom: var(--s2); }
.ch-stats-row { font-size: 14px; color: var(--tx-2); display: flex; gap: var(--s4); flex-wrap: wrap; }
.ch-stats-row strong { color: var(--tx-1); font-weight: 600; }

.ch-actions {
  display: flex; gap: var(--s2); align-items: center;
  margin-left: auto; flex-shrink: 0;
}
.btn-ch-sub {
  height: 38px; padding: 0 var(--s5);
  border-radius: var(--r-full); border: none;
  background: var(--tx-1); color: var(--bg);
  font-size: 14px; font-weight: 600; cursor: pointer;
  transition: background var(--t-fast), transform var(--t-fast);
}
.btn-ch-sub:hover { background: var(--brand); transform: translateY(-1px); }
.btn-ch-sub.subbed { background: var(--bg-active); color: var(--tx-1); }

.btn-ch-notif {
  width: 38px; height: 38px; border-radius: 50%;
  border: none; background: var(--bg-active);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: var(--tx-1); transition: background var(--t-fast);
}
.btn-ch-notif:hover { background: var(--bg-hover); }
.btn-ch-notif svg { width: 18px; height: 18px; }

.ch-tabs-bar {
  display: flex; border-bottom: 1px solid var(--border);
  padding: 0 var(--s5); overflow-x: auto; scrollbar-width: none; gap: 0;
}
.ch-tabs-bar::-webkit-scrollbar { display: none; }
.ch-tab {
  height: 48px; padding: 0 var(--s5);
  border: none; background: none;
  font-size: 14px; font-weight: 500; color: var(--tx-2);
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  border-bottom: 2px solid transparent;
  transition: color var(--t-fast), border-color var(--t-fast);
}
.ch-tab:hover { color: var(--tx-1); }
.ch-tab.active { color: var(--tx-1); font-weight: 700; border-bottom-color: var(--tx-1); }

.ch-content { padding: var(--s5); }

.about-box { max-width: 700px; }
.about-box h3 { font-size: 15px; font-weight: 700; margin-top: var(--s5); margin-bottom: var(--s2); }
.about-box p { font-size: 14px; color: var(--tx-2); line-height: 1.75; }
.about-link {
  display: inline-flex; align-items: center; gap: var(--s1);
  font-size: 14px; color: var(--brand);
  margin-top: var(--s2); text-decoration: none;
}
.about-link:hover { text-decoration: underline; }
.about-link svg { width: 14px; height: 14px; }


/* =================================================
   TOAST NOTIFICATIONS
   ================================================= */

.toast-stack {
  position: fixed; bottom: var(--s6); left: 50%;
  transform: translateX(-50%);
  z-index: 500; display: flex; flex-direction: column;
  gap: var(--s2); pointer-events: none; align-items: center;
}
.toast-msg {
  background: var(--tx-1); color: var(--bg);
  font-size: 14px; font-weight: 500;
  padding: var(--s3) var(--s5);
  border-radius: var(--r-full);
  box-shadow: var(--sh-lg);
  white-space: nowrap;
  animation: toastSlide 3s ease forwards;
}
@keyframes toastSlide {
  0%   { opacity: 0; transform: translateY(12px); }
  12%  { opacity: 1; transform: translateY(0); }
  80%  { opacity: 1; }
  100% { opacity: 0; transform: translateY(-4px); }
}



/* =================================================
   RESPONSIVE – NEW PAGES
   ================================================= */

@media (max-width: 1199px) {
  .watch-layout { grid-template-columns: 1fr; }
  /* Hide suggested videos at tablet — reappear stacked on mobile below */
  .watch-aside-col { display: none; }
}

@media (max-width: 899px) {
  .sug-thumb-wrap { width: 130px; }
  .shorts-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}

@media (max-width: 639px) {
  /* Show suggested below video on mobile */
  .watch-aside-col { display: block; order: 2; }
  .watch-layout { padding: var(--s3); gap: var(--s3); }
  .watch-pills { gap: var(--s1); }
  .w-pill { padding: 0 var(--s3); height: 34px; font-size: 13px; }
  .shorts-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
  .shorts-page-wrap { padding: var(--s3); }
  .ch-header { padding: var(--s3); gap: var(--s3); }
  .ch-actions { margin-left: 0; width: 100%; }
  .ch-content { padding: var(--s3); }
  .ch-tabs-bar { padding: 0 var(--s3); }
}

@media (max-width: 419px) {
  .shorts-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s2); }
  .short-card { border-radius: var(--r-md); }
  .sprev-card { width: 130px; }
}


/* =================================================
   REDUCED MOTION
   ================================================= */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}