:root {
  --bg: #07070f;
  --surface-1: #0f0f1e;
  --surface-2: #161628;
  --surface-3: #1e1e38;
  --border: rgba(255, 255, 255, 0.07);
  --border-hover: rgba(255, 255, 255, 0.15);
  --accent: #8b5cf6;
  --accent-2: #f472b6;
  --accent-3: #06b6d4;
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #f472b6 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(139,92,246,0.15) 0%, rgba(244,114,182,0.15) 100%);
  --text: #f1f0ff;
  --text-2: #b8b8d0;
  --muted: #606080;
  --success: #10b981;
  --error: #ef4444;
  --font: 'Inter', -apple-system, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --shadow: 0 20px 60px rgba(0,0,0,0.5);
  --shadow-accent: 0 0 40px rgba(139,92,246,0.3);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── NAV ── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(7, 7, 15, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
}
.logo-icon { font-size: 22px; }
.logo-text {
  font-size: 20px;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }
.btn-nav {
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.btn-nav:hover { opacity: 0.9; transform: translateY(-1px); }
.nav-mobile-menu {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
}

/* ── HERO ── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 24px 60px;
  max-width: 1100px;
  margin: 0 auto;
  gap: 60px;
}
.hero-inner { flex: 1; }
.hero-badge {
  display: inline-block;
  background: var(--gradient-subtle);
  border: 1px solid rgba(139,92,246,0.3);
  color: #c084fc;
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
}
.hero-title {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -2px;
  margin-bottom: 20px;
}
.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-2);
  margin-bottom: 28px;
  max-width: 520px;
}
.hero-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}
.hero-chips span {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-2);
}
.btn-hero {
  display: inline-block;
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 16px 36px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-accent);
  margin-bottom: 36px;
}
.btn-hero:hover { transform: translateY(-2px); box-shadow: 0 0 60px rgba(139,92,246,0.5); }
.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
}
.stat { display: flex; flex-direction: column; }
.stat strong { font-size: 18px; font-weight: 800; }
.stat span { font-size: 12px; color: var(--text-2); }
.stat-divider { width: 1px; height: 32px; background: var(--border); }

/* Floating cards */
.hero-visual {
  flex: 0 0 340px;
  position: relative;
  height: 380px;
  display: none;
}
@media (min-width: 900px) { .hero-visual { display: block; } }
.floating-card {
  position: absolute;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  width: 240px;
  box-shadow: var(--shadow);
  animation: float 6s ease-in-out infinite;
}
.fc1 { top: 0; right: 40px; animation-delay: 0s; }
.fc2 { top: 120px; right: 0; animation-delay: -2s; }
.fc3 { top: 240px; right: 60px; animation-delay: -4s; }
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}
.fc-genre { font-size: 11px; font-weight: 600; color: var(--accent); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px; }
.fc-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.fc-bars { display: flex; gap: 3px; align-items: flex-end; height: 30px; }
.fc-bars span {
  width: 4px;
  background: var(--gradient);
  border-radius: 2px;
  animation: wave 0.8s ease-in-out infinite;
}
.fc1 .fc-bars span:nth-child(1) { height: 40%; animation-delay: 0s; }
.fc1 .fc-bars span:nth-child(2) { height: 70%; animation-delay: 0.1s; }
.fc1 .fc-bars span:nth-child(3) { height: 100%; animation-delay: 0.2s; }
.fc1 .fc-bars span:nth-child(4) { height: 55%; animation-delay: 0.15s; }
.fc1 .fc-bars span:nth-child(5) { height: 80%; animation-delay: 0.05s; }
.fc1 .fc-bars span:nth-child(6) { height: 45%; animation-delay: 0.25s; }
.fc1 .fc-bars span:nth-child(7) { height: 90%; animation-delay: 0.1s; }
.fc1 .fc-bars span:nth-child(8) { height: 60%; animation-delay: 0.2s; }
.fc1 .fc-bars span:nth-child(9) { height: 35%; animation-delay: 0.05s; }
.fc1 .fc-bars span:nth-child(10) { height: 75%; animation-delay: 0.15s; }
.fc2 .fc-bars span:nth-child(1) { height: 60%; animation-delay: 0.1s; }
.fc2 .fc-bars span:nth-child(2) { height: 90%; animation-delay: 0.2s; }
.fc2 .fc-bars span:nth-child(3) { height: 45%; animation-delay: 0.05s; }
.fc2 .fc-bars span:nth-child(4) { height: 80%; animation-delay: 0.15s; }
.fc2 .fc-bars span:nth-child(5) { height: 55%; animation-delay: 0s; }
.fc2 .fc-bars span:nth-child(6) { height: 100%; animation-delay: 0.25s; }
.fc2 .fc-bars span:nth-child(7) { height: 40%; animation-delay: 0.1s; }
.fc2 .fc-bars span:nth-child(8) { height: 70%; animation-delay: 0.2s; }
.fc2 .fc-bars span:nth-child(9) { height: 85%; animation-delay: 0.05s; }
.fc2 .fc-bars span:nth-child(10) { height: 50%; animation-delay: 0.15s; }
.fc3 .fc-bars span:nth-child(1) { height: 75%; animation-delay: 0.2s; }
.fc3 .fc-bars span:nth-child(2) { height: 50%; animation-delay: 0.1s; }
.fc3 .fc-bars span:nth-child(3) { height: 85%; animation-delay: 0.05s; }
.fc3 .fc-bars span:nth-child(4) { height: 40%; animation-delay: 0.2s; }
.fc3 .fc-bars span:nth-child(5) { height: 95%; animation-delay: 0.15s; }
.fc3 .fc-bars span:nth-child(6) { height: 60%; animation-delay: 0s; }
.fc3 .fc-bars span:nth-child(7) { height: 70%; animation-delay: 0.1s; }
.fc3 .fc-bars span:nth-child(8) { height: 45%; animation-delay: 0.25s; }
.fc3 .fc-bars span:nth-child(9) { height: 80%; animation-delay: 0.2s; }
.fc3 .fc-bars span:nth-child(10) { height: 55%; animation-delay: 0.05s; }
@keyframes wave {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.4); }
}

/* ── GENERATOR SECTION ── */
.generator-section {
  max-width: 680px;
  margin: 0 auto;
  padding: 60px 24px;
}
.generator-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow);
}
.gen-header { text-align: center; margin-bottom: 32px; }
.gen-header h2 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.gen-header p { font-size: 14px; color: var(--text-2); }
.gen-step { margin-bottom: 28px; }
.step-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}
.step-num {
  width: 26px; height: 26px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}
.topic-textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  padding: 16px;
  resize: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  line-height: 1.6;
}
.topic-textarea::placeholder { color: #505070; }
.topic-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}
.char-count {
  text-align: right;
  font-size: 12px;
  color: var(--text-2);
  margin-top: 6px;
}
.genre-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.genre-pill {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 10px 18px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}
.genre-pill:hover {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(139,92,246,0.1);
}
.genre-pill.active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
  font-weight: 600;
}
/* ── Verse count selector ── */
.verse-count-row {
  display: flex;
  gap: 10px;
}
.verse-btn {
  flex: 1;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 9px 0;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
  text-align: center;
}
.verse-btn:hover { border-color: var(--accent); color: var(--text); }
.verse-btn.active { background: var(--accent); border-color: transparent; color: #fff; font-weight: 600; }

/* ── Sounds like ── */
.step-optional { font-size: 11px; color: var(--text-3, #aaa); font-weight: 400; margin-left: 4px; }
.sounds-like-wrap { position: relative; }
.sounds-like-input {
  width: 100%;
  box-sizing: border-box;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  font-family: var(--font);
}
.sounds-like-input:focus { outline: none; border-color: var(--accent); }
.sounds-like-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  z-index: 50;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.sounds-like-results.hidden { display: none; }
.sl-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: background 0.1s;
}
.sl-result:hover { background: var(--surface-2); }
.sl-result img { width: 36px; height: 36px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.sl-result-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sl-result-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sl-result-artist { color: var(--text-2); font-size: 12px; }
.sounds-like-selected {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  background: rgba(139,92,246,0.1);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}
.sounds-like-selected.hidden { display: none; }
.sl-clear { background: none; border: none; color: var(--text-2); cursor: pointer; font-size: 14px; margin-left: auto; }

/* ── Studio dark overrides ── */
body.studio-mode .verse-btn { background: #1e1e1e; border-color: #2e2e2e; color: #888; }
body.studio-mode .verse-btn.active { background: var(--accent); color: #fff; border-color: transparent; }
body.studio-mode .sounds-like-input { background: #1e1e1e; border-color: #2e2e2e; color: #eee; }
body.studio-mode .sounds-like-results { background: #1a1a1a; border-color: #333; }
body.studio-mode .sl-result:hover { background: #222; }

.btn-generate {
  width: 100%;
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 18px;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
  box-shadow: var(--shadow-accent);
  font-family: var(--font);
  margin-top: 8px;
}
.btn-generate:hover { transform: translateY(-2px); box-shadow: 0 0 50px rgba(139,92,246,0.5); }
.btn-generate:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.gen-disclaimer { text-align: center; font-size: 12px; color: #505070; margin-top: 14px; }

/* ── LOADING ── */
.loading-overlay {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 60px;
}
.loading-overlay.hidden { display: none; }
.loading-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  text-align: center;
  box-shadow: var(--shadow);
}
.loading-bars {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  height: 60px;
  margin-bottom: 32px;
}
.loading-bars span {
  width: 5px;
  border-radius: 3px;
  background: var(--gradient);
  animation: loadwave 0.9s ease-in-out infinite;
}
@keyframes loadwave {
  0%, 100% { transform: scaleY(0.3); opacity: 0.5; }
  50% { transform: scaleY(1); opacity: 1; }
}
.loading-steps { margin-bottom: 24px; display: flex; flex-direction: column; gap: 10px; }
.lstep {
  font-size: 15px;
  color: #404060;
  transition: color 0.4s;
  padding: 8px;
  border-radius: var(--radius);
}
.lstep.active {
  color: var(--text);
  background: var(--gradient-subtle);
  border: 1px solid rgba(139,92,246,0.2);
}
.lstep.done { color: var(--success); }
.loading-quote {
  font-size: 13px;
  color: #505070;
  font-style: italic;
  margin-bottom: 28px;
}
.loading-timer { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.loading-progress-bar {
  width: 100%;
  height: 4px;
  background: var(--surface-3);
  border-radius: 2px;
  overflow: hidden;
}
.loading-progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 2px;
  width: 0%;
  transition: width 0.5s ease;
}
#loading-timer-text { font-size: 12px; color: var(--text-2); }

/* ── RESULT ── */
.result-section {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 24px 60px;
}
.result-section.hidden { display: none; }
.result-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 28px 28px 0;
  gap: 16px;
}
.result-genre-badge {
  display: inline-block;
  background: var(--gradient-subtle);
  border: 1px solid rgba(139,92,246,0.3);
  color: #c084fc;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.result-title { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.result-about { font-size: 13px; color: var(--text-2); }
.btn-share {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}
.btn-share:hover { border-color: var(--border-hover); color: var(--text); }

/* Player */
.player-wrap { padding: 24px 28px; }
.waveform-outer {
  position: relative;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin-bottom: 16px;
  overflow: hidden;
  min-height: 80px;
  display: flex;
  align-items: center;
}
.waveform-bars {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  width: 100%;
  height: 50px;
}
.waveform-bars span {
  flex: 1;
  max-width: 5px;
  border-radius: 2px;
  background: rgba(139, 92, 246, 0.3);
  transition: background 0.3s;
  cursor: pointer;
}
.waveform-bars.playing span {
  animation: wave 0.7s ease-in-out infinite;
  background: var(--gradient);
}
.waveform-bars span:nth-child(odd) { animation-delay: 0.1s !important; }
.waveform-bars span:nth-child(3n) { animation-delay: 0.2s !important; }
.waveform-bars span:nth-child(5n) { animation-delay: 0.05s !important; }
.preview-lock {
  position: absolute;
  inset: 0;
  background: rgba(7, 7, 15, 0.92);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
}
.preview-lock.hidden { display: none; }
.lock-inner { text-align: center; padding: 20px; }
.lock-title { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.lock-sub { font-size: 14px; color: var(--text-2); margin-bottom: 20px; }
.btn-unlock-overlay {
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: transform 0.2s;
}
.btn-unlock-overlay:hover { transform: scale(1.03); }
.player-controls { display: flex; align-items: center; gap: 14px; }
.btn-play {
  width: 44px; height: 44px;
  background: var(--gradient);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.15s;
}
.btn-play:hover { transform: scale(1.08); }
.progress-wrap { flex: 1; }
.progress-track {
  height: 5px;
  background: var(--surface-3);
  border-radius: 3px;
  cursor: pointer;
  margin-bottom: 8px;
  overflow: hidden;
  position: relative;
}
.progress-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 3px;
  width: 0%;
  transition: width 0.25s linear;
}
.time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-2);
}
.preview-badge-small {
  background: rgba(139,92,246,0.2);
  color: #c084fc;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 10px;
  font-weight: 600;
}

/* Lyrics */
.lyrics-section { border-top: 1px solid var(--border); }
.lyrics-toggle {
  width: 100%;
  background: none;
  border: none;
  color: var(--text-2);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  padding: 14px 28px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: color 0.2s;
}
.lyrics-toggle:hover { color: var(--text); }
.toggle-caret { transition: transform 0.3s; font-size: 10px; }
.lyrics-toggle.open .toggle-caret { transform: rotate(180deg); }
.lyrics-body { padding: 0 28px 24px; }
.lyrics-body.hidden { display: none; }
.lyrics-body pre {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-2);
  white-space: pre-wrap;
  line-height: 1.8;
}

/* CTA row */
.result-cta {
  display: flex;
  gap: 12px;
  padding: 16px 28px 28px;
  flex-wrap: wrap;
}
.btn-regenerate {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}
.btn-regenerate:hover { border-color: var(--border-hover); color: var(--text); }
.btn-download {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}
.btn-download:hover { border-color: #10b981; color: #10b981; }
.btn-unlock-main {
  flex: 1;
  background: var(--gradient);
  color: #fff;
  border: none;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 30px rgba(139,92,246,0.3);
}
.btn-unlock-main:hover { transform: translateY(-1px); box-shadow: 0 0 45px rgba(139,92,246,0.5); }

/* ── EXAMPLES ── */
.examples-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 80px 24px;
}
.section-head {
  text-align: center;
  margin-bottom: 48px;
}
.section-head h2 { font-size: 36px; font-weight: 800; margin-bottom: 8px; }
.section-head p { font-size: 16px; color: var(--text-2); }
.examples-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.example-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.example-card:hover {
  border-color: rgba(139,92,246,0.4);
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}
.ex-play-btn {
  width: 36px; height: 36px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #fff;
  flex-shrink: 0;
  align-self: flex-start;
}
.ex-badge {
  display: inline-block;
  background: var(--gradient-subtle);
  border: 1px solid rgba(139,92,246,0.3);
  color: #c084fc;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 6px;
}
.ex-title { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.ex-topic { font-size: 12px; color: var(--text-2); }
.ex-lyric {
  font-size: 13px;
  color: #606088;
  font-style: italic;
  border-left: 2px solid rgba(139,92,246,0.3);
  padding-left: 12px;
  line-height: 1.7;
}

/* ── HOW IT WORKS ── */
.hiw-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}
.hiw-section h2 { font-size: 36px; font-weight: 800; margin-bottom: 56px; }
.hiw-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}
.hiw-step {
  flex: 1;
  padding: 0 24px;
}
.hiw-icon { font-size: 36px; margin-bottom: 12px; }
.hiw-num {
  font-size: 13px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 2px;
  margin-bottom: 12px;
}
.hiw-step h3 { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.hiw-step p { font-size: 14px; color: var(--text-2); line-height: 1.7; }
.hiw-arrow {
  font-size: 28px;
  color: #303050;
  padding-top: 36px;
  flex-shrink: 0;
}

/* ── PRICING ── */
.pricing-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 24px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.pricing-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px 28px;
  position: relative;
}
.pricing-card.featured {
  border-color: rgba(139,92,246,0.5);
  background: var(--surface-2);
  box-shadow: 0 0 50px rgba(139,92,246,0.15);
}
.pricing-popular {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: #fff;
  padding: 4px 16px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.pricing-tier { font-size: 13px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.pricing-price { font-size: 44px; font-weight: 900; margin-bottom: 4px; }
.pricing-per { font-size: 13px; color: var(--text-2); margin-bottom: 24px; }
.pricing-features { list-style: none; margin-bottom: 28px; display: flex; flex-direction: column; gap: 10px; }
.pricing-features li { font-size: 14px; color: var(--text-2); }
.pricing-features li.muted { color: #303050; }
.btn-pricing-free, .btn-pricing-main {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
}
.btn-pricing-free {
  background: var(--surface-3);
  border: 1px solid var(--border);
  color: var(--text-2);
}
.btn-pricing-free:hover { border-color: var(--border-hover); color: var(--text); }
.btn-pricing-main {
  background: var(--gradient);
  border: none;
  color: #fff;
  box-shadow: 0 0 30px rgba(139,92,246,0.3);
}
.btn-pricing-main:hover { transform: translateY(-1px); }

/* ── FOOTER ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 60px 24px;
}
.footer-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.footer-logo {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 12px;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.footer p { font-size: 14px; color: var(--text-2); margin-bottom: 20px; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 20px; }
.footer-links a { font-size: 14px; color: var(--text-2); text-decoration: none; }
.footer-links a:hover { color: var(--text); }
.footer-copy { font-size: 12px; color: #404058; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 24px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow);
  z-index: 999;
  transition: opacity 0.3s;
}
.toast.hidden { display: none; }

/* ── UTILS ── */
.hidden { display: none !important; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-mobile-menu { display: block; }
  .hero { flex-direction: column; padding: 100px 24px 60px; gap: 40px; min-height: auto; }
  .hero-title { font-size: 40px; }
  .hero-sub { font-size: 16px; }
  .generator-card { padding: 28px 20px; }
  .pricing-grid { grid-template-columns: 1fr; }
  .hiw-steps { flex-direction: column; align-items: center; }
  .hiw-arrow { transform: rotate(90deg); padding: 0; }
  .hiw-step { max-width: 300px; }
  .result-cta { flex-direction: column; }
  .btn-unlock-main { flex: none; }
}

/* ── TIKTOK BUTTON ── */
.btn-tiktok {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #000;
  border: 1px solid #333;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-tiktok:hover { background: #111; border-color: #555; transform: translateY(-1px); }

/* ── TIKTOK MODAL ── */
.tt-modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.tt-modal-bg.hidden { display: none; }
.tt-modal {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 740px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
  box-shadow: var(--shadow);
}
.tt-close {
  position: absolute;
  top: 16px; right: 20px;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 20px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.tt-close:hover { color: var(--text); background: var(--surface-2); }

/* Idle state layout */
#tt-state-idle { display: flex; gap: 32px; align-items: flex-start; }
.tt-phone-preview { flex-shrink: 0; }
.tt-phone-frame {
  width: 160px;
  height: 284px;
  background: #000;
  border-radius: 24px;
  border: 3px solid #333;
  overflow: hidden;
  position: relative;
}
.tt-phone-frame canvas { width: 100%; height: 100%; display: block; }
.tt-modal-info { flex: 1; }
.tt-modal-info h3 { font-size: 22px; font-weight: 800; margin-bottom: 10px; }
.tt-modal-info > p { font-size: 14px; color: var(--text-2); margin-bottom: 20px; line-height: 1.7; }
.tt-steps-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.tt-step-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-2);
}
.btn-tt-generate {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
  width: 100%;
  justify-content: center;
}
.btn-tt-generate:hover { background: #111; transform: translateY(-1px); }
.btn-tt-generate:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.tt-compat-note { font-size: 12px; color: #505070; margin-top: 10px; text-align: center; }

/* Recording state */
#tt-state-recording { text-align: center; }
.tt-recording-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 20px;
}
.tt-rec-dot {
  width: 12px; height: 12px;
  background: #ef4444;
  border-radius: 50%;
  animation: pulse-rec 1s ease-in-out infinite;
}
@keyframes pulse-rec { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }
.tt-record-canvas-preview {
  width: 120px;
  height: 213px;
  border-radius: 12px;
  display: block;
  margin: 0 auto 20px;
}
.tt-record-progress { margin-bottom: 12px; }
.tt-record-bar {
  height: 6px;
  background: var(--surface-3);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 8px;
}
.tt-record-fill {
  height: 100%;
  background: #ef4444;
  border-radius: 3px;
  width: 0%;
  transition: width 0.3s linear;
}
.tt-record-label { font-size: 13px; color: var(--text-2); }
.tt-record-note { font-size: 12px; color: #505070; }

/* Done state */
#tt-state-done { text-align: center; padding: 20px 0; }
.tt-done-icon { font-size: 64px; margin-bottom: 16px; }
#tt-state-done h3 { font-size: 24px; font-weight: 800; margin-bottom: 10px; }
#tt-state-done p { font-size: 15px; color: var(--text-2); margin-bottom: 28px; }
.btn-tt-share {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #000;
  color: #fff;
  border: none;
  padding: 16px 40px;
  border-radius: 14px;
  font-size: 17px;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
  margin-bottom: 14px;
}
.btn-tt-share:hover { background: #111; transform: translateY(-2px); }
.btn-tt-again {
  display: block;
  background: none;
  border: none;
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font);
  margin: 0 auto;
}
.btn-tt-again:hover { color: var(--text); }

@media (max-width: 600px) {
  #tt-state-idle { flex-direction: column; align-items: center; }
  .tt-modal { padding: 24px 18px; }
}

/* ── MODE SWITCHER ── */
.mode-switcher {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  background: var(--surface-2);
  border-radius: 10px;
  padding: 4px;
}
.mode-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  color: var(--text-2);
  background: none;
  transition: all 0.2s;
}
.mode-btn.active {
  background: var(--gradient);
  color: #fff;
}

/* ── SONG SEARCH ── */
.song-search-wrap { position: relative; }
.song-search-input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  padding: 14px 16px;
  transition: border-color 0.2s;
}
.song-search-input::placeholder { color: #505070; }
.song-search-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.song-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0; right: 0;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  z-index: 50;
  box-shadow: var(--shadow);
}
.song-results.hidden { display: none; }
.song-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.song-result-item:last-child { border-bottom: none; }
.song-result-item:hover { background: var(--surface-2); }
.sri-thumb { width: 48px; height: 36px; border-radius: 4px; object-fit: cover; flex-shrink: 0; }
.sri-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.sri-artist { font-size: 12px; color: var(--text-2); }
.sri-dur { font-size: 11px; color: #505070; margin-left: auto; flex-shrink: 0; }

.selected-song {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--gradient-subtle);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-top: 10px;
}
.selected-song.hidden { display: none; }
.selected-song img { width: 56px; height: 42px; border-radius: 6px; object-fit: cover; }
.sel-title { font-size: 14px; font-weight: 700; }
.sel-artist { font-size: 12px; color: var(--text-2); }
.sel-clear { margin-left: auto; background: none; border: none; color: var(--text-2); font-size: 16px; cursor: pointer; padding: 4px 8px; border-radius: 4px; }
.sel-clear:hover { color: var(--text); background: var(--surface-3); }

/* Searching indicator */
.song-search-spinner {
  position: absolute;
  right: 14px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

/* ── SONG SOURCE TABS ── */
.song-source-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.src-tab {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
}
.src-tab.active {
  background: var(--gradient);
  border-color: transparent;
  color: #fff;
}
.src-tab:not(.active):hover {
  border-color: var(--border-hover);
  color: var(--text);
}

/* ── TIKTOK URL PASTE ── */
.tiktok-paste-wrap { display: flex; flex-direction: column; gap: 10px; }
.tiktok-paste-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid rgba(139,92,246,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-2);
}
.tiktok-url-status {
  font-size: 13px;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 500;
}
.tiktok-url-status.hidden { display: none; }
.tiktok-url-loading { background: var(--surface-2); color: var(--text-2); }
.tiktok-url-success { background: rgba(16,185,129,0.1); color: var(--success); border: 1px solid rgba(16,185,129,0.3); }
.tiktok-url-error   { background: rgba(239,68,68,0.1); color: var(--error); border: 1px solid rgba(239,68,68,0.3); }

/* ── STITCH BUTTON ── */
.btn-stitch {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #010101 0%, #69c9d0 50%, #ee1d52 100%);
  border: none;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-stitch:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-stitch.hidden { display: none !important; }

/* ── MOBILE ENHANCEMENTS ── */
@media (max-width: 600px) {
  /* Genre pills — scrollable row */
  .genre-grid {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .genre-grid::-webkit-scrollbar { display: none; }
  .genre-pill { flex-shrink: 0; white-space: nowrap; min-height: 44px; }

  /* Larger textarea on mobile */
  .topic-textarea { font-size: 16px; } /* prevents iOS zoom */

  /* Toast higher — above iOS home indicator */
  .toast { bottom: 80px; max-width: calc(100vw - 32px); text-align: center; }

  /* TikTok modal — full-screen on mobile */
  .tt-modal-bg { padding: 0; align-items: flex-end; }
  .tt-modal {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 92vh;
    padding: 28px 20px 40px;
  }

  /* Result CTA — stitch button full width */
  .result-cta { flex-direction: column; }
  .btn-stitch, .btn-tiktok, .btn-unlock-main { width: 100%; justify-content: center; }
  .btn-unlock-main { flex: none; }

  /* Player seek track — taller for fat fingers */
  .progress-track { height: 8px; }

  /* Source tabs */
  .src-tab { font-size: 12px; padding: 8px 10px; }

  /* Generator card */
  .generator-card { padding: 24px 16px; }
}

/* ── Auth ── */
.modal-bg {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-bg.hidden { display: none; }

.nav-credits { font-size: 13px; font-weight: 600; color: var(--primary); background: rgba(139,92,246,.12); padding: 4px 12px; border-radius: 20px; }
.btn-nav-ghost { background: transparent; border: 1px solid var(--border); color: var(--text-2); }
.btn-nav-ghost:hover { background: var(--surface-2); }
.auth-modal { max-width: 400px; width: 100%; background: var(--surface-1); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 32px; }
.auth-tabs { display: flex; gap: 4px; background: var(--surface-2); border-radius: 10px; padding: 4px; margin-bottom: 20px; }
.auth-tab { flex: 1; background: transparent; border: none; color: var(--text-2); padding: 8px; border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all .2s; }
.auth-tab.active { background: var(--surface-1); color: var(--text); }
.auth-input { width: 100%; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; color: var(--text); font-size: 15px; margin-bottom: 12px; box-sizing: border-box; }
.auth-input:focus { outline: none; border-color: var(--primary); }
.btn-auth-submit { width: 100%; background: var(--gradient); color: #fff; border: none; border-radius: 10px; padding: 13px; font-size: 15px; font-weight: 700; cursor: pointer; margin-bottom: 14px; transition: opacity .2s; }
.btn-auth-submit:hover { opacity: .9; }
.auth-note { text-align: center; font-size: 13px; color: var(--text-2); margin: 0; }
.auth-note a { color: var(--primary); }
.auth-error { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.3); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #f87171; margin-bottom: 14px; }

/* ── Trending topics row ── */
.trending-row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.trending-label { font-size: 12px; font-weight: 700; color: var(--text-2); white-space: nowrap; padding-top: 5px; }
.trending-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.trending-chip {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.trending-chip:hover { background: rgba(139,92,246,.15); border-color: var(--primary); color: var(--text); }
.trending-chip.skeleton { width: 90px; height: 24px; background: var(--surface-2); border-color: transparent; animation: skeleton-pulse 1.2s ease-in-out infinite; cursor: default; }
@keyframes skeleton-pulse { 0%,100% { opacity: .4; } 50% { opacity: .9; } }

/* ── STUDIO MODE ──────────────────────────────────────────── */

#studio-sidebar {
  display: none;
}

#studio-library {
  display: none;
}

body.studio-mode {
  display: flex;
  flex-direction: row;
  height: 100vh;
  overflow: hidden;
  background: #0d0d0d;
}

body.studio-mode .nav,
body.studio-mode .hero,
body.studio-mode .examples-section,
body.studio-mode .hiw-section,
body.studio-mode .pricing-section,
body.studio-mode .footer,
body.studio-mode .auth-modal-bg {
  display: none !important;
}

body.studio-mode #studio-sidebar {
  display: flex;
  flex-direction: column;
  width: 220px;
  min-width: 220px;
  height: 100vh;
  background: #111;
  border-right: 1px solid #222;
  flex-shrink: 0;
  z-index: 10;
}

.studio-logo-area {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid #222;
}

.studio-logo-icon { font-size: 22px; }
.studio-logo-text { font-size: 18px; font-weight: 700; color: #fff; letter-spacing: -0.5px; }

.studio-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 12px;
  flex: 1;
}

.studio-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: #888;
  font-size: 14px;
  font-weight: 500;
  width: 100%;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}

.studio-nav-btn:hover { background: #1e1e1e; color: #ccc; }
.studio-nav-btn.active { background: #1e1e1e; color: #fff; }
.snb-icon { font-size: 16px; }

.studio-sidebar-bottom {
  padding: 16px;
  border-top: 1px solid #222;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.studio-credits-block {
  background: #1a1a1a;
  border-radius: 10px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.studio-credits-row {
  display: flex;
  align-items: baseline;
  gap: 5px;
}

#studio-credits-num {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.studio-credits-label {
  font-size: 12px;
  color: #666;
}

.studio-buy-btn {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.studio-buy-btn:hover { opacity: 0.85; }

.studio-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.studio-user-email {
  font-size: 11px;
  color: #555;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.studio-signout-btn {
  background: none;
  border: none;
  color: #555;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  padding: 0;
  transition: color 0.15s;
}

.studio-signout-btn:hover { color: #ccc; }

/* ── Generator section in studio mode ── */

body.studio-mode .generator-section {
  flex: 1;
  overflow-y: auto;
  background: #0d0d0d;
  padding: 40px 40px 80px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: none;
  margin: 0;
}

body.studio-mode .generator-section.studio-hidden {
  display: none !important;
}

body.studio-mode .generator-card {
  background: #161616;
  border: 1px solid #252525;
  border-radius: 18px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

body.studio-mode .gen-header h2 { color: #fff; }
body.studio-mode .gen-header p { color: #555; }

body.studio-mode .step-label { color: #aaa; }
body.studio-mode .step-num { background: #252525; color: #777; }

body.studio-mode .topic-textarea {
  background: #1e1e1e;
  border-color: #2e2e2e;
  color: #eee;
}

body.studio-mode .topic-textarea:focus {
  border-color: #444;
  background: #222;
}

body.studio-mode .genre-pill {
  background: #1e1e1e;
  border-color: #2e2e2e;
  color: #aaa;
}

body.studio-mode .genre-pill:hover {
  border-color: #444;
  color: #eee;
}

body.studio-mode .genre-pill.active {
  background: linear-gradient(135deg, #7c3aed22, #2563eb22);
  border-color: #7c3aed;
  color: #a78bfa;
}

body.studio-mode .mode-btn {
  background: #1a1a1a;
  border-color: #2a2a2a;
  color: #888;
}

body.studio-mode .mode-btn.active {
  background: #252525;
  color: #fff;
}

body.studio-mode .gen-disclaimer { color: #444; }
body.studio-mode .char-count { color: #444; }
body.studio-mode .trending-label { color: #666; }

body.studio-mode .trending-chip {
  background: #1e1e1e;
  border-color: #2e2e2e;
  color: #888;
}

body.studio-mode .trending-chip:hover {
  border-color: #7c3aed;
  color: #a78bfa;
}

/* ── Result section in studio mode ── */

body.studio-mode .result-section {
  flex: 1;
  overflow-y: auto;
  background: #0d0d0d;
  padding: 40px 40px 80px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: none;
  margin: 0;
}

body.studio-mode .result-section.studio-hidden {
  display: none !important;
}

body.studio-mode .result-card {
  background: #161616;
  border: 1px solid #252525;
  border-radius: 18px;
  width: 100%;
  max-width: 680px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

body.studio-mode .result-title { color: #fff; }
body.studio-mode .result-about { color: #666; }
body.studio-mode .result-genre-badge { background: #252525; color: #aaa; }

body.studio-mode .waveform-outer { background: #1e1e1e; }
body.studio-mode .progress-track { background: #252525; }

body.studio-mode .lyrics-toggle { color: #666; background: none; border-color: #252525; }
body.studio-mode .lyrics-toggle:hover { color: #aaa; border-color: #333; }
body.studio-mode .lyrics-body { background: #1a1a1a; border-color: #252525; }
body.studio-mode #lyrics-display { color: #bbb; }

/* ── Studio library panel ── */

body.studio-mode #studio-library {
  display: none;
  flex: 1;
  overflow-y: auto;
  background: #0d0d0d;
  padding: 40px 40px 80px;
}

body.studio-mode #studio-library.active {
  display: block;
}

.studio-lib-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  max-width: 900px;
}

.studio-lib-header h2 {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  margin: 0;
}

.studio-create-new-btn {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.studio-create-new-btn:hover { opacity: 0.85; }

.studio-songs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  max-width: 900px;
}

.studio-songs-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #444;
}

.sse-icon { font-size: 48px; margin-bottom: 16px; }
.studio-songs-empty p { font-size: 16px; margin-bottom: 20px; color: #555; }

.sse-cta {
  background: linear-gradient(135deg, #7c3aed, #2563eb);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.studio-song-card {
  background: #161616;
  border: 1px solid #222;
  border-radius: 14px;
  padding: 18px;
  transition: border-color 0.15s, transform 0.15s;
  cursor: default;
}

.studio-song-card:hover {
  border-color: #333;
  transform: translateY(-1px);
}

.ssc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.ssc-genre {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #a78bfa;
  background: #7c3aed1a;
  padding: 3px 8px;
  border-radius: 6px;
}

.ssc-date { font-size: 11px; color: #444; }

.ssc-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 6px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ssc-topic {
  font-size: 12px;
  color: #555;
  margin: 0 0 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ssc-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.ssc-play-btn {
  background: #fff;
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}

.ssc-play-btn:hover { opacity: 0.85; }

.ssc-dl-btn {
  background: #222;
  color: #aaa;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.ssc-dl-btn:hover { background: #2a2a2a; color: #fff; }

.ssc-locked { font-size: 11px; color: #444; }
.ssc-processing { font-size: 11px; color: #666; }
.ssc-del-btn {
  margin-left: auto;
  background: none;
  border: none;
  color: #555;
  font-size: 13px;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  transition: color 0.15s;
}
.ssc-del-btn:hover { color: #ef4444; }

.ssc-retry-btn {
  background: #7c3aed22;
  border: 1px solid #7c3aed66;
  color: #c084fc;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
}
.ssc-retry-btn:hover { background: #7c3aed44; }

/* ── Studio loading overlay adjustments ── */

body.studio-mode .loading-overlay {
  flex: 1;
  overflow-y: auto;
  background: #0d0d0d;
  padding: 40px 40px 80px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  max-width: none;
  margin: 0;
}
body.studio-mode .loading-overlay.hidden { display: none; }
body.studio-mode .loading-overlay .loading-card {
  width: 100%;
  max-width: 680px;
}

/* ── Mobile: collapse sidebar ── */

@media (max-width: 640px) {
  body.studio-mode #studio-sidebar {
    display: none !important;
  }

  body.studio-mode .generator-section,
  body.studio-mode .result-section,
  body.studio-mode #studio-library {
    padding: 20px 16px 80px;
  }

  body.studio-mode .loading-overlay {
    padding: 20px 16px 80px;
  }
}

/* ── Studio improvements ── */

/* Song count badge on My Songs nav */
.snb-badge {
  margin-left: auto;
  background: #7c3aed;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 2px 6px;
  min-width: 18px;
  text-align: center;
}

/* Last song mini-card in sidebar */
.sidebar-last-song {
  margin: 0 12px;
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 10px;
  padding: 12px;
  cursor: default;
}

.sls-label {
  font-size: 10px;
  color: #444;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.sls-title {
  font-size: 13px;
  font-weight: 600;
  color: #ddd;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.sls-genre {
  font-size: 11px;
  color: #666;
  margin-bottom: 10px;
}

.sls-play-btn {
  width: 100%;
  background: #252525;
  border: none;
  border-radius: 6px;
  color: #aaa;
  font-size: 12px;
  font-weight: 500;
  padding: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sls-play-btn:hover { background: #333; color: #fff; }
.sls-play-btn:disabled { opacity: 0.4; cursor: default; }

/* TikTok connect section in sidebar */
.sidebar-tiktok-section {
  margin: 8px 12px 0;
  padding: 10px 12px;
  background: #1a1a1a;
  border: 1px solid #252525;
  border-radius: 10px;
}

.stk-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #555;
}

.stk-status {
  margin-left: auto;
  font-size: 10px;
  color: #444;
}

.stk-connected {
  color: #22c55e;
}

/* "Parody a Real Song" coming soon state */
.mode-btn-soon {
  opacity: 0.5;
  cursor: default !important;
  pointer-events: all !important;
}

.soon-badge {
  background: #7c3aed44;
  color: #a78bfa;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 4px;
  padding: 1px 5px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Library song cards — TikTok post button */
.ssc-tiktok-btn {
  background: none;
  border: 1px solid #333;
  border-radius: 8px;
  color: #666;
  font-size: 12px;
  padding: 7px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: border-color 0.15s, color 0.15s;
}

.ssc-tiktok-btn:hover {
  border-color: #888;
  color: #ccc;
}

/* Result card TikTok CTA — make it pop more in studio */
body.studio-mode .btn-tiktok {
  background: linear-gradient(135deg, #000, #111);
  border: 1px solid #333;
  font-size: 14px;
  padding: 12px 22px;
  flex: 1;
}

body.studio-mode .btn-tiktok:hover {
  background: #111;
  border-color: #666;
}

/* Song count loading state */
.ssc-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px;
  color: #444;
  font-size: 14px;
}

/* ═══════════════════════════════════════════════
   VIDEO COMBINER MODAL
═══════════════════════════════════════════════ */

.vc-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.vc-modal-bg.hidden { display: none; }

.vc-modal {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #0f0f1e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 32px 28px 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7);
  animation: vcSlideIn 0.22s ease;
  overflow: hidden;
}
@keyframes vcSlideIn {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.vc-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: none;
  color: #666;
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
.vc-close:hover { color: #fff; background: rgba(255,255,255,0.07); }

.vc-title {
  font-size: 20px;
  font-weight: 700;
  color: #f1f0ff;
  margin-bottom: 8px;
}
.vc-sub {
  font-size: 14px;
  color: #888;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ── Dropzone ── */
.vc-dropzone {
  border: 2px dashed rgba(139,92,246,0.4);
  border-radius: 14px;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: rgba(139,92,246,0.03);
}
.vc-dropzone:hover, .vc-dropzone.drag-over {
  border-color: #8b5cf6;
  background: rgba(139,92,246,0.08);
}
.vc-dz-icon { font-size: 36px; margin-bottom: 10px; }
.vc-dz-main { font-size: 16px; font-weight: 600; color: #c4b5fd; margin-bottom: 4px; }
.vc-dz-sub  { font-size: 12px; color: #555; }

/* ── Preview step ── */
.vc-preview-wrap {
  position: relative;
  width: 100%;
  padding-top: 177.8%; /* 9:16 */
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 12px;
}
.vc-preview-vid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.vc-preview-song-badge {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.vc-preview-info {
  font-size: 12px;
  color: #555;
  text-align: center;
  margin-bottom: 16px;
}
.vc-preview-actions {
  display: flex;
  gap: 10px;
}
.vc-change-btn {
  flex: 1;
  padding: 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #aaa;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.vc-change-btn:hover { background: rgba(255,255,255,0.09); }

.vc-go-btn {
  flex: 2;
  padding: 12px;
  background: linear-gradient(135deg, #8b5cf6, #f472b6);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.vc-go-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.vc-go-btn:active { transform: translateY(0); }

/* ── Combining step ── */
.vc-combining-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  margin: 16px 0 24px;
}
.vc-combining-bars {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  height: 60px;
}
.vc-combining-bars span {
  display: block;
  width: 6px;
  background: linear-gradient(to top, #8b5cf6, #f472b6);
  border-radius: 3px;
  animation: vcBar 0.9s ease-in-out infinite;
}
@keyframes vcBar {
  0%, 100% { height: 8px; opacity: 0.4; }
  50%       { height: 50px; opacity: 1; }
}
.vc-combining-bars span:nth-child(1) { animation-delay: 0s; }
.vc-combining-bars span:nth-child(2) { animation-delay: 0.1s; }
.vc-combining-bars span:nth-child(3) { animation-delay: 0.2s; }
.vc-combining-bars span:nth-child(4) { animation-delay: 0.3s; }
.vc-combining-bars span:nth-child(5) { animation-delay: 0.4s; }
.vc-combining-bars span:nth-child(6) { animation-delay: 0.3s; }
.vc-combining-bars span:nth-child(7) { animation-delay: 0.2s; }
.vc-combining-bars span:nth-child(8) { animation-delay: 0.1s; }

.vc-progress-track {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.07);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}
.vc-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #8b5cf6, #f472b6);
  border-radius: 3px;
  transition: width 0.3s ease;
}
.vc-progress-label {
  font-size: 14px;
  color: #aaa;
  text-align: center;
  margin-bottom: 6px;
}
.vc-progress-hint {
  font-size: 12px;
  color: #444;
  text-align: center;
}

/* ── Done step ── */
.vc-done-icon {
  font-size: 52px;
  text-align: center;
  margin-bottom: 12px;
}
.vc-download-btn {
  display: block;
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #8b5cf6, #f472b6);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  margin: 20px 0 18px;
  transition: opacity 0.15s, transform 0.1s;
}
.vc-download-btn:hover { opacity: 0.9; transform: translateY(-1px); }

.vc-done-steps {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.vc-done-step {
  font-size: 13px;
  color: #aaa;
  padding-left: 4px;
}

.vc-again-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: none;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.vc-again-btn:hover { border-color: rgba(255,255,255,0.25); color: #aaa; }

/* ── Combine CTA (result section) ── */
.combine-cta-wrap {
  text-align: center;
  margin-bottom: 16px;
}
.btn-combine-primary {
  display: inline-block;
  padding: 14px 32px;
  background: linear-gradient(135deg, #8b5cf6, #f472b6);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-combine-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-combine-primary:active { transform: translateY(0); }
.combine-cta-hint {
  margin-top: 7px;
  font-size: 12px;
  color: #555;
}

/* ── Lyrics Editor – two-column ── */
.lyrics-editor-section {
  display: flex;
  flex-direction: column;
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  gap: 20px;
}
.lyrics-editor-section.hidden { display: none; }

/* Left panel: controls */
.le-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
}

.le-push { flex: 1; min-height: 12px; }

/* Right panel: textarea */
.le-right {
  flex: 1;
  display: flex;
}

.le-back-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  align-self: flex-start;
}
.le-back-btn:hover { border-color: var(--accent); color: var(--accent); }

.le-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.le-genre-badge {
  font-size: 12px;
  font-weight: 600;
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 3px 8px;
  white-space: nowrap;
  flex-shrink: 0;
}

.le-title-input {
  flex: 1;
  background: var(--surface-2, #f5f5f5);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  min-width: 0;
}
.le-title-input:focus { outline: none; border-color: var(--accent); }

.le-regen-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}
.le-regen-btn:hover { border-color: var(--accent); color: var(--accent); }
.le-regen-btn:disabled { opacity: 0.5; cursor: wait; }

.le-spell-btn {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-2);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  text-align: center;
}
.le-spell-btn:hover { border-color: #22c55e; color: #22c55e; }
.le-spell-btn:disabled { opacity: 0.5; cursor: wait; }

.le-hint {
  font-size: 12px;
  color: var(--text-2);
  margin: 0;
  line-height: 1.5;
}

.le-lyrics-textarea {
  flex: 1;
  width: 100%;
  box-sizing: border-box;
  background: var(--surface-2, #f9f9f9);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text);
  resize: vertical;
  min-height: 340px;
}
.le-lyrics-textarea:focus { outline: none; border-color: var(--accent); }

.btn-generate-song {
  width: 100%;
  padding: 14px;
  background: var(--accent, #6c3cf7);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-generate-song:hover { opacity: 0.9; }
.btn-generate-song:active { transform: translateY(1px); }
.btn-generate-song:disabled { opacity: 0.5; cursor: wait; }

.le-disclaimer {
  font-size: 12px;
  color: var(--text-2);
  text-align: center;
  margin: 0;
}

/* ── Studio mode: side-by-side ── */
body.studio-mode .lyrics-editor-section {
  flex-direction: row;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
  flex: 1;
  overflow: hidden;
  background: #0d0d0d;
}

body.studio-mode .le-left {
  width: 300px;
  flex-shrink: 0;
  background: #111;
  border: none;
  border-right: 1px solid #252525;
  border-radius: 0;
  padding: 28px 22px;
  overflow-y: auto;
}

body.studio-mode .le-right {
  flex: 1;
  overflow: hidden;
}

body.studio-mode .le-title-input {
  background: #1c1c1c;
  border-color: #333;
  color: #eee;
}

body.studio-mode .le-lyrics-textarea {
  flex: 1;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  resize: none;
  padding: 32px 40px;
  background: #0d0d0d;
  font-size: 14px;
  line-height: 1.85;
  color: #ccc;
  min-height: unset;
}

/* ── GENERATOR VIDEO UPLOAD ── */
.gvu-wrap {
  margin-bottom: 20px;
}
.gvu-idle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1.5px dashed rgba(139,92,246,0.35);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: rgba(139,92,246,0.04);
}
.gvu-idle:hover {
  border-color: rgba(139,92,246,0.65);
  background: rgba(139,92,246,0.09);
}
.gvu-idle-icon { font-size: 18px; flex-shrink: 0; }
.gvu-idle-text {
  font-size: 13.5px;
  color: var(--text-2);
  flex: 1;
}
.gvu-optional { opacity: 0.55; }
.gvu-idle-arrow {
  font-size: 18px;
  color: rgba(139,92,246,0.6);
  font-weight: 600;
  flex-shrink: 0;
}
.gvu-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(139,92,246,0.08);
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: var(--radius);
}
.gvu-thumb {
  width: 72px;
  height: 48px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: #000;
}
.gvu-preview-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.gvu-preview-name {
  font-size: 12px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gvu-preview-badge {
  font-size: 11px;
  color: #a78bfa;
}
.gvu-remove {
  flex-shrink: 0;
  background: rgba(255,255,255,0.07);
  border: none;
  color: var(--text-2);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gvu-remove:hover { background: rgba(255,255,255,0.15); color: var(--text); }

/* Highlighted combine button when video is pre-loaded */
.btn-combine-primary.combine-btn-ready {
  background: linear-gradient(135deg, #7c3aed, #db2777);
  box-shadow: 0 0 24px rgba(139,92,246,0.4);
  animation: pulse-combine 2s ease-in-out infinite;
}
@keyframes pulse-combine {
  0%, 100% { box-shadow: 0 0 20px rgba(139,92,246,0.4); }
  50%       { box-shadow: 0 0 36px rgba(139,92,246,0.7); }
}

/* ── SHARED VIDEO BANNER ── */
.shared-video-banner {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #1a0f3a, #2a1050);
  border: 1px solid rgba(139, 92, 246, 0.5);
  border-radius: 40px;
  padding: 12px 18px 12px 14px;
  box-shadow: 0 4px 24px rgba(139,92,246,0.35);
  max-width: min(92vw, 520px);
  animation: svb-slide-up 0.4s ease;
}
.shared-video-banner.hidden { display: none; }
@keyframes svb-slide-up {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}
.svb-icon { font-size: 20px; flex-shrink: 0; }
.svb-text { font-size: 13px; color: #d4b8ff; line-height: 1.4; }
.svb-text strong { color: #f0e0ff; }
.svb-dismiss {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 4px;
  line-height: 1;
  margin-left: 4px;
}
.svb-dismiss:hover { color: rgba(255,255,255,0.8); }

.parody-wrap { position: relative; }

.parody-detected {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(139,92,246,0.15);
  border: 1px solid rgba(139,92,246,0.4);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: #e2d4ff;
  margin-top: 6px;
}
.parody-detected.hidden { display: none; }
.parody-detected #parody-label { flex: 1; }
