:root {
  --bg: #0F111A;
  --card: #161925;
  --card-2: #1C2030;
  --border: #282C3F;
  --input: #11131D;
  --text: #F4F6FB;
  --muted: #8F97B0;
  --accent: #00E5FF;
  --accent-ink: #062A31;
  --violet: #7C4DFF;
  --success: #00E676;
  --error: #FF6B6B;
  --warn: #FFD54F;
  --radius: 16px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 var(--font);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
a { color: var(--accent); }

.glow {
  position: fixed;
  inset: -30vh -20vw auto auto;
  width: 70vw;
  height: 70vh;
  background: radial-gradient(closest-side, rgba(124, 77, 255, .22), transparent 70%),
              radial-gradient(closest-side, rgba(0, 229, 255, .14), transparent 70%) 40% 60% / 80% 80% no-repeat;
  pointer-events: none;
  z-index: 0;
}

.topbar, .wrap, .footer { position: relative; z-index: 1; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 18px 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -.01em;
}
.toplink { color: var(--muted); text-decoration: none; font-size: 14px; }
.toplink:hover { color: var(--text); }

.wrap {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 8px 16px 40px;
  flex: 1;
}

.hero { padding: 28px 0 24px; }
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 7vw, 54px);
  line-height: 1.05;
  letter-spacing: -.035em;
  font-weight: 800;
}
.accent {
  background: linear-gradient(90deg, var(--accent), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p { margin: 0; max-width: 560px; color: var(--muted); font-size: 17px; }

.banner {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 213, 79, .35);
  background: rgba(255, 213, 79, .08);
  border-radius: 12px;
  font-size: 14px;
}
.banner strong { color: var(--warn); }

.card {
  background: linear-gradient(180deg, var(--card-2), var(--card));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 20px 50px -30px rgba(0, 0, 0, .8);
}

.label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 8px;
  padding: 0;
}

.url-row { display: flex; gap: 8px; }
input[type="url"], select {
  width: 100%;
  min-width: 0;
  background: var(--input);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 14px;
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
input[type="url"]:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 229, 255, .18);
}
select { padding: 11px 12px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 52%, calc(100% - 13px) 52%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .08s, filter .15s, background .15s;
}
.btn:active { transform: translateY(1px); }
.btn.primary {
  width: 100%;
  padding: 15px 18px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 17px;
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.primary:disabled { background: #2E344E; color: var(--muted); cursor: progress; }
.btn.ghost {
  flex: none;
  padding: 0 16px;
  background: var(--card-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn.ghost:hover { border-color: var(--accent); }
.btn.link { background: none; color: var(--muted); padding: 8px; font-weight: 600; }
.btn.link:hover { color: var(--text); }

.chips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  border: 0;
  margin: 20px 0 0;
  padding: 0;
}
.chips legend { grid-column: 1 / -1; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 8px 6px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--input);
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.chips small { font-weight: 500; font-size: 11px; color: var(--muted); }
.chips input:checked + span {
  border-color: var(--accent);
  background: rgba(0, 229, 255, .08);
  box-shadow: inset 0 0 0 1px var(--accent);
}
.chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.studio {
  margin: 20px 0 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(124, 77, 255, .05);
  padding: 0 14px;
}
.studio summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
  font-weight: 700;
}
.studio summary::-webkit-details-marker { display: none; }
.studio summary::after {
  content: "";
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform .2s;
}
.studio[open] summary::after { transform: rotate(-135deg); }
.badge {
  flex: none;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(124, 77, 255, .2);
  color: #B9A2FF;
}
.studio.disabled { opacity: .5; pointer-events: none; }

.studio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 4px 0 12px;
}
.studio-grid label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.studio-grid.off { opacity: .45; }

.switch {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  cursor: pointer;
  font-weight: 600;
}
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch small { color: var(--muted); font-weight: 500; }
.track {
  flex: none;
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 99px;
  background: #2A2F45;
  transition: background .15s;
}
.track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s;
}
.switch input:checked + .track { background: var(--violet); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { outline: 2px solid var(--accent); outline-offset: 2px; }
.switch input:disabled ~ * { opacity: .45; }

.hint { margin: 6px 0 14px; color: var(--muted); font-size: 13px; }
.error {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 107, 107, .1);
  border: 1px solid rgba(255, 107, 107, .35);
  color: #FFC4C4;
  white-space: pre-line;
  font-size: 15px;
}
form .btn.primary { margin-top: 20px; }

.progress-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.step { margin: 0; font-weight: 700; }
.detail { margin: 2px 0 0; color: var(--muted); font-size: 14px; min-height: 1.4em; }
.pct { font-weight: 800; font-size: 22px; color: var(--accent); font-variant-numeric: tabular-nums; }
.bar { margin-top: 14px; height: 10px; border-radius: 99px; background: #222638; overflow: hidden; }
.fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--violet));
  transition: width .4s ease;
}
.progress.indeterminate .fill { width: 35% !important; animation: slide 1.2s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(290%); } }
.progress-foot { display: flex; justify-content: flex-end; margin-top: 8px; }

.result { text-align: center; }
.result-icon {
  width: 52px;
  height: 52px;
  margin: 4px auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0, 230, 118, .12);
  color: var(--success);
}
.result-title { margin: 0; font-size: 20px; font-weight: 800; }
.result-file { margin: 6px 0 2px; word-break: break-word; }
.result .btn.primary { margin-top: 14px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.footer {
  max-width: 760px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 32px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}
.footer p { margin: 4px 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-top: 10px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }
.turnstile { margin-top: 18px; display: flex; justify-content: center; min-height: 65px; }

/* legal pages */
.legal { max-width: 760px; }
.legal h1 { font-size: clamp(28px, 5vw, 38px); letter-spacing: -.02em; margin: 24px 0 6px; }
.legal h2 { font-size: 18px; margin: 28px 0 8px; }
.legal p, .legal li { color: #C9CEDD; }
.legal ul { padding-left: 20px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

@media (max-width: 560px) {
  .chips { grid-template-columns: repeat(2, 1fr); }
  .studio-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .hero { padding-top: 12px; }
  .toplink { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* "how it works" card (static site) */
.how h2 { margin: 0 0 10px; font-size: 20px; }
.how ol { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 10px; }
.how li { color: #C9CEDD; }
.how li b { color: var(--text); }
.result .muted { max-width: 520px; margin: 6px auto; }

/* nav */
.nav { display: flex; gap: 6px; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); background: var(--card-2); border: 1px solid var(--border); }

/* studio */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 150px; padding: 20px; text-align: center; cursor: pointer;
  border: 2px dashed var(--border); border-radius: 14px; background: var(--input); color: var(--accent);
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--accent); background: rgba(0, 229, 255, .05); }
.drop-title { color: var(--text); font-weight: 700; }
.preview { display: block; width: 100%; max-height: 360px; margin-top: 14px; border-radius: 12px; background: #000; }
.chips-3 { grid-template-columns: repeat(3, 1fr); }
.studio-grid { margin-top: 18px; }
.studio-grid select { width: 100%; }
.results-head { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.results-head .result-icon { margin: 0; }
.result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.result-item { border: 1px solid var(--border); border-radius: 12px; padding: 12px; background: var(--input); }
.result-item video { display: block; width: 100%; max-height: 420px; border-radius: 10px; background: #000; margin-bottom: 10px; }
.result-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; word-break: break-word; }
.btn.small-btn { width: auto; padding: 10px 18px; font-size: 15px; flex: none; }
.progress-foot { justify-content: space-between; align-items: center; }

@media (max-width: 560px) {
  .chips-3 { grid-template-columns: 1fr; }
  .nav a { padding: 6px 8px; font-size: 14px; }
}

.studio-promo { display: grid; gap: 6px; text-decoration: none; color: inherit; border-color: rgba(124, 77, 255, .45); background: linear-gradient(135deg, rgba(124, 77, 255, .16), rgba(0, 229, 255, .06)), var(--card); transition: transform .12s, border-color .15s; }
.studio-promo:hover { transform: translateY(-2px); border-color: var(--violet); }
.studio-promo .badge { justify-self: start; }
.promo-title { font-size: 20px; font-weight: 800; }
.promo-cta { color: var(--accent); font-weight: 700; margin-top: 4px; }
