/* ═══════════════════════════════════════════════════════════════════════════
   StreamVault — Volcanic Glass Design System
   Palette: #1A1A1A · #333333 · #FF6B2B · #FFB088
   Fonts: Clash Display (headings) · Newsreader (body) · Space Mono (code/meta)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────────────────── */
:root {
  --bg-base:       #0e0e0e;
  --bg-surface:    #1a1a1a;
  --bg-elevated:   #242424;
  --bg-card:       #1e1e1e;
  --bg-hover:      #2a2a2a;
  --border:        rgba(255,255,255,0.07);
  --border-bright: rgba(255,255,255,0.14);

  --text-primary:  #f0ece6;
  --text-secondary:#a09890;
  --text-muted:    #5a5450;

  --accent:        #FF6B2B;
  --accent-light:  #FFB088;
  --accent-dim:    rgba(255,107,43,0.15);
  --accent-glow:   rgba(255,107,43,0.35);

  --success:       #4ade80;
  --error:         #f87171;
  --warning:       #fbbf24;

  --font-display:  'Clash Display', sans-serif;
  --font-body:     'Newsreader', serif;
  --font-mono:     'Space Mono', monospace;

  --radius-sm:     6px;
  --radius-md:     12px;
  --radius-lg:     18px;
  --radius-xl:     24px;
  --radius-full:   9999px;

  --shadow-sm:     0 2px 8px rgba(0,0,0,0.4);
  --shadow-md:     0 8px 24px rgba(0,0,0,0.5);
  --shadow-lg:     0 20px 60px rgba(0,0,0,0.6);
  --shadow-accent: 0 8px 32px rgba(255,107,43,0.25);

  --transition:    0.2s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.4s cubic-bezier(0.4,0,0.2,1);

  --nav-height:    68px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Scrollbar ─────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-surface); }
::-webkit-scrollbar-thumb { background: var(--bg-elevated); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ── Utility ───────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { background: #ff7d42; transform: translateY(-1px); box-shadow: 0 12px 40px rgba(255,107,43,0.4); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-bright);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--accent); background: var(--accent-dim); }

.btn-upload {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
  padding: 8px 16px;
  font-size: 13px;
}
.btn-upload:hover { border-color: var(--accent); color: var(--accent); }

.btn-hero-primary {
  background: var(--accent);
  color: #fff;
  padding: 14px 32px;
  font-size: 16px;
  box-shadow: var(--shadow-accent);
}
.btn-hero-primary:hover { background: #ff7d42; transform: translateY(-2px); box-shadow: 0 16px 48px rgba(255,107,43,0.45); }

.btn-hero-ghost {
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
  padding: 14px 28px;
  font-size: 16px;
  backdrop-filter: blur(8px);
}
.btn-hero-ghost:hover { background: rgba(255,255,255,0.1); border-color: var(--accent); }

.btn-load-more {
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 12px 40px;
  font-size: 14px;
  border-radius: var(--radius-full);
}
.btn-load-more:hover { border-color: var(--accent); color: var(--accent); }

/* ── Navbar ────────────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: rgba(14,14,14,0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar.scrolled { background: rgba(14,14,14,0.97); }

.nav-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.logo-icon {
  width: 34px; height: 34px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.logo-accent { color: var(--accent); }

.nav-search {
  flex: 1;
  max-width: 480px;
  position: relative;
  margin: 0 auto;
}
.nav-search input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 44px 10px 18px;
  color: var(--text-primary);
  font-size: 14px;
  transition: var(--transition);
}
.nav-search input::placeholder { color: var(--text-muted); }
.nav-search input:focus { outline: none; border-color: var(--accent); background: var(--bg-card); box-shadow: 0 0 0 3px var(--accent-dim); }
.search-btn {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  transition: var(--transition);
  display: flex;
}
.search-btn:hover { color: var(--accent); }

.nav-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.nav-guest { display: flex; align-items: center; gap: 8px; }

.nav-user { display: flex; align-items: center; gap: 10px; }
.nav-avatar-wrap { position: relative; }
.nav-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.nav-avatar:hover { border-color: var(--accent); }

.nav-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: var(--transition);
  z-index: 200;
}
.nav-avatar-wrap:hover .nav-dropdown,
.nav-dropdown:hover {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dropdown-header span:first-child { font-family: var(--font-display); font-weight: 600; font-size: 14px; }
.dropdown-email { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
  width: 100%;
  text-align: left;
}
.dropdown-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }
.dropdown-logout { color: var(--error) !important; }
.dropdown-logout:hover { background: rgba(248,113,113,0.1) !important; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Mobile Menu ───────────────────────────────────────────────────────── */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 16px 20px;
  z-index: 99;
  flex-direction: column;
  gap: 8px;
}
.mobile-menu.open { display: flex; }
.mobile-search { display: flex; gap: 8px; margin-bottom: 8px; }
.mobile-search input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  color: var(--text-primary);
  font-size: 14px;
}
.mobile-search input:focus { outline: none; border-color: var(--accent); }
.mobile-search button {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-full);
  padding: 10px 18px;
  font-family: var(--font-display);
  font-size: 14px;
}
.mobile-link {
  display: block;
  padding: 12px 16px;
  color: var(--text-secondary);
  font-size: 15px;
  border-radius: var(--radius-md);
  transition: var(--transition);
}
.mobile-link:hover { background: var(--bg-elevated); color: var(--text-primary); }
.mobile-link-primary { color: var(--accent); font-family: var(--font-display); font-weight: 600; }
.mobile-logout { color: var(--error); width: 100%; text-align: left; }

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  padding-top: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 60px;
  padding-right: 60px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
}
.hero-orb-1 {
  width: 600px; height: 600px;
  background: var(--accent);
  top: -200px; left: -100px;
  animation: orbFloat 8s ease-in-out infinite;
}
.hero-orb-2 {
  width: 400px; height: 400px;
  background: #ff3cac;
  bottom: -100px; right: 200px;
  animation: orbFloat 10s ease-in-out infinite reverse;
}
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 30px) scale(0.95); }
}

.hero-content { position: relative; z-index: 1; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-dim);
  border: 1px solid rgba(255,107,43,0.3);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-light);
  margin-bottom: 24px;
  letter-spacing: 0.05em;
}
.badge-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out 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: clamp(42px, 6vw, 80px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.hero-title em {
  font-style: italic;
  font-family: var(--font-body);
  color: var(--accent);
  font-weight: 300;
}

.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 36px;
}

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 48px; }

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.hero-stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}
.stat-label { font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); letter-spacing: 0.05em; }
.hero-stat-divider { width: 1px; height: 40px; background: var(--border-bright); }

/* Hero Visual */
.hero-visual {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.hero-card-stack {
  position: relative;
  width: 360px;
  height: 280px;
}
.hero-card {
  position: absolute;
  border-radius: var(--radius-xl);
  overflow: hidden;
}
.hero-card-back {
  width: 300px; height: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  bottom: 0; right: 0;
  transform: rotate(6deg);
  opacity: 0.5;
}
.hero-card-mid {
  width: 320px; height: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  bottom: 10px; right: 10px;
  transform: rotate(3deg);
  opacity: 0.7;
}
.hero-card-front {
  width: 340px; height: 260px;
  background: var(--bg-card);
  border: 1px solid var(--border-bright);
  bottom: 20px; right: 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hc-thumb {
  flex: 1;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a1a0e 50%, #1a0a00 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.hc-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 40% 40%, rgba(255,107,43,0.2), transparent 60%);
}
.hc-play-btn {
  width: 56px; height: 56px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-accent);
  position: relative;
  z-index: 1;
  animation: heroPlayPulse 3s ease-in-out infinite;
}
@keyframes heroPlayPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,107,43,0.4); }
  50% { box-shadow: 0 0 0 16px rgba(255,107,43,0); }
}
.hc-info {
  padding: 14px 16px;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
}
.hc-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hc-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 4px 0;
}
.hc-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 6px;
  font-family: var(--font-mono);
}

/* ── Trending Section ──────────────────────────────────────────────────── */
.trending-section {
  padding: 60px 0 40px;
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-base) 0%, var(--bg-surface) 100%);
}
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 60px;
  margin-bottom: 28px;
}
.section-title-wrap { display: flex; flex-direction: column; gap: 4px; }
.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.section-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.trending-scroll {
  display: flex;
  gap: 20px;
  padding: 0 60px 20px;
  overflow-x: auto;
  scrollbar-width: none;
}
.trending-scroll::-webkit-scrollbar { display: none; }

.trending-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 40px;
}

/* ── Trending Card ─────────────────────────────────────────────────────── */
.trending-card {
  flex-shrink: 0;
  width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
}
.trending-card:hover { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.trending-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-elevated);
  position: relative;
  overflow: hidden;
}
.trending-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}
.trending-card:hover .trending-card-thumb img { transform: scale(1.05); }
.trending-card-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-elevated), var(--bg-hover));
  font-size: 36px;
}
.trending-rank {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
}
.trending-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.8);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}
.trending-card-info { padding: 14px; }
.trending-card-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trending-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Filter Bar ────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 60px;
  margin-bottom: 32px;
  gap: 16px;
}
.filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
}
.filter-scroll::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: var(--transition);
}
.filter-chip:hover { color: var(--text-primary); border-color: var(--border-bright); }
.filter-chip.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: var(--shadow-accent); }

.sort-select {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  padding: 8px 16px;
  font-size: 13px;
  font-family: var(--font-display);
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a09890' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.sort-select:focus { outline: none; border-color: var(--accent); color: var(--text-primary); }

/* ── Main Content ──────────────────────────────────────────────────────── */
.main-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 60px 80px;
}

.videos-section .section-header {
  padding: 0;
  margin-bottom: 28px;
}
.video-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* ── Video Grid ────────────────────────────────────────────────────────── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

/* ── Video Card ────────────────────────────────────────────────────────── */
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}
.video-card:hover { border-color: rgba(255,107,43,0.4); transform: translateY(-4px); box-shadow: var(--shadow-md); }

.video-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: var(--bg-elevated);
  position: relative;
  overflow: hidden;
}
.video-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}
.video-card:hover .video-card-thumb img { transform: scale(1.05); }
.video-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-elevated) 0%, var(--bg-hover) 100%);
  font-size: 40px;
  position: relative;
}
.video-thumb-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,107,43,0.05), transparent);
}

.video-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}
.video-card:hover .video-card-overlay { opacity: 1; }
.overlay-play {
  width: 52px; height: 52px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: var(--shadow-accent);
  transform: scale(0.8);
  transition: var(--transition);
}
.video-card:hover .overlay-play { transform: scale(1); }

.video-card-duration {
  position: absolute;
  bottom: 8px; right: 8px;
  background: rgba(0,0,0,0.85);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 3px 7px;
  border-radius: 4px;
}
.video-card-category {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(0,0,0,0.75);
  color: var(--accent-light);
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.video-card-info { padding: 16px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.video-card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-card-creator {
  display: flex;
  align-items: center;
  gap: 8px;
}
.creator-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.creator-name {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: var(--font-display);
}
.video-card-stats {
  display: flex;
  gap: 14px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  margin-top: auto;
}
.video-stat { display: flex; align-items: center; gap: 4px; }

/* Skeleton */
.video-card.skeleton {
  pointer-events: none;
  animation: shimmer 1.5s ease-in-out infinite;
}
.video-card.skeleton::before {
  content: '';
  display: block;
  aspect-ratio: 16/9;
  background: var(--bg-elevated);
}
.video-card.skeleton::after {
  content: '';
  display: block;
  height: 100px;
  background: var(--bg-elevated);
  margin: 16px;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ── Empty State ───────────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  grid-column: 1 / -1;
}
.empty-icon { font-size: 64px; margin-bottom: 16px; }
.empty-state h3 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.empty-state p { color: var(--text-secondary); margin-bottom: 24px; }

.load-more-wrap { text-align: center; }

/* ── Auth Pages ────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 20px 40px;
  position: relative;
  overflow: hidden;
}
.auth-page .hero-bg { position: fixed; }

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-xl);
  padding: 40px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}
.auth-title {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.auth-subtitle { color: var(--text-secondary); font-size: 15px; margin-bottom: 32px; }

.form-group { margin-bottom: 20px; }
.form-label {
  display: block;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.form-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 15px;
  transition: var(--transition);
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus { outline: none; border-color: var(--accent); background: var(--bg-card); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-input.error { border-color: var(--error); }

.form-error {
  font-size: 12px;
  color: var(--error);
  margin-top: 6px;
  font-family: var(--font-mono);
}

.btn-auth {
  width: 100%;
  background: var(--accent);
  color: #fff;
  padding: 14px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
  margin-top: 8px;
  justify-content: center;
}
.btn-auth:hover { background: #ff7d42; transform: translateY(-1px); box-shadow: var(--shadow-accent); }
.btn-auth:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0;
  color: var(--text-muted);
  font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 24px;
}
.auth-switch a { color: var(--accent); font-weight: 600; }
.auth-switch a:hover { text-decoration: underline; }

.auth-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: 20px;
  display: none;
}
.auth-alert.error { background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.3); color: var(--error); display: block; }
.auth-alert.success { background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.3); color: var(--success); display: block; }

/* ── Video Player Page ─────────────────────────────────────────────────── */
.player-page {
  padding-top: var(--nav-height);
  min-height: 100vh;
}
.player-layout {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 60px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 32px;
  align-items: start;
}
.player-main {}

.video-player-wrap {
  width: 100%;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.video-player-wrap video {
  width: 100%;
  height: 100%;
  display: block;
}
.player-no-file {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: var(--bg-surface);
  color: var(--text-muted);
}
.player-no-file .no-file-icon { font-size: 48px; }
.player-no-file p { font-size: 14px; font-family: var(--font-mono); }

.player-info { margin-top: 24px; }
.player-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
  line-height: 1.3;
}
.player-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.player-stats {
  display: flex;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}
.player-actions { display: flex; gap: 10px; }
.btn-like, .btn-share {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--border-bright);
  color: var(--text-secondary);
  background: var(--bg-elevated);
  transition: var(--transition);
}
.btn-like:hover, .btn-share:hover { border-color: var(--accent); color: var(--accent); }
.btn-like.liked { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

.player-creator {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.creator-avatar-lg {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.creator-info { flex: 1; }
.creator-info h4 { font-family: var(--font-display); font-size: 15px; font-weight: 600; }
.creator-info p { font-size: 13px; color: var(--text-muted); }

.player-description {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 20px;
}
.player-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tag-chip {
  padding: 4px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* Comments */
.comments-section { margin-top: 32px; }
.comments-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text-primary);
}
.comment-form { display: flex; gap: 12px; margin-bottom: 28px; }
.comment-input {
  flex: 1;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 14px;
  resize: none;
  transition: var(--transition);
  min-height: 48px;
}
.comment-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.btn-comment {
  background: var(--accent);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  transition: var(--transition);
  align-self: flex-end;
}
.btn-comment:hover { background: #ff7d42; }

.comment-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.comment-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg-elevated);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
}
.comment-body { flex: 1; }
.comment-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.comment-author { font-family: var(--font-display); font-size: 14px; font-weight: 600; }
.comment-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }
.comment-text { font-size: 14px; color: var(--text-secondary); line-height: 1.6; }

/* Sidebar */
.player-sidebar {}
.sidebar-title {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-primary);
}
.related-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  margin-bottom: 8px;
}
.related-card:hover { background: var(--bg-elevated); border-color: var(--border); }
.related-thumb {
  width: 120px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
.related-thumb img { width: 100%; height: 100%; object-fit: cover; }
.related-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}
.related-info { flex: 1; min-width: 0; }
.related-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 6px;
}
.related-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); }

/* ── Upload Page ───────────────────────────────────────────────────────── */
.upload-page {
  padding-top: var(--nav-height);
  min-height: 100vh;
}
.upload-layout {
  max-width: 900px;
  margin: 0 auto;
  padding: 48px 40px;
}
.upload-header { margin-bottom: 40px; }
.upload-header h1 {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}
.upload-header p { color: var(--text-secondary); font-size: 16px; }

.upload-drop-zone {
  border: 2px dashed var(--border-bright);
  border-radius: var(--radius-xl);
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-surface);
  margin-bottom: 32px;
  position: relative;
}
.upload-drop-zone:hover, .upload-drop-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.upload-drop-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}
.drop-icon { font-size: 56px; margin-bottom: 16px; }
.drop-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.drop-sub { color: var(--text-secondary); font-size: 14px; margin-bottom: 16px; }
.drop-formats {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.upload-preview {
  display: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-bottom: 32px;
  align-items: center;
  gap: 16px;
}
.upload-preview.visible { display: flex; }
.preview-icon { font-size: 36px; }
.preview-info { flex: 1; }
.preview-name { font-family: var(--font-display); font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.preview-size { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); }
.preview-remove {
  color: var(--error);
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.preview-remove:hover { background: rgba(248,113,113,0.1); }

.upload-form { display: flex; flex-direction: column; gap: 24px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-textarea {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 15px;
  resize: vertical;
  min-height: 100px;
  transition: var(--transition);
}
.form-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }
.form-select {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a09890' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.form-select:focus { outline: none; border-color: var(--accent); }

.upload-progress {
  display: none;
  background: var(--bg-elevated);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 16px;
}
.upload-progress.visible { display: block; }
.progress-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.progress-bar {
  height: 6px;
  background: var(--bg-hover);
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
  transition: width 0.3s ease;
  width: 0%;
}

.btn-submit {
  background: var(--accent);
  color: #fff;
  padding: 16px 40px;
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  transition: var(--transition);
  align-self: flex-start;
  box-shadow: var(--shadow-accent);
}
.btn-submit:hover { background: #ff7d42; transform: translateY(-1px); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* ── Profile Page ──────────────────────────────────────────────────────── */
.profile-page {
  padding-top: var(--nav-height);
  min-height: 100vh;
}
.profile-header {
  background: linear-gradient(180deg, var(--bg-surface) 0%, var(--bg-base) 100%);
  border-bottom: 1px solid var(--border);
  padding: 48px 60px 40px;
}
.profile-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 28px;
}
.profile-avatar-xl {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--bg-base);
  box-shadow: var(--shadow-accent);
  flex-shrink: 0;
}
.profile-info { flex: 1; }
.profile-username {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.profile-bio { color: var(--text-secondary); font-size: 15px; margin-bottom: 12px; }
.profile-stats { display: flex; gap: 24px; }
.profile-stat { display: flex; flex-direction: column; gap: 2px; }
.profile-stat-num { font-family: var(--font-display); font-size: 22px; font-weight: 700; }
.profile-stat-label { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); letter-spacing: 0.05em; }

.profile-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 60px;
}

/* ── Toast ─────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-full);
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-primary);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1);
  white-space: nowrap;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: rgba(74,222,128,0.4); color: var(--success); }
.toast.error { border-color: rgba(248,113,113,0.4); color: var(--error); }

/* ── Spinner ───────────────────────────────────────────────────────────── */
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
}
.footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 60px 48px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
}
.footer-brand { max-width: 280px; }
.footer-tagline { color: var(--text-muted); font-size: 14px; margin-top: 12px; }
.footer-links { display: flex; gap: 60px; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.footer-col a { font-size: 14px; color: var(--text-muted); transition: var(--transition); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 60px;
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; padding: 120px 40px 60px; text-align: center; }
  .hero-visual { display: none; }
  .hero-sub { max-width: 100%; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .player-layout { grid-template-columns: 1fr; }
  .player-sidebar { display: none; }
}

@media (max-width: 768px) {
  :root { --nav-height: 60px; }
  .nav-search { display: none; }
  .nav-guest { display: none; }
  .nav-hamburger { display: flex; }
  .hero { padding: 100px 24px 60px; }
  .section-header { padding: 0 24px; }
  .trending-scroll { padding: 0 24px 20px; }
  .filter-bar { padding: 0 24px; }
  .main-content { padding: 40px 24px 60px; }
  .video-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
  .footer-inner { flex-direction: column; padding: 0 24px 40px; }
  .footer-links { flex-wrap: wrap; gap: 32px; }
  .footer-bottom { padding: 20px 24px; }
  .upload-layout { padding: 32px 24px; }
  .form-row { grid-template-columns: 1fr; }
  .profile-header { padding: 32px 24px 28px; }
  .profile-content { padding: 32px 24px; }
  .player-layout { padding: 24px; }
  .auth-card { padding: 28px 24px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 36px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .video-grid { grid-template-columns: 1fr; }
  .trending-card { width: 240px; }
}