:root {
  --bg: #09090c;
  --surface: #111117;
  --surface-2: #17171f;
  --border: #23232d;
  --text: #ececf1;
  --muted: #9b9bac;
  --accent: #7c5cff;
  --accent-ink: #ffffff;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--border); padding: .1em .4em; border-radius: 6px; }
pre code, .copy-row code { background: none; border: 0; padding: 0; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }

/* Header */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.top-row { display: flex; align-items: center; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.brand-mark { width: 22px; height: 22px; border-radius: 7px; background: linear-gradient(135deg, var(--accent), #c06cff); position: relative; }
.brand-mark::after { content: ""; position: absolute; left: 8px; top: 6px; border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.nav { display: flex; gap: 4px; margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { padding: 7px 11px; border-radius: 8px; color: var(--muted); font-size: 14px; white-space: nowrap; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav .nav-cta { color: var(--accent-ink); background: var(--accent); }
.nav .nav-cta:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); color: var(--accent-ink); }

/* Hero */
.hero { padding: 88px 0 56px; background: radial-gradient(60% 80% at 50% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); }
.eyebrow { margin: 0 0 12px; color: var(--accent); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; }
.hero h1 { margin: 0; max-width: 760px; font-size: clamp(32px, 6vw, 56px); line-height: 1.05; letter-spacing: -.03em; }
.lede { max-width: 620px; margin: 18px 0 28px; color: var(--muted); font-size: 17px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 18px; border-radius: 10px; font: 600 14px/1 inherit; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn-ghost { border-color: var(--border); background: var(--surface); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn.wide { width: 100%; }

/* Sections */
.section { padding: 56px 0; border-top: 1px solid var(--border); }
.section h2 { margin: 0 0 6px; font-size: 26px; letter-spacing: -.02em; }
.section h3 { margin: 30px 0 6px; font-size: 17px; }
.section > .wrap > .muted { margin: 0 0 18px; }

/* Tabs + frames */
.tabs { display: flex; gap: 6px; margin: 18px 0 12px; flex-wrap: wrap; }
.tab { height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); font: 600 13px/1 inherit; cursor: pointer; }
.tab.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.frame { position: relative; aspect-ratio: 16 / 9; width: 100%; border-radius: var(--radius); overflow: hidden; background: #000; border: 1px solid var(--border); }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.play-card { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; color: #fff;
  background: radial-gradient(50% 60% at 50% 45%, color-mix(in srgb, var(--accent) 30%, transparent), transparent 70%), linear-gradient(180deg, #121219, #07070a); }
.play-icon { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); box-shadow: 0 10px 40px color-mix(in srgb, var(--accent) 45%, transparent); transition: transform .15s ease; }
.play-card:hover .play-icon { transform: scale(1.06); }
.play-icon svg { width: 30px; height: 30px; fill: #fff; margin-left: 3px; }
.play-text { font-weight: 700; font-size: 15px; }
.play-sub { color: var(--muted); font-size: 13px; }
.copy-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 8px 8px 8px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; }
.copy-row code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--text); }
.copy-row.tight { margin-top: 6px; }
.copy { flex: none; height: 30px; padding: 0 12px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font: 600 12px/1 inherit; cursor: pointer; }
.copy:hover { border-color: var(--accent); }

/* Features */
.features { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.features li { padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.features b { display: block; margin-bottom: 4px; }
.features span { color: var(--muted); font-size: 14px; }

/* Code */
.code { position: relative; margin: 10px 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow-x: auto; font: 13px/1.6 var(--mono); color: #d7d7e4; }
.code .copy { position: absolute; top: 8px; right: 8px; opacity: 0; transition: opacity .15s; }
.code:hover .copy, .code:focus-within .copy { opacity: 1; }
@media (hover: none) { .code .copy { opacity: 1; } }

/* Table */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; margin-top: 10px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td:last-child { white-space: normal; color: var(--muted); }
th { background: var(--surface); font-weight: 600; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
tr:last-child td { border-bottom: 0; }

/* Customizer */
.custom { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 18px; }
.panel { display: flex; flex-direction: column; gap: 12px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); min-width: 0; }
.field input:not([type=color]) { height: 38px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font: 14px inherit; }
.field input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 1px; }
.field.color input { width: 100%; height: 38px; padding: 3px; border-radius: 9px; border: 1px solid var(--border); background: var(--bg); cursor: pointer; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; text-align: center; padding: 7px 0; border-radius: 7px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; }
.seg input:checked + span { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--border); }
.switch { display: flex; align-items: center; justify-content: space-between; font-size: 14px; cursor: pointer; }
.switch input { order: 2; appearance: none; width: 38px; height: 22px; border-radius: 22px; background: var(--border); position: relative; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(16px); }
.panel:not(.is-tv) .tv-only { display: none; }

/* Footer */
.foot { border-top: 1px solid var(--border); padding: 28px 0 40px; }
.foot-row { display: flex; align-items: center; justify-content: space-between; }

@media (max-width: 820px) {
  .custom { grid-template-columns: minmax(0, 1fr); }
  .top-row { gap: 12px; }
  .hero { padding: 56px 0 40px; }
  .section { padding: 44px 0; }
}
