:root {
  --bg: #0d0e11;
  --surface: #14161b;
  --surface-2: #1b1e25;
  --border: #262a34;
  --accent: #ff5b24;
  --accent-hover: #ff7140;
  --text: #f2f2f0;
  --muted: #9399a8;
  --good: #4ad295;
  --bad: #ff6b6b;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

.bg-glow {
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 460px;
  background: radial-gradient(ellipse at center, rgba(255, 91, 36, 0.16), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-variant-numeric: tabular-nums;
}

.accent { color: var(--accent); }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* Header */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(13, 14, 17, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 66px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 20px;
  letter-spacing: -0.02em;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.beta-pill {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 91, 36, 0.16);
  color: var(--accent);
  border: 1px solid rgba(255, 91, 36, 0.4);
}

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

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}

.nav a:hover { color: var(--text); }

.lang-btn {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.lang-btn:hover { border-color: var(--accent); }

/* Hero */
.hero {
  padding: 52px 0 28px;
  text-align: center;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 18px;
}

.pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 10px var(--good);
  animation: pulseAnim 1.8s infinite;
}

@keyframes pulseAnim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.25); }
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(34px, 5.5vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 0 auto 14px;
  max-width: 820px;
}

.hero-sub {
  color: var(--muted);
  font-size: 16px;
  max-width: 680px;
  margin: 0 auto 24px;
}

.usage-strip {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 20px;
}

.usage-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.usage-item + .usage-item {
  padding-left: 12px;
  border-left: 1px solid var(--border);
}

.usage-label { color: var(--muted); }
.usage-val { font-weight: 600; }

/* Studio Card */
.studio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 48px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.mode-tabs {
  display: inline-flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 18px;
}

.tab {
  border: none;
  background: transparent;
  color: var(--muted);
  padding: 9px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.tab.active {
  background: var(--accent);
  color: #0d0e11;
}

.url-row {
  display: flex;
  gap: 10px;
}

.url-row input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.url-row input:focus { border-color: var(--accent); }

.hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 36px 20px;
  border: 2px dashed var(--border);
  border-radius: 14px;
  background: var(--bg);
  cursor: pointer;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: rgba(255, 91, 36, 0.05);
}

.drop-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 91, 36, 0.14);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
}

.drop-title { font-weight: 600; font-size: 15px; }
.drop-sub { font-size: 13px; color: var(--muted); }

/* 15-Minute Window Selector */
.window-box {
  margin-top: 20px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.video-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.meta-thumb {
  width: 96px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.meta-title {
  font-weight: 600;
  font-size: 15px;
}

.meta-sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.window-header span {
  display: block;
  font-size: 12px;
}

.window-readout {
  background: rgba(255, 91, 36, 0.14);
  color: var(--accent);
  border: 1px solid rgba(255, 91, 36, 0.4);
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.timeline-track {
  position: relative;
  height: 16px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 12px;
}

.timeline-highlight {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0%;
  width: 100%;
  background: linear-gradient(90deg, #ff5b24, #ff8547);
  border-radius: 999px;
  transition: left 0.08s ease, width 0.08s ease;
}

.slider-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.slider-row input[type="range"] {
  flex: 1;
  min-width: 180px;
  accent-color: var(--accent);
}

.quick-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.jump-btn {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  cursor: pointer;
}

.jump-btn:hover { border-color: var(--accent); color: var(--accent); }

/* Controls */
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 22px;
}

.group-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 10px;
}

.pill-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.pill-grid.cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

.choice {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  text-align: left;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.15s, transform 0.15s;
}

.choice:hover { border-color: #3d4352; transform: translateY(-1px); }
.choice.active {
  border-color: var(--accent);
  background: rgba(255, 91, 36, 0.08);
}

.choice-title { font-weight: 600; font-size: 14px; }
.choice-desc { font-size: 12px; color: var(--muted); }

/* Caption Previews */
.cap-preview {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 2px 4px #000;
}

.cap-preview em { font-style: normal; }
.cap-orange em { color: #ff5b24; }
.cap-yellow em { color: #ffe600; }
.cap-mint em { color: #29ed8a; }
.cap-box {
  background: #121418;
  padding: 2px 8px;
  border-radius: 6px;
  align-self: flex-start;
  font-weight: 700;
}
.cap-box em { color: #ff5b24; }

/* Buttons */
.submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.clip-count-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}

.clip-count-wrap select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
}

.btn-primary {
  background: var(--accent);
  color: #0d0e11;
  border: none;
  border-radius: 999px;
  padding: 13px 28px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 91, 36, 0.3);
  transition: transform 0.15s, background 0.15s;
}

.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary:hover:not(:disabled) { border-color: var(--accent); }
.btn-secondary:disabled { opacity: 0.55; cursor: not-allowed; }
.full { width: 100%; border-radius: 999px; }

.error-banner {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: var(--bad);
  font-size: 14px;
}

/* Progress */
.progress-card {
  margin-top: 18px;
  padding: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
}

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

.progress-title { font-weight: 600; font-size: 15px; }
.progress-stage { font-size: 13px; color: var(--muted); }
.progress-pct { font-size: 18px; font-weight: 700; color: var(--accent); }

.progress-bar {
  height: 10px;
  background: var(--surface-2);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #ff5b24, #ff8d4d);
  border-radius: 999px;
  transition: width 0.35s ease;
}

/* Results */
.section { margin-bottom: 64px; }
.overline {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.1em;
}
.section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 30px;
  margin: 4px 0 20px;
}

.clips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 40px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}

.clip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.clip-video-wrap {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #000;
}

.clip-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.score-pill {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(13, 14, 17, 0.85);
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.clip-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.clip-title { font-weight: 700; font-size: 15px; }
.clip-hook { font-size: 12px; color: var(--good); }
.clip-caption { font-size: 13px; color: var(--muted); }
.clip-tags { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--accent); }

.clip-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.clip-actions a, .clip-actions button {
  flex: 1;
  text-align: center;
  text-decoration: none;
  padding: 9px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

/* Plans */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.plan-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.plan-card.featured {
  border-color: var(--accent);
  box-shadow: 0 12px 40px rgba(255, 91, 36, 0.14);
}

.plan-badge {
  position: absolute;
  top: -11px;
  right: 18px;
  background: var(--accent);
  color: #0d0e11;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}

.muted-badge {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
}

.plan-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.plan-top h3 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 22px; }
.plan-price { font-size: 28px; font-weight: 700; }
.plan-price span { font-size: 14px; color: var(--muted); }
.plan-desc { font-size: 13px; color: var(--muted); margin: 0 0 16px; }

.plan-list {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  flex: 1;
}

.plan-list li::before {
  content: '✓ ';
  color: var(--accent);
  font-weight: 700;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

@media (max-width: 860px) {
  .controls-grid, .plans-grid { grid-template-columns: 1fr; }
  .pill-grid { grid-template-columns: 1fr; }
  .nav { display: none; }
  .url-row { flex-direction: column; }
}
