@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #08090d;
  --card: #111218;
  --surface: #111218;
  --surface-2: #16171f;
  --surface-3: #1d1e27;
  --fg: #f6f5fb;
  --text: #f6f5fb;
  --mut: #9293a1;
  --muted: #9293a1;
  --bd: rgba(255,255,255,.09);
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.16);
  --acc: #9d7bff;
  --violet: #9d7bff;
  --violet-light: #c5b3ff;
  --inp: #16171f;
  --green: #6ee7a2;
  --shadow: 0 36px 100px rgba(0,0,0,.42);
  color-scheme: dark;
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  background: var(--bg);
}

:root[data-theme="light"] {
  --bg: #f5f7fb;
  --card: #fff;
  --surface: #fff;
  --surface-2: #f0f2f8;
  --surface-3: #e5e8f1;
  --fg: #181622;
  --text: #181622;
  --mut: #686a79;
  --muted: #686a79;
  --bd: rgba(30,27,48,.1);
  --line: rgba(30,27,48,.1);
  --line-strong: rgba(30,27,48,.18);
  --acc: #7654db;
  --violet: #7654db;
  --violet-light: #6846c7;
  --inp: #f0f2f8;
  --green: #16804b;
  --shadow: 0 28px 70px rgba(49,42,79,.12);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -180px, rgba(118,75,255,.17), transparent 520px),
    radial-gradient(circle at calc(100% + 260px) 720px, rgba(72,212,180,.07), transparent 390px),
    var(--bg);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  transition: color .25s, background-color .25s;
}
button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--violet-light); outline-offset: 3px; }

.studio-nav {
  width: min(1140px, calc(100% - 48px));
  height: 88px;
  margin-inline: auto;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.studio-brand { display: flex; align-items: center; gap: 11px; color: var(--text); text-decoration: none; font-size: 17px; font-weight: 800; letter-spacing: -.04em; }
.studio-brand > span:last-child span { color: var(--violet-light); }
.studio-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid rgba(157,123,255,.38); border-radius: 10px; color: var(--violet-light); background: rgba(157,123,255,.12); }
.studio-mark svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.studio-actions { display: flex; align-items: center; gap: 10px; }
.studio-nav .langs { display: flex; gap: 4px; padding: 4px; border: 1px solid var(--line); border-radius: 100px; background: var(--surface); }
.studio-nav .langs button { padding: 7px 11px; border: 0; border-radius: 100px; color: var(--muted); background: transparent; font-size: 10px; font-weight: 800; }
.studio-nav .langs button.active { color: #fff; background: var(--violet); }
.privacy-pill { display: flex; align-items: center; gap: 9px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); font-size: 11px; font-weight: 700; }
.privacy-pill > span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(110,231,162,.1); }
.theme-toggle { min-width: 82px; height: 36px; padding: 0 12px; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); border-radius: 100px; color: var(--muted); background: var(--surface); cursor: pointer; font-size: 10px; font-weight: 800; transition: color .2s, border-color .2s, background .2s, transform .2s; }
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); transform: translateY(-1px); }
.theme-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .moon-icon { display: none; }
[data-theme="light"] .theme-toggle .sun-icon { display: none; }
[data-theme="light"] .theme-toggle .moon-icon { display: block; }

.wrap, body > .max-w-6xl { width: min(1140px, calc(100% - 48px)); max-width: 1140px; margin-inline: auto; padding: 72px 0 70px; }
.intro { margin-bottom: 36px; }
.intro h1, body > .max-w-6xl > div:first-child h1 { margin: 0 0 12px; color: var(--text); font-size: clamp(42px,6vw,72px); line-height: .98; letter-spacing: -.06em; }
.intro p { max-width: 660px; font-size: 15px; line-height: 1.7; }
.tag { border-color: var(--line-strong); border-radius: 100px; color: var(--violet-light); background: rgba(157,123,255,.08); }
.layout, body > .max-w-6xl > .grid { gap: 18px; }
.card {
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: rgba(17,18,24,.9);
  box-shadow: none;
}
[data-theme="light"] .card { background: rgba(255,255,255,.9); }
.sectionhead { padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.sectionhead h2, .output h2 { color: var(--text); letter-spacing: -.035em; }
.num { color: var(--violet-light); border-color: var(--line); background: rgba(157,123,255,.08); font-family: "DM Mono", monospace; }
label, .lbl { color: var(--muted); }
input, select, textarea, .in {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-2);
}
input:focus, select:focus, textarea:focus, .in:focus { outline: 2px solid var(--violet); outline-offset: 1px; }
.hint, p, .footer, .shotnote { color: var(--muted); }
.secondary, .btn { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); transition: transform .2s, border-color .2s, background .2s; }
.secondary:hover, .btn:hover { border-color: var(--violet); transform: translateY(-1px); }
.primary, .btn.on { color: #fff; border-color: var(--violet); background: linear-gradient(135deg,var(--violet),#7654db); }
.output { color: var(--text); border: 1px solid rgba(157,123,255,.22); background: linear-gradient(145deg,rgba(157,123,255,.11),rgba(17,18,24,.96) 38%); box-shadow: var(--shadow); }
[data-theme="light"] .output { background: linear-gradient(145deg,rgba(118,84,219,.09),rgba(255,255,255,.97) 38%); }
.output p, .output .hint, .output label { color: var(--muted); }
.output select { color: var(--text); border-color: var(--line-strong); background: var(--surface-2); }
.output textarea { color: var(--text); }
.live, .map { color: var(--violet-light); }
.meta { color: var(--muted); border-color: var(--line); }
.drop { border-color: var(--line-strong); background: rgba(157,123,255,.025); }
.drop:hover, .drop.over { border-color: var(--violet); background: rgba(157,123,255,.06); }
pre { color: var(--text); font-family: "DM Mono", ui-monospace, monospace; }
.studio-footer {
  width: min(1140px, calc(100% - 48px));
  min-height: 110px;
  margin: 42px auto 0;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  color: #565762;
  font-size: 10px;
}
.wrap > .studio-footer { width: 100%; }
.studio-footer > span:first-child { color: #7b7c88; font-weight: 800; }
.studio-footer small { font-size: inherit; font-weight: 500; }
.studio-footer a { color: var(--violet-light); text-decoration: none; }
.studio-footer a:hover { text-decoration: underline; }
.studio-footer p { margin: 0; color: inherit; }
[data-theme="light"] .studio-footer { color: #777987; }
[data-theme="light"] .studio-footer > span:first-child { color: #555763; }

/* Local fallbacks for the video builder's layout utilities. */
.hidden { display: none !important; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.self-start { align-self: start; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }
.gap-2 { gap: .5rem; }
.gap-3 { gap: .75rem; }
.gap-4 { gap: 1rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.w-full { width: 100%; }
.text-xs { font-size: .75rem; line-height: 1rem; }
.text-sm { font-size: .875rem; line-height: 1.25rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.font-bold { font-weight: 700; }
.space-y-1 > :not([hidden]) ~ :not([hidden]) { margin-top: .25rem; }
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: .75rem; }
.space-y-4 > :not([hidden]) ~ :not([hidden]) { margin-top: 1rem; }

@media (min-width: 768px) { .md\:p-6 { padding: 1.5rem; } }
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .lg\:sticky { position: sticky; }
  .lg\:top-4 { top: 1rem; }
}

@media (max-width: 720px) {
  .studio-nav, .wrap, body > .max-w-6xl { width: min(100% - 24px, 1140px); }
  .studio-nav { height: 72px; }
  .privacy-pill { display: none; }
  .theme-toggle { min-width: 36px; width: 36px; padding: 0; }
  .theme-label { display: none; }
  .wrap, body > .max-w-6xl { padding-top: 54px; }
  .intro h1, body > .max-w-6xl > div:first-child h1 { font-size: clamp(38px,12vw,56px); }
  .studio-footer { width: min(100% - 24px,1140px); min-height: 100px; flex-wrap: wrap; gap: 8px; text-align: center; }
  .wrap > .studio-footer { width: 100%; }
  .studio-footer p { order: 3; width: 100%; }
}

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *,*::before,*::after { transition-duration: .01ms !important; } }
