
:root {
  --bg: #090b10;
  --bg-soft: #111522;
  --panel: #141927;
  --panel-2: #1a2031;
  --panel-3: #20283d;
  --line: rgba(255,255,255,.08);
  --line-strong: rgba(255,255,255,.16);
  --text: #edf1ff;
  --muted: #a3abc1;
  --dim: #6f7894;
  --accent: #cab07a;
  --accent-2: #8d7df2;
  --green: #67d3b0;
  --orange: #f2ad67;
  --pink: #e38aac;
  --violet: #ab94ff;
  --shadow: 0 22px 60px rgba(0,0,0,.32);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(202,176,122,.13), transparent 28%),
    radial-gradient(circle at top right, rgba(141,125,242,.12), transparent 28%),
    linear-gradient(180deg, #090b10 0%, #0d1118 100%);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  line-height: 1.65;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
}
.site-shell {
  position: relative;
  z-index: 1;
  width: min(1220px, calc(100% - 28px));
  margin: 20px auto 38px;
}
.site-header {
  position: sticky;
  top: 14px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 18px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(12,15,24,.8);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}
.brand { color: inherit; text-decoration: none; display: flex; flex-direction: column; gap: 2px; }
.brand-kicker { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.brand-title { font-size: 20px; font-weight: 700; }
.site-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.site-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  transition: .18s ease;
  font-size: 14px;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--text);
  background: rgba(255,255,255,.04);
  border-color: var(--line);
}
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  border-radius: 12px;
  width: 44px;
  height: 44px;
  font-size: 18px;
}
.hero {
  padding: 42px 34px 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(202,176,122,.14), rgba(141,125,242,.08));
  box-shadow: var(--shadow);
}
.hero.small { padding: 34px 30px 28px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  border: 1px solid var(--line);
  color: #d7def7;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.hero h1 { margin: 16px 0 10px; font-size: clamp(32px, 5vw, 54px); line-height: 1.08; }
.hero p { margin: 0; color: var(--muted); font-size: 15px; max-width: 860px; }
.hero-actions, .chip-row, .kpi-row, .filter-row, .toc { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-actions { margin-top: 22px; }
.chip-row { margin-top: 18px; }
.kpi-row { margin-top: 24px; }
.chip, .kpi, .mini-chip {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: #dde4fb;
  font-size: 13px;
}
.kpi strong { color: #fff; margin-right: 4px; }
.layout-gap { display: grid; gap: 22px; margin-top: 22px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.card, .panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  box-shadow: var(--shadow);
}
.card { padding: 22px; }
.panel { padding: 24px; }
.panel h2, .panel h3, .card h2, .card h3, .card h4 { margin: 0 0 10px; line-height: 1.28; }
.card p, .panel p { color: var(--muted); }
.stat-card {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.stat-top { display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.stat-number { font-size: 38px; line-height: 1; font-weight: 800; }
.stat-tag {
  font-size: 12px; color: var(--accent); border: 1px solid rgba(202,176,122,.22);
  background: rgba(202,176,122,.1); border-radius: 999px; padding: 6px 10px;
}
.stat-card h3 { font-size: 22px; margin-top: 16px; }
.stat-card .action-link, .button, button.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 12px; text-decoration: none; border: 1px solid var(--line);
  background: rgba(255,255,255,.05); color: var(--text); font-weight: 600; cursor: pointer; transition: .18s ease;
}
.action-link:hover, .button:hover { transform: translateY(-1px); border-color: var(--line-strong); }
.button.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; color: #fff; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-title h2 { margin: 0; font-size: 26px; }
.section-title p { margin: 0; }
.toc a {
  color: var(--muted); text-decoration: none; border: 1px solid var(--line); background: rgba(255,255,255,.03);
  border-radius: 12px; padding: 10px 14px; font-size: 13px;
}
.toc a:hover { color: var(--text); }
.search-input {
  width: 100%; padding: 13px 15px; border-radius: 14px; border: 1px solid var(--line);
  background: #0c111b; color: var(--text); outline: none; font-size: 14px;
}
.search-input:focus { border-color: var(--line-strong); }
.filter-button {
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted);
  border-radius: 999px; padding: 8px 13px; cursor: pointer; font-size: 13px;
}
.filter-button.active, .filter-button:hover { color: var(--text); border-color: var(--line-strong); }
.camera-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.camera-card {
  position: relative; overflow: hidden; min-height: 210px; padding: 22px; border-radius: 18px;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.02));
  box-shadow: var(--shadow); cursor: pointer; transition: transform .18s ease, border-color .18s ease;
}
.camera-card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.camera-card.open { background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03)); }
.camera-card::after {
  content: ""; position: absolute; inset: 0; opacity: .12; pointer-events: none;
  background: radial-gradient(circle at top right, var(--card-accent, rgba(255,255,255,.12)), transparent 38%);
}
.camera-tag, .info-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--card-accent, var(--accent)); margin-bottom: 12px;
}
.camera-tag::before, .info-tag::before {
  content: ""; width: 7px; height: 7px; border-radius: 999px; background: currentColor;
}
.camera-card h3 { font-size: 20px; margin: 0 0 4px; }
.camera-card .cn { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.camera-card .desc { color: var(--muted); font-size: 13px; }
.camera-expand { max-height: 0; overflow: hidden; opacity: 0; transition: .22s ease; }
.camera-card.open .camera-expand { max-height: 240px; opacity: 1; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--line); }
.codebox {
  position: relative; background: #0c111b; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
}
.codebox pre {
  margin: 0; padding: 18px; white-space: pre-wrap; word-break: break-word; overflow: auto;
  max-height: 540px; color: #edf1ff; font-family: "SFMono-Regular", Consolas, monospace; font-size: 13px; line-height: 1.72;
}
.copy-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.copy-btn, .ghost-btn {
  border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--text);
  border-radius: 12px; padding: 10px 13px; cursor: pointer; font-size: 13px; font-weight: 600;
}
.copy-btn:hover, .ghost-btn:hover { border-color: var(--line-strong); }
.copy-status { color: var(--green); font-size: 12px; min-height: 16px; }
.note-box {
  border: 1px solid rgba(103,211,176,.22); background: rgba(103,211,176,.08); color: #dbfff4;
  border-radius: 16px; padding: 14px 16px; font-size: 14px;
}
.prose h2 { margin-top: 0; }
.prose h3 { margin-top: 24px; font-size: 20px; }
.prose .grid-2, .prose .grid-3 { margin-top: 12px; }
.prose .card { padding: 18px; background: rgba(255,255,255,.03); box-shadow: none; }
.prose table { width: 100%; border-collapse: collapse; overflow: hidden; border-radius: 18px; font-size: 14px; margin-top: 12px; }
.prose th, .prose td { border-bottom: 1px solid var(--line); padding: 14px 12px; text-align: left; vertical-align: top; }
.prose th { background: rgba(255,255,255,.05); color: #dfe8ff; }
.prose tr:hover td { background: rgba(255,255,255,.02); }
.prose ul { padding-left: 18px; color: #d8deee; }
.prose li { margin: 8px 0; }
.prose details { margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.03); padding: 14px 16px; }
.prose summary { cursor: pointer; font-weight: 700; }
.prose .tag {
  display: inline-flex; align-items: center; padding: 5px 10px; border-radius: 999px; font-size: 12px; margin-right: 6px;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: #dbe3fa;
}
.agent-card .top-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.agent-card .chip { font-size: 12px; }
.agent-card .desc { margin-bottom: 16px; }
.explain-box {
  display: none; margin-bottom: 14px; padding: 14px 16px; border-radius: 16px;
  background: rgba(103,211,176,.08); border: 1px solid rgba(103,211,176,.2); color: #dbfff4; font-size: 14px;
}
.explain-box.show { display: block; }
.list-plain { display: grid; gap: 10px; }
.list-plain li { list-style: none; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.03); }
.site-footer {
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; padding: 22px 6px 10px; color: var(--muted); font-size: 13px;
}
.footer-muted { color: var(--dim); }
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(16px); opacity: 0;
  padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: rgba(10,13,20,.9); color: var(--text); z-index: 100; transition: .18s ease; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.color-orange { color: var(--orange); }
.color-green { color: var(--green); }
.color-pink { color: var(--pink); }
.color-violet { color: var(--violet); }
@media (max-width: 980px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .site-shell { width: min(100%, calc(100% - 18px)); margin-top: 12px; }
  .hero { padding: 30px 22px 24px; }
  .panel, .card, .camera-card { padding: 18px; }
  .site-header { top: 8px; }
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: calc(100% + 10px); padding: 12px;
    border-radius: 16px; border: 1px solid var(--line); background: rgba(12,15,24,.96); box-shadow: var(--shadow);
  }
  .site-nav.open { display: grid; }
  .site-nav a { width: 100%; }
  .hero h1 { font-size: 34px; }
}


body.auth-pending .site-shell, body.auth-pending .auth-page-shell { visibility: hidden; }
.auth-page-shell { width: min(1040px, calc(100% - 28px)); margin: 20px auto 38px; position: relative; z-index: 1; }
.auth-layout { display: grid; grid-template-columns: 1.05fr .95fr; gap: 20px; margin-top: 22px; }
.auth-card, .promo-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  box-shadow: var(--shadow);
}
.auth-card { padding: 24px; }
.promo-card { padding: 28px; background: linear-gradient(145deg, rgba(202,176,122,.12), rgba(141,125,242,.08)); }
.auth-title { font-size: 34px; line-height: 1.1; margin: 14px 0 10px; }
.auth-sub { color: var(--muted); margin: 0; }
.auth-tabs { display:flex; flex-wrap:wrap; gap:10px; margin:18px 0 18px; }
.auth-tab {
  border:1px solid var(--line); background:rgba(255,255,255,.04); color:var(--muted);
  border-radius:999px; padding:9px 14px; cursor:pointer; font-size:13px; font-weight:600;
}
.auth-tab.active, .auth-tab:hover { color:var(--text); border-color: var(--line-strong); }
.auth-panel { display:none; }
.auth-panel.active { display:block; }
.form-grid { display:grid; gap:14px; }
.form-label { display:grid; gap:8px; font-size:13px; color:#dfe5f8; }
.form-label span { font-weight:600; }
.form-input {
  width:100%; padding:13px 14px; border-radius:14px; border:1px solid var(--line);
  background:#0c111b; color:var(--text); outline:none; font-size:14px;
}
.form-input:focus { border-color: var(--line-strong); }
.form-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:8px; }
.form-hint, .auth-note { color: var(--muted); font-size:13px; }
.form-error { color:#ffb4b4; font-size:13px; min-height:18px; }
.form-success { color: var(--green); font-size:13px; min-height:18px; }
.promo-list { display:grid; gap:12px; margin:18px 0 0; padding:0; }
.promo-list li { list-style:none; padding:14px 16px; border-radius:16px; border:1px solid var(--line); background: rgba(255,255,255,.04); }
.auth-actions { display:flex; align-items:center; gap:10px; margin-left:auto; }
.user-chip {
  display:inline-flex; align-items:center; gap:8px; padding:8px 12px; border-radius:999px;
  border:1px solid var(--line); background: rgba(255,255,255,.05); color:#dfe5f8; font-size:13px;
}
.user-chip strong { color:#fff; }
.auth-spinner-wrap { min-height: 64vh; display:flex; align-items:center; justify-content:center; }
.auth-spinner {
  width:48px; height:48px; border-radius:999px; border:3px solid rgba(255,255,255,.12);
  border-top-color: var(--accent); animation: spin 1s linear infinite;
}
.inline-banner {
  padding:14px 16px; border-radius:16px; border:1px solid rgba(255,180,180,.22);
  background: rgba(255,110,110,.08); color:#ffd3d3; font-size:14px; margin-top:14px;
}
.inline-banner.good {
  border-color: rgba(103,211,176,.22); background: rgba(103,211,176,.08); color: #dbfff4;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 920px) {
  .auth-layout { grid-template-columns: 1fr; }
}
