:root {
  --bg: #0b0d14;
  --bg-alt: #12151f;
  --surface: #171b28;
  --border: rgba(255,255,255,0.08);
  --text: #f2f3f7;
  --text-dim: #9297a8;
  --accent: #6c5ce7;
  --accent-light: #8b7ef0;
  --record: #ff4d4d;
  --record-dark: #e13a3a;
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3 { line-height: 1.15; margin: 0 0 12px; }
p { margin: 0 0 12px; color: var(--text-dim); }
.hidden { display: none !important; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,13,20,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}
.logo-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--record);
  display: inline-block;
  box-shadow: 0 0 0 4px rgba(255,77,77,0.15);
}
.nav-links {
  display: flex;
  gap: 28px;
}
.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color .15s;
}
.nav-links a:hover { color: var(--text); }
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.icon-btn:hover { color: var(--text); border-color: var(--text-dim); }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s, background .15s, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 10px 20px;
}
.btn-primary:hover { background: var(--accent-light); }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.btn-large { padding: 14px 28px; font-size: 1.05rem; }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  padding: 12px 22px;
  border: 1px solid var(--border);
}
.btn-secondary:hover { background: #1e2333; }
.btn-ghost {
  background: transparent;
  color: var(--text-dim);
  padding: 12px 22px;
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-dim); }
.btn-record {
  background: var(--record);
  color: #fff;
  padding: 14px 26px;
  font-size: 1.05rem;
}
.btn-record:hover { background: var(--record-dark); }
.btn-stop {
  background: var(--surface);
  color: var(--record);
  border: 1px solid var(--record);
  padding: 12px 22px;
}
.btn-stop:hover { background: rgba(255,77,77,0.1); }
.rec-dot-icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  display: inline-block;
}

/* Hero */
.hero {
  padding: 84px 0 56px;
  text-align: center;
  background: radial-gradient(60% 60% at 50% 0%, rgba(108,92,231,0.18), transparent 70%);
}
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: var(--accent-light);
  background: rgba(108,92,231,0.12);
  border: 1px solid rgba(108,92,231,0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
.hero-sub {
  max-width: 620px;
  margin: 0 auto 28px;
  font-size: 1.1rem;
}
.hero-cta { margin-bottom: 20px; }
.hero-note {
  display: block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--text-dim);
}
.trust-badges {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin-top: 12px;
}

/* Settings drawer */
.settings-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 90;
}
.settings-panel {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: 340px;
  max-width: 90vw;
  background: var(--bg-alt);
  border-left: 1px solid var(--border);
  z-index: 91;
  padding: 24px;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform .2s ease;
}
.settings-panel.open { transform: translateX(0); }
.settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.settings-panel-header h3 { margin: 0; font-size: 1.15rem; }
.settings-section { margin-bottom: 24px; }
.settings-section .option-label { display: block; margin-bottom: 10px; }
.settings-note {
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.5;
  margin-top: 8px;
}
.settings-summary {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.settings-summary .badge {
  font-size: 0.78rem;
  color: var(--text-dim);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}

/* Studio */
.studio { padding: 40px 0 80px; }
.studio-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 28px;
  display: grid;
  gap: 24px;
}
.option-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}
.option-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.pill-group { display: flex; gap: 10px; flex-wrap: wrap; }
.pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all .15s;
}
.pill:hover { color: var(--text); }
.pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.toggle-row { display: flex; gap: 24px; flex-wrap: wrap; }
.toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.92rem;
  color: var(--text);
}
.toggle input { display: none; }
.toggle-track {
  width: 38px;
  height: 22px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  position: relative;
  transition: background .15s;
}
.toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform .15s, background .15s;
}
.toggle input:checked + .toggle-track { background: var(--accent); }
.toggle input:checked + .toggle-track::after {
  transform: translateX(16px);
  background: #fff;
}

.studio-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.stage-frame {
  width: 100%;
  max-width: 780px;
  aspect-ratio: 16/9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}
.stage-frame video,
.stage-frame canvas {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
.stage-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--text-dim);
}
.stage-placeholder p { margin: 0; font-size: 0.9rem; }
.rec-indicator {
  position: absolute;
  top: 14px;
  left: 14px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-variant-numeric: tabular-nums;
}
.rec-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--record);
  animation: pulse 1.2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.countdown-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
}
.countdown-overlay span {
  font-size: 5rem;
  font-weight: 700;
  color: #fff;
  animation: countdown-pop .9s ease;
}
@keyframes countdown-pop {
  0% { transform: scale(0.6); opacity: 0; }
  30% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.stage-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}
.stage-status {
  min-height: 20px;
  font-size: 0.88rem;
  color: var(--text-dim);
  text-align: center;
}

/* Editor */
.editor-panel {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.editor-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.editor-time {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}
.editor-timeline {
  position: relative;
  height: 56px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}
.editor-track {
  position: absolute;
  inset: 0;
}
.editor-segment {
  position: absolute;
  top: 6px;
  bottom: 6px;
  background: var(--accent);
  border-radius: 6px;
  opacity: 0.85;
  transition: opacity .1s;
}
.editor-segment.selected {
  opacity: 1;
  outline: 2px solid #fff;
  outline-offset: -2px;
}
.editor-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 10px;
  cursor: ew-resize;
  background: rgba(255,255,255,0.25);
}
.editor-handle-left { left: 0; border-radius: 6px 0 0 6px; }
.editor-handle-right { right: 0; border-radius: 0 6px 6px 0; }
.editor-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fff;
  pointer-events: none;
  left: 0;
}
.editor-hint {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin: 0;
}
.editor-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.editor-status {
  min-height: 18px;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 0;
}

/* Features */
.features { padding: 70px 0; background: var(--bg-alt); }
.features h2, .how-it-works h2, .faq h2 {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 40px;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-icon { font-size: 1.8rem; margin-bottom: 12px; }
.feature-card h3 { font-size: 1.05rem; }
.feature-card p { margin: 0; font-size: 0.92rem; }

/* How it works */
.how-it-works { padding: 70px 0; }
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
}
.step { text-align: center; }
.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.05rem; }
.step p { font-size: 0.92rem; }

/* FAQ */
.faq { padding: 70px 0 90px; background: var(--bg-alt); }
.faq-list {
  max-width: 700px;
  margin: 0 auto;
  display: grid;
  gap: 12px;
}
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
summary::-webkit-details-marker { display: none; }
details p { margin: 10px 0 0; font-size: 0.92rem; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-inner p { margin: 0; font-size: 0.88rem; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}
