:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #111113;
  --panel-2: #18181b;
  --border: #27272a;
  --text: #f8fafc;
  --muted: #a1a1aa;
  --accent: #FF3B30;
  --accent-soft: rgba(255, 59, 48, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(255, 59, 48, 0.16), transparent 34rem),
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button:disabled { opacity: 0.55; cursor: not-allowed; }

.site-header { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(18px); background: rgba(5, 5, 5, 0.7); border-bottom: 1px solid rgba(255,255,255,0.06); }
.nav-shell { width: min(1120px, calc(100% - 32px)); margin: auto; display: flex; align-items: center; justify-content: space-between; padding: 18px 0; gap: 20px; }
.brand-mark { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: -0.03em; font-size: 1.15rem; }
.brand-dot { width: 18px; height: 18px; border-radius: 999px; background: var(--accent); box-shadow: 0 0 28px var(--accent); }
.nav-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.nav-link { color: var(--muted); padding: 10px 12px; }
.nav-link:hover { color: var(--text); }
.nav-button, .button { border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; background: var(--accent); color: white; font-weight: 800; padding: 12px 18px; cursor: pointer; box-shadow: 0 14px 40px rgba(255, 59, 48, 0.24); }
.nav-button.ghost, .button.secondary { background: rgba(255,255,255,0.06); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.button.full { width: 100%; }
.button.small { padding: 8px 12px; font-size: 0.9rem; }

.hero-section { width: min(1120px, calc(100% - 32px)); margin: auto; min-height: 760px; display: grid; grid-template-columns: 1.05fr 0.95fr; align-items: center; gap: 56px; padding: 70px 0; }
.launch-pill, .eyebrow, .badge { color: var(--accent); font-weight: 900; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem; }
.hero-section h1 { margin: 16px 0; font-size: clamp(3.2rem, 9vw, 7.4rem); line-height: 0.88; letter-spacing: -0.09em; font-weight: 900; max-width: 880px; }
.hero-section h1 span { color: var(--accent); }
.hero-copy { color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 640px; line-height: 1.65; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.video-mock { justify-self: center; width: min(360px, 100%); aspect-ratio: 9/16; border: 1px solid rgba(255,255,255,0.12); border-radius: 36px; background: linear-gradient(180deg, #171717, #050505); padding: 16px; box-shadow: 0 30px 90px rgba(0,0,0,0.55); position: relative; overflow: hidden; }
.mock-top { height: 8px; width: 90px; border-radius: 999px; background: #2f2f33; margin: 4px auto 70px; }
.stick-scene { position: absolute; inset: 90px 20px 40px; display: grid; place-items: center; }
.stick-head { width: 72px; height: 72px; border: 7px solid white; border-radius: 999px; position: relative; top: -70px; }
.stick-body, .stick-body::before, .stick-body::after { position: absolute; display: block; background: white; border-radius: 999px; content: ''; }
.stick-body { width: 8px; height: 170px; top: 185px; }
.stick-body::before { width: 170px; height: 8px; left: -82px; top: 44px; transform: rotate(-10deg); }
.stick-body::after { width: 160px; height: 8px; left: -74px; bottom: -35px; transform: rotate(22deg); box-shadow: 16px 55px 0 white; }
.caption-chip { position: absolute; bottom: 24px; left: 18px; right: 18px; text-align: center; font-size: 2rem; line-height: 1; font-weight: 900; text-shadow: 0 5px 0 #000; }

.workflow-section, .pricing-grid, .stats-grid { width: min(1120px, calc(100% - 32px)); margin: auto; display: grid; gap: 18px; }
.workflow-section { grid-template-columns: repeat(3, 1fr); padding: 45px 0; }
.step-card, .pricing-card, .panel, .auth-card, .tip-card, .stats-grid article, .video-card { background: rgba(17,17,19,0.82); border: 1px solid var(--border); border-radius: 28px; padding: 24px; }
.step-card span { color: var(--accent); font-weight: 900; }
.step-card h2, .pricing-card h3, .pricing-card h2 { margin: 12px 0 8px; font-weight: 900; letter-spacing: -0.04em; }
.step-card p, .pricing-card p, .muted, .tip-card p, .page-heading p { color: var(--muted); line-height: 1.6; }

.pricing-section, .page-shell, .dashboard-shell, .create-shell, .video-detail-shell, .auth-shell { width: min(1120px, calc(100% - 32px)); margin: auto; padding: 70px 0; }
.pricing-section header, .page-heading { text-align: center; margin-bottom: 28px; }
.pricing-section h2, .page-heading h1, .dashboard-heading h1, .create-panel h1, .auth-card h1 { font-size: clamp(2rem, 5vw, 4rem); font-weight: 900; letter-spacing: -0.07em; margin: 8px 0; }
.pricing-grid { grid-template-columns: repeat(3, 1fr); }
.pricing-card { position: relative; display: grid; gap: 16px; }
.pricing-card.featured { border-color: rgba(255,59,48,0.8); box-shadow: 0 0 0 1px rgba(255,59,48,0.4), 0 30px 90px rgba(255,59,48,0.12); }
.badge { background: var(--accent-soft); padding: 8px 10px; border-radius: 999px; width: fit-content; }
.price { font-size: 2.8rem; color: var(--text) !important; font-weight: 900; letter-spacing: -0.06em; margin: 0 !important; }
.price span { font-size: 1rem; color: var(--muted); letter-spacing: 0; }
ul { padding-left: 20px; color: var(--muted); line-height: 1.9; }

.auth-shell, .create-shell { display: grid; place-items: center; }
.create-shell { grid-template-columns: 1fr 0.55fr; gap: 24px; align-items: start; }
.auth-card, .create-panel { width: min(540px, 100%); }
.create-panel { width: 100%; }
form { display: grid; gap: 16px; }
label, fieldset { display: grid; gap: 8px; color: var(--muted); border: 0; padding: 0; margin: 0; }
input, textarea, select { width: 100%; color: var(--text); background: #09090b; border: 1px solid var(--border); border-radius: 18px; padding: 14px 16px; outline: none; }
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 54px; }
.password-toggle { position: absolute; top: 50%; right: 10px; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; border: 0; border-radius: 999px; color: var(--muted); background: transparent; cursor: pointer; }
.password-toggle:hover, .password-toggle:focus-visible, .password-toggle.is-visible { color: var(--text); background: rgba(255,255,255,0.08); }
.password-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.link-button { background: none; color: var(--muted); border: 0; cursor: pointer; text-decoration: underline; }
.form-message { min-height: 22px; color: #86efac; }
.form-message.is-error { color: #fca5a5; }
.aspect-row { display: flex; gap: 10px; flex-wrap: wrap; }
.aspect-choice { border: 1px solid var(--border); background: #09090b; color: var(--text); padding: 10px 16px; border-radius: 999px; cursor: pointer; }
.aspect-choice.active { background: var(--accent); border-color: var(--accent); }

.dashboard-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.stats-grid { grid-template-columns: repeat(3, 1fr); width: 100%; margin-bottom: 24px; }
.admin-stats { grid-template-columns: repeat(4, 1fr); }
.admin-link { color: #fca5a5; }
.admin-panel { margin-top: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 680px; }
th, td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; }
.stats-grid span { font-size: 2.2rem; font-weight: 900; color: var(--accent); }
.panel header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.video-list { display: grid; gap: 12px; }
.video-card { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; border-radius: 18px; }
.video-card h3 { margin: 0; font-weight: 800; }
.video-card p, .video-card small { color: var(--muted); margin: 4px 0 0; }
.video-card small { color: #fca5a5; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 8px 12px; background: rgba(255,255,255,0.08); color: var(--muted); font-weight: 800; width: fit-content; }
.status-pill.done { background: rgba(34,197,94,0.18); color: #86efac; }
.status-pill.failed { background: rgba(239,68,68,0.18); color: #fca5a5; }
.status-pill.rendering, .status-pill.voicing, .status-pill.scripting, .status-pill.queued { background: var(--accent-soft); color: #fecaca; }
.video-output video { width: min(360px, 100%); border-radius: 24px; border: 1px solid var(--border); background: #000; display: block; margin: 20px 0; }
.progress-card { border: 1px dashed var(--border); border-radius: 18px; padding: 22px; color: var(--muted); }
.json-box { margin-top: 20px; max-height: 420px; overflow: auto; background: #09090b; border: 1px solid var(--border); border-radius: 18px; padding: 16px; color: #d4d4d8; font-size: 0.82rem; }
.legal { max-width: 780px; }
.site-footer { width: min(1120px, calc(100% - 32px)); margin: 50px auto 0; border-top: 1px solid var(--border); padding: 24px 0 38px; display: flex; justify-content: space-between; gap: 16px; color: var(--muted); }
.site-footer nav { display: flex; gap: 16px; }
code { background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 7px; }

@media (max-width: 860px) {
  .hero-section, .create-shell { grid-template-columns: 1fr; min-height: auto; }
  .workflow-section, .pricing-grid, .stats-grid, .admin-stats { grid-template-columns: 1fr; }
  .dashboard-heading, .site-footer { align-items: flex-start; flex-direction: column; }
  .video-card { grid-template-columns: 1fr; }
  .nav-shell { align-items: flex-start; }
  .nav-actions { gap: 4px; }
}
