/* ─── Base Variables & Fonts ─────────────────────────────────────────── */
:root {
  --bg: #07080a;
  --bg-card: #0f1015;
  --bg-card-hover: #161822;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(168, 85, 247, 0.4);
  --purple: #a855f7;
  --purple-glow: rgba(168, 85, 247, 0.35);
  --pink: #ec4899;
  --cyan: #00f2fe;
  --green: #22c55e;
  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-faint: #64748b;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --grad-from: #a855f7;
  --grad-to: #ec4899;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.app-body {
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
  background-image: 
    radial-gradient(ellipse at 50% 0%, rgba(168,85,247,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(236,72,153,0.06) 0%, transparent 50%);
}

/* ─── Top Navbar ──────────────────────────────────────────────────────── */
.app-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: 60px;
  background: rgba(7, 8, 10, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.app-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.logo-accent {
  background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.status-dot-wrap { display: flex; align-items: center; gap: 0.5rem; }
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #6b7280;
  animation: pulse 2s infinite;
}
.status-dot.green { background: var(--green); box-shadow: 0 0 10px var(--green); }
.status-lbl { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ─── Single Page Container ───────────────────────────────────────────── */
.single-page-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 85px 1.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

/* ─── Hero 1-Click Generator Card ─────────────────────────────────────── */
.hero-generator-card {
  background: radial-gradient(circle at 50% 0%, rgba(168,85,247,0.18) 0%, rgba(15,16,21,0.95) 75%);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 40px rgba(168,85,247,0.15);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  background: rgba(168,85,247,0.15);
  border: 1px solid rgba(168,85,247,0.3);
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 750px;
}

.gradient-text {
  background: linear-gradient(135deg, #c084fc, #f472b6, #38bdf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 680px;
  line-height: 1.6;
}

.url-input-container {
  width: 100%;
  max-width: 780px;
  margin-top: 0.5rem;
}

.url-input-wrap {
  display: flex;
  align-items: center;
  background: #090a0e;
  border: 2px solid rgba(168,85,247,0.35);
  border-radius: var(--radius-pill);
  padding: 0.45rem 0.6rem 0.45rem 1.25rem;
  box-shadow: 0 0 35px rgba(168,85,247,0.2);
  transition: var(--transition);
}

.url-input-wrap:focus-within {
  border-color: var(--purple);
  box-shadow: 0 0 45px rgba(168,85,247,0.4);
}

.url-icon {
  color: var(--purple);
  flex-shrink: 0;
  margin-right: 0.75rem;
}

.url-input {
  flex: 1;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.05rem;
  font-weight: 500;
  outline: none;
  min-width: 0;
}

.url-input::placeholder {
  color: var(--text-faint);
  font-size: 0.95rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: var(--transition);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(168,85,247,0.45);
}

.btn-generate {
  padding: 0.9rem 1.75rem;
  font-size: 1rem;
  flex-shrink: 0;
  box-shadow: 0 4px 20px rgba(168,85,247,0.35);
}

/* ─── Live Progress Card ──────────────────────────────────────────────── */
.pipeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: 0 12px 40px rgba(0,0,0,0.4);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
}

.card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.status-indicator-spinner {
  width: 34px;
  height: 34px;
  border: 3px solid rgba(168,85,247,0.2);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

.progress-track {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #a855f7, #ec4899, #00f2fe);
  border-radius: 4px;
  transition: width 0.4s ease;
}

.progress-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.phase-log {
  background: #090a0d;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1.1rem;
  font-family: 'JetBrains Mono', 'Consolas', monospace;
  font-size: 0.8rem;
  color: #a78bfa;
  max-height: 160px;
  overflow-y: auto;
  line-height: 1.5;
  white-space: pre-wrap;
}

/* ─── Gallery Section ─────────────────────────────────────────────────── */
.gallery-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.section-header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.section-sub {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.btn-outline {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 600;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-hover);
}

.btn-sm {
  padding: 0.4rem 0.9rem;
  font-size: 0.8rem;
}

.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1.25rem;
}

.clip-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.clip-card:hover {
  border-color: var(--purple);
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(168,85,247,0.18);
}

.clip-thumb {
  aspect-ratio: 9/16;
  position: relative;
  overflow: hidden;
  background: #000;
}

.clip-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.clip-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.clip-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  opacity: 0;
  background: rgba(0,0,0,0.45);
  transition: var(--transition);
  color: #fff;
}

.clip-card:hover .clip-play-overlay { opacity: 1; }

.clip-info {
  padding: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.clip-rank { font-size: 0.8rem; font-weight: 800; color: var(--purple); }
.clip-score { font-size: 0.75rem; color: var(--text-muted); font-weight: 600; }

.clip-actions {
  padding: 0.6rem 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.clip-btn {
  flex: 1;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.clip-btn:hover {
  background: rgba(168,85,247,0.15);
  border-color: var(--purple);
  color: #fff;
}

/* ─── Unified Inline Studio Editor Section ────────────────────────────── */
.studio-editor-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 50px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
}

.editor-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.75rem;
  background: #0a0b0e;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 1rem;
}

.editor-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.editor-badge-icon {
  font-size: 1.5rem;
}

.editor-main-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff;
}

.editor-sub-title {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.editor-active-picker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.editor-picker-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.editor-video-select {
  background: #14161f;
  border: 1px solid var(--border-hover);
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  outline: none;
}

.editor-studio-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  min-height: 520px;
}

/* Studio Left: Video Player (Responsive inline player, no fullscreen capture) */
.studio-player-container {
  border-right: 1px solid var(--border);
  background: #07080a;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem;
  gap: 1rem;
}

.studio-player-box {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 9/16;
  max-height: 480px;
  position: relative;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

.studio-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

/* Real-time Live Caption Overlay on Video Player */
.live-caption-overlay {
  position: absolute;
  bottom: 18%;
  left: 6%;
  right: 6%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  pointer-events: none;
  z-index: 10;
  font-family: 'Nirmala UI', 'Segoe UI', 'Outfit', sans-serif;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-shadow:
    -3px -3px 0 #000,
     3px -3px 0 #000,
    -3px  3px 0 #000,
     3px  3px 0 #000,
     0px  4px 12px rgba(0,0,0,0.8);
}

.live-caption-overlay span {
  background: rgba(0,0,0,0.45);
  padding: 0.35rem 0.9rem;
  border-radius: 8px;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
}

.player-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  color: var(--text-muted);
  padding: 1.5rem;
}

.pe-icon { font-size: 3rem; }

/* Timeline Bar */
.trim-bar {
  width: 100%;
  max-width: 320px;
  padding: 0.5rem 0;
}

.trim-track {
  height: 20px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  margin-bottom: 0.35rem;
}

.trim-range {
  position: absolute;
  top: 0; bottom: 0;
  left: 0%; right: 0%;
  background: linear-gradient(90deg, rgba(168,85,247,0.4), rgba(236,72,153,0.4));
  border-top: 2px solid var(--purple);
  border-bottom: 2px solid var(--purple);
}

.trim-handle {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 14px; height: 26px;
  background: var(--purple);
  border: 2px solid #fff;
  border-radius: 4px;
  cursor: ew-resize;
  z-index: 2;
}

.trim-start { left: 0; transform: translate(-50%, -50%); }
.trim-end { right: 0; transform: translate(50%, -50%); }

.trim-playhead {
  position: absolute;
  top: -4px; bottom: -4px;
  width: 3px;
  background: #00f2fe;
  border-radius: 2px;
  left: 0%;
  pointer-events: none;
  z-index: 3;
}

.trim-times {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-faint);
  font-family: monospace;
}

/* Transport Controls */
.studio-transport {
  width: 100%;
  max-width: 320px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: #11131a;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.transport-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  transition: var(--transition);
}

.transport-btn:hover { background: rgba(255,255,255,0.12); }
.transport-btn.small { font-size: 0.72rem; padding: 0.25rem 0.5rem; }

.transport-time, .transport-time-total {
  font-size: 0.75rem;
  font-family: monospace;
  color: var(--text-muted);
}
.transport-divider { color: var(--text-faint); font-size: 0.75rem; }
.transport-spacer { flex: 1; }

.export-box {
  width: 100%;
  max-width: 320px;
}

.btn-export-main {
  width: 100%;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 800;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(168,85,247,0.35);
}

/* Studio Right: Tabbed Controls */
.studio-controls-container {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--bg-card);
}

.editor-tabs {
  display: flex;
  gap: 0.4rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.editor-tabs::-webkit-scrollbar { display: none; }

.editor-tab {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition);
}

.editor-tab:hover { color: #fff; background: rgba(255,255,255,0.08); }
.editor-tab.active {
  background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
  color: #fff;
  border-color: transparent;
}

.panel {
  display: none;
  flex-direction: column;
  gap: 1rem;
}
.panel.active { display: flex; }

.panel-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.panel-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: -0.5rem;
}

/* Filter Grid */
.filter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.filter-preset {
  background: #11131a;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
}

.filter-preset:hover { border-color: var(--purple); }
.filter-preset.active {
  border-color: var(--purple);
  background: rgba(168,85,247,0.12);
}

.fp-thumb {
  width: 100%;
  height: 48px;
  border-radius: 4px;
}

.filter-preset span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
}

/* Sliders */
.slider-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}
.slider-row span:first-child { width: 100px; flex-shrink: 0; }

.ctrl-slider {
  flex: 1;
  accent-color: var(--purple);
  cursor: pointer;
}

.ctrl-val {
  width: 55px;
  text-align: right;
  color: var(--text);
  font-size: 0.8rem;
}

/* Presets Chips */
.pitch-presets, .speed-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pitch-btn, .speed-btn {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: var(--transition);
}

.pitch-btn:hover, .speed-btn:hover { color: #fff; border-color: var(--border-hover); }
.pitch-btn.active, .speed-btn.active {
  background: rgba(168,85,247,0.2);
  border-color: var(--purple);
  color: var(--purple);
}

.pitch-visual {
  height: 6px;
  background: rgba(255,255,255,0.08);
  border-radius: 3px;
  position: relative;
  margin: 0.5rem 0;
}
.pitch-center-line {
  position: absolute;
  left: 50%; top: -3px; bottom: -3px;
  width: 2px;
  background: rgba(255,255,255,0.3);
}
.pitch-indicator {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 12px; height: 12px;
  background: var(--purple);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--purple);
}

/* Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form-group label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-input {
  background: #11131a;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 0.65rem 0.9rem;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
}
.form-input:focus { border-color: var(--purple); }

.trim-info {
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 0.65rem 0.9rem;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.trim-info strong { color: var(--purple); }

.color-presets {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.color-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}
.color-dot.active {
  border-color: #fff;
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

.color-picker {
  width: 32px; height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
}

.caption-preview-box {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: #090a0d;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.cap-preview-word {
  font-size: 1.1rem;
  font-weight: 900;
  color: #fff;
  font-family: 'Nirmala UI', sans-serif;
  text-shadow: 0 1px 4px #000;
}
.cap-preview-word.highlight {
  text-shadow: 0 0 10px rgba(255,230,0,0.6), 0 1px 4px #000;
}

.btn-ghost-small {
  background: none;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  align-self: flex-start;
}
.btn-ghost-small:hover { color: #fff; border-color: var(--border-hover); }

/* ─── Toast Notifications ────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: #141620;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.25rem;
  font-size: 0.85rem;
  color: var(--text);
  box-shadow: 0 10px 35px rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  animation: slideIn 0.3s ease;
  max-width: 340px;
}

.toast.success { border-color: rgba(34,197,94,0.5); }
.toast.error { border-color: rgba(244,63,94,0.5); }
.toast.info { border-color: rgba(168,85,247,0.5); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ─── Feature Pills ─────────────────────────────────────────────────── */
.features-pills-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.feat-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: #c084fc;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.8rem;
  backdrop-filter: blur(8px);
}

/* ─── Shorts Count Picker ───────────────────────────────────────────── */
.shorts-count-picker {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-right: 0.5rem;
}

.count-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-select-sm {
  background: #141622;
  color: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
}

.form-select-sm:focus {
  border-color: var(--purple);
}

.clip-btn.primary {
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  border: none;
}

.clip-btn.primary:hover {
  opacity: 0.9;
  box-shadow: 0 4px 15px rgba(168,85,247,0.4);
}

/* ─── Video Modal Player ────────────────────────────────────────────── */
.video-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.video-modal-content {
  background: #0f1015;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,0.8), 0 0 40px rgba(168,85,247,0.25);
  overflow: hidden;
}

.video-modal-header {
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.modal-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.video-modal-body {
  background: #000;
  aspect-ratio: 9/16;
  max-height: 65vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.video-modal-footer {
  padding: 0.85rem 1.25rem;
  display: flex;
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}

/* ─── Responsive Media Queries ────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-title { font-size: 2rem; }
}

@media (max-width: 600px) {
  .hero-title { font-size: 1.6rem; }
  .url-input-wrap {
    flex-direction: column;
    border-radius: var(--radius);
    padding: 0.75rem;
    gap: 0.75rem;
  }
  .shorts-count-picker {
    width: 100%;
    justify-content: space-between;
  }
  .btn-generate { width: 100%; justify-content: center; }
  .clips-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
