/* Black surface, white borders, rounded frames. Wide display type, one glow behind the logo. */
:root {
  --bg: #000;
  --fg: #fff;
  --muted: #a8a8a8;
  --faint: #6a6a6a;
  --line: #fff;
  --line-soft: #2a2a2a;
  --r: 18px;
  --display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image: radial-gradient(rgba(255,255,255,.11) 1px, transparent 1px);
  background-size: 26px 26px;
  color: var(--fg);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; line-height: 1.15; letter-spacing: -0.02em; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

/* ---------- buttons ---------- */
.btn {
  appearance: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 46px; padding: 0 24px;
  font: 600 15px/1 var(--body);
  color: var(--fg); background: var(--bg);
  border: 1px solid var(--line); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s;
}
.btn:hover { background: var(--fg); color: var(--bg); }
.btn-solid { background: var(--fg); color: var(--bg); }
.btn-solid:hover { background: var(--bg); color: var(--fg); }
.btn-small { min-height: 38px; padding: 0 18px; font-size: 14px; }
.btn[disabled] { opacity: .35; cursor: not-allowed; }
.btn[disabled]:hover { background: var(--bg); color: var(--fg); }
.btn-solid[disabled]:hover { background: var(--fg); color: var(--bg); }

/* ---------- floating header ---------- */
.site-header { padding-top: 16px; }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding: 0 14px 0 20px;
  background: rgba(0,0,0,.85); border: 1px solid var(--line); border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font: 600 18px var(--display); letter-spacing: -0.02em; }
.brand img { width: 30px; height: auto; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a:not(.btn) { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 500; }
.nav a:not(.btn):hover { color: var(--fg); }
#who { color: var(--muted); font-size: 15px; }

/* ---------- landing ---------- */
.hero { position: relative; padding: 88px 0 72px; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; left: 50%; top: 120px; width: 760px; height: 760px; transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255,255,255,.2), rgba(255,255,255,0) 62%); pointer-events: none;
}
.hero .wrap { position: relative; }
.hero-logo { width: clamp(96px, 14vw, 150px); margin: 0 auto 40px; filter: drop-shadow(0 0 28px rgba(255,255,255,.35)); }
.hero h1 { font-size: clamp(34px, 6vw, 72px); max-width: 15ch; margin-inline: auto; }
.hero .lede { margin: 26px auto 0; max-width: 52ch; font-size: 18px; color: var(--muted); }
.hero .actions { margin-top: 38px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.console-frame { width: min(860px, 100% - 32px); margin: 0 auto 96px; border: 1px solid var(--line); border-radius: var(--r); background: rgba(0,0,0,.92); overflow: hidden; text-align: left; }
.console-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.status { display: inline-flex; align-items: center; gap: 8px; }
.dot { width: 9px; height: 9px; border: 1px solid var(--fg); border-radius: 50%; flex: none; }
.dot.on { background: var(--fg); box-shadow: 0 0 10px rgba(255,255,255,.7); }
.dot.busy { background: linear-gradient(90deg, var(--fg) 50%, transparent 50%); }
.console-body { position: relative; padding: 22px 20px 26px; min-height: 250px; font: 13.5px/1.8 var(--mono); color: #ececec; }
.console-body .mark { position: absolute; right: 24px; bottom: 18px; width: 110px; opacity: .08; }
.console-body .t { color: var(--faint); margin-right: 12px; }

.section { padding: 0 0 96px; }
.section h2 { font-size: clamp(26px, 3.4vw, 40px); max-width: 18ch; }
.features { margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { border: 1px solid var(--line); border-radius: var(--r); padding: 26px 24px 28px; background: rgba(0,0,0,.88); }
.feature h3 { font-size: 17px; letter-spacing: -0.01em; }
.feature p { margin-top: 12px; color: var(--muted); font-size: 15px; }
.feature svg { width: 34px; height: 34px; margin-bottom: 40px; stroke: var(--fg); fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }

.site-footer { padding: 28px 0 40px; color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- dashboard ---------- */
.app .site-header .wrap { width: min(1280px, 100% - 32px); }
.app { min-height: 100vh; display: flex; flex-direction: column; }
.banner { width: min(1280px, 100% - 32px); margin: 16px auto 0; padding: 10px 20px; border: 1px dashed var(--line); border-radius: 12px; font-size: 14px; color: var(--muted); }
.app-main { flex: 1; display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 16px; width: min(1280px, 100% - 32px); margin: 16px auto 32px; align-items: start; }
.sidebar, .panel { border: 1px solid var(--line); border-radius: var(--r); background: rgba(0,0,0,.92); overflow: hidden; }
.sidebar { display: flex; flex-direction: column; }
.sidebar-head { padding: 18px 18px 14px 22px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sidebar-head h2 { font-size: 15px; }
.bot-list { list-style: none; margin: 0; padding: 0 10px 10px; display: grid; gap: 6px; }
.bot-list button {
  width: 100%; text-align: left; background: none; color: inherit; border: 1px solid var(--line-soft); border-radius: 12px;
  padding: 14px 16px; font: inherit; cursor: pointer; display: grid; gap: 2px;
}
.bot-list button:hover { border-color: var(--line); }
.bot-list button[aria-current="true"] { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.bot-list .name { font-weight: 700; }
.bot-list .meta { font-size: 13px; opacity: .7; display: flex; align-items: center; gap: 8px; }
.bot-list button[aria-current="true"] .dot { border-color: var(--bg); box-shadow: none; }
.bot-list button[aria-current="true"] .dot.on { background: var(--bg); }
.quota { padding: 14px 22px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }

.panel { min-width: 0; display: flex; flex-direction: column; min-height: 560px; }
.panel-head { padding: 22px 26px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel-head h1 { font-size: 22px; }
.panel-head .status { margin-top: 8px; color: var(--muted); font-size: 14px; }
.controls { display: flex; gap: 8px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; padding: 0 26px 18px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.tabs button { background: none; color: var(--muted); border: 1px solid transparent; border-radius: 999px; padding: 0 18px; min-height: 38px; font: 600 14px var(--body); cursor: pointer; }
.tabs button:hover { color: var(--fg); border-color: var(--line-soft); }
.tabs button[aria-selected="true"] { background: var(--fg); color: var(--bg); }
.tab-body { padding: 26px; flex: 1; min-width: 0; }
.log { border: 1px solid var(--line); border-radius: 14px; background: #000; height: min(54vh, 520px); overflow: auto; padding: 16px 18px; font: 13px/1.75 var(--mono); white-space: pre-wrap; word-break: break-word; color: #ececec; margin: 0; }
.field { display: grid; gap: 8px; margin-bottom: 20px; max-width: 640px; }
.field label { font-size: 14px; font-weight: 700; }
.field .hint, .hint { color: var(--muted); font-size: 14px; }
input[type="text"], textarea { width: 100%; background: #000; color: var(--fg); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font: 14px var(--mono); }
textarea { min-height: 220px; resize: vertical; }
.dropzone { border: 1px dashed var(--line); border-radius: 14px; padding: 36px; text-align: center; max-width: 640px; }
.dropzone p { color: var(--muted); margin-bottom: 16px; }
.empty { padding: 56px 26px; max-width: 520px; }
.empty h2 { font-size: 22px; }
.empty p { margin: 14px 0 26px; color: var(--muted); }

dialog { background: #000; color: var(--fg); border: 1px solid var(--line); border-radius: var(--r); padding: 0; width: min(480px, 100% - 32px); }
dialog::backdrop { background: rgba(0,0,0,.8); }
dialog form { padding: 28px; }
dialog h2 { font-size: 20px; margin-bottom: 22px; }
dialog .row { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }

.toast { position: fixed; right: 20px; bottom: 20px; border: 1px solid var(--line); border-radius: 14px; background: #000; padding: 12px 18px; font-size: 14px; max-width: 360px; z-index: 10; }

.gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate .box { border: 1px solid var(--line); border-radius: 24px; background: rgba(0,0,0,.92); padding: 44px; max-width: 420px; }
.gate img { width: 60px; margin-bottom: 28px; filter: drop-shadow(0 0 18px rgba(255,255,255,.3)); }
.gate h1 { font-size: 22px; }
.gate p { margin: 14px 0 30px; color: var(--muted); }

@media (max-width: 900px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .nav a:not(.btn) { display: none; }
  .app-main { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
  .console-frame { margin-bottom: 64px; }
}
@media (max-width: 560px) {
  .features { grid-template-columns: 1fr; }
  .site-header .wrap { padding-left: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
