/* video.basisdata.net — light by default, dark via footer switch */
:root, [data-theme="light"] {
  --bg: #F7F6F2; --panel: #FFFFFF; --inset: #F2F1EC; --line: #E3E1DA; --line2: #C9C6BE;
  --text: #17181B; --sub: #3F434A; --muted: #5E626B;
  --accent: #C2410C; --on-accent: #FFFFFF; --acc-text: #9A3412; --acc-soft: #FFF3EC; --acc-line: #F5CDB8; --chip: #FDE4D6;
  --ok: #166534; --bad: #B91C1C; --tone1: #F1E4DA; --tone2: #DDEAE6; --tone3: #E5E2EF; --tone4: #F0E9D2;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0D0E11; --panel: #16181D; --inset: #0D0E11; --line: #262A31; --line2: #3A3F48;
  --text: #F2EFE9; --sub: #D6D3CD; --muted: #A3A7B0;
  --accent: #FF6A3D; --on-accent: #0D0E11; --acc-text: #FF9A75; --acc-soft: #1E1612; --acc-line: #3B2A22; --chip: #2A1E18;
  --ok: #9BE3B4; --bad: #FCA5A5; --tone1: #2B2220; --tone2: #1F2A2A; --tone3: #24222E; --tone4: #2A2618;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: 'Inter Tight', system-ui, -apple-system, sans-serif; font-size: 15px; line-height: 1.5; }
a { color: var(--acc-text); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; }
.muted { color: var(--muted); }
.label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
h1, h2, h3 { margin: 0; line-height: 1.15; }
.hidden { display: none !important; }

/* buttons & controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--line2); color: var(--text); }
.btn-primary { background: var(--accent); color: var(--on-accent); border-color: var(--accent); font-weight: 700; }
.btn-primary:hover { color: var(--on-accent); filter: brightness(1.06); }
.btn-primary[disabled] { opacity: .55; cursor: not-allowed; }
.btn-soft { background: var(--acc-soft); border-color: var(--acc-line); color: var(--acc-text); font-weight: 600; }
.btn-ghost { background: transparent; }
.btn-lg { min-height: 48px; padding: 0 24px; font-size: 16px; border-radius: 12px; }
.btn-sm { min-height: 32px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg a, .seg button { min-height: 32px; min-width: 40px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; }
.seg .on { background: var(--text); color: var(--bg); }
.pill { min-height: 40px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--sub); font: inherit; font-size: 13px; cursor: pointer; }
.pill.on { border-color: var(--accent); background: var(--acc-soft); color: var(--acc-text); font-weight: 600; }
.pill[disabled] { opacity: .45; cursor: not-allowed; }
input[type=text], input[type=email], input[type=password], input[type=number], textarea, select {
  width: 100%; background: var(--inset); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 15px; }
textarea { resize: vertical; line-height: 1.5; }
label.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.switch { display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-size: 13px; cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.alert { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--acc-line); background: var(--acc-soft); color: var(--acc-text); font-size: 14px; }
.alert.ok { border-color: var(--line); background: var(--panel); color: var(--ok); }

/* logo */
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.logo:hover { color: var(--text); }
.logo-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text strong { font-size: 16px; }
.logo-text small { font-size: 12px; color: var(--muted); }

/* app shell */
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--panel); }
.topbar-r { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip-credits { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--text); text-decoration: none; }
.chip-credits svg { color: var(--acc-text); }
.avatar { width: 36px; height: 36px; border-radius: 999px; background: var(--inset); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--text); text-decoration: none; }
.shell { display: flex; flex-wrap: wrap; min-height: calc(100vh - 120px); }
.sidenav { flex: 1 1 200px; max-width: 220px; padding: 20px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.sidenav > a { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; text-decoration: none; color: var(--muted); border: 1px solid transparent; font-size: 14px; }
.sidenav > a.on { background: var(--panel); border-color: var(--line); color: var(--text); font-weight: 600; }
.tipbox { margin-top: 24px; padding: 14px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.main { flex: 999 1 560px; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 20px; }
.side { flex: 1 1 280px; max-width: 340px; padding: 24px 20px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 22px; }
.appfoot { border-top: 1px solid var(--line); background: var(--panel); padding: 12px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); }
.theme-row { display: flex; align-items: center; gap: 10px; }
@media (max-width: 760px) {
  .sidenav { max-width: none; flex-direction: row; flex-wrap: wrap; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; }
  .tipbox { display: none; }
  .side { max-width: none; border-left: 0; border-top: 1px solid var(--line); }
  .main { padding: 16px; }
}

/* studio */
.row { display: flex; flex-wrap: wrap; gap: 8px; }
.between { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.group { display: flex; flex-direction: column; gap: 10px; }
.preview { padding: 16px; }
.stage { margin: 0 auto; max-width: 100%; height: 380px; background: var(--inset); border: 1px solid var(--line); border-radius: 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--muted); text-align: center; }
.stage video, .stage img { width: 100%; height: 100%; object-fit: contain; background: #000; }
.stage .ph { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 24px; }
.stage .ph svg { color: var(--acc-text); }
.composer { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.assist { border: 1px solid var(--acc-line); background: var(--acc-soft); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.assist .label { color: var(--acc-text); font-weight: 600; }
.assist textarea { background: var(--panel); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: var(--chip); color: var(--acc-text); }
.modelbtn { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); font: inherit; cursor: pointer; width: 100%; }
.modelbtn.on { border-color: var(--accent); background: var(--acc-soft); }
.modelbtn .top { display: flex; justify-content: space-between; width: 100%; font-weight: 600; font-size: 14px; }
.modelbtn .rate { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--acc-text); font-weight: 500; }
.modelbtn small { font-size: 12px; color: var(--muted); }
.costbox { margin-top: auto; padding: 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.costbox .big { font-size: 26px; font-weight: 700; font-family: 'JetBrains Mono', monospace; }
.tpl-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.tpl-list button { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--inset); color: var(--text); font: inherit; font-size: 13px; cursor: pointer; }
.tpl-list button:hover { border-color: var(--accent); }
.filebox { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px dashed var(--line2); border-radius: 10px; font-size: 13px; color: var(--muted); }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.gcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.gthumb { position: relative; aspect-ratio: 16 / 10; background: var(--tone1); display: flex; align-items: center; justify-content: center; cursor: pointer; border: 0; padding: 0; width: 100%; }
.gthumb video, .gthumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 999px; background: var(--panel); color: var(--ok); }
.badge.busy { background: var(--accent); color: var(--on-accent); }
.badge.bad { color: var(--bad); }
.gbody { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.gbody .p { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gbody .meta { font-size: 11px; color: var(--muted); font-family: 'JetBrains Mono', monospace; }
.gbody .err { font-size: 12px; color: var(--bad); }
.gactions { display: flex; flex-wrap: wrap; gap: 6px; }
.spin { width: 22px; height: 22px; border: 3px solid var(--line2); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast { position: fixed; right: 20px; bottom: 70px; max-width: 360px; padding: 12px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 14px; z-index: 50; box-shadow: 0 8px 24px rgba(0,0,0,.2); }

/* tables */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* auth */
.auth { min-height: 100vh; display: flex; flex-direction: column; }
.auth-box { width: 100%; max-width: 420px; margin: 40px auto; padding: 28px; display: flex; flex-direction: column; gap: 16px; }

/* landing */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.lnav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 0; }
.lnav nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; font-size: 14px; }
.lnav nav > a:not(.btn) { color: var(--sub); text-decoration: none; }
.hero { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding: 64px 0 48px; }
.hero > div { flex: 1 1 440px; display: flex; flex-direction: column; gap: 22px; }
.hero h1 { font-size: clamp(38px, 6vw, 60px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 800; }
.hero p.sub { font-size: 19px; color: var(--sub); max-width: 540px; margin: 0; }
.badge-top { align-self: flex-start; font-size: 12px; font-family: 'JetBrains Mono', monospace; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--acc-line); background: var(--acc-soft); color: var(--acc-text); }
.demo { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.demo .screen { height: 260px; border-radius: 12px; background: var(--tone1); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: var(--muted); overflow: hidden; }
.demo .screen video { width: 100%; height: 100%; object-fit: cover; }
.demo .io { background: var(--inset); border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.section { padding: 56px 0; display: flex; flex-direction: column; gap: 28px; }
.section h2 { font-size: clamp(28px, 4vw, 38px); letter-spacing: -0.02em; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.feat { padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.feat .n { font-size: 12px; font-family: 'JetBrains Mono', monospace; color: var(--acc-text); }
.feat p, .step p { margin: 0; color: var(--sub); }
.step { border-top: 2px solid var(--accent); padding-top: 18px; display: flex; flex-direction: column; gap: 8px; }
.step .n { font-size: 40px; font-weight: 800; color: var(--acc-text); line-height: 1; }
.plan { padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.plan.hot { background: var(--acc-soft); border-color: var(--accent); }
.plan .price { font-size: 34px; font-weight: 800; }
.usage { padding: 18px; display: flex; flex-wrap: wrap; gap: 24px; font-size: 14px; color: var(--sub); }
details.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
details.faq summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; cursor: pointer; font-size: 17px; font-weight: 600; list-style: none; }
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: '+'; color: var(--acc-text); font-size: 22px; }
details.faq[open] summary::after { content: '−'; }
details.faq p { margin: 0 0 16px; color: var(--sub); }
.lfoot { border-top: 1px solid var(--line); background: var(--panel); }
.lfoot .wrap { padding: 24px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; font-size: 13px; color: var(--muted); }
