/* ==========================================================================
   海豹AI开放平台 · 站点样式
   ========================================================================== */
:root {
  --bg: #050b16;
  --bg-2: #071426;
  --card: rgba(12, 27, 46, 0.72);
  --card-2: rgba(9, 21, 38, 0.92);
  --line: rgba(120, 180, 255, 0.14);
  --line-2: rgba(120, 180, 255, 0.26);
  --ink: #eaf4ff;
  --muted: #8ea9c6;
  --muted-2: #6b86a5;
  --brand: #35d6ff;
  --brand-2: #4f8cff;
  --accent: #7af0c8;
  --warn: #ffb454;
  --danger: #ff6b81;
  --ok: #45e0a8;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --glow: 0 0 0 1px rgba(53, 214, 255, 0.22), 0 12px 40px rgba(53, 214, 255, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
::selection { background: rgba(53, 214, 255, 0.28); }

/* ---------- background ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: -3;
  background-image:
    linear-gradient(rgba(120, 180, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 180, 255, 0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 35%, transparent 100%);
}
.bg-orb {
  position: fixed; border-radius: 50%; filter: blur(90px); z-index: -2;
  opacity: 0.55; pointer-events: none;
}
.bg-orb.o1 { width: 620px; height: 620px; left: -180px; top: -220px;
  background: radial-gradient(circle, rgba(53, 214, 255, 0.30), transparent 65%); }
.bg-orb.o2 { width: 560px; height: 560px; right: -160px; top: 80px;
  background: radial-gradient(circle, rgba(79, 140, 255, 0.26), transparent 65%); }
.bg-orb.o3 { width: 520px; height: 520px; left: 40%; bottom: -320px;
  background: radial-gradient(circle, rgba(122, 240, 200, 0.14), transparent 65%); }

/* ---------- layout ---------- */
.app { min-height: calc(100vh - 148px); }
.container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.section { padding: 84px 0; position: relative; }
.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(53, 214, 255, 0.06);
  color: var(--brand); font-size: 12.5px; font-weight: 600; letter-spacing: 0.08em;
}
.eyebrow::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 10px var(--brand);
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 18px 0 12px; }
.section-head p { color: var(--muted); margin: 0; font-size: 15.5px; }
.grad-text {
  background: linear-gradient(120deg, #9fe9ff 0%, #35d6ff 34%, #6fa0ff 70%, #a9ffe9 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.mono { font-family: var(--mono); }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; }
.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.hide { display: none !important; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(18px);
  background: rgba(5, 11, 22, 0.68);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background .25s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(5, 11, 22, 0.9); }
.nav-inner {
  width: min(1180px, calc(100% - 48px)); margin: 0 auto;
  height: 68px; display: flex; align-items: center; gap: 28px;
}
.brand { display: flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -0.01em; }
.brand-logo { width: 38px; height: 38px; border-radius: 12px; overflow: hidden; flex: none;
  box-shadow: 0 0 0 1px rgba(53, 214, 255, 0.25), 0 8px 24px rgba(53, 214, 255, 0.18); }
.brand-name { font-size: 17px; white-space: nowrap; }
.brand-name small { display: block; font-size: 10px; letter-spacing: 0.22em;
  color: var(--muted-2); font-weight: 600; line-height: 1; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav-link {
  padding: 8px 14px; border-radius: 10px; color: var(--muted);
  font-size: 14px; font-weight: 500; transition: .18s;
}
.nav-link:hover { color: var(--ink); background: rgba(120, 180, 255, 0.07); }
.nav-link.active { color: var(--ink); background: rgba(53, 214, 255, 0.09); }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.nav-user { display: flex; align-items: center; gap: 9px; padding: 5px 6px 5px 12px;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(12, 27, 46, 0.7); }
.avatar { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #041018; font-weight: 800; font-size: 12px; }
.nav-mobile { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 42px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  background: rgba(120, 180, 255, 0.08); color: var(--ink);
  font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: transform .16s, box-shadow .2s, background .2s, border-color .2s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary {
  background: linear-gradient(135deg, #35d6ff, #4f8cff 60%, #7a7dff);
  color: #03111f; box-shadow: 0 10px 30px rgba(53, 214, 255, 0.24);
}
.btn-primary:hover { box-shadow: 0 14px 40px rgba(53, 214, 255, 0.34); }
.btn-ghost { background: transparent; border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: rgba(120, 180, 255, 0.07); border-color: rgba(53, 214, 255, 0.45); }
.btn-soft { background: rgba(53, 214, 255, 0.1); color: var(--brand); border-color: rgba(53, 214, 255, 0.2); }
.btn-danger { background: rgba(255, 107, 129, 0.1); color: var(--danger); border-color: rgba(255, 107, 129, 0.25); }
.btn-sm { height: 34px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; }
.btn-lg { height: 50px; padding: 0 24px; border-radius: 14px; font-size: 15px; }
.btn-icon { width: 34px; height: 34px; padding: 0; border-radius: 9px; }

/* ---------- hero ---------- */
.hero { padding: 76px 0 54px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 54px; align-items: center; }
.hero h1 {
  font-size: clamp(38px, 5.1vw, 62px); line-height: 1.08; margin: 22px 0 20px;
  letter-spacing: -0.035em;
}
.hero-sub { color: var(--muted); font-size: 16.5px; max-width: 540px; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-note { margin-top: 18px; display: flex; gap: 18px; flex-wrap: wrap;
  color: var(--muted-2); font-size: 12.5px; }
.hero-note span { display: flex; align-items: center; gap: 6px; }
.hero-note svg { color: var(--accent); }

.hero-panel {
  position: relative; border-radius: 24px; padding: 1px;
  background: linear-gradient(145deg, rgba(53, 214, 255, 0.45), rgba(79, 140, 255, 0.08) 45%, rgba(122, 240, 200, 0.28));
  box-shadow: var(--shadow);
}
.hero-panel-inner {
  border-radius: 23px; background: linear-gradient(180deg, rgba(9, 22, 40, 0.96), rgba(6, 16, 30, 0.98));
  padding: 22px; overflow: hidden;
}
.panel-top { display: flex; align-items: center; gap: 8px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line); }
.dots { display: flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255,255,255,.18); }
.dots i:nth-child(1) { background: #ff6b6b; }
.dots i:nth-child(2) { background: #ffd166; }
.dots i:nth-child(3) { background: #45e0a8; }
.panel-title { font-size: 12px; color: var(--muted-2); font-family: var(--mono); }
.panel-body { padding-top: 16px; }
.live-row { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--muted); }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 4px rgba(69, 224, 168, 0.12), 0 0 12px var(--ok); animation: pulse 2s infinite; }
.hero-chat { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 92%; padding: 11px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.6; }
.bubble.user { align-self: flex-end; background: linear-gradient(135deg, rgba(53,214,255,.18), rgba(79,140,255,.2));
  border: 1px solid rgba(53,214,255,.22); }
.bubble.bot { align-self: flex-start; background: rgba(120, 180, 255, 0.06);
  border: 1px solid var(--line); color: #cfe6ff; }
.cursor { display: inline-block; width: 7px; height: 14px; background: var(--brand);
  vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
.hero-models { display: grid; gap: 8px; margin-top: 16px; }
.mini-model { display: flex; align-items: center; gap: 10px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 11px; background: rgba(120,180,255,.04); }
.mini-model b { font-size: 12.5px; font-weight: 650; }
.mini-model span { margin-left: auto; font-size: 11px; color: var(--muted-2); }
.mini-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(53,214,255,.18), rgba(79,140,255,.18));
  color: var(--brand); }

/* ---------- stats strip ---------- */
.stats-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 54px; }
.stat { padding: 18px 20px; border: 1px solid var(--line); border-radius: 16px;
  background: rgba(12, 27, 46, 0.5); }
.stat b { display: block; font-size: 24px; letter-spacing: -0.02em; }
.stat span { color: var(--muted-2); font-size: 12.5px; }

/* ---------- model cards ---------- */
.model-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.model-card {
  position: relative; border: 1px solid var(--line); border-radius: 20px;
  background: linear-gradient(180deg, rgba(12, 27, 46, 0.82), rgba(8, 19, 34, 0.9));
  padding: 26px; overflow: hidden; transition: .25s;
}
.model-card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 2px;
  background: linear-gradient(90deg, transparent, var(--brand), transparent);
  opacity: .6;
}
.model-card:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: var(--shadow); }
.model-top { display: flex; align-items: flex-start; gap: 14px; }
.model-icon { width: 46px; height: 46px; border-radius: 13px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(53,214,255,.2), rgba(79,140,255,.22));
  border: 1px solid rgba(53,214,255,.25); color: var(--brand); }
.model-card h3 { font-size: 18px; margin-bottom: 4px; }
.model-id { font-family: var(--mono); font-size: 11.5px; color: var(--muted-2); }
.status-pill { margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600;
  border: 1px solid var(--line); color: var(--muted); }
.status-pill.online { color: var(--ok); border-color: rgba(69,224,168,.3); background: rgba(69,224,168,.08); }
.status-pill.offline { color: var(--warn); border-color: rgba(255,180,84,.25); background: rgba(255,180,84,.07); }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.model-desc { color: var(--muted); font-size: 13.5px; margin: 16px 0; min-height: 44px; }
.model-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 16px; }
.metric { padding: 10px; border-radius: 11px; background: rgba(120,180,255,.05);
  border: 1px solid var(--line); text-align: center; }
.metric b { display: block; font-size: 13px; }
.metric span { font-size: 10.5px; color: var(--muted-2); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tag { padding: 3px 9px; border-radius: 999px; font-size: 11px;
  background: rgba(53,214,255,.08); color: #9fdcff; border: 1px solid rgba(53,214,255,.14); }
.model-foot { display: flex; gap: 10px; margin-top: 18px; }

/* ---------- features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 24px; border-radius: 17px; border: 1px solid var(--line);
  background: rgba(12, 27, 46, 0.45); transition: .2s; }
.feature:hover { border-color: var(--line-2); background: rgba(12, 27, 46, 0.7); }
.feature-icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(53,214,255,.14), rgba(79,140,255,.14));
  color: var(--brand); margin-bottom: 15px; }
.feature h3 { font-size: 15.5px; margin-bottom: 7px; }
.feature p { margin: 0; color: var(--muted); font-size: 13.2px; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.step { position: relative; padding: 26px 24px; border-radius: 18px;
  border: 1px solid var(--line); background: rgba(12, 27, 46, 0.5); }
.step-num { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(53,214,255,.12); color: var(--brand); font-weight: 800; font-family: var(--mono);
  margin-bottom: 15px; }
.step h3 { font-size: 16px; margin-bottom: 7px; }
.step p { margin: 0; color: var(--muted); font-size: 13.2px; }

/* ---------- code ---------- */
.code-wrap { border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: #040a14; box-shadow: var(--shadow); }
.code-head { display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  background: rgba(120,180,255,.05); border-bottom: 1px solid var(--line); }
.code-tabs { display: flex; gap: 4px; }
.code-tab { padding: 5px 11px; border-radius: 7px; font-size: 12px; color: var(--muted);
  background: transparent; border: 0; cursor: pointer; }
.code-tab.active { background: rgba(53,214,255,.12); color: var(--brand); }
.copy-btn { margin-left: auto; }
pre.code { margin: 0; padding: 20px; overflow-x: auto; font-family: var(--mono);
  font-size: 12.8px; line-height: 1.75; color: #c7e4ff; }
pre.code .k { color: #8ab4ff; }
pre.code .s { color: #9be3b8; }
pre.code .c { color: #5d7a99; }
pre.code .n { color: #ffd58a; }

/* ---------- cta ---------- */
.cta {
  position: relative; border-radius: 26px; padding: 54px 30px; text-align: center;
  border: 1px solid rgba(53,214,255,.24); overflow: hidden;
  background:
    radial-gradient(700px 260px at 50% 0%, rgba(53,214,255,.16), transparent 70%),
    linear-gradient(180deg, rgba(12,27,46,.9), rgba(7,17,31,.96));
}
.cta h2 { font-size: clamp(26px, 3.4vw, 38px); margin-bottom: 12px; }
.cta p { color: var(--muted); max-width: 620px; margin: 0 auto 26px; }

/* ---------- auth ---------- */
.auth-wrap { min-height: calc(100vh - 68px); display: grid; place-items: center; padding: 54px 20px; }
.auth-card { width: min(460px, 100%); border-radius: 22px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(12,27,46,.9), rgba(7,17,31,.96));
  box-shadow: var(--shadow); padding: 30px; }
.auth-logo { display: flex; justify-content: center; margin-bottom: 16px; }
.auth-card h1 { font-size: 24px; text-align: center; margin-bottom: 6px; }
.auth-sub { text-align: center; color: var(--muted); font-size: 13.5px; margin: 0 0 22px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  background: rgba(120,180,255,.06); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 18px; }
.seg button { height: 36px; border: 0; border-radius: 9px; background: transparent;
  color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.seg button.active { background: rgba(53,214,255,.14); color: var(--ink); box-shadow: inset 0 0 0 1px rgba(53,214,255,.2); }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.input, .select, .textarea {
  width: 100%; height: 44px; padding: 0 13px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(4, 10, 20, 0.6); color: var(--ink);
  outline: none; transition: .18s;
}
.input:focus, .select:focus, .textarea:focus { border-color: rgba(53,214,255,.5);
  box-shadow: 0 0 0 3px rgba(53,214,255,.09); }
.input::placeholder, .textarea::placeholder { color: #5a7391; }
.textarea { height: auto; padding: 12px 13px; resize: vertical; min-height: 90px; }
.input-row { display: flex; gap: 8px; }
.input-row .input { flex: 1; }
.form-err { color: var(--danger); font-size: 12.5px; min-height: 18px; margin: -4px 0 10px; }
.auth-foot { text-align: center; font-size: 12.5px; color: var(--muted-2); margin-top: 18px; }
.auth-foot a { color: var(--brand); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted-2);
  font-size: 11.5px; margin: 18px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- console ---------- */
.console { display: grid; grid-template-columns: 232px 1fr; gap: 22px;
  width: min(1240px, calc(100% - 40px)); margin: 26px auto 60px; }
.side {
  border: 1px solid var(--line); border-radius: 18px; padding: 14px;
  background: rgba(10, 22, 39, 0.7); height: fit-content; position: sticky; top: 92px;
}
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 8px 14px;
  border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.side-user b { font-size: 13px; display: block; max-width: 128px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.side-user span { font-size: 11px; color: var(--muted-2); display: block; max-width: 128px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-link { display: flex; align-items: center; gap: 10px; padding: 10px 11px;
  border-radius: 10px; color: var(--muted); font-size: 13.5px; cursor: pointer; transition: .16s; }
.side-link:hover { color: var(--ink); background: rgba(120,180,255,.06); }
.side-link.active { color: var(--ink); background: rgba(53,214,255,.1); }
.side-link svg { opacity: .85; }
.side-foot { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.console-main { min-width: 0; }
.page-head { display: flex; align-items: flex-end; gap: 14px; margin: 4px 0 20px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.page-head .row { margin-left: auto; }

.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; }
.card { border: 1px solid var(--line); border-radius: 16px; padding: 18px;
  background: rgba(12, 27, 46, 0.55); }
.card .label { color: var(--muted-2); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.card .value { font-size: 25px; font-weight: 700; margin: 7px 0 2px; letter-spacing: -0.02em; }
.card .value small { font-size: 12px; color: var(--muted); font-weight: 500; }
.card .sub { font-size: 11.5px; color: var(--muted-2); }
.panel { border: 1px solid var(--line); border-radius: 18px; background: rgba(12, 27, 46, 0.5);
  padding: 20px; margin-top: 16px; }
.panel-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.panel-head h3 { font-size: 15px; }
.panel-head .spacer { flex: 1; }
.quota-bar { height: 9px; border-radius: 999px; background: rgba(120,180,255,.1); overflow: hidden; }
.quota-bar i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent)); transition: width .5s; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 10px 14px; font-size: 13px; }
.kv dt { color: var(--muted-2); }
.kv dd { margin: 0; word-break: break-all; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
th { text-align: left; color: var(--muted-2); font-weight: 600; font-size: 11.5px;
  padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 10px; border-bottom: 1px solid rgba(120,180,255,.07); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(120,180,255,.035); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px;
  border-radius: 999px; font-size: 11px; font-weight: 600; }
.pill.ok { color: var(--ok); background: rgba(69,224,168,.1); }
.pill.err { color: var(--danger); background: rgba(255,107,129,.1); }
.pill.warn { color: var(--warn); background: rgba(255,180,84,.1); }
.pill.plain { color: var(--muted); background: rgba(120,180,255,.08); }
.empty { padding: 34px; text-align: center; color: var(--muted-2); font-size: 13px; }

/* ---------- chat ---------- */
.chat-shell { border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
  background: rgba(9, 20, 36, 0.7); display: flex; flex-direction: column; height: 620px; }
.chat-bar { display: flex; align-items: center; gap: 10px; padding: 12px 16px;
  border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.chat-bar .select { width: auto; height: 34px; font-size: 12.5px; }
.chat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.msg { display: flex; gap: 10px; max-width: 86%; }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.msg .who { width: 30px; height: 30px; border-radius: 9px; flex: none; display: grid;
  place-items: center; font-size: 11px; font-weight: 800; }
.msg.user .who { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #041018; }
.msg.bot .who { background: rgba(122,240,200,.12); color: var(--accent); border: 1px solid rgba(122,240,200,.2); }
.msg .body { padding: 11px 14px; border-radius: 14px; font-size: 13.8px; line-height: 1.7;
  white-space: pre-wrap; word-break: break-word; }
.msg.user .body { background: linear-gradient(135deg, rgba(53,214,255,.16), rgba(79,140,255,.2));
  border: 1px solid rgba(53,214,255,.2); }
.msg.bot .body { background: rgba(120,180,255,.06); border: 1px solid var(--line); }
.msg .body code { font-family: var(--mono); font-size: 12px; background: rgba(0,0,0,.35);
  padding: 1px 5px; border-radius: 5px; }
.msg .body pre { background: #040a14; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; overflow-x: auto; font-family: var(--mono); font-size: 12px; margin: 8px 0; }
.chat-input { border-top: 1px solid var(--line); padding: 12px 14px; }
.chat-input textarea { width: 100%; min-height: 46px; max-height: 130px; resize: none;
  border: 1px solid var(--line); border-radius: 12px; background: rgba(4,10,20,.55);
  padding: 11px 13px; outline: none; }
.chat-input textarea:focus { border-color: rgba(53,214,255,.45); }
.chat-foot { display: flex; align-items: center; gap: 10px; margin-top: 9px; }
.chat-foot .hint { color: var(--muted-2); font-size: 11.5px; }
.chat-settings { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.chat-settings label { font-size: 11.5px; color: var(--muted-2); display: flex; align-items: center; gap: 6px; }
.chat-settings input[type=range] { width: 90px; accent-color: var(--brand); }
.typing { color: var(--muted-2); font-size: 12px; }

/* ---------- docs ---------- */
.docs { display: grid; grid-template-columns: 220px 1fr; gap: 34px;
  width: min(1120px, calc(100% - 48px)); margin: 40px auto 70px; }
.docs-nav { position: sticky; top: 92px; height: fit-content; border-left: 1px solid var(--line); padding-left: 16px; }
.docs-nav a { display: block; padding: 7px 0; color: var(--muted); font-size: 13px; }
.docs-nav a:hover { color: var(--brand); }
.docs-body h1 { font-size: 32px; margin-bottom: 10px; }
.docs-body h2 { font-size: 21px; margin: 34px 0 12px; padding-top: 6px; }
.docs-body h3 { font-size: 15.5px; margin: 22px 0 8px; }
.docs-body p, .docs-body li { color: var(--muted); font-size: 13.8px; }
.docs-body code { font-family: var(--mono); font-size: 12.5px; background: rgba(120,180,255,.08);
  padding: 2px 6px; border-radius: 5px; color: #b9e2ff; }
.docs-body table { margin: 12px 0; }
.docs-body th, .docs-body td { white-space: normal; }
.docs-body pre.code { border: 1px solid var(--line); border-radius: 14px; margin: 12px 0; }
.note { border-left: 3px solid var(--brand); background: rgba(53,214,255,.06);
  padding: 12px 16px; border-radius: 0 10px 10px 0; color: var(--muted); font-size: 13px; margin: 14px 0; }

/* ---------- modal / toast ---------- */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(2, 6, 12, 0.7);
  backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px;
  animation: fade .18s ease; }
.modal { width: min(520px, 100%); border-radius: 20px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, #0b1a2e, #071220); box-shadow: var(--shadow);
  padding: 24px; animation: pop .2s ease; }
.modal h3 { font-size: 18px; margin-bottom: 6px; }
.modal p { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.key-box { display: flex; gap: 8px; align-items: center; background: #040a14;
  border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; margin: 12px 0; }
.key-box code { flex: 1; font-family: var(--mono); font-size: 12.5px; word-break: break-all; }

.toast { position: fixed; left: 50%; bottom: 32px; transform: translate(-50%, 20px);
  z-index: 200; padding: 11px 18px; border-radius: 12px; font-size: 13px;
  background: rgba(10, 24, 42, 0.96); border: 1px solid var(--line-2);
  box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .22s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(255,107,129,.35); color: #ffc3cc; }
.toast.ok { border-color: rgba(69,224,168,.35); color: #b9ffe6; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 34px 0; color: var(--muted-2);
  font-size: 12.5px; }
.footer-inner { width: min(1180px, calc(100% - 48px)); margin: 0 auto;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.footer-links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.footer a:hover { color: var(--brand); }

/* ---------- animation ---------- */
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes blink { 0%,49% { opacity: 1; } 50%,100% { opacity: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.rise { animation: rise .5s ease both; }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-panel { max-width: 560px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .docs { grid-template-columns: 1fr; }
  .docs-nav { display: none; }
}
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-mobile { display: inline-flex !important; }
  .model-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: repeat(2, 1fr); }
  .console { grid-template-columns: 1fr; }
  .side { position: static; display: flex; overflow-x: auto; gap: 6px; padding: 10px; }
  .side-user { display: none; }
  .side-foot { display: none; }
  .side-link { white-space: nowrap; }
  .console-main { margin-top: 4px; }
}
@media (max-width: 560px) {
  .container, .nav-inner, .footer-inner { width: calc(100% - 32px); }
  .section { padding: 58px 0; }
  .hero { padding-top: 46px; }
  .hero h1 { font-size: 36px; }
  .feature-grid { grid-template-columns: 1fr; }
  .stats-strip { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .card .value { font-size: 21px; }
  .model-metrics { grid-template-columns: repeat(3, 1fr); }
  .chat-shell { height: 72vh; }
  .msg { max-width: 94%; }
  .nav-actions .btn span { display: none; }
  .auth-card { padding: 22px; }
}
