/* TuringReels — shared design system */
:root {
  --bg-deep: #050510;
  --bg: #0a0a18;
  --bg-elev: #11132a;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --accent: #00e5ff;
  --accent-2: #7b5cff;
  --warm: #ff3d8a;
  --text: #f1f3ff;
  --text-muted: #8c93b8;
  --text-dim: #5e6488;
  --success: #2ee37a;
  --danger: #ff5a6a;
  --warning: #ffd166;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  --radius: 14px;
  --radius-lg: 22px;
  --max-w: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 20% -10%, rgba(123, 92, 255, 0.18), transparent 60%),
    radial-gradient(900px 500px at 90% 10%, rgba(0, 229, 255, 0.10), transparent 60%),
    var(--bg-deep);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: #fff; }

img, video { max-width: 100%; display: block; }

/* ---------- Layout ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 22px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  margin: 28px 0 64px;
}

@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 16, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 18px;
}

.logo {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.3px;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.logo span { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}
.nav-links a:hover, .nav-links a.active { color: #fff; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--accent);
  color: #000;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  text-shadow: none;
  letter-spacing: 0.1px;
  transition: transform .15s ease, background .15s ease;
}
.nav-cta:hover { background: #fff; color: #000; transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border-strong);
  color: #fff;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
}

@media (max-width: 740px) {
  .nav-links {
    position: absolute;
    top: 60px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 14px 22px;
    gap: 14px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 28px;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.05;
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.hero .accent { color: var(--accent); }

.hero p {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 22px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  background: var(--bg-card);
  color: #fff;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--bg-card-hover); color: #fff; }
.btn-primary { background: var(--accent); color: #000; font-weight: 800; text-shadow: none; }
.btn-primary:hover { background: #fff; color: #000; transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--border-strong); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 7px 13px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- Section heads ---------- */
.section { margin: 36px 0; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
}
.section-head h2 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.section-head a { font-size: 14px; color: var(--text-muted); }
.section-head a:hover { color: var(--accent); }

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.card h3 { font-size: 17px; font-weight: 700; color: #fff; line-height: 1.3; }
.card .meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 10px; flex-wrap: wrap; }
.card p { font-size: 14px; color: var(--text-muted); }

.card-actions { display: flex; gap: 10px; align-items: center; margin-top: auto; }

.card a { color: inherit; }
.card a:hover h3 { color: var(--accent); }

/* Card thumbnail (gradient poster) */
.thumb {
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 12px;
  color: #fff;
  background: linear-gradient(135deg, #2a2467, #0c0c25);
  border: 1px solid var(--border);
}
.thumb::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(800px 200px at 50% -10%, rgba(255,255,255,.08), transparent 60%);
  pointer-events: none;
}
.thumb .badge-duration {
  position: absolute;
  top: 10px; right: 10px;
  background: rgba(0,0,0,.6);
  border: 1px solid var(--border);
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
  font-weight: 600;
}
.thumb .badge-status {
  position: absolute;
  top: 10px; left: 10px;
  background: rgba(0, 229, 255, 0.18);
  border: 1px solid rgba(0, 229, 255, 0.4);
  color: var(--accent);
  padding: 4px 8px;
  font-size: 11px;
  border-radius: 6px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.thumb .thumb-title {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: 14px;
  text-shadow: 0 2px 16px rgba(0,0,0,.6);
}

/* category gradients */
.thumb[data-cat="cyberpunk"] { background: linear-gradient(135deg, #ff2d92, #29104a 60%, #00e5ff); }
.thumb[data-cat="sci-fi"]    { background: linear-gradient(135deg, #00e5ff, #1a1a4a 60%, #6c2bd9); }
.thumb[data-cat="anime"]     { background: linear-gradient(135deg, #ffafcc, #845ec2 60%, #1d2b64); }
.thumb[data-cat="fantasy"]   { background: linear-gradient(135deg, #ffd166, #6c2bd9 60%, #0b1140); }
.thumb[data-cat="action"]    { background: linear-gradient(135deg, #ff5a6a, #3a0a14 60%, #ffd166); }
.thumb[data-cat="horror"]    { background: linear-gradient(135deg, #2b0a1a, #1c1c1c 60%, #ff2d2d); }
.thumb[data-cat="comedy"]    { background: linear-gradient(135deg, #ffd166, #2ee37a 60%, #06d6a0); }
.thumb[data-cat="retro"]     { background: linear-gradient(135deg, #ff7b00, #ff006e 60%, #3a86ff); }

/* ---------- Progress ---------- */
.progress {
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
  height: 8px;
}
.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width .3s ease;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
}
.progress.near > span { background: linear-gradient(90deg, var(--warm), var(--accent)); }

/* ---------- Tags / chips ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 229, 255, 0.08);
  border: 1px solid rgba(0, 229, 255, 0.18);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.tag:hover { background: rgba(0, 229, 255, 0.18); color: #fff; }

.tag-row { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Voter ---------- */
.voter {
  display: inline-flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  gap: 2px;
}
.voter button {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.voter button:hover { color: #fff; background: var(--bg-card-hover); }
.voter button.active.up { color: var(--success); background: rgba(46, 227, 122, 0.12); }
.voter button.active.down { color: var(--danger); background: rgba(255, 90, 106, 0.12); }
.voter .count {
  min-width: 38px;
  text-align: center;
  font-weight: 700;
  color: #fff;
  font-size: 14px;
}

.voter-lg button { width: 44px; height: 44px; font-size: 20px; }
.voter-lg .count { font-size: 16px; min-width: 48px; }

/* ---------- Backer button (Kickstarter funding model) ---------- */
.backer {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 999px;
  font-weight: 800;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
  text-shadow: none;
  transition: transform .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
  box-shadow: 0 6px 22px rgba(0, 229, 255, 0.18);
}
.backer:hover { background: #fff; color: #000; transform: translateY(-1px); }
.backer .icon { font-size: 15px; }
.backer .count {
  background: rgba(0, 0, 0, 0.18);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 12px;
}
.backer.backed { background: var(--success); color: #000; box-shadow: 0 6px 22px rgba(46, 227, 122, 0.22); }
.backer.backed:hover { background: #fff; color: #000; }

.backer-lg { padding: 14px 24px; font-size: 16px; gap: 12px; }
.backer-lg .icon { font-size: 20px; }
.backer-lg .count { font-size: 14px; padding: 5px 12px; }

.card-actions { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.card-actions .btn-block { width: 100%; justify-content: center; }

/* ---------- Gamification: wallet badge + popover ---------- */
.credit-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  background: linear-gradient(135deg, rgba(123, 92, 255, 0.20), rgba(0, 229, 255, 0.18));
  border: 1px solid rgba(123, 92, 255, 0.40);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.credit-badge:hover { transform: translateY(-1px); background: linear-gradient(135deg, rgba(123, 92, 255, 0.30), rgba(0, 229, 255, 0.28)); }
.credit-badge .bal { color: var(--accent); font-weight: 800; }

.credit-panel {
  position: fixed;
  top: 70px;
  right: 22px;
  width: 360px;
  max-height: calc(100vh - 92px);
  overflow-y: auto;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  z-index: 200;
  padding: 18px;
  display: none;
  scrollbar-width: thin;
}
.credit-panel.open { display: block; animation: panelin .18s ease; }
@keyframes panelin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.credit-panel::-webkit-scrollbar { width: 8px; }
.credit-panel::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }

.credit-panel header h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.7px; color: var(--text-muted); margin-bottom: 8px; }
.credit-panel header .bal-row { display: flex; align-items: baseline; gap: 8px; }
.credit-panel header .bal-row strong { font-size: 32px; color: var(--accent); font-weight: 800; line-height: 1; }
.credit-panel header .bal-row small { color: var(--text-muted); font-size: 13px; }
.credit-panel header .meta { font-size: 12px; color: var(--text-muted); margin-top: 6px; }

.credit-panel section { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.credit-panel section h4 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); margin-bottom: 10px; }

.credit-panel ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }

.credit-panel .earn li { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 14px; color: var(--text); }
.credit-panel .earn strong { color: var(--success); font-weight: 800; font-size: 13px; }

.credit-panel .ach-list { gap: 10px; }
.credit-panel .ach { display: flex; gap: 10px; align-items: flex-start; opacity: 0.45; transition: opacity .15s; }
.credit-panel .ach.got { opacity: 1; }
.credit-panel .ach .trophy { font-size: 18px; flex-shrink: 0; width: 22px; text-align: center; }
.credit-panel .ach strong { font-size: 14px; color: #fff; }
.credit-panel .ach small { color: var(--success); font-weight: 800; font-size: 11px; margin-left: 4px; }
.credit-panel .ach .d { color: var(--text-muted); font-size: 12px; margin-top: 1px; }

.credit-panel .activity li { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.credit-panel .activity li:last-child { border-bottom: none; }
.credit-panel .activity li .d { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credit-panel .activity li.pos strong { color: var(--success); }
.credit-panel .activity li.neg strong { color: var(--warm); }
.credit-panel .activity li.empty { color: var(--text-muted); font-style: italic; border: none; padding: 8px 0; justify-content: flex-start; }

@media (max-width: 540px) {
  .credit-panel { left: 14px; right: 14px; width: auto; top: 64px; }
}

/* ---------- Auth: sign-in link, avatar, user menu ---------- */
.sign-in-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  text-decoration: none;
}
.sign-in-link:hover { color: #fff; border-color: var(--accent); }

.avatar-sm, .avatar-md, .avatar-lg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 800;
  color: #02020a;
  font-family: inherit;
  flex-shrink: 0;
  letter-spacing: 0.3px;
}
.avatar-sm { width: 34px; height: 34px; font-size: 12px; }
.avatar-md { width: 48px; height: 48px; font-size: 16px; }
.avatar-lg { width: 96px; height: 96px; font-size: 32px; box-shadow: 0 8px 28px rgba(0,0,0,0.4); }

.user-avatar-btn {
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  padding: 1px;
  cursor: pointer;
  transition: border-color .15s ease;
}
.user-avatar-btn:hover { border-color: var(--accent); }

.user-menu {
  position: fixed;
  top: 70px;
  right: 22px;
  width: 280px;
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  z-index: 200;
  padding: 14px;
  display: none;
}
.user-menu.open { display: block; animation: panelin .18s ease; }
.user-menu header {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.user-menu header strong { display: block; color: #fff; font-size: 14px; line-height: 1.2; }
.user-menu header small { color: var(--text-muted); font-size: 12px; display: block; margin-top: 2px; }
.user-menu a, .user-menu button {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-decoration: none;
}
.user-menu a:hover, .user-menu button:hover { background: var(--bg-card); color: var(--accent); }
.user-menu .signout-btn {
  color: var(--danger);
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  border-radius: 0;
}
.user-menu .signout-btn:hover { color: #fff; background: rgba(255, 90, 106, 0.12); }

@media (max-width: 540px) {
  .user-menu { left: 14px; right: 14px; width: auto; top: 64px; }
}

/* Author link inline */
.author-link {
  color: var(--text) !important;
  font-weight: 600;
  text-decoration: none;
}
.author-link:hover { color: var(--accent) !important; }

/* ---------- Login page ---------- */
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 13px 22px;
  background: #fff;
  color: #1f1f1f;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  width: 100%;
  transition: background .15s ease, transform .15s ease;
  font-family: inherit;
}
.google-btn:hover { background: #f1f3f5; transform: translateY(-1px); }
.google-btn svg { display: block; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 20px 0;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---------- Profile pages (own + creator) ---------- */
.profile-header {
  display: flex;
  gap: 22px;
  align-items: flex-start;
  padding: 26px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 22px;
}
@media (max-width: 540px) {
  .profile-header { flex-direction: column; align-items: flex-start; }
}
.profile-header h1 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  letter-spacing: -0.3px;
}
.profile-header .handle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}
.profile-header .bio {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 10px;
  max-width: 520px;
}
.profile-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
}
.stat-card .v {
  font-size: 26px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}
.stat-card .l {
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  margin-top: 8px;
  font-weight: 600;
}

.badge-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.badge-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 14px;
  text-align: center;
  opacity: 0.45;
  transition: opacity .15s, transform .15s, border-color .15s;
}
.badge-card.got { opacity: 1; }
.badge-card.got:hover { transform: translateY(-2px); border-color: var(--accent); }
.badge-card .ico { font-size: 28px; line-height: 1; }
.badge-card .name { font-weight: 700; font-size: 13px; color: #fff; margin-top: 8px; }
.badge-card .desc { color: var(--text-muted); font-size: 11px; margin-top: 4px; line-height: 1.35; }
.badge-card .reward { color: var(--success); font-weight: 800; font-size: 11px; margin-top: 6px; }

/* ---------- Sidebar / aside ---------- */
aside .panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 18px;
}
aside .panel h3 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
aside ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
aside ul a { color: var(--text); font-size: 14px; line-height: 1.35; }
aside ul a:hover { color: var(--accent); }
aside li .sub { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Ad slot ---------- */
.ad-slot {
  background: repeating-linear-gradient(
    45deg,
    rgba(255,255,255,0.025),
    rgba(255,255,255,0.025) 10px,
    rgba(255,255,255,0.05) 10px,
    rgba(255,255,255,0.05) 20px
  );
  border: 1px dashed var(--border-strong);
  color: var(--text-dim);
  text-align: center;
  padding: 22px;
  border-radius: var(--radius);
  font-size: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.ad-slot.tall { padding: 80px 22px; }

/* ---------- Request detail ---------- */
.request-head {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 22px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 22px;
  align-items: start;
}
@media (max-width: 640px) {
  .request-head { grid-template-columns: 1fr; }
}
.request-head h1 {
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}
.request-head .desc {
  color: var(--text-muted);
  font-size: 17px;
  margin: 8px 0 16px;
}
.request-head .meta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 13px;
  margin-bottom: 14px;
}
.request-head .meta-row strong { color: #fff; }

/* ---------- Video page ---------- */
.video-frame {
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 9;
  position: relative;
  border: 1px solid var(--border);
}
.video-frame .poster {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff;
  background: linear-gradient(135deg, #2a2467, #0c0c25);
}
.video-frame .play {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.25);
  font-size: 64px;
  color: var(--accent);
  text-shadow: 0 4px 24px rgba(0, 229, 255, 0.5);
  cursor: pointer;
  transition: background .2s ease;
}
.video-frame .play:hover { background: rgba(0, 0, 0, 0.15); }

.video-stats {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 14px;
}
.video-stats strong { color: #fff; }

/* ---------- Comments ---------- */
.comments h2 { font-size: 20px; margin-bottom: 14px; }
.comment-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 18px;
}
.comment-form textarea {
  width: 100%;
  min-height: 80px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  resize: vertical;
}
.comment-form textarea:focus { outline: none; border-color: var(--accent); }
.comment-form .row { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 12px; }
.comment-form small { color: var(--text-muted); font-size: 12px; }

.comment {
  border-top: 1px solid var(--border);
  padding: 14px 0;
  display: flex;
  gap: 12px;
}
.comment .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: #02020a; font-size: 14px;
  flex-shrink: 0;
}
.comment .body { flex: 1; min-width: 0; }
.comment .author { font-weight: 700; color: #fff; font-size: 14px; }
.comment .date { color: var(--text-muted); font-size: 12px; margin-left: 6px; }
.comment p { font-size: 15px; color: #d3d8f5; margin-top: 4px; word-wrap: break-word; }

/* ---------- Forms ---------- */
.form-block {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
}
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font-size: 14px; font-weight: 600; color: #fff; }
.form-row small { color: var(--text-muted); font-size: 12px; }
.form-row input, .form-row textarea, .form-row select {
  background: rgba(0,0,0,0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 13px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none; border-color: var(--accent);
}
.form-row textarea { min-height: 110px; resize: vertical; }

/* ---------- Orientation toggle (submit form) ---------- */
.orient-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 4px;
}
.orient {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 18px 14px;
  background: rgba(0, 0, 0, 0.25);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  color: #fff;
  font-family: inherit;
  transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.orient:hover { border-color: var(--border-strong); background: rgba(0, 0, 0, 0.4); }
.orient.active {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, 0.12);
}
.orient-icon {
  border: 2px solid var(--text-muted);
  border-radius: 4px;
  margin-bottom: 4px;
  display: block;
  transition: border-color .15s ease, background .15s ease;
}
.orient-icon.landscape { width: 44px; height: 26px; }
.orient-icon.portrait  { width: 26px; height: 44px; }
.orient.active .orient-icon {
  border-color: var(--accent);
  background: rgba(0, 229, 255, 0.20);
}
.orient strong { font-size: 14px; color: #fff; font-weight: 700; }
.orient small  { color: var(--text-muted); font-size: 11px; }

/* ---------- AI draft section (revealed after Generate) ---------- */
.draft-section {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  animation: draftin .25s ease;
}
@keyframes draftin {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.draft-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}
.draft-banner {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(123, 92, 255, 0.18), rgba(0, 229, 255, 0.15));
  border: 1px solid rgba(0, 229, 255, 0.30);
  border-radius: 999px;
  font-size: 12px;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* ---------- Pills / status ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(255,255,255,0.06);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.pill.voting   { background: rgba(0,229,255,0.10); color: var(--accent); border-color: rgba(0,229,255,0.25); }
.pill.near     { background: rgba(255,61,138,0.10); color: var(--warm);   border-color: rgba(255,61,138,0.25); }
.pill.generating { background: rgba(255,209,102,0.10); color: var(--warning); border-color: rgba(255,209,102,0.25); }
.pill.generated  { background: rgba(46,227,122,0.10); color: var(--success); border-color: rgba(46,227,122,0.25); }

/* ---------- Leaderboard ---------- */
.lb-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.lb-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.lb-item:hover { border-color: var(--border-strong); }
.lb-item .rank { font-weight: 800; font-size: 18px; color: var(--accent); }
.lb-item .title { font-weight: 600; color: #fff; }
.lb-item .stat { color: var(--text-muted); font-size: 14px; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 60px;
  padding: 36px 0;
  color: var(--text-muted);
  font-size: 14px;
}
.site-footer .footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 28px;
  margin-bottom: 24px;
}
@media (max-width: 740px) {
  .site-footer .footer-grid { grid-template-columns: 1fr 1fr; }
}
.site-footer h4 {
  color: #fff;
  font-size: 14px;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer .copy { text-align: center; padding-top: 18px; border-top: 1px solid var(--border); color: var(--text-dim); }

/* ---------- Misc ---------- */
.empty {
  padding: 40px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}

.flash {
  position: fixed;
  bottom: 20px; left: 50%;
  transform: translateX(-50%);
  background: var(--bg-elev);
  color: #fff;
  border: 1px solid var(--accent);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow);
  z-index: 100;
  animation: flashin .25s ease;
}
@keyframes flashin {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ---------- Two-col layout for video page ---------- */
.video-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
}
@media (max-width: 980px) {
  .video-layout { grid-template-columns: 1fr; }
}

/* ---------- Trending strip ---------- */
.strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: thin;
}
.strip::-webkit-scrollbar { height: 8px; }
.strip::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 4px; }
.strip .card { min-width: 280px; max-width: 280px; }

/* =============================================================
   Primary-CTA legibility override (must be the last block)
   Browsers apply :link/:visited from the user-agent stylesheet
   which can outrank a plain class for color on <a> elements.
   This final !important rule guarantees pure-black text on all
   cyan / green CTAs so the labels stay legible.
   ============================================================= */
.btn-primary, a.btn-primary,
.btn-primary:link, .btn-primary:visited,
.btn-primary:hover, .btn-primary:focus, .btn-primary:active,
.nav-cta, a.nav-cta,
.nav-cta:link, .nav-cta:visited,
.nav-cta:hover, .nav-cta:focus, .nav-cta:active,
.backer, .backer:hover, .backer:focus, .backer:active,
.backer.backed, .backer.backed:hover {
  color: #000 !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}
