:root {
  --bg: #0b0b10;
  --panel: #14141c;
  --panel-2: #1c1c27;
  --line: #2a2a38;
  --text: #ececf3;
  --muted: #9a9ab0;
  --accent: #53fc18;       /* kick-green */
  --accent-2: #9146ff;     /* twitch-purple */
  --danger: #ff5470;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* nav */
.nav { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.logo { font-weight: 800; font-size: 20px; text-decoration: none; letter-spacing: -0.02em; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav-links a:hover { color: var(--text); }

/* buttons */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none;
  padding: 11px 20px; border-radius: 10px; font-weight: 700; font-size: 15px;
  background: var(--accent); color: #071200; transition: transform .1s, filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.nav-links .btn { color: #071200; }

/* hero */
.hero { padding: 70px 0 50px; display: grid; grid-template-columns: 1.2fr .8fr; gap: 50px; align-items: center; }
.pill {
  display: inline-block; font-size: 13px; font-weight: 600; color: var(--accent);
  border: 1px solid rgba(83,252,24,.35); background: rgba(83,252,24,.07);
  padding: 4px 12px; border-radius: 99px; margin-bottom: 18px;
}
h1 { font-size: clamp(36px, 5.5vw, 60px); line-height: 1.05; letter-spacing: -0.035em; margin: 0 0 18px; }
h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), #b4ff8c); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { color: var(--muted); font-size: 19px; max-width: 540px; margin: 0 0 28px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.platforms { margin-top: 26px; color: var(--muted); font-size: 14px; }

.phone {
  width: 260px; aspect-ratio: 9/16; margin: 0 auto; border-radius: 30px;
  border: 8px solid #22222e; background: #000; overflow: hidden; position: relative;
  box-shadow: 0 30px 80px rgba(83,252,24,.12), 0 0 0 1px var(--line);
}
.phone .cam { height: 40%; background: linear-gradient(135deg, #3b2b6e, #9146ff); display: grid; place-items: center; font-size: 64px; }
.phone .game { height: 60%; background: radial-gradient(circle at 60% 40%, #2d5f1d, #0c1a08 70%); position: relative; }
.phone .game::after { content: '+'; position: absolute; inset: 0; display: grid; place-items: center; color: #fff8; font-size: 40px; }
.phone .hook {
  position: absolute; top: 40%; left: 0; right: 0; transform: translateY(-50%); text-align: center;
  font-weight: 900; font-size: 17px; color: #fff; text-shadow: 0 0 4px #000, 0 0 4px #000, 2px 2px 0 #000; padding: 0 14px;
}
.phone .ui { position: absolute; right: 10px; bottom: 60px; display: grid; gap: 14px; font-size: 20px; text-align: center; }
.phone .ui small { display: block; font-size: 10px; color: #fff; }

/* sections */
section { padding: 60px 0; }
h2 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -0.03em; margin: 0 0 10px; }
.sub { color: var(--muted); margin: 0 0 36px; max-width: 620px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card h3 { margin: 10px 0 6px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; }
.step-n { font-size: 13px; font-weight: 800; color: var(--accent); letter-spacing: .08em; }
.icon { font-size: 26px; }

/* pricing */
.toggle-note { color: var(--muted); font-size: 14px; margin-top: -20px; margin-bottom: 30px; }
.pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.plan { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; }
.plan.hot { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 20px 50px rgba(83,252,24,.1); position: relative; }
.plan.hot::before { content: 'Most popular'; position: absolute; top: -12px; left: 24px; background: var(--accent); color: #071200; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 99px; }
.plan h3 { margin: 0; font-size: 18px; }
.plan .price { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; margin: 10px 0 2px; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan .tag { color: var(--muted); font-size: 14px; min-height: 42px; }
.plan ul { list-style: none; padding: 0; margin: 18px 0 24px; font-size: 14px; flex: 1; }
.plan li { padding: 5px 0 5px 24px; position: relative; }
.plan li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 800; }
.plan li.no { color: #5c5c70; }
.plan li.no::before { content: '–'; color: #5c5c70; }
.plan .btn { text-align: center; }

.math { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.math .big { font-size: 34px; font-weight: 800; color: var(--accent); letter-spacing: -0.02em; }

.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 10px 0 0; }

footer { border-top: 1px solid var(--line); padding: 30px 0 50px; color: var(--muted); font-size: 14px; }

/* auth */
.auth { max-width: 400px; margin: 60px auto; }
.auth h1 { font-size: 32px; }
label { display: block; font-size: 14px; font-weight: 600; margin: 16px 0 6px; }
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); font: inherit;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.error { color: var(--danger); font-size: 14px; min-height: 20px; margin-top: 10px; }
.muted { color: var(--muted); }

/* dashboard */
.dash { display: grid; grid-template-columns: 380px 1fr; gap: 24px; padding: 20px 0 60px; align-items: start; }
.dash > * { min-width: 0; }   /* long stream titles must not widen the column */
.usage { display: flex; justify-content: space-between; align-items: center; font-size: 14px; margin-bottom: 8px; }
.bar { height: 8px; background: var(--panel-2); border-radius: 99px; overflow: hidden; }
.bar > div { height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.modes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; background: var(--panel-2); padding: 4px; border-radius: 10px; }
.modes button { background: transparent; border: 0; color: var(--muted); padding: 9px 4px; border-radius: 7px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.modes button.on { background: var(--panel); color: var(--text); box-shadow: 0 0 0 1px var(--line); }
.modes button .lock { font-size: 11px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.layouts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.layouts label { margin: 0; cursor: pointer; }
.layouts input { display: none; }
.layouts .opt { border: 1px solid var(--line); border-radius: 10px; padding: 10px 6px; text-align: center; font-size: 12px; font-weight: 600; background: var(--panel-2); }
.layouts .opt i { display: block; width: 24px; height: 40px; margin: 0 auto 6px; border-radius: 3px; border: 2px solid var(--muted); }
.layouts .opt i.facecam { background: linear-gradient(var(--accent-2) 40%, var(--muted) 40% 43%, transparent 43%); }
.layouts .opt i.blur { background: linear-gradient(transparent 33%, var(--muted) 33% 66%, transparent 66%); }
.layouts .opt i.crop { background: var(--muted); }
.layouts input:checked + .opt { border-color: var(--accent); color: var(--accent); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
label.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
label.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent); flex: none; }
label.check small { display: block; font-weight: 400; margin-top: 2px; }
label.check:has(input:disabled) { cursor: not-allowed; }

.job { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.job-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.job-title { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: var(--panel-2); color: var(--muted); white-space: nowrap; }
.badge.done { color: var(--accent); }
.badge.failed { color: var(--danger); }
.badge.running { color: #ffd84d; }
.clips { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; margin-top: 14px; }
.clip video { width: 100%; aspect-ratio: 9/16; object-fit: contain; border-radius: 10px; background: #000; display: block; }
.clip .meta { font-size: 12px; color: var(--muted); margin: 6px 0; }
.clip .actions { display: flex; gap: 6px; }
.clip .actions .btn { flex: 1; text-align: center; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; border: 1px dashed var(--line); border-radius: var(--radius); }
.spin { display: inline-block; width: 12px; height: 12px; border: 2px solid #ffd84d55; border-top-color: #ffd84d; border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: -1px; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.legal { max-width: 720px; padding: 30px 0 60px; }
.legal h1 { font-size: 40px; margin-bottom: 4px; }
.legal h2 { font-size: 20px; margin: 34px 0 8px; letter-spacing: 0; }
.legal p, .legal li { color: #c9c9d6; }
.legal a, footer a { color: var(--accent); }
.legal ul { padding-left: 20px; }
.code-input { font-size: 28px; letter-spacing: 10px; text-align: center; font-variant-numeric: tabular-nums; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; text-decoration: underline; }
.linklike:disabled { color: var(--muted); cursor: default; text-decoration: none; }
.auth .hint { margin: 8px 0 0; }
.forgot { text-align: right; font-size: 13px; margin-top: 8px; }
.forgot a { color: var(--muted); }
.check-agree { font-weight: 400; font-size: 13px; color: var(--muted); margin-top: 14px; }
.check-agree a { color: var(--accent); }

.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 10; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--accent); color: #071200; font-weight: 700; padding: 10px 18px; border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.4); }
.toast.bad { background: var(--danger); color: #fff; }

.progress { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; align-items: center; margin-top: 12px; }
.progress-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.progress-pct { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 700; }
.progress .bar { grid-column: 1; }
.progress .btn { grid-column: 2; grid-row: 1 / span 2; }
.progress .bar > div { transition: width .5s ease; }
.progress.waiting .bar > div { background: repeating-linear-gradient(-45deg, var(--line) 0 10px, var(--panel-2) 10px 20px); background-size: 28px 28px; animation: wait 1s linear infinite; }
@keyframes wait { to { background-position: 28px 0; } }
.badge.canceled { color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .progress.waiting .bar > div, .spin { animation: none; } }

@media (max-width: 900px) {
  .hero, .dash { grid-template-columns: 1fr; }
  .pricing { grid-template-columns: 1fr 1fr; }
  .grid3, .math { grid-template-columns: 1fr; }
  .nav-links a:not(.btn) { display: none; }
}
@media (max-width: 560px) {
  .pricing { grid-template-columns: 1fr; }
  .hero { padding-top: 30px; }
}
