/* ════════════════════════════════════════════════
   SnapDance Website — Design System
   Colors from the mobile app:
     Primary BG:  #111
     Card BG:     #1a1a1a
     Accent:      #ff2d55
     Orange:      #ff9800
     Text:        #fff / #ccc / #aaa / #999
     Border:      #222 / #333
   ════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222;
  --bg-elevated: #141414;
  --accent: #ff2d55;
  --accent-hover: #ff4570;
  --accent-glow: rgba(255, 45, 85, 0.15);
  --accent-glow-strong: rgba(255, 45, 85, 0.3);
  --orange: #ff9800;
  --purple: #bb86fc;
  --green: #00c853;
  --green-hover: #00e676;
  --blue: #4fc3f7;
  --teal: #00bfa5;
  --red: #f44336;
  --text-primary: #fff;
  --text-secondary: #ccc;
  --text-muted: #aaa;
  --text-dim: #999;
  --text-faint: #666;
  --border: #222;
  --border-light: #333;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button { font-family: var(--font); cursor: pointer; border: none; }

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
}

.logo-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.logo-icon.small { width: 44px; height: 44px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 14px;
  color: var(--text-muted);
  transition: color var(--transition);
  font-weight: 500;
}

.nav-links a:hover { color: var(--text-primary); }

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 8px 20px !important;
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
  transition: background var(--transition) !important;
}

.nav-cta:hover { background: var(--accent-hover) !important; }

.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  padding: 4px;
}

.nav-mobile-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  transition: all var(--transition);
  border: none;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 30px var(--accent-glow-strong);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  color: var(--text-secondary);
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--border-light);
  transition: all var(--transition);
}

.btn-secondary:hover {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--text-dim);
}

.btn-large { padding: 16px 40px; font-size: 16px; }

/* ── Nav link active state ── */
.nav-link {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link.active { color: var(--text-primary) !important; }

/* ── Nav right (avatar + admin link) ── */
.nav-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-admin {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-avatar-link {
  display: flex;
  align-items: center;
}

.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  overflow: hidden;
  transition: border-color 0.2s;
}

.nav-avatar:hover {
  border-color: var(--accent);
}

/* ════════════════════════════════════════════════
   HOME — Template Gallery
   ════════════════════════════════════════════════ */

/* ── Home Hero (compact banner) ── */
.page-header-section {
  padding: 96px 24px 24px;
}
.page-header-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.page-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.5px;
}
.page-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-top: 4px;
}
.page-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.custom-template-btn {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.custom-template-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.home-hero {
  padding: 100px 24px 40px;
  position: relative;
  overflow: hidden;
}

.home-hero-glow {
  position: absolute;
  top: -300px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.home-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
}

.home-hero-text h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 6px;
}

.home-hero-sub {
  font-size: 16px;
  color: var(--text-muted);
}

.home-hero-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-stat-pill {
  padding: 6px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  color: var(--text-dim);
}

.hero-stat-pill strong {
  color: var(--text-primary);
  font-weight: 700;
}

/* ── Filter Bar ── */
.filter-bar {
  position: sticky;
  top: 64px;
  z-index: 100;
  background: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
}

.filter-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.filter-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar { display: none; }

.filter-tab {
  padding: 7px 16px;
  background: transparent;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all var(--transition);
  cursor: pointer;
  font-family: var(--font);
}

.filter-tab:hover {
  color: var(--text-primary);
  background: var(--bg-card);
}

.filter-tab.active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.sort-select {
  background: var(--bg-card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 12px;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  outline: none;
}

.sort-select:focus { border-color: var(--accent); }
.sort-select option { background: var(--bg-secondary); }

.template-search {
  flex: 1;
  min-width: 160px;
  max-width: 280px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: 13px;
  font-family: var(--font);
  outline: none;
}
.template-search::placeholder { color: var(--text-muted); }
.template-search:focus { border-color: var(--accent); }

/* ── Template Grid ── */
.template-gallery {
  padding: 32px 0 80px;
  min-height: 60vh;
}

.gallery-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

@media (min-width: 1200px) {
  .template-grid { grid-template-columns: repeat(5, 1fr); }
}

.gallery-empty {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-faint);
  font-size: 15px;
}

/* ── Template Card ── */
.tmpl-card-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
}

.tmpl-card-wrap:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 20px var(--accent-glow);
}

.tmpl-video-container {
  position: relative;
  aspect-ratio: 9/16;
  background: #000;
  overflow: hidden;
}

.tmpl-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tmpl-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.25);
  transition: opacity 0.3s ease;
}

.tmpl-card-wrap:hover .tmpl-play-overlay { opacity: 0; }

.tmpl-tiktok-logo {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.6));
}

.tmpl-stats-overlay {
  position: absolute;
  right: 6px;
  bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 2;
  pointer-events: none;
}
.tmpl-stats-overlay .tmpl-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}
.tmpl-stats-overlay .tmpl-stat svg {
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.8));
}

.tmpl-card-badges {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  gap: 4px;
}

.tmpl-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.tmpl-badge-bpm {
  background: rgba(187, 134, 252, 0.25);
  color: var(--purple);
  border: 1px solid rgba(187, 134, 252, 0.3);
}

.badge-diff-easy {
  background: rgba(0, 200, 83, 0.2);
  color: #4caf50;
  border: 1px solid rgba(0, 200, 83, 0.3);
}

.badge-diff-medium {
  background: rgba(255, 152, 0, 0.2);
  color: var(--orange);
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.badge-diff-hard {
  background: rgba(244, 67, 54, 0.2);
  color: var(--red);
  border: 1px solid rgba(244, 67, 54, 0.3);
}

.tmpl-virality {
  position: absolute;
  top: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(255, 45, 85, 0.15);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 45, 85, 0.25);
}

.tmpl-card-info {
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.tmpl-card-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tmpl-card-category {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  padding: 2px 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-full);
}

/* ── Template Detail Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

/* Generic .modal-card used by auth gates etc — keep overflow-y:auto */
.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.open .modal-card {
  transform: scale(1) translateY(0);
}

/* ── Template Modal specific: 2-column layout ── */
.tmd-card {
  max-width: 1000px;
  max-height: 92vh;
  overflow: hidden;
  border-radius: 20px;
  display: flex;
  flex-direction: row;
}

/* LEFT column — fixed 320px, video fills it entirely */
.tmd-left {
  width: 320px;
  flex-shrink: 0;
  position: relative;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
  display: flex;
  flex-direction: column;
}

.tmd-left::before {
  content: "▶";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 64px;
  color: rgba(255, 255, 255, 0.15);
  z-index: 0;
  pointer-events: none;
}

.tmd-video-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 1;
}

.tmd-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tmd-mute-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.55);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  transition: background 0.2s;
}
.tmd-mute-btn:hover { background: rgba(255,45,85,0.7); }

/* Tier badge pinned top-left */
.tmd-tier-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
  padding: 3px 10px;
  border-radius: 20px;
}

/* Bottom gradient overlay */
.tmd-left-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  z-index: 3;
}

.tmd-left-pill {
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 700;
  color: #8B5CF6;
  background: rgba(139,92,252,0.15);
  border: 1px solid rgba(139,92,252,0.3);
  padding: 3px 10px;
  border-radius: 20px;
  display: inline-block;
}

.tmd-left-name {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 4px;
}

.tmd-left-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tmd-bpm {
  font-size: 13px;
  color: var(--accent);
  font-weight: 700;
}

.tmd-runs {
  font-size: 12px;
  color: var(--text-muted);
}

/* RIGHT column */
.tmd-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* Header */
.tmd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.tmd-header-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  flex: 1;
  margin-right: 12px;
}

.tmd-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.tmd-logo-link {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 14px;
}

.tmd-logo-img {
  height: 28px;
  width: 28px;
  border-radius: 6px;
}

.tmd-logo-text {
  color: var(--text-primary);
}

.tmd-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
  transition: color var(--transition);
}

.tmd-close-btn:hover { color: var(--text-primary); }

/* Scrollable body */
.tmd-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 0;
}

/* Creator card */
.tmd-creator-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 16px;
}

.tmd-creator-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.tmd-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.tmd-creator-info {
  flex: 1;
  min-width: 0;
}

.tmd-creator-handle {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}

.tmd-creator-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tmd-creator-btns {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.tmd-icon-btn {
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), color var(--transition);
}

.tmd-icon-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.tmd-follow-btn {
  background: var(--accent);
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: background var(--transition);
}

.tmd-follow-btn:hover { background: var(--accent-hover); }

.tmd-follow-btn.following {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-muted);
}

.tmd-msg-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 9px;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: border-color var(--transition), color var(--transition);
}

.tmd-msg-btn:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

/* Section (music / selfie) */
.tmd-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.tmd-section-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Music rows */
.tmd-music-rows {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tmd-music-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  background: transparent;
}

.tmd-music-row:hover {
  border-color: var(--text-dim);
}

.tmd-music-row--active {
  border-color: var(--accent);
  background: rgba(255,45,85,0.08);
}

.tmd-music-icon {
  font-size: 20px;
  width: 28px;
  text-align: center;
  flex-shrink: 0;
}

.tmd-music-info {
  flex: 1;
  min-width: 0;
}

.tmd-music-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-primary);
}

.tmd-music-row--active .tmd-music-label {
  color: var(--accent);
}

.tmd-music-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
  line-height: 1.4;
}

.tmd-radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-light);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition), background var(--transition);
}

.tmd-music-row--active .tmd-radio-dot {
  border-color: var(--accent);
  background: var(--accent);
}

.tmd-radio-dot--checked::after {
  content: '';
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #fff;
}

/* Selfie dropzone (tmd variant) */
.tmd-dropzone {
  padding: 24px;
  text-align: center;
}

.tmd-drop-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.tmd-drop-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.tmd-drop-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 12px;
}

.tmd-choose-btn {
  font-size: 13px;
  padding: 8px 18px;
}

/* Footer */
.tmd-footer {
  border-top: 1px solid var(--border-light);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
}

.tmd-cancel-btn {
  min-width: 90px;
  padding: 12px 20px;
  font-size: 14px;
}

.tmd-generate-btn {
  flex: 1;
  justify-content: center;
  font-size: 14px;
  padding: 12px;
}

.tmd-generate-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ── Old generic modal parts (kept for auth gate etc.) ── */
.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 10;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--transition);
}

.modal-close:hover { background: rgba(255,255,255,0.15); }

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.modal-video-wrap {
  aspect-ratio: 9/16;
  max-height: 70vh;
  background: #000;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  overflow: hidden;
}

.modal-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-info {
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-info h2 {
  font-size: 24px;
  font-weight: 800;
}

.modal-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.modal-audio-section { margin-top: auto; }

.modal-audio-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.modal-audio-section audio {
  width: 100%;
  height: 36px;
  border-radius: var(--radius-sm);
}

.modal-actions {
  margin-top: 8px;
}

.modal-actions .btn-primary {
  width: 100%;
  justify-content: center;
}

/* ── Selfie Upload Flow (in modal) ── */
.modal-selfie-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.modal-selfie-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.selfie-dropzone {
  border: 2px dashed rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.selfie-dropzone:hover,
.selfie-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(255, 45, 85, 0.05);
}

.selfie-prompt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 13px;
}

.selfie-preview-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
}

.selfie-preview-wrap img {
  max-height: 160px;
  max-width: 100%;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.selfie-clear {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.selfie-clear:hover {
  background: var(--accent);
}

/* ── Music Picker ── */
.modal-music-flow {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.music-options {
  display: flex;
  gap: 8px;
}

.music-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.music-option:hover {
  border-color: rgba(255, 255, 255, 0.25);
}

.music-option.selected {
  border-color: var(--accent);
  background: rgba(255, 45, 85, 0.08);
}

.music-option-icon {
  color: var(--text-dim);
  margin-bottom: 2px;
}

.music-option.selected .music-option-icon {
  color: var(--accent);
}

.music-option span {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.music-option small {
  font-size: 11px;
  color: var(--text-dim);
}

.music-options-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.music-option-accent.selected {
  border-color: var(--accent);
  background: rgba(255, 45, 85, 0.12);
}

.music-catalog {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.music-search-wrap {
  position: relative;
}

.music-search {
  width: 100%;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}

.music-search:focus {
  border-color: var(--accent);
}

.music-list {
  max-height: 200px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.music-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 0.15s;
}

.music-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.music-item.selected {
  background: rgba(255, 45, 85, 0.12);
  outline: 1px solid var(--accent);
}

.music-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.music-item-title {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-item-meta {
  font-size: 11px;
  color: var(--text-dim);
}

.music-item-actions {
  flex-shrink: 0;
  margin-left: 8px;
}

.music-play-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.music-play-btn:hover {
  background: var(--accent);
}

.music-loading {
  font-size: 12px;
  color: var(--text-dim);
  text-align: center;
  padding: 16px;
}

.music-upload-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border: 1px dashed #333;
  border-radius: 8px;
  margin: 4px 0 8px;
}

.music-upload-btn {
  flex-shrink: 0;
  padding: 6px 14px;
  background: rgba(255,255,255,0.08);
  border: 1px solid #444;
  border-radius: 6px;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background 0.2s;
}

.music-upload-btn:hover:not(:disabled) {
  background: rgba(255,255,255,0.14);
}

.music-upload-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.music-upload-chip {
  font-size: 13px;
  color: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Generation Progress ── */
.modal-gen-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 32px 0;
}

.gen-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite, spinnerGlow 2s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes spinnerGlow {
  0%, 100% { box-shadow: 0 0 6px rgba(255, 45, 85, 0.3); }
  50% { box-shadow: 0 0 18px rgba(255, 45, 85, 0.7); }
}

.gen-status {
  font-size: 14px;
  color: var(--text-dim);
  text-align: center;
  min-height: 20px;
}

.gen-steps {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.gen-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
  transition: color 0.4s ease;
}

.gen-step.active {
  color: var(--accent);
}

.gen-step.done {
  color: #00c853;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
  transition: background 0.4s ease;
}

.gen-step.active .step-dot {
  animation: stepPulse 1s ease-in-out infinite;
}

@keyframes stepPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.7); }
}

.gen-step-arrow {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.15);
}

.gen-progress-bar {
  position: relative;
  width: 100%;
  max-width: 320px;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin: 4px auto 0;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.gen-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff2d55 0%, #ff5e8a 50%, #ff2d55 100%);
  background-size: 200% 100%;
  border-radius: 999px;
  transition: width 0.6s ease;
  animation: genProgressFlow 2.4s linear infinite;
  box-shadow: 0 0 12px rgba(255, 45, 85, 0.55);
}

.gen-progress-shine {
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: genProgressShine 2.2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes genProgressFlow {
  0% { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

@keyframes genProgressShine {
  0% { left: -40%; }
  60%, 100% { left: 100%; }
}

.gen-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.gen-timer {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.gen-eta {
  font-size: 12px;
  color: var(--accent);
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.gen-tip {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
  text-align: center;
  margin: 0;
  max-width: 260px;
  line-height: 1.5;
  min-height: 18px;
  transition: opacity 0.5s ease;
}

/* ── Generation Result ── */
.modal-gen-result {
  display: flex;
  flex-direction: column;
}

.gen-result-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 20px 0;
}

/* Prevent <video>'s intrinsic dimensions from forcing its grid column wider
   than 1fr — without min-width:0, replaced elements (img, video) can blow
   out grid sizing and the columns end up unequal. */
.gen-result-col {
  min-width: 0;
}

/* Fixed-ratio frame ensures both columns render at exactly the same size,
   regardless of <video>'s intrinsic dimensions or controls chrome. */
.gen-result-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.gen-result-frame img,
.gen-result-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

/* Native fullscreen — show the full portrait, no crop, on black background */
#modalResultVideo:fullscreen,
#modalResultVideo:-webkit-full-screen {
  position: static;
  inset: auto;
  object-fit: contain;
  background: #000;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
}

.gen-result-col-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.gen-result-actions {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#modalPostTikTokBtn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gen-result-reply-row {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gen-result-reply-label {
  font-size: 11px;
  color: var(--text-muted);
}

.gen-result-reply-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #1a1a1a;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
}

.gen-result-reply-text {
  flex: 1;
  font-size: 12px;
  color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.gen-result-reply-copy {
  flex-shrink: 0;
  background: transparent;
  border: 1px solid #444;
  border-radius: 6px;
  color: #ccc;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.gen-result-reply-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.gen-result-reply-copy.copied {
  border-color: #00c853;
  color: #00c853;
}


.gen-result-secondary {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.gen-result-secondary .btn-outline,
.gen-result-secondary a.btn-outline {
  flex: 1;
  justify-content: center;
  text-decoration: none;
  text-align: center;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.btn-outline:hover {
  border-color: var(--accent);
  background: rgba(255, 45, 85, 0.08);
}

/* ── Old marketing sections (kept for reference pages) ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 60px;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  max-width: 600px;
  text-align: center;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent-glow);
  border: 1px solid rgba(255, 45, 85, 0.3);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--accent), #ff8a65, var(--accent));
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 4s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  gap: 48px;
  justify-content: center;
}

.stat { text-align: center; }

.stat-value {
  display: block;
  font-size: 32px;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 500;
}

/* Phone mockup */
.hero-visual {
  display: none; /* shown on wider screens */
  z-index: 1;
}

.phone-mockup {
  width: 280px;
  height: 560px;
  background: var(--bg-secondary);
  border-radius: 36px;
  border: 3px solid var(--border-light);
  padding: 12px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 60px var(--accent-glow);
}

.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  border-radius: 26px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.mock-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
}

.mock-dot { width: 8px; height: 8px; background: var(--border-light); border-radius: 50%; }
.mock-title { font-size: 13px; font-weight: 700; color: var(--text-muted); }

.mock-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 12px;
}

.mock-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  animation: mockPulse 3s ease-in-out infinite;
}

.pulse-1 { animation-delay: 0s; }
.pulse-2 { animation-delay: 0.3s; }
.pulse-3 { animation-delay: 0.6s; }
.pulse-4 { animation-delay: 0.9s; }
.pulse-5 { animation-delay: 1.2s; }
.pulse-6 { animation-delay: 1.5s; }

@keyframes mockPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.mock-bottom-bar {
  padding: 16px;
  display: flex;
  justify-content: center;
}

.mock-btn-big {
  width: 140px;
  height: 40px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

/* ── Sections ── */
.section-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-tag {
  display: inline-block;
  padding: 4px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* ── Features ── */
.features {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px;
  transition: all var(--transition);
}

.feature-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}

.feature-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 20px;
}

.feature-icon.accent-orange { background: rgba(255, 152, 0, 0.15); color: var(--orange); }
.feature-icon.accent-purple { background: rgba(187, 134, 252, 0.15); color: var(--purple); }
.feature-icon.accent-green  { background: rgba(0, 200, 83, 0.15); color: var(--green); }
.feature-icon.accent-blue   { background: rgba(79, 195, 247, 0.15); color: var(--blue); }
.feature-icon.accent-teal   { background: rgba(0, 191, 165, 0.15); color: var(--teal); }

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ── How It Works ── */
.how-it-works {
  padding: 120px 0;
}

.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 240px;
  max-width: 320px;
  text-align: center;
}

.step-number {
  width: 48px;
  height: 48px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  margin: 0 auto 24px;
  box-shadow: 0 0 30px var(--accent-glow-strong);
}

.step-visual {
  margin-bottom: 24px;
}

.step-mockup {
  width: 160px;
  height: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Selfie mockup */
.selfie-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px dashed var(--border-light);
  animation: selfieBreath 2s ease-in-out infinite;
}

@keyframes selfieBreath {
  0%, 100% { border-color: var(--border-light); }
  50% { border-color: var(--accent); }
}

.selfie-btn {
  width: 60px;
  height: 32px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

/* Template mockup */
.template-mock {
  flex-direction: row;
  gap: 6px;
  padding: 16px;
}

.tmpl-card {
  width: 36px;
  height: 60px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.tmpl-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

/* Result mockup */
.result-mock { position: relative; }

.result-play {
  display: flex;
  align-items: center;
  justify-content: center;
}

.result-share {
  width: 80px;
  height: 28px;
  background: var(--accent);
  border-radius: var(--radius-full);
}

.step h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 14px;
  color: var(--text-dim);
  max-width: 260px;
  margin: 0 auto;
}

.step-connector {
  display: flex;
  align-items: center;
  padding: 0 8px;
  opacity: 0.5;
}

/* ── Pipeline ── */
.pipeline {
  padding: 120px 0;
  background: var(--bg-secondary);
}

.pipeline-flow {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.pipe-step {
  flex: 1;
  min-width: 180px;
  max-width: 240px;
  text-align: center;
  padding: 0 16px;
}

.pipe-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-glow);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin: 0 auto 16px;
  border: 1px solid rgba(255, 45, 85, 0.2);
}

.pipe-icon.accent-orange { background: rgba(255, 152, 0, 0.1); color: var(--orange); border-color: rgba(255, 152, 0, 0.2); }
.pipe-icon.accent-purple { background: rgba(187, 134, 252, 0.1); color: var(--purple); border-color: rgba(187, 134, 252, 0.2); }
.pipe-icon.accent-green  { background: rgba(0, 200, 83, 0.1); color: var(--green); border-color: rgba(0, 200, 83, 0.2); }

.pipe-step h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.pipe-step p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
}

.pipe-arrow {
  display: flex;
  align-items: center;
  padding-top: 16px;
}

/* ── CTA ── */
.cta-section {
  padding: 120px 0;
}

.cta-card {
  position: relative;
  text-align: center;
  padding: 80px 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}

.cta-card h2 {
  font-size: 32px;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}

.cta-card p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 32px;
  position: relative;
}

.cta-card .btn-primary { position: relative; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-dim);
  transition: color var(--transition);
}

.footer-links a:hover { color: var(--text-primary); }

.footer-copy {
  font-size: 13px;
  color: var(--text-faint);
}


/* ════════════════════════════════════════════════
   DASHBOARD PAGE STYLES
   ════════════════════════════════════════════════ */

.dashboard-page {
  padding-top: 80px;
  min-height: 100vh;
}

.dash-header {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.dash-header h1 {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 16px;
}

/* Stats bar */
.dash-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.dash-stat {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
}

.dash-stat .stat-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-pending { background: var(--text-dim); }
.dot-generating { background: var(--orange); }
.dot-ready { background: var(--green); }
.dot-published { background: var(--accent); }
.dot-failed { background: var(--red); }

.dash-stat .stat-count {
  font-weight: 700;
  color: var(--text-primary);
}

/* Tools panel */
.tools-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 32px;
}

.tool-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.tool-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.tool-desc {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.tool-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tool-input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color var(--transition);
}

.tool-input:focus { border-color: var(--accent); }

.tool-input-small {
  max-width: 80px;
  text-align: center;
}

.tool-status {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 8px;
  min-height: 18px;
}

.tool-status.active { color: var(--orange); }
.tool-status.done { color: var(--green); }
.tool-status.fail { color: var(--red); }

/* Dashboard buttons */
.dash-btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
  white-space: nowrap;
}

.dash-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.dash-btn-approve { background: var(--green); color: #fff; }
.dash-btn-approve:hover:not(:disabled) { background: var(--green-hover); }

.dash-btn-publish { background: var(--accent); color: #fff; }
.dash-btn-publish:hover:not(:disabled) { background: var(--accent-hover); }

.dash-btn-reject { background: var(--bg-elevated); color: var(--text-dim); border: 1px solid var(--border); }
.dash-btn-reject:hover:not(:disabled) { background: var(--bg-card-hover); color: var(--text-primary); }

.dash-btn-sm { padding: 6px 14px; font-size: 12px; }

/* Retry dropdown */
.retry-dropdown-wrap {
  position: relative;
  display: inline-block;
}

.retry-dropdown {
  display: none;
  position: absolute;
  bottom: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 220px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
  z-index: 9999;
  overflow: hidden;
}

.retry-dropdown.open { display: block; }

.retry-option {
  display: block;
  width: 100%;
  padding: 10px 14px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 13px;
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
  transition: background var(--transition);
}

.retry-option:hover {
  background: var(--bg-card-hover);
  color: var(--text-primary);
}

.retry-option + .retry-option {
  border-top: 1px solid var(--border);
}

/* Published template badge */
.badge-published {
  background: rgba(0, 200, 83, 0.15);
  color: var(--green);
}

/* Published card border accent */
.published-card {
  border-left: 3px solid var(--green);
}

.badge-manual {
  background: rgba(79, 195, 247, 0.15);
  color: var(--blue);
}

/* ── Collapsible Sections ── */
.collapsible > .dash-section-title {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.collapsible > .dash-section-title:hover {
  color: var(--accent);
}

.section-chevron {
  display: inline-block;
  font-size: 14px;
  transition: transform var(--transition);
  color: var(--text-muted);
  flex-shrink: 0;
}

.collapsible.collapsed .section-chevron {
  transform: rotate(-90deg);
}

.dash-section-body {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  max-height: 20000px;
  opacity: 1;
}

.collapsible.collapsed .dash-section-body {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

/* Hashtag chips */
.hashtag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  max-height: 100px;
  overflow-y: auto;
}

.hashtag-chip {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 4px;
}

.hashtag-chip.custom {
  border-color: rgba(255, 45, 85, 0.3);
  color: var(--accent);
}

.hashtag-chip .remove-tag {
  cursor: pointer;
  color: var(--text-faint);
  font-size: 14px;
  line-height: 1;
  transition: color var(--transition);
}

.hashtag-chip .remove-tag:hover { color: var(--red); }

/* ── Home Upload Card (template grid) ── */
.upload-card {
  border: 2px dashed var(--border-light) !important;
  transition: all var(--transition);
}

.upload-card:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 20px var(--accent-glow) !important;
}

.upload-dropzone-home {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.upload-dropzone-home.dragover {
  background: rgba(255, 45, 85, 0.08);
}

.upload-home-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  height: 100%;
}

.upload-home-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 45, 85, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 4px;
}

.upload-home-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.upload-home-sub {
  font-size: 11px;
  color: var(--text-faint);
  text-align: center;
}

.upload-home-preview {
  position: relative;
  width: 100%;
  height: 100%;
}

.upload-home-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-card-form {
  padding: 10px !important;
}

.upload-card-input {
  width: 100%;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font);
  outline: none;
  margin-bottom: 6px;
  box-sizing: border-box;
}

.upload-card-input:focus { border-color: var(--accent); }

.upload-card-row {
  display: flex;
  gap: 6px;
}

.upload-card-select {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 7px 8px;
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font);
  outline: none;
  cursor: pointer;
}

.upload-card-btn {
  flex: 1;
  padding: 7px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background var(--transition);
  white-space: nowrap;
}

.upload-card-btn:hover:not(:disabled) { background: var(--accent-hover); }
.upload-card-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.upload-card-progress {
  height: 3px;
  background: var(--bg-elevated);
  border-radius: 2px;
  margin-top: 6px;
  overflow: hidden;
}

.upload-card-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

.upload-card-status {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 4px;
  min-height: 14px;
}

.upload-card-status.active { color: var(--orange); }
.upload-card-status.done { color: var(--green); }
.upload-card-status.fail { color: var(--red); }

.upload-home-step-badge {
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

/* Selfie upload section */
.upload-selfie-section {
  margin-bottom: 6px;
}

.upload-selfie-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--bg-primary);
  border: 1px dashed var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition);
}

.upload-selfie-row:hover {
  border-color: var(--accent);
}

.upload-selfie-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 45, 85, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}

.selfie-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
}

.selfie-hint {
  font-size: 10px;
  color: var(--text-faint);
}

.upload-selfie-preview {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.upload-selfie-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.selfie-clear {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.selfie-clear:hover { background: var(--red); }

/* Dashboard Upload dropzone */
.upload-dropzone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
  position: relative;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(255, 45, 85, 0.04);
}

.dropzone-content {
  padding: 28px 16px;
  text-align: center;
}

.dropzone-icon {
  font-size: 28px;
  color: var(--text-faint);
  margin-bottom: 8px;
}

.dropzone-label {
  font-size: 13px;
  color: var(--text-dim);
}

.dropzone-browse {
  color: var(--accent);
  text-decoration: underline;
  cursor: pointer;
}

.dropzone-hint {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
}

.dropzone-preview {
  position: relative;
  aspect-ratio: 9 / 16;
  max-height: 220px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dropzone-preview video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.dropzone-clear {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
  z-index: 2;
}

.dropzone-clear:hover { background: var(--red); }

.upload-progress {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  width: 0%;
  transition: width 0.3s ease;
}

/* Section headings */
.dash-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px 32px;
}

.dash-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-section-title .count-badge {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  color: var(--text-dim);
}

/* Video card grid */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

/* Video cards */
.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: visible;
  transition: all var(--transition);
}

.dash-card .video-wrap,
.dash-card .preview-grid {
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.dash-card:hover {
  border-color: var(--border-light);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.dash-card.stage2 { border-color: rgba(0, 200, 83, 0.4); }
.dash-card.in-progress { border-color: rgba(255, 152, 0, 0.4); }
.dash-card.failed { border-color: rgba(244, 67, 54, 0.4); }

/* Video containers */
.video-wrap {
  aspect-ratio: 9/16;
  max-height: 420px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-wrap.half { max-height: 300px; }

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Video overlay controls */
.video-wrap {
  position: relative;
}

.video-overlay-controls {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
  z-index: 2;
}

.video-wrap:hover .video-overlay-controls {
  opacity: 1;
  pointer-events: auto;
}

.vo-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  transition: background 0.15s, transform 0.15s;
}

.vo-btn:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

/* Video expand modal */
.video-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
}

.video-modal-overlay.open {
  display: flex;
}

.video-modal-inner {
  position: relative;
  max-width: 480px;
  max-height: 90vh;
  width: 90vw;
}

.video-modal-inner video {
  width: 100%;
  max-height: 85vh;
  border-radius: 12px;
  background: #000;
}

.video-modal-close {
  position: absolute;
  top: -12px;
  right: -12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  transition: background 0.15s;
}

.video-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Side-by-side preview */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
}

.preview-col {
  background: var(--bg-card);
  text-align: center;
}

.preview-label {
  font-size: 10px;
  color: var(--text-faint);
  padding: 8px 0 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

/* Metadata badges */
.card-meta {
  padding: 12px 14px 6px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.meta-badge {
  font-size: 11px;
  background: var(--bg-elevated);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-likes { color: var(--accent); border-color: rgba(255, 45, 85, 0.2); }
.badge-views { color: var(--blue); border-color: rgba(79, 195, 247, 0.2); }
.badge-shares { color: #81c784; border-color: rgba(129, 199, 132, 0.2); }
.badge-comments { color: #ffb74d; border-color: rgba(255, 183, 77, 0.2); }
.badge-hashtag { color: var(--blue); }
.badge-name { background: var(--green); color: #fff; font-weight: 600; border: none; }
.badge-bpm { color: var(--purple); border-color: rgba(187, 134, 252, 0.2); }
.badge-id { color: var(--text-faint); }
.badge-creator { color: var(--text-dim); }
.badge-song { color: var(--orange); border-color: rgba(255, 152, 0, 0.2); }
.badge-no-song { color: var(--text-faint); border-color: var(--border); }
.badge-score { color: var(--green); border-color: rgba(0, 200, 83, 0.2); }

.badge-gender {
  color: var(--purple);
  border-color: rgba(187, 134, 252, 0.2);
  cursor: pointer;
  transition: all var(--transition);
}

.badge-gender:hover {
  background: rgba(187, 134, 252, 0.15);
  border-color: var(--purple);
}

.badge-uncertain {
  color: var(--orange);
  border-color: rgba(255, 152, 0, 0.2);
}

.badge-generating {
  background: var(--orange);
  color: #000;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
}

.badge-failed { background: var(--red); color: #fff; font-weight: 600; border: none; }

/* Card description */
.card-desc {
  padding: 4px 14px 12px;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.4;
}

.card-error {
  color: var(--red);
  padding: 8px 14px;
  font-size: 12px;
}

/* Card actions */
.card-actions {
  display: flex;
  gap: 8px;
  padding: 0 14px 14px;
}

.card-actions .dash-btn { flex: 1; }

/* Generation progress row */
.gen-progress-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 14px 2px;
  font-size: 12px;
}

.gen-percent {
  color: var(--orange);
  font-weight: 700;
  font-size: 14px;
}

.gen-eta {
  color: var(--text-muted);
  font-size: 12px;
}

/* Progress bar */
.card-progress {
  height: 4px;
  background: var(--border);
  margin: 0 14px 14px;
  border-radius: 2px;
  overflow: hidden;
}

.card-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--orange), #ffb74d);
  transition: width 0.6s ease;
}

/* Spinner */
.spinner {
  width: 12px;
  height: 12px;
  border: 2px solid #000;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.dash-empty {
  text-align: center;
  color: var(--text-faint);
  padding: 60px 24px;
  font-size: 14px;
}

.dash-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
  opacity: 0.3;
}

/* Link preview fallback */
.link-preview {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.link-preview:hover { text-decoration: underline; }

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  display: none;
  z-index: 2000;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  max-width: 400px;
  backdrop-filter: blur(10px);
  animation: toastIn 0.3s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.toast.success { background: var(--green); color: #fff; }
.toast.error { background: var(--red); color: #fff; }
.toast.info { background: var(--orange); color: #000; }

/* ════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════ */

@media (min-width: 900px) {
  .hero {
    flex-direction: row;
    gap: 80px;
    justify-content: center;
  }

  .hero-content { text-align: left; }

  .hero-subtitle {
    margin-left: 0;
    margin-right: 0;
  }

  .hero-actions { justify-content: flex-start; }
  .hero-stats { justify-content: flex-start; }
  .hero-visual { display: block; }
}

@media (max-width: 768px) {
  .nav-right {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 10, 10, 0.95);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
  }

  .nav-right.open { display: flex; }
  .nav-right .nav-link { padding: 12px 24px; }
  .nav-right .nav-avatar-link { padding: 12px 24px; }
  .nav-mobile-toggle { display: flex; }

  .features-grid { grid-template-columns: 1fr; }

  .steps { flex-direction: column; gap: 32px; }
  .step-connector { transform: rotate(90deg); }

  .pipeline-flow { flex-direction: column; align-items: center; gap: 24px; }
  .pipe-arrow { transform: rotate(90deg); }

  .hero-stats { gap: 24px; }

  .footer-inner { flex-direction: column; text-align: center; }

  .dash-grid { grid-template-columns: 1fr; }

  .tools-panel { grid-template-columns: 1fr; }

  /* Home page responsive */
  .home-hero-inner { flex-direction: column; align-items: flex-start; }
  .home-hero-stats { width: 100%; }

  .filter-inner { flex-direction: column; gap: 8px; align-items: stretch; }
  .filter-tabs { padding-bottom: 4px; }
  .sort-select { width: 100%; }

  .template-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }

  .modal-body { grid-template-columns: 1fr; }
  .modal-video-wrap {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 50vh;
  }
  .tmd-card { flex-direction: column; }
  .tmd-left { width: 100%; height: 220px; flex-shrink: 0; }
  .tmd-right { flex: 1; min-height: 0; }

  /* Dance share landing (/dance/{id}): show the full 9:16 preview, not a
     wide-shallow center-crop. Matches the natural aspect of the source. */
  body.dance-mode .tmd-left {
    height: auto;
    aspect-ratio: 9 / 16;
    max-height: 60vh;
  }
  body.dance-mode .tmd-video-wrap video { object-fit: contain; background: #000; }
}

/* ════════════════════════════════════════════════
   CREATORS PAGE STYLES
   ════════════════════════════════════════════════ */

.creators-page {
  padding-top: 80px;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Creator login page */
.login-container {
  max-width: 400px;
  margin: 60px auto 0;
  text-align: center;
  padding: 0 20px;
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.login-title {
  color: var(--text-primary);
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 8px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 32px;
}

.login-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  border-radius: 10px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: opacity 0.15s;
}

.login-btn:hover { opacity: 0.85; }

.login-btn-google {
  background: #fff;
  color: #333;
}

.login-btn-apple {
  background: #000;
  color: #fff;
  border: 1px solid #333;
}

.login-btn-email {
  background: var(--accent);
  color: #fff;
}

.login-btn-icon {
  font-size: 20px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 4px 0;
}

.login-divider-line {
  flex: 1;
  height: 1px;
  background: var(--border-light);
}

.login-divider-text {
  color: var(--text-secondary);
  font-size: 13px;
}

.login-email-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-email-input {
  height: 48px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  padding: 0 16px;
  color: var(--text-primary);
  font-size: 15px;
  font-family: var(--font);
  outline: none;
}

.login-email-input:focus {
  border-color: var(--accent);
}

.login-footer {
  color: var(--text-secondary);
  font-size: 11px;
  margin-top: 28px;
  opacity: 0.6;
}

/* Creator top bar */
.creator-top-bar {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.creator-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.creator-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  flex-shrink: 0;
}

.creator-id-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.creator-id-name {
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 700;
}

.creator-id-handle {
  color: var(--text-secondary);
  font-size: 13px;
}

.new-creator-form {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

/* Stats grid (boxes like the screenshot) */
.creator-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}

.creator-stat-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: all var(--transition);
}

.creator-stat-box:hover {
  border-color: var(--border-light);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.creator-stat-balance {
  cursor: pointer;
  border-color: rgba(255, 45, 85, 0.3);
  position: relative;
}

.creator-stat-balance:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px var(--accent-glow);
}

.creator-stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.2;
}

.creator-stat-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.creator-stat-hint {
  font-size: 10px;
  color: var(--accent);
  margin-top: 2px;
}

/* Creator sections */
.creator-section {
  margin-bottom: 32px;
}

.creator-section-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Upload area */
.creator-upload-area {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  max-width: 700px;
}

.creator-upload-dropzone {
  border: 2px dashed var(--border-light);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  cursor: pointer;
  transition: all var(--transition);
  overflow: hidden;
  aspect-ratio: 9/16;
  max-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.creator-upload-dropzone:hover,
.creator-upload-dropzone.dragover {
  border-color: var(--accent);
  background: rgba(255, 45, 85, 0.04);
}

.creator-upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 16px;
  text-align: center;
}

.creator-upload-preview {
  position: relative;
  width: 100%;
  height: 100%;
}

.creator-upload-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creator-upload-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

/* Template cards grid */
.creator-templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.creator-tmpl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition);
}

.creator-tmpl-card:hover {
  border-color: var(--border-light);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.creator-tmpl-video-wrap {
  position: relative;
  aspect-ratio: 9/16;
  max-height: 320px;
  background: #000;
  overflow: hidden;
}

.creator-tmpl-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.creator-tmpl-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-faint);
  font-size: 13px;
}

.creator-tmpl-status-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.badge-active {
  background: rgba(0, 200, 83, 0.2);
  color: var(--green);
  border: 1px solid rgba(0, 200, 83, 0.3);
}

.badge-paused {
  background: rgba(255, 152, 0, 0.2);
  color: var(--orange);
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.creator-tmpl-info {
  padding: 14px;
}

.creator-tmpl-name {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.creator-tmpl-metrics {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.creator-tmpl-metric {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.creator-tmpl-metric-value {
  display: block;
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
}

.creator-tmpl-metric-label {
  display: block;
  font-size: 9px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.creator-tmpl-actions {
  display: flex;
  gap: 8px;
}

/* Balance Modal */
.balance-modal-body {
  padding: 32px 28px;
}

.balance-modal-body h2 {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 20px;
}

.balance-summary {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
}

.balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}

.balance-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.balance-label {
  font-size: 13px;
  color: var(--text-muted);
}

.balance-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.balance-options {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.balance-option h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.balance-option-desc {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 10px;
}

/* Live / Pending status label under template card */
.creator-tmpl-live-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
}

.creator-tmpl-live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-live {
  color: var(--green);
  background: rgba(0, 200, 83, 0.1);
  border: 1px solid rgba(0, 200, 83, 0.25);
}

.status-live .creator-tmpl-live-dot {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.status-pending {
  color: var(--orange);
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.25);
}

.status-pending .creator-tmpl-live-dot {
  background: var(--orange);
}

.status-rejected {
  color: var(--red);
  background: rgba(244, 67, 54, 0.1);
  border: 1px solid rgba(244, 67, 54, 0.25);
}

.status-rejected .creator-tmpl-live-dot {
  background: var(--red);
}

/* Review status badges */
.badge-pending-review {
  background: rgba(255, 152, 0, 0.2);
  color: var(--orange);
  border: 1px solid rgba(255, 152, 0, 0.3);
}

.badge-rejected {
  background: rgba(244, 67, 54, 0.2);
  color: var(--red);
  border: 1px solid rgba(244, 67, 54, 0.3);
}

/* Review card on dashboard */
.creator-review-card {
  border-color: rgba(187, 134, 252, 0.4);
}

.review-comments {
  padding: 8px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.review-comment {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 10px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--purple);
}

.review-comment-time {
  font-size: 10px;
  color: var(--text-faint);
  margin-right: 6px;
}

.review-comment-input {
  display: flex;
  gap: 6px;
  padding: 6px 14px 10px;
}

.review-comment-input .tool-input {
  flex: 1;
  padding: 7px 10px;
  font-size: 12px;
}

/* Creator-side comments */
.creator-comments-list {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.creator-comment {
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
}

.creator-comment-time {
  font-size: 10px;
  color: var(--text-faint);
  margin-right: 4px;
}

/* ── Next Steps Box ── */
.next-steps-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 24px;
}

.next-steps-heading {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.next-steps-subtext {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 16px;
}

.next-steps-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.next-steps-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background var(--transition);
  font-family: var(--font);
}

.next-steps-btn:hover {
  background: var(--accent-hover);
}

.next-steps-btn-outline {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
}

.next-steps-btn-outline:hover {
  background: var(--accent-glow);
}

.next-steps-checklist {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 4px;
}

.next-step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 500;
}

.next-step-item.active {
  color: var(--text-primary);
}

.next-step-item.done {
  color: var(--green);
  text-decoration: line-through;
}

.next-step-circle {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}

.next-step-item.active .next-step-circle {
  background: var(--accent);
}

.next-step-item.done .next-step-circle {
  background: var(--green);
}

/* ── Earnings Explainer ── */
.earnings-explainer {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 24px;
}

.earnings-explainer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.earnings-explainer-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.earnings-explainer-rate {
  text-align: right;
}

.earnings-explainer-rate-value {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: var(--green);
  line-height: 1.2;
}

.earnings-explainer-rate-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.earnings-explainer-desc {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.5;
}

/* ── Template Share Section ── */
.tmpl-share-section {
  border-top: 1px solid var(--border);
  padding-top: 10px;
  margin-top: 10px;
  margin-bottom: 8px;
}

.tmpl-share-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: 8px;
}

.tmpl-share-buttons {
  display: flex;
  gap: 6px;
}

.tmpl-share-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--accent);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition);
  font-family: var(--font);
}

.tmpl-share-btn:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.tmpl-pending-hint {
  font-size: 11px;
  color: var(--text-faint);
  font-style: italic;
  padding: 6px 0;
}

/* ── Enhanced Empty State ── */
.empty-state-enhanced {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px;
}

.empty-state-emoji {
  font-size: 36px;
  margin-bottom: 12px;
}

.empty-state-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.empty-state-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  max-width: 360px;
}

/* ── Creator Tips ── */
.creator-tips-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.creator-tip-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color var(--transition);
}

.creator-tip-row:hover {
  border-color: var(--border-light);
}

.creator-tip-num {
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  width: 20px;
  flex-shrink: 0;
}

.creator-tip-text {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

/* ── Leaderboard ── */
.leaderboard-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.leader-row {
  display: flex;
  align-items: center;
  padding: 8px 4px;
}

.leader-rank {
  color: var(--text-faint);
  font-size: 13px;
  font-weight: 700;
  width: 36px;
  flex-shrink: 0;
}

.leader-rank-top {
  color: var(--accent);
}

.leader-name {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
  flex: 1;
}

.leader-name-you {
  color: var(--accent);
}

.leader-stat {
  color: var(--text-dim);
  font-size: 12px;
  margin-right: 12px;
}

.leader-earned {
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
  width: 48px;
  text-align: right;
}

.leader-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 0;
}

.leader-row-you {
  background: var(--accent-glow);
  border-radius: var(--radius-sm);
  margin-top: 4px;
}

/* Responsive — creators */
@media (max-width: 768px) {
  .creator-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .creator-upload-area {
    grid-template-columns: 1fr;
  }

  .creator-templates-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .creator-tmpl-metrics {
    flex-direction: column;
    gap: 6px;
  }

  .new-creator-form {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ── Scroll animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ════════════════════════════════════════════════
   Dashboard Redesign — Tabs + Panels
   ════════════════════════════════════════════════ */

/* ── Header Row ── */
.dash-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 24px 16px;
}

.dash-header-left h1 {
  font-size: 28px;
  font-weight: 800;
}

.dash-header-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-action-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  padding: 8px 16px;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.dash-action-btn:hover { border-color: var(--accent); color: var(--accent); }

.dash-action-btn.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 45, 85, 0.07);
}

/* ── Panel Backdrop ── */
.panel-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(2px);
  z-index: 40;
}

.panel-backdrop.active { display: block; }

/* ── Settings Panel Anchor ── */
.settings-panel-anchor {
  position: relative;
  height: 0;
  z-index: 50;
}

/* ── Settings Panel Base (floating dropdown) ── */
.settings-panel {
  display: none;
  position: fixed;
  right: 24px;
  top: 70px;
  width: 740px;
  max-width: calc(100vw - 48px);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
  z-index: 51;
}

.settings-panel.open { display: block; }

.settings-panel .settings-panel-inner {
  padding: 20px 24px;
  max-height: 480px;
  overflow-y: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.settings-panel .settings-panel-inner::-webkit-scrollbar { display: none; }

/* ── Billing Panel — full-page override ── */
#panel-billing {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: 100%;
  border-radius: 0;
  border: none;
  z-index: 51;
  display: none;
  flex-direction: column;
  background: #1a1a1a;
}

#panel-billing.open { display: flex; }

#panel-billing .settings-panel-inner {
  flex: 1;
  max-height: none;
  overflow-y: auto;
  padding: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

#panel-billing .settings-panel-inner::-webkit-scrollbar { display: none; }

/* ── Settings Panel Grid (scraping) ── */
.settings-panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px 28px;
}

.settings-group-full { grid-column: 1 / -1; }

.settings-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.tool-hint {
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 4px;
}

/* ── Tab Bar ── */
.dash-tabs-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
}

.dash-tabs {
  display: flex;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.dash-tabs::-webkit-scrollbar { display: none; }

.dash-tab {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #f5c518;
  opacity: 0.55;
  padding: 12px 18px;
  font-size: 13px;
  font-family: var(--font);
  cursor: pointer;
  white-space: nowrap;
  margin-bottom: -1px;
  transition: opacity 0.15s, border-color 0.15s;
}

.dash-tab:hover { opacity: 0.8; }

.dash-tab.active {
  color: #f5c518;
  opacity: 1;
  border-bottom-color: #f5c518;
  font-weight: 600;
}

.tab-keyword { color: #f5c518; font-weight: 700; }

.tab-count {
  display: inline-block;
  background: rgba(0, 200, 83, 0.12);
  border: 1px solid rgba(0, 200, 83, 0.3);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  margin-left: 5px;
  vertical-align: middle;
  color: #00c853;
}

.dash-tab.active .tab-count {
  background: rgba(0, 200, 83, 0.2);
  border-color: rgba(0, 200, 83, 0.5);
}

/* ── Tab Panels ── */
.tab-panel {
  display: none;
  padding: 24px 0 48px;
}

.tab-panel.active { display: block; }

/* ── In Generation section labels ── */
.tab-section-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 8px 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-section-failed { color: var(--red); }
.tab-section-generating { color: var(--orange); }

.tab-section-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 24px 0;
}

.spinner-inline {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--orange);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

/* ── Billing Panel ── */
.billing-header {
  position: sticky;
  top: 0;
  background: #1a1a1a;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 24px 40px 16px;
  max-width: 1400px;
  margin: 0 auto;
  border-bottom: 1px solid var(--border);
}

.billing-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}

.billing-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: transparent;
  border: none;
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  padding: 0;
  transition: opacity 0.15s;
}

.billing-back-btn:hover { opacity: 0.75; }
.billing-back-btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.billing-date-range,
.billing-rate-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.billing-date-input {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font);
  padding: 6px 10px;
  outline: none;
}

.billing-date-input:focus { border-color: var(--accent); }

.billing-rate-input {
  width: 64px;
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 12px;
  font-family: var(--font);
  padding: 6px 8px;
  text-align: center;
  outline: none;
}

.billing-rate-input:focus { border-color: var(--accent); }

.btn-sm {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--font);
  padding: 6px 12px;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-sm:hover { border-color: var(--accent); color: var(--accent); }

.billing-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px 40px 0;
}

.billing-loading {
  color: var(--text-dim);
  font-size: 13px;
  padding: 8px 0;
}

.billing-summary-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  min-width: 130px;
  flex: 1;
}

.billing-summary-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 6px;
}

.billing-summary-value {
  font-size: 24px;
  font-weight: 800;
}

.billing-view-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 16px 40px 8px;
}

.billing-sort-label { font-size: 12px; color: var(--text-muted); }

.billing-view-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  font-size: 12px;
  font-family: var(--font);
  padding: 6px 14px;
  cursor: pointer;
  transition: all var(--transition);
}

.billing-view-btn.active,
.billing-view-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(255, 45, 85, 0.07);
}

/* Template list */
.tmpl-list-header {
  display: flex;
  align-items: center;
  padding: 8px 40px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-bottom: 1px solid var(--border);
  max-width: 1400px;
  margin: 0 auto;
}

.tmpl-row {
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition);
  max-width: 1400px;
  margin: 0 auto;
}

.tmpl-row:hover { background: var(--bg-elevated); }

.tmpl-row-summary {
  display: flex;
  align-items: center;
  padding: 12px 40px;
  gap: 8px;
}

.tmpl-col { font-size: 13px; text-align: right; flex-shrink: 0; }

.tmpl-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }

.tmpl-thumb {
  width: 36px;
  height: 36px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.tmpl-info { display: flex; flex-direction: column; min-width: 0; }

.tmpl-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tmpl-id {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tmpl-row-chevron {
  font-size: 12px;
  color: var(--text-dim);
  transition: transform 0.2s;
  text-align: center;
  flex-shrink: 0;
}

.tmpl-row.expanded .tmpl-row-chevron { transform: rotate(180deg); }

.tmpl-row-detail { display: none; padding: 0 40px 16px; }
.tmpl-row.expanded .tmpl-row-detail { display: block; }

.tmpl-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.tmpl-detail-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.tmpl-detail-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.7px;
  margin-bottom: 4px;
}

.tmpl-detail-value { font-size: 15px; font-weight: 700; color: var(--text-primary); }

/* By Creator table */
.billing-table-wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  overflow-x: auto;
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.billing-table th {
  padding: 10px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
  background: var(--bg-primary);
  white-space: nowrap;
}

.billing-table th.col-num { text-align: right; }
.billing-table th.th-active { color: var(--accent); }

.billing-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.billing-table td.col-num { text-align: right; }
.billing-table tbody tr:hover { background: var(--bg-elevated); }

.billing-note {
  max-width: 1400px;
  margin: 16px auto 0;
  padding: 0 40px 32px;
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* ════════════════════════════════════════════════
   APP LAYOUT — Sidebar + Main Content
   Used by: dashboard.html, creators.html, my-videos.html
   ════════════════════════════════════════════════ */

.app-layout {
  display: flex;
  padding-top: 64px;
  min-height: 100vh;
}

.app-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 20px 10px;
  position: fixed;
  top: 64px;
  bottom: 0;
  overflow-y: auto;
  background: var(--bg-primary);
  scrollbar-width: none;
}

.app-sidebar::-webkit-scrollbar { display: none; }

.app-main {
  margin-left: 220px;
  flex: 1;
  padding: 32px;
  min-width: 0;
}

.sidebar-section { margin-bottom: 20px; }

.sidebar-section-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 8px;
  margin-bottom: 4px;
  display: block;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
  transition: all var(--transition);
  margin-bottom: 2px;
  text-decoration: none;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font);
}

.sidebar-link:hover { background: var(--bg-card); color: var(--text-primary); }
.sidebar-link.active { background: var(--accent-glow); color: var(--accent); }
.sidebar-link .icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }

/* ── App Page Header ── */
.app-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  gap: 16px;
  flex-wrap: wrap;
}

.app-page-title { font-size: 22px; font-weight: 800; }
.app-page-subtitle { font-size: 13px; color: var(--text-dim); margin-top: 2px; }

/* ── Stat Cards ── */
.stat-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  transition: border-color .15s;
}

.stat-card[data-metric]:hover {
  border-color: #444;
}

.stat-card.ov-card-active {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 1px var(--accent);
}

.stat-card-label {
  font-size: 12px;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-card-value { font-size: 26px; font-weight: 800; color: var(--text-primary); line-height: 1.1; }
.stat-card-sub { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* ── Screen Tabs (in-page nav) ── */
.screen-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.screen-tabs::-webkit-scrollbar { display: none; }

.screen-tab {
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: all var(--transition);
}

.screen-tab:hover { color: var(--text-primary); }
.screen-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* ── Filter Chip ── */
.filter-chip {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all var(--transition);
  font-family: var(--font);
  white-space: nowrap;
}

.filter-chip:hover { border-color: var(--text-dim); color: var(--text-primary); }
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ── App Table ── */
.app-table { width: 100%; border-collapse: collapse; }

.app-table th {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.app-table td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-secondary);
}

.app-table tbody tr:last-child td { border-bottom: none; }
.app-table tbody tr:hover td { background: rgba(255,255,255,0.02); }

/* ── App Cards ── */
.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

.app-card-flush {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* ── App Forms ── */
.app-form-group { margin-bottom: 16px; }

.app-form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 5px;
}

.app-form-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border var(--transition);
}

.app-form-input:focus { border-color: var(--accent); }

.app-form-select {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  cursor: pointer;
}

.app-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ── App Section Header ── */
.app-section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.app-section-title { font-size: 15px; font-weight: 700; }

/* ── App Buttons (rounded square, distinct from pill .btn-primary) ── */
.btn {
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn.btn-primary { background: var(--accent); color: #fff; border-radius: var(--radius-sm) !important; }
.btn.btn-primary:hover { background: var(--accent-hover); }

.btn.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-secondary);
  border-radius: var(--radius-sm) !important;
  padding: 7px 17px;
}

.btn.btn-outline:hover { border-color: var(--text-dim); color: var(--text-primary); }

.btn.btn-ghost { background: transparent; border: none; color: var(--text-dim); padding: 6px 10px; }
.btn.btn-ghost:hover { background: var(--bg-card); color: var(--text-primary); }
.btn.btn-sm { padding: 5px 12px; font-size: 12px; }

/* ── App Status Badges ── */
.app-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.status-active  { background: rgba(0,200,83,0.12);   color: var(--green); }
.status-pending { background: rgba(255,152,0,0.12);  color: var(--orange); }
.status-rejected, .status-error { background: rgba(244,67,54,0.12); color: var(--red); }
.status-paused  { background: rgba(153,153,153,0.12); color: var(--text-dim); }

/* ── Category Pills ── */
.cat { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full); }
.cat-standard, .cat-creator       { background: rgba(79,195,247,0.12);  color: var(--blue); }
.cat-premium,  .cat-super_creator { background: rgba(187,134,252,0.12); color: var(--purple); }
.cat-elite                        { background: rgba(255,152,0,0.12);   color: var(--orange); }

/* ── Mini Avatar ── */
.mini-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; flex-shrink: 0; color: #fff;
}

/* ── Audit Log ── */
.audit-row { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.audit-row:last-child { border-bottom: none; }
.audit-time  { font-size: 11px; color: var(--text-faint); width: 80px; flex-shrink: 0; padding-top: 2px; }
.audit-who   { font-size: 12px; font-weight: 600; color: var(--text-dim); width: 70px; flex-shrink: 0; }
.audit-action { font-size: 13px; color: var(--text-secondary); flex: 1; }
.audit-tag   { display: inline-block; font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px; background: var(--bg-elevated); color: var(--text-dim); margin-right: 5px; text-transform: uppercase; }

/* ── Payout Rows ── */
.payout-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); gap: 16px; }
.payout-row:last-child { border-bottom: none; }
.payout-creator { display: flex; align-items: center; gap: 10px; }
.payout-amount  { font-size: 16px; font-weight: 700; }
.payout-period  { font-size: 11px; color: var(--text-dim); }

/* ── Login Screen ── */
.login-screen { max-width: 380px; margin: 60px auto; padding: 0 24px; }
.login-logo { text-align: center; margin-bottom: 8px; }
.login-logo img { height: 72px; width: auto; }
.login-tagline { text-align: center; color: var(--text-dim); font-size: 14px; margin-bottom: 28px; }

.oauth-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-bottom: 10px;
  transition: all var(--transition);
  font-family: var(--font);
}

.oauth-btn:hover { border-color: var(--text-dim); background: var(--bg-card-hover); }
.oauth-btn .oauth-icon { font-size: 18px; }

.or-divider { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--text-faint); font-size: 12px; }
.or-divider::before, .or-divider::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }
.login-terms { text-align: center; color: var(--text-faint); font-size: 11px; margin-top: 18px; }

/* ── Balance Banner ── */
.balance-banner {
  background: linear-gradient(135deg, rgba(255,45,85,0.12), rgba(255,45,85,0.04));
  border: 1px solid rgba(255,45,85,0.25);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  margin-bottom: 20px;
}

.balance-amount { font-size: 36px; font-weight: 800; }
.balance-label  { font-size: 12px; color: var(--text-dim); font-weight: 600; letter-spacing: 0.05em; margin-bottom: 6px; text-transform: uppercase; }

.balance-progress-bar { height: 5px; background: var(--border-light); border-radius: 3px; margin-top: 10px; overflow: hidden; }
.balance-progress-fill { height: 100%; background: var(--accent); border-radius: 3px; transition: width 0.4s ease; }

/* ── Info / Warning Boxes ── */
.info-box { background: rgba(79,195,247,0.08); border: 1px solid rgba(79,195,247,0.25); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 12px; color: var(--blue); margin-bottom: 14px; }
.warn-box { background: rgba(255,152,0,0.08); border: 1px solid rgba(255,152,0,0.25); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 12px; color: var(--orange); margin-bottom: 14px; }

/* ── Creator Stat Grid (3-col) ── */
.creator-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }

.creator-stat-cell {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
}

.creator-stat-val  { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.creator-stat-lbl  { font-size: 10px; color: var(--text-faint); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* ── Template List Item (creator) ── */
.tmpl-list-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 14px 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.tmpl-list-thumb { width: 52px; height: 72px; border-radius: var(--radius-sm); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; background: var(--bg-card-hover); }

/* ── Video Grid (my-videos) ── */
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }

.video-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }

.video-thumb {
  aspect-ratio: 9/16;
  background: linear-gradient(135deg, #1a1a2e, #16213e);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; position: relative;
}

.generated-badge { position: absolute; top: 8px; right: 8px; background: var(--green); color: #fff; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: var(--radius-full); text-transform: uppercase; }

.mv-thumb-btn {
  position: absolute;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  padding: 0;
  z-index: 2;
  transition: background 0.15s ease;
}
.mv-thumb-btn:hover { background: rgba(0, 0, 0, 0.85); }
.mv-thumb-expand { top: 8px; left: 8px; }
.mv-thumb-sound { bottom: 8px; right: 8px; }

.video-info { padding: 10px 12px; }
.video-template { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.video-date { font-size: 11px; color: var(--text-faint); }
.video-actions { padding: 8px 12px; border-top: 1px solid var(--border); display: flex; gap: 6px; }

/* ── Wizard Steps ── */
.wizard { max-width: 560px; margin: 40px auto; }
.wizard-steps { display: flex; align-items: center; margin-bottom: 32px; }
.wizard-step-item { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; }

.wizard-step-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-card-hover); border: 2px solid var(--border-light);
  color: var(--text-dim); display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
}

.wizard-step-item.done   .wizard-step-num { background: var(--green); border-color: var(--green); color: #fff; }
.wizard-step-item.active .wizard-step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.wizard-step-lbl { color: var(--text-dim); }
.wizard-step-item.active .wizard-step-lbl { color: var(--text-primary); }
.wizard-step-line { flex: 1; height: 2px; background: var(--border-light); margin: 0 8px; }
.wizard-step-line.done { background: var(--green); }

/* ── Toggle Switch ── */
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--border); }
.toggle-row:last-child { border-bottom: none; }
.toggle-label { font-weight: 600; font-size: 13px; }

.toggle { width: 44px; height: 24px; border-radius: 12px; cursor: pointer; position: relative; transition: background 0.2s; flex-shrink: 0; }
.toggle.on  { background: var(--green); }
.toggle.off { background: var(--border-light); }
.toggle-knob { width: 20px; height: 20px; border-radius: 50%; background: #fff; position: absolute; top: 2px; transition: left 0.2s; }
.toggle.on  .toggle-knob { left: calc(100% - 22px); }
.toggle.off .toggle-knob { left: 2px; }

/* ── Notification Dot ── */
.notif-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 6px; vertical-align: middle; }

/* ── Queue Card (template approval) ── */
.queue-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; display: flex; gap: 16px; margin-bottom: 12px; }
.queue-thumb { width: 70px; height: 124px; background: var(--bg-card-hover); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .app-sidebar { width: 200px; }
  .app-main { margin-left: 200px; padding: 24px; }
  .stat-card-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .app-layout { flex-direction: column; }
  .app-sidebar { display: none; }
  .app-main { margin-left: 0; padding: 20px 16px; }
  .app-form-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .creator-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-card-grid    { grid-template-columns: 1fr 1fr; }
}

/* ── Wizard aliases (mockup class names) ── */
.wizard-step-bar { display: flex; align-items: center; gap: 0; margin-bottom: 32px; }
.wizard-step { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.wizard-step .wizard-step-num { width: 28px; height: 28px; border-radius: 50%; background: var(--bg-card-hover); border: 2px solid var(--border-light); color: var(--text-dim); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; }
.wizard-step.done .wizard-step-num { background: var(--green); border-color: var(--green); color: #fff; }
.wizard-step.active .wizard-step-num { background: var(--accent); border-color: var(--accent); color: #fff; }
.wizard-step-label { color: var(--text-dim); }
.wizard-step.active .wizard-step-label { color: var(--text-primary); }
.wizard-line { flex: 1; height: 2px; background: var(--border-light); margin: 0 8px; }
.wizard-line.done { background: var(--green); }

/* ── Form primitives (shared by creators + onboarding) ── */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 6px; }
.form-input {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
  transition: border-color var(--transition);
  display: block;
}
.form-input:focus { border-color: var(--accent); }
.form-select {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  outline: none;
  cursor: pointer;
  appearance: none;
}

/* ── Login screen wrapper ── */
.login-screen-wrap { display: flex; justify-content: center; padding: 80px 16px 60px; min-height: 100vh; }
.login-screen { width: 100%; max-width: 380px; }
.login-divider-row { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--text-faint); font-size: 12px; }
.login-divider-row::before, .login-divider-row::after { content: ''; flex: 1; height: 1px; background: var(--border-light); }

/* ── Stat card sub-text ── */
.stat-sub { font-size: 11px; color: var(--text-dim); margin-top: 4px; }

/* ── Creator tab panels ── */
.creator-tab { display: block; }

/* ── Screen tabs (creator page) ── */
.screen-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-top: 16px; }
.screen-tab {
  padding: 10px 20px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.screen-tab:hover { color: var(--text-primary); }
.screen-tab.active { color: var(--text-primary); border-bottom-color: var(--accent); }
