:root {
  --navy:     #0d0015;
  --card:     #1a0030;
  --card-2:   #220040;
  --purple:   #8f00ff;
  --pink:     #ff00ff;
  --grad:     linear-gradient(90deg, #7f00ff, #9f00ff, #df00ff, #ff00ff);
  --text:     #ffffff;
  --muted:    #b090cc;
  --border:   rgba(159, 0, 255, 0.2);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--navy);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── Themed scrollbars (everywhere) ───────────────────────────────── */
* { scrollbar-width: thin; scrollbar-color: #8f00ff rgba(255,255,255,0.05); }
::-webkit-scrollbar { -webkit-appearance: none; width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #7f00ff, #ff00ff);
  border-radius: 6px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #9b1fff, #ff3df0);
  background-clip: padding-box;
}

/* ── Utilities ────────────────────────────────────────────────────── */
.gradient-text {
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-label {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--purple);
  margin-bottom: 12px;
}

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 56px;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  border: none;
  transition: opacity 0.2s, transform 0.2s, background 0.2s, border-color 0.2s;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.18);
}
.btn-ghost:hover {
  border-color: var(--purple);
  background: rgba(143,0,255,0.08);
}

.btn-gradient {
  background: var(--grad);
  color: #fff;
  border: none;
  outline: none;
  cursor: pointer;
}
.btn-gradient:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn-full {
  width: 100%;
  padding: 13px;
  font-size: 0.95rem;
}

/* ── Nav ──────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding: 0 2rem;
  background: rgba(13, 0, 21, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  overflow: hidden;
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.nav-logo img  {
  height: 56px;
  display: block;
}
.nav-actions   { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
@media (max-width: 1100px) {
  .nav-actions .btn { padding: 7px 14px; font-size: 0.82rem; }
  .nav-center .nav-tagline { font-size: 0.88rem; }
}
@media (max-width: 860px) {
  .nav { padding: 0 1rem; }
  .nav-center .nav-tagline { font-size: 0.6rem; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn { padding: 7px 12px; font-size: 0.8rem; }
}
@media (max-width: 640px) {
  .nav-center { display: none; }
  .nav-actions .btn { padding: 6px 10px; font-size: 0.75rem; }
}
.nav.scrolled {
  box-shadow: 0 2px 32px rgba(143,0,255,0.22);
  border-bottom-color: rgba(143,0,255,0.45);
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { position: relative; height: calc(100vh - 64px); display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; }
#hero-bg { position: absolute; inset: 0; overflow: hidden; }
#hero-bg video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-bg-overlay { position: absolute; inset: 0; background: rgba(13,0,21,0.6); z-index: 1; }
.hero-content { position: relative; z-index: 1; max-width: min(960px, 95vw); padding: 0 2rem; display: flex; flex-direction: column; align-items: center; }
.hero-headline { margin-bottom: 2.5rem; }
.hero-h1 { font-size: clamp(2rem, 5.5vw, 4.8rem); font-weight: 900; text-transform: uppercase; line-height: 1.1; letter-spacing: -0.01em; color: #fff; }
.hero-features { display: flex; align-items: flex-start; justify-content: center; width: 100%; margin-bottom: 2.5rem; }
.hero-feature { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; }
.hero-feature-label { font-size: clamp(0.72rem, 1.6vw, 1.2rem); font-weight: 800; text-transform: uppercase; letter-spacing: 0.2em; color: #fff; white-space: nowrap; }
.hero-feature-desc { font-size: clamp(0.68rem, 1.4vw, 1.05rem); color: var(--muted); line-height: 1.55; text-align: center; }
.hero-divider { flex-shrink: 0; padding: 0 2rem; display: flex; align-items: flex-start; padding-top: 0.15rem; }
.hero-divider-gem { display: block; width: 1px; height: 54px; background: rgba(255,255,255,0.35); }
.hero-dropzone { position: relative; width: min(740px, 92vw); height: 230px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px; background: rgba(143,0,255,0.04); border: none; border-radius: 20px; color: #fff; cursor: pointer; overflow: hidden; transition: background 0.25s, box-shadow 0.25s; box-shadow: 0 0 60px rgba(143,0,255,0.25), 0 0 120px rgba(143,0,255,0.1); }
.hero-dropzone:hover, .hero-dropzone.drag-over { background: rgba(143,0,255,0.09); box-shadow: 0 0 80px rgba(143,0,255,0.4), 0 0 160px rgba(143,0,255,0.18); }
.hero-dropzone-border { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-dropzone-border rect { animation: march-dashes 2s linear infinite; }
@keyframes march-dashes { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -76; } }
.hero-dropzone-icon { width: 60px; height: 60px; flex-shrink: 0; }
.hero-dropzone-label { font-size: 1.15rem; font-weight: 600; color: var(--muted); }
.nav-center {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 12px;
  min-width: 0;
}
.nav-tagline { font-size: 1rem; font-weight: 700; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }

/* ── Modal ────────────────────────────────────────────────────────── */
.modal-overlay {
  display: flex;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.72);
  z-index: 200;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--card);
  border-radius: 20px;
  width: min(660px, 95vw);
  min-height: min(640px, 90vh);
  max-height: 94vh;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(143,0,255,0.28);
  box-shadow: 0 32px 90px rgba(0,0,0,0.65);
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: #8f00ff rgba(255,255,255,0.04);
  transform: scale(0.94) translateY(10px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}
.modal-overlay.open .modal {
  transform: none;
  opacity: 1;
}
.modal::-webkit-scrollbar { -webkit-appearance: none; width: 8px; }
.modal::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 3px; }
.modal::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #7f00ff, #ff00ff); border-radius: 3px; }
.modal::-webkit-scrollbar-thumb:hover { opacity: 0.85; }

.modal-progress {
  height: 4px;
  background: rgba(255,255,255,0.07);
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  flex-shrink: 0;
}
.modal-progress-bar {
  height: 100%;
  background: var(--grad);
  transition: width 0.4s ease;
  width: 16.66%;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 0;
  flex-shrink: 0;
}
.modal-step-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  line-height: 1;
  transition: color 0.2s, background 0.2s;
}
.modal-close:hover {
  color: var(--text);
  background: rgba(255,255,255,0.08);
}

.modal-step { display: none; }
.modal-step.active { display: block; }

/* Step 1: let the upload box grow to fill the empty space below the header */
.modal-step[data-step="1"].active { display: flex; flex-direction: column; flex: 1; }
.modal-step[data-step="1"] .modal-body { display: flex; flex-direction: column; }
.modal-step[data-step="1"] #mp3-dropzone { flex: 1; justify-content: center; }

.modal-body {
  padding: 28px 32px 12px;
  flex: 1;
}
.modal-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
}
/* Descriptive paragraph under a heading — applies inside nested views too.
   Hints and the clips subtitle keep their own tighter spacing. */
.modal-body p:not(.modal-hint):not(.clips-subtitle) {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin-bottom: 22px;
}

.modal-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 8px;
}

.modal-input {
  display: block;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
  margin-bottom: 16px;
}
.modal-input:focus { border-color: var(--purple); }

.modal-textarea {
  resize: none;
  min-height: 160px;
  line-height: 1.6;
  scrollbar-width: thin;
  scrollbar-color: #8f00ff rgba(255,255,255,0.04);
}
.modal-textarea::-webkit-scrollbar { -webkit-appearance: none; width: 8px; }
.modal-textarea::-webkit-scrollbar-track { background: rgba(255,255,255,0.04); border-radius: 3px; }
.modal-textarea::-webkit-scrollbar-thumb { background: linear-gradient(180deg, #7f00ff, #ff00ff); border-radius: 3px; }
.modal-textarea::-webkit-scrollbar-thumb:hover { opacity: 0.85; }

/* Dropzone */
.dropzone {
  border-radius: 12px;
  padding: 44px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  background-image:
    linear-gradient(var(--card), var(--card)),
    linear-gradient(90deg, #7f00ff, #ff00ff);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  transition: background-image 0.2s;
}
.dropzone:hover {
  background-image:
    linear-gradient(rgba(26,0,48,0.5), rgba(26,0,48,0.5)),
    linear-gradient(90deg, #7f00ff, #ff00ff);
}
.dropzone svg       { width: 44px; height: 44px; }
.dropzone-label     { font-size: 0.95rem; color: var(--muted); }
.dropzone-sub       { font-size: 0.8rem; color: rgba(176,144,204,0.6); }
.dropzone.drag-over {
  background-image:
    linear-gradient(rgba(143,0,255,0.12), rgba(143,0,255,0.12)),
    linear-gradient(90deg, #7f00ff, #ff00ff);
}
.dropzone.has-file {
  background-image:
    linear-gradient(rgba(26,0,48,0.82), rgba(26,0,48,0.82)),
    linear-gradient(90deg, #7f00ff, #ff00ff);
  box-shadow: 0 0 24px rgba(143,0,255,0.2);
}
.dropzone.has-file .dropzone-label { color: var(--text); font-weight: 600; }

/* Thumbnail preview state — 16:9 with black bars matching _make_youtube_thumbnail */
.dropzone.thumb-preview {
  padding: 0;
  background-image: none;
  background: #000;
  border: none;
  aspect-ratio: 16 / 9;
  height: auto;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dropzone.thumb-preview img {
  width: 56.25%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0;
}
.dropzone.thumb-preview.thumb-fit img {
  width: 100%;
}
.dropzone.thumb-preview .dropzone-remove {
  background: rgba(0,0,0,0.55);
  color: #fff;
  z-index: 1;
}
.dropzone.thumb-preview .dropzone-remove:hover {
  background: rgba(0,0,0,0.8);
}

.dropzone-remove {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  flex-shrink: 0;
}
.dropzone-remove:hover { background: rgba(255,255,255,0.22); color: #fff; }

.dropzone { position: relative; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}

.modal-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: -6px;
  margin-bottom: 4px;
  line-height: 1.5;
}

/* ── Step 2 producer info fields ─────────────────────────────────── */
.meta-info-input { font-size: 0.85rem !important; padding: 9px 12px !important; margin-top: 8px; }

/* ── Step 2 extra-artist rows ────────────────────────────────────── */
.add-artist-btn {
  background: none;
  border: none;
  color: var(--purple);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 10px;
  display: block;
  transition: opacity 0.15s;
}
.add-artist-btn:hover { opacity: 0.7; }

.artist-row { display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.artist-row .modal-input { flex: 1; margin-bottom: 0; }
.artist-remove {
  flex-shrink: 0;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 0.95rem;
  cursor: pointer;
  padding: 6px 9px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.artist-remove:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* ── Step 3 tag chips ────────────────────────────────────────────── */
.meta-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
  min-height: 38px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 6px 8px;
  cursor: text;
}
.meta-tag-chip {
  background: rgba(143,0,255,0.12);
  border: 1px solid rgba(143,0,255,0.28);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
  cursor: pointer;
  user-select: none;
}
.meta-tag-chip:hover {
  background: rgba(200,0,80,0.2);
  border-color: rgba(200,0,80,0.45);
  color: #f87171;
}
.tag-add-input {
  background: none;
  border: none;
  color: #fff;
  font-size: 0.78rem;
  outline: none;
  min-width: 90px;
  flex: 1;
  padding: 2px 0;
}
.tag-add-input::placeholder { color: #6b7280; }

/* ── Step 4 crop toggle ──────────────────────────────────────────── */
.thumb-crop-toggle {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
}
.thumb-crop-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--muted);
}
.thumb-crop-option input[type="radio"] {
  accent-color: var(--purple);
  cursor: pointer;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* ── Skip links (Step 5 & 6) ─────────────────────────────────────── */
.yt-skip-link {
  display: block;
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
  text-align: center;
}
.yt-skip-link:hover { color: var(--text); }

/* ── Step 5: YouTube clip selector ──────────────────────────────── */
.yt-search-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}
/* Clip editor */
.yt-clip-preview-area {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 14px;
}
.yt-clip-preview-area iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-clip-preview-area img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.yt-clip-time-overlay {
  position: absolute;
  bottom: 8px;
  right: 10px;
  background: rgba(0,0,0,0.7);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  pointer-events: none;
}
.yt-loop-badge {
  position: absolute;
  top: 8px;
  left: 10px;
  background: rgba(0,0,0,0.65);
  color: #ff4444;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  pointer-events: none;
}
.yt-timeline-wrap { margin-bottom: 6px; padding: 8px 0; }
.yt-timeline-bar {
  position: relative;
  height: 6px;
  background: rgba(255,255,255,0.1);
  border-radius: 3px;
  cursor: pointer;
}
.yt-clip-window {
  position: absolute;
  top: -5px;
  height: 16px;
  background: rgba(255,255,255,0.9);
  border-radius: 4px;
  cursor: grab;
  box-shadow: 0 0 0 1px rgba(143,0,255,0.7);
}
.yt-clip-window:active { cursor: grabbing; }
.yt-timestamps {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 12px;
  text-align: center;
}
.yt-editor-controls {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 4px;
}

/* Thumbnail preview */
.thumb-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 14px;
}
.thumb-preview img { width: 100%; height: 100%; object-fit: cover; }
.thumb-preview.thumb-fit img { object-fit: cover; }
.thumb-placeholder { color: var(--muted); font-size: 0.85rem; text-align: center; }
.thumb-error-msg {
  color: var(--muted);
  font-size: 0.84rem;
  text-align: center;
  padding: 0 20px;
  line-height: 1.6;
}

/* ── YouTube dark-mode preview (Step 5) ─────────────────────────── */
.yt-preview {
  background: #1a1a1a;
  border-radius: 10px;
  border: 8px solid #1a1a1a;
  margin-top: 16px;
  overflow: hidden;
  color: #f1f1f1;
  font-family: 'Roboto', -apple-system, sans-serif;
}

/* Player */
.yt-player {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1a1a1a;
  overflow: hidden;
  cursor: pointer;
}
.yt-player-bg {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  overflow: hidden;
}
.yt-player-bg img,
.yt-player-bg video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.yt-player-bg iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  pointer-events: none;
}
.yt-player-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.75));
  padding: 20px 0 0;
}
.yt-progress-wrap { padding: 0 10px; margin-bottom: 4px; }
.yt-progress-track {
  height: 3px;
  background: rgba(255,255,255,0.25);
  border-radius: 2px;
  cursor: pointer;
}
.yt-progress-fill {
  width: 0%;
  height: 100%;
  background: #f00;
  border-radius: 2px;
}
.yt-ctrls {
  display: flex;
  align-items: center;
  padding: 0 6px 8px;
  gap: 2px;
}
.yt-ctrl-btn {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.9;
  transition: opacity 0.15s;
}
.yt-ctrl-btn:hover { opacity: 1; }
.yt-ctrl-btn svg  { width: 17px; height: 17px; }
.yt-time {
  font-size: 0.72rem;
  color: #fff;
  white-space: nowrap;
  padding: 0 4px;
  font-family: -apple-system, sans-serif;
}
.yt-ctrl-spacer { flex: 1; }

/* Info below player */
.yt-video-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #f1f1f1;
  padding: 12px 12px 6px;
  line-height: 1.4;
}
.yt-channel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 12px 10px;
}
.yt-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #3d3d3d;
  flex-shrink: 0;
  overflow: hidden;
}
.yt-connect-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 32px;
}
.yt-connect-body h2 { margin-bottom: 10px; }
.yt-connect-body > p { max-width: 360px; }
.yt-connect-hint {
  text-align: center;
  margin-top: 14px;
  margin-bottom: 0;
}
.btn-yt-connect {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  padding: 14px 24px;
  background: #ff0000;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 28px;
  transition: background 0.2s, transform 0.1s;
}
.btn-yt-connect:hover  { background: #cc0000; }
.btn-yt-connect:active { transform: scale(0.98); }

/* ── Landing tier cards (Step 6) ─────────────────────────────────── */
.landing-tiers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.landing-tier-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.landing-tier-card.featured {
  background: linear-gradient(var(--card), var(--card)) padding-box,
              linear-gradient(90deg, #7f00ff, #ff00ff) border-box;
  border: 2px solid transparent;
}
.landing-tier-name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.landing-tier-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.landing-tier-price span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--muted);
}
.landing-tier-perks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--muted);
  flex: 1;
}
.landing-tier-perks li::before {
  content: '✓  ';
  color: var(--purple);
}
.landing-tier-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.18);
  background: transparent;
  color: #f1f1f1;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, opacity 0.2s;
}
.landing-tier-btn:hover:not(:disabled) { background: rgba(255,255,255,0.08); }
.landing-tier-btn.btn-gradient {
  border: none;
  background: var(--grad);
  color: #fff;
}
.landing-tier-btn.btn-gradient:hover:not(:disabled) { opacity: 0.88; }
.landing-tier-btn:disabled { opacity: 0.6; cursor: default; }

.yt-channel-info  { flex: 1; min-width: 0; }
.yt-channel-name  { font-size: 0.8rem; font-weight: 600; color: #f1f1f1; }
.yt-channel-subs  { font-size: 0.7rem; color: #aaa; }
.yt-subscribe-btn {
  display: inline-block;
  background: #f1f1f1;
  color: #0f0f0f;
  border: none;
  border-radius: 18px;
  padding: 6px 13px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: default;
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

/* Info box: stats + description */
.yt-info-box {
  background: #272727;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 0 12px 12px;
}
.yt-stats {
  font-size: 0.75rem;
  font-weight: 700;
  color: #f1f1f1;
  margin-bottom: 8px;
  line-height: 1.2;
  white-space: pre;
}
.yt-desc-box {
  font-size: 0.75rem;
  color: #f1f1f1;
  font-weight: 400;
  line-height: 1.55;
  white-space: pre-line;
}
.yt-show-more {
  display: block;
  color: #aaa;
  font-weight: 400;
  margin-top: 4px;
}

/* Paywall step */
.paywall {
  text-align: center;
  padding-bottom: 8px;
}
.paywall-emoji { font-size: 2.5rem; margin-bottom: 16px; }
.paywall h2    { margin-bottom: 10px; }
.paywall > p   { margin-bottom: 28px; }

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #fff;
  color: #1f1f1f;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  margin-bottom: 10px;
  transition: background 0.2s;
}
.btn-google:hover { background: #f1f1f1; }

/* Modal footer */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px 24px;
  border-top: 1px solid rgba(255,255,255,0.05);
  flex-shrink: 0;
  margin-top: auto;
}
.btn-back {
  background: rgba(255,255,255,0.05);
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.1);
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}
.btn-back:hover { background: rgba(255,255,255,0.1); }

#modal-next:disabled {
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.25);
  cursor: not-allowed;
  opacity: 1;
}
#modal-next:disabled:hover { transform: none; opacity: 1; }

/* ── How It Works ─────────────────────────────────────────────────── */
.how-it-works { padding: 100px 0; }
.hiw-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
}
.hiw-step {
  position: relative;
  background: var(--card);
  border-radius: 16px;
  padding: 40px 28px 32px;
  border: 1px solid rgba(143,0,255,0.12);
  overflow: hidden;
}
.hiw-step-bg {
  position: absolute;
  top: -10px;
  left: 12px;
  font-size: 7rem;
  font-weight: 900;
  line-height: 1;
  color: #fff;
  opacity: 0.04;
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.04em;
}
.hiw-step-content { position: relative; z-index: 1; }
.hiw-step-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; }
.hiw-step-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.7; }
.hiw-connector { display: flex; align-items: center; justify-content: center; padding: 0 20px; }
.hiw-arrow { font-size: 1.5rem; color: var(--purple); opacity: 0.45; }
@media (max-width: 768px) {
  .hiw-grid { grid-template-columns: 1fr; }
  .hiw-connector { padding: 4px 0; transform: rotate(90deg); }
}

/* ── Stats Bar ────────────────────────────────────────────────────── */
.stats-bar {
  padding: 60px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}
.stat-item { display: flex; flex-direction: column; gap: 8px; }
.stat-number { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 800; color: #fff; line-height: 1; }
.stat-label { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
@media (max-width: 640px) { .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; } }

/* ── Feature Deep Dive ────────────────────────────────────────────── */
.fdd { padding: 100px 0; }
.fdd-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  margin-bottom: 88px;
}
.fdd-row:last-child { margin-bottom: 0; }
.fdd-row-reverse .fdd-text   { order: 2; }
.fdd-row-reverse .fdd-visual { order: 1; }
.fdd-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--purple);
  margin-bottom: 14px;
}
.fdd-headline {
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}
.fdd-body { font-size: 0.95rem; color: var(--muted); line-height: 1.85; }
.fdd-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: rgba(143,0,255,0.03);
  border: 2px dashed rgba(143,0,255,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(143,0,255,0.4);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
@media (max-width: 768px) {
  .fdd-row { grid-template-columns: 1fr; gap: 32px; margin-bottom: 60px; }
  .fdd-row-reverse .fdd-text   { order: 1; }
  .fdd-row-reverse .fdd-visual { order: 2; }
}

/* ── FDD Demo Animations ─────────────────────────────────────────── */
.fdd-demo {
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  background: #0d0b14;
  border: 1px solid rgba(143,0,255,0.2);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  overflow: hidden;
  padding: 22px 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.demo-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(168,85,247,0.65);
  margin: 0;
}
.demo-blur-line {
  height: 10px;
  border-radius: 99px;
  background: rgba(255,255,255,0.11);
}
.demo-chips { display: flex; gap: 7px; }
.demo-chip {
  height: 22px;
  border-radius: 99px;
  background: rgba(143,0,255,0.18);
  border: 1px solid rgba(143,0,255,0.38);
  flex-shrink: 0;
}
.demo-track {
  height: 5px;
  border-radius: 99px;
  background: rgba(255,255,255,0.07);
  overflow: hidden;
}
.demo-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #8f00ff, #ec4899);
  width: 0%;
}
.demo-btn {
  border: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 9px 16px;
  cursor: default;
  align-self: flex-start;
}
.demo-success {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4ade80;
}
.demo-check { font-size: 13px; }

/* Card 1 — Metadata */
.demo-input-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  height: 40px;
  border-radius: 9px;
  background: rgba(143,0,255,0.07);
  border: 1px solid rgba(143,0,255,0.28);
}
.demo-typing-bar {
  height: 9px;
  border-radius: 4px;
  background: rgba(255,255,255,0.22);
  flex: 1;
  max-width: 0;
  animation: meta-type 9s ease-in-out infinite;
}
@keyframes meta-type {
  0%,  4%  { max-width: 0%; }
  32%      { max-width: 72%; }
  88%      { max-width: 72%; }
  93%      { max-width: 0%; }
  100%     { max-width: 0%; }
}
.demo-cursor {
  width: 2px;
  height: 15px;
  background: #a855f7;
  border-radius: 1px;
  animation: cursor-blink 0.8s step-end infinite;
}
@keyframes cursor-blink { 50% { opacity: 0; } }
.demo-gen-btn {
  background: linear-gradient(135deg, #8f00ff, #ec4899);
  color: #fff;
  animation: gen-btn 9s ease-in-out infinite;
}
@keyframes gen-btn {
  0%,  30% { opacity: 0.4; transform: scale(1); }
  34%      { opacity: 1;   transform: scale(1.06); }
  37%, 88% { opacity: 1;   transform: scale(1); }
  93%      { opacity: 0.4; }
  100%     { opacity: 0.4; }
}
.demo-meta-output { display: flex; flex-direction: column; gap: 8px; animation: meta-out 9s ease-in-out infinite; }
.demo-field-group { display: flex; flex-direction: column; gap: 5px; }
.demo-field-label {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  margin: 0;
}
.demo-tags-box {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 5px 7px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
}
@keyframes meta-out {
  0%,  40% { opacity: 0; transform: translateY(5px); }
  50%, 88% { opacity: 1; transform: translateY(0); }
  93%      { opacity: 0; }
  100%     { opacity: 0; }
}

/* Card 2 — Visualizer */
.demo-clips { display: flex; gap: 7px; flex: 1; min-height: 0; }
.demo-clip {
  flex: 1;
  border-radius: 7px;
  background: #000;
  border: 2px solid rgba(143,0,255,0.14);
  overflow: hidden;
}
.demo-clip video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.demo-clip-1 { animation: clip-in-1 9s ease-in-out infinite; }
@keyframes clip-in-1 {
  0%,  2%  { opacity: 0; transform: translateY(7px); }
  14%, 92% { opacity: 1; transform: translateY(0); }
  96%      { opacity: 0; }
  100%     { opacity: 0; }
}
.demo-clip-2 { animation: clip-in-2 9s ease-in-out infinite; }
@keyframes clip-in-2 {
  0%,  5%  { opacity: 0; transform: translateY(7px); border-color: rgba(143,0,255,0.14); box-shadow: none; }
  14%      { opacity: 1; transform: translateY(0);   border-color: rgba(143,0,255,0.14); box-shadow: none; }
  20%, 90% { opacity: 1; transform: translateY(0);   border-color: #a855f7; box-shadow: 0 0 10px rgba(168,85,247,0.38); }
  95%      { opacity: 0; border-color: rgba(143,0,255,0.14); box-shadow: none; }
  100%     { opacity: 0; border-color: rgba(143,0,255,0.14); }
}
.demo-clip-3 { animation: clip-in-3 9s ease-in-out infinite; }
@keyframes clip-in-3 {
  0%,  8%  { opacity: 0; transform: translateY(7px); }
  16%, 92% { opacity: 1; transform: translateY(0); }
  96%      { opacity: 0; }
  100%     { opacity: 0; }
}
.demo-viz-progress {
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: viz-prog 9s ease-in-out infinite;
}
@keyframes viz-prog {
  0%,  18% { opacity: 0; }
  22%, 90% { opacity: 1; }
  95%      { opacity: 0; }
  100%     { opacity: 0; }
}
.demo-encode-label { color: rgba(255,255,255,0.45) !important; }
.demo-fill-viz { animation: fill-viz 9s ease-in-out infinite; }
@keyframes fill-viz {
  0%,  22% { width: 0%; }
  58%      { width: 100%; }
  90%      { width: 100%; }
  95%      { width: 0%; }
  100%     { width: 0%; }
}
.demo-vid-ready { animation: vid-ready 9s ease-in-out infinite; }
@keyframes vid-ready {
  0%,  58% { opacity: 0; transform: translateY(4px); }
  64%, 90% { opacity: 1; transform: translateY(0); }
  95%      { opacity: 0; }
  100%     { opacity: 0; }
}

/* Card 3 — Publish */
.demo-yt-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  animation: yt-card 9s ease-in-out infinite;
}
@keyframes yt-card {
  0%      { opacity: 0; }
  8%, 90% { opacity: 1; }
  95%     { opacity: 0; }
  100%    { opacity: 0; }
}
.demo-yt-thumb {
  width: 100%;
  height: 80px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(143,0,255,0.32), rgba(236,72,153,0.22));
  border: 1px solid rgba(143,0,255,0.18);
}
.demo-yt-meta { display: flex; flex-direction: column; }
.demo-pub-btn {
  background: #cc0000;
  color: #fff;
  animation: pub-btn 9s ease-in-out infinite;
}
@keyframes pub-btn {
  0%,  14% { opacity: 0; transform: scale(1); }
  18%      { opacity: 1; }
  22%      { transform: scale(1.06); }
  26%, 90% { opacity: 1; transform: scale(1); }
  95%      { opacity: 0; }
  100%     { opacity: 0; }
}
.demo-pub-progress { animation: pub-prog 9s ease-in-out infinite; }
@keyframes pub-prog {
  0%,  24% { opacity: 0; }
  28%, 90% { opacity: 1; }
  95%      { opacity: 0; }
  100%     { opacity: 0; }
}
.demo-fill-pub { animation: fill-pub 9s ease-in-out infinite; }
@keyframes fill-pub {
  0%,  28% { width: 0%; }
  62%      { width: 100%; }
  90%      { width: 100%; }
  95%      { width: 0%; }
  100%     { width: 0%; }
}
.demo-live { animation: live-badge 9s ease-in-out infinite; }
@keyframes live-badge {
  0%,  62% { opacity: 0; transform: translateX(-6px); }
  70%, 90% { opacity: 1; transform: translateX(0); }
  95%      { opacity: 0; }
  100%     { opacity: 0; }
}

/* ── Reviews ──────────────────────────────────────────────────────── */
.reviews { padding: 100px 0; background: rgba(143,0,255,0.03); }
.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 768px) { .reviews-grid { grid-template-columns: 1fr; } }
.review-card {
  background: var(--card);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid rgba(255,255,255,0.05);
  border-top: 2px solid var(--purple);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.review-stars  { color: var(--purple); font-size: 0.9rem; letter-spacing: 2px; }
.review-quote  { font-size: 0.92rem; line-height: 1.75; color: #d4c4e8; flex: 1; }
.review-author { display: flex; flex-direction: row; align-items: center; gap: 12px; }
.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(143,0,255,0.18);
  border: 1px solid rgba(143,0,255,0.3);
  flex-shrink: 0;
  overflow: hidden;
}
.review-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.review-author-info { display: flex; flex-direction: column; gap: 3px; }
.review-name   { font-size: 0.88rem; font-weight: 700; color: #fff; }
.review-subs   { font-size: 0.75rem; color: var(--muted); }

/* ── Pricing ──────────────────────────────────────────────────────── */
.pricing { padding: 100px 0; }

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  align-items: stretch;
  max-width: 700px;
  margin: 0 auto;
}
@media (max-width: 768px) { .pricing-grid { grid-template-columns: 1fr; } }

.pricing-card {
  background: var(--card);
  border-radius: 16px;
  padding: 32px 28px;
  border: 1px solid rgba(255,255,255,0.06);
}
.pricing-card.featured {
  border: 2px solid transparent;
  background-image:
    linear-gradient(var(--card), var(--card)),
    linear-gradient(90deg, #7f00ff, #9f00ff, #df00ff, #ff00ff);
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

.pricing-badge {
  display: inline-block;
  background: var(--grad);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}
.pricing-name  { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.pricing-price { font-size: 2.4rem; font-weight: 800; margin-bottom: 4px; }
.pricing-price span { font-size: 0.95rem; font-weight: 400; color: var(--muted); }
.pricing-desc  { color: var(--muted); font-size: 0.83rem; margin-bottom: 22px; }

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}
.pricing-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: #d4c4e8;
}
.check-icon { width: 16px; height: 16px; flex-shrink: 0; }
.fdd-demo:not(.animate) * { animation-play-state: paused !important; }
.pricing-everything-in {
  font-size: 0.8rem !important;
  font-weight: 700;
  color: #c084fc !important;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(192,132,252,0.2);
  margin-bottom: 2px;
}

.btn-pricing {
  display: block;
  width: 100%;
  text-align: center;
  padding: 12px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s, background 0.2s, border-color 0.2s;
}
.btn-pricing.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--text);
}
.btn-pricing.outline:hover {
  border-color: var(--purple);
  background: rgba(143,0,255,0.08);
}
.btn-pricing.filled {
  background: var(--grad);
  color: #fff;
  border: none;
}
.btn-pricing.filled:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

/* ── Modal step transitions ────────────────────────────────────────── */
@keyframes stepEnterFwd  { from { opacity:0; transform:translateX(28px); } to { opacity:1; transform:translateX(0); } }
@keyframes stepExitFwd   { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(-28px); } }
@keyframes stepEnterBack { from { opacity:0; transform:translateX(-28px); } to { opacity:1; transform:translateX(0); } }
@keyframes stepExitBack  { from { opacity:1; transform:translateX(0); } to { opacity:0; transform:translateX(28px); } }
.step-enter-fwd  { animation: stepEnterFwd  0.28s cubic-bezier(0.22,1,0.36,1) forwards; }
.step-exit-fwd   { animation: stepExitFwd   0.2s  ease forwards; }
.step-enter-back { animation: stepEnterBack 0.28s cubic-bezier(0.22,1,0.36,1) forwards; }
.step-exit-back  { animation: stepExitBack  0.2s  ease forwards; }

/* ── Button micro-interactions ────────────────────────────────────── */
.btn:active,
.btn-pricing:active,
.btn-yt-connect:active,
.landing-tier-btn:active {
  transform: scale(0.96);
  transition-duration: 0.08s;
}
.hero-dropzone:active {
  transform: scale(0.99);
  transition-duration: 0.08s;
}

/* ── Scroll-to-top button ─────────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 90;
  box-shadow: 0 4px 24px rgba(143,0,255,0.45);
}
.scroll-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover  { opacity: 0.85; transform: translateY(-2px); }
.scroll-top:active { transform: scale(0.92); }
.scroll-top svg    { width: 18px; height: 18px; }

/* ── Entrance animations ──────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-anim {
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-play-state: paused;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

/* ── Footer ───────────────────────────────────────────────────────── */
footer { border-top: 1px solid rgba(255,255,255,0.05); padding: 48px 2rem; }

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-logo img { height: 44px; opacity: 0.75; display: block; }
.footer-copy     { color: var(--muted); font-size: 0.82rem; }
.footer-links    { display: flex; gap: 22px; }
.footer-links a  { color: var(--muted); font-size: 0.82rem; text-decoration: none; transition: color 0.2s; }

/* ── Clip extraction step (landing modal step 5) ──────────────────── */
.landing-clip-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 4px;
}
.landing-clip-card {
  position: relative;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.18s, background 0.18s;
}
.landing-clip-card:hover {
  border-color: rgba(255,255,255,0.18);
}
.landing-clip-card.selected {
  border-color: #9f00ff;
  box-shadow: 0 0 0 1px #8f00ff;
}
.landing-clip-thumb-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}
.landing-clip-img,
.landing-clip-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.landing-clip-video { display: none; }
.landing-clip-card:hover .landing-clip-video { display: block; }
.landing-clip-card:hover .landing-clip-img   { display: none; }
.landing-clip-label {
  position: absolute;
  bottom: 6px;
  right: 7px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  background: rgba(0,0,0,0.65);
  padding: 2px 6px;
  border-radius: 4px;
  pointer-events: none;
  line-height: 1.4;
}

/* ── Clip extraction indeterminate bar (landing step 5) ──────────── */
.landing-extract-bar {
  height: 4px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin: 8px 0 4px;
  display: none;
}
.landing-extract-bar.active { display: block; }
.landing-extract-bar.active::after {
  content: '';
  display: block;
  height: 100%;
  width: 38%;
  background: var(--grad);
  border-radius: 3px;
  animation: extract-sweep 1.3s ease-in-out infinite;
}
@keyframes extract-sweep {
  0%   { transform: translateX(-160%); }
  100% { transform: translateX(380%); }
}

/* ── Encode progress bar (landing step 6) ─────────────────────────── */
.landing-encode-bar {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin: 4px 0;
}
.landing-encode-fill {
  height: 100%;
  width: 0%;
  background: var(--grad);
  border-radius: 3px;
  transition: width 0.6s ease;
}
.footer-links a:hover { color: var(--text); }

/* ── Step 5: visualizer clip picker ──────────────────────────────── */
.clips-subtitle {
  color: #9b93a8;
  font-size: 13px;
  margin-top: 4px;
}
#clips-grid {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 18px;
  width: 100%;
}
.clip-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
}
.clip-number {
  flex-shrink: 0;
  white-space: nowrap;
}
.clip-number-word {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b090cc;
}
.clip-number-digit {
  font-size: 13px;
  font-weight: 700;
  color: #b090cc;
}
.clip-card {
  position: relative;
  flex: 1;
  max-width: 280px;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
}
.clip-card video {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
/* Gradient border that follows the rounded corners (mask-composite trick) */
.clip-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  padding: 2px;
  background: linear-gradient(135deg, #7f00ff, #ff00ff);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.clip-card:hover::after,
.clip-card.selected::after { opacity: 1; }
.clip-timestamp {
  position: absolute;
  left: 8px;
  bottom: 8px;
  background: rgba(0,0,0,0.78);
  color: #fff;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  pointer-events: none;
  font-size: 12px;
}

/* ── Accessibility: respect reduced-motion preference ─────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
