/* ═══════════════════════════════════════════════════════════════
   OKEX 模型广场 · 设计系统 v2
   参考 FDE 视觉语言：深蓝黑 #070A14 基底 / 青 #37E6FF / 蓝紫 #4F6BFF
   淡紫透视网格地平线 + 3D 粒子场 · 简约大气科技感
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* 表面 */
  --bg: #070a14;
  --bg-subtle: #0a0f1d;
  --bg-muted: #111a2e;
  --bg-inset: #0c1322;
  --surface: rgba(17, 26, 46, 0.72);
  --surface-2: rgba(13, 20, 36, 0.86);
  --border: rgba(120, 140, 255, 0.14);
  --border-strong: rgba(120, 140, 255, 0.30);

  /* 文字 */
  --text: #eef2ff;
  --text-2: #a7b3d0;
  --text-3: #6c7a9e;

  /* 品牌 */
  --brand: #37e6ff;
  --brand-2: #4f6bff;
  --brand-ink: #04101c;
  --accent: #37e6ff;
  --accent-hover: #7af0ff;
  --accent-soft: rgba(55, 230, 255, 0.09);

  /* 语义 */
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.10);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.10);
  --red: #fb7185;
  --red-soft: rgba(251, 113, 133, 0.10);

  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(120, 140, 255, 0.08);
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --nav-h: 58px;
}

* { box-sizing: border-box; }

/* 背景层置于 z-index:-1，body 必须透明，由 html 提供底色 */
html { background: var(--bg); }
html, body {
  margin: 0;
  padding: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: rgba(55, 230, 255, 0.28); color: #fff; }

a { color: inherit; text-decoration: none; }
a.link { color: var(--accent); }
a.link:hover { text-decoration: underline; }

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
h1 { font-size: 32px; line-height: 1.25; letter-spacing: -0.025em; }
h2 { font-size: 22px; line-height: 1.3; }
h3 { font-size: 16px; }
h4 { font-size: 14px; }
p { margin: 0; }

code, pre { font-family: var(--mono); font-size: 12.5px; }

/* ═══ 科技背景层 ═══════════════════════════════════════════════════ */
#tech-backdrop {
  position: fixed; inset: 0; z-index: -1;
  pointer-events: none; overflow: hidden;
  background:
    radial-gradient(1100px 620px at 50% -8%, rgba(79, 107, 255, 0.16), transparent 68%),
    radial-gradient(760px 520px at 88% 8%, rgba(55, 230, 255, 0.07), transparent 70%),
    linear-gradient(180deg, #080d1a 0%, #070a14 55%, #060911 100%);
}
.tech-glow { position: absolute; border-radius: 50%; filter: blur(90px); }
.tech-glow-a {
  width: 620px; height: 620px; top: -260px; left: 50%; margin-left: -310px;
  background: rgba(79, 107, 255, 0.14);
  animation: glow-breathe 12s ease-in-out infinite;
}
.tech-glow-b {
  width: 420px; height: 420px; top: 12%; right: -140px;
  background: rgba(55, 230, 255, 0.08);
  animation: glow-breathe 16s ease-in-out infinite reverse;
}
@keyframes glow-breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
}
.tech-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(120, 140, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 140, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 78% 62% at 50% 0%, #000 10%, transparent 80%);
  mask-image: radial-gradient(ellipse 78% 62% at 50% 0%, #000 10%, transparent 80%);
}
/* 复刻 FDE 的透视网格地平线：rotateX(72deg) + 渐隐遮罩 */
.tech-horizon {
  position: absolute; left: -60%; right: -60%; bottom: -14%; height: 78%;
  background-image:
    linear-gradient(rgba(120, 140, 255, 0.11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 140, 255, 0.11) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(460px) rotateX(72deg);
  transform-origin: bottom center;
  -webkit-mask-image: linear-gradient(transparent 30%, #000 96%);
  mask-image: linear-gradient(transparent 30%, #000 96%);
}
.tech-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ═══ 导航 ═══════════════════════════════════════════════════════ */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(7, 10, 20, 0.76);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px;
  gap: 28px;
}
.nav::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(55, 230, 255, 0.45), rgba(79, 107, 255, 0.35), transparent);
  pointer-events: none;
}
.nav-logo {
  display: flex; align-items: center; gap: 9px;
  font-weight: 650; font-size: 15px; letter-spacing: -0.02em;
  flex-shrink: 0;
}
.nav-mark {
  width: 25px; height: 25px; border-radius: 7px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: var(--brand-ink);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: -0.03em;
  box-shadow: 0 0 18px rgba(55, 230, 255, 0.32);
}
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-link {
  padding: 6px 11px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 13.5px; font-weight: 450;
  transition: background 0.15s, color 0.15s;
}
.nav-link:hover { background: var(--bg-muted); color: var(--text); }
.nav-link.active {
  color: var(--brand); background: var(--accent-soft); font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(55, 230, 255, 0.16);
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

/* ═══ 按钮 ═══════════════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text);
  font-family: inherit; font-size: 13.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s,
              box-shadow 0.2s, transform 0.08s;
}
.btn:hover {
  background: var(--bg-muted); border-color: rgba(55, 230, 255, 0.45);
  color: var(--text);
  box-shadow: 0 0 18px rgba(55, 230, 255, 0.10);
}
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary, .btn-accent {
  background: linear-gradient(100deg, var(--brand) 0%, #5aa8ff 55%, var(--brand-2) 100%);
  border-color: transparent; color: var(--brand-ink); font-weight: 650;
  box-shadow: 0 0 22px rgba(55, 230, 255, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
.btn-primary:hover, .btn-accent:hover {
  background: linear-gradient(100deg, #7af0ff 0%, #78b6ff 55%, #6b7dff 100%);
  border-color: transparent; color: var(--brand-ink);
  box-shadow: 0 0 30px rgba(55, 230, 255, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--bg-muted); border-color: transparent; box-shadow: none; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { height: 44px; padding: 0 22px; font-size: 14.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-danger { color: var(--red); border-color: rgba(251, 113, 133, 0.35); }
.btn-danger:hover { background: var(--red-soft); border-color: var(--red); box-shadow: none; }

/* ═══ 表单 ═══════════════════════════════════════════════════════ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--text-3); }
.input, .select, .textarea {
  height: 36px; padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: rgba(7, 12, 24, 0.72);
  font-family: inherit; font-size: 13.5px; color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}
.textarea { height: auto; min-height: 76px; padding: 9px 11px; resize: vertical; line-height: 1.55; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(55, 230, 255, 0.12), 0 0 16px rgba(55, 230, 255, 0.10);
}
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.select { cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%236c7a9e' stroke-width='1.3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px;
}
.select option { background: #0c1322; color: var(--text); }

/* ═══ 卡片 ═══════════════════════════════════════════════════════ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
.card-pad-0 { padding: 0; overflow: hidden; }
.card-hover { transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s, background 0.2s; }
.card-hover:hover {
  border-color: rgba(55, 230, 255, 0.38);
  background: rgba(20, 32, 56, 0.8);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), 0 0 24px rgba(55, 230, 255, 0.08);
  transform: translateY(-2px);
}

/* ═══ 表格 ═══════════════════════════════════════════════════════ */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; padding: 10px 14px;
  font-size: 12px; font-weight: 500; color: var(--text-3);
  border-bottom: 1px solid var(--border);
  background: rgba(9, 15, 28, 0.7);
  white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(55, 230, 255, 0.045); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); font-size: 12.5px; }

/* ═══ 徽标 ═══════════════════════════════════════════════════════ */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  height: 21px; padding: 0 7px;
  border-radius: 5px;
  font-size: 11.5px; font-weight: 500;
  background: var(--bg-muted); color: var(--text-2);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge-green { background: var(--green-soft); color: var(--green); border-color: rgba(74, 222, 128, 0.24); }
.badge-amber { background: var(--amber-soft); color: var(--amber); border-color: rgba(251, 191, 36, 0.24); }
.badge-red { background: var(--red-soft); color: var(--red); border-color: rgba(251, 113, 133, 0.24); }
.badge-blue { background: var(--accent-soft); color: var(--brand); border-color: rgba(55, 230, 255, 0.22); }
.badge-outline { background: transparent; border: 1px solid var(--border-strong); color: var(--text-2); }

.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex-shrink: 0; }
.dot-green { background: #4ade80; box-shadow: 0 0 8px rgba(74, 222, 128, 0.7); }
.dot-amber { background: #fbbf24; box-shadow: 0 0 8px rgba(251, 191, 36, 0.7); }
.dot-red { background: #fb7185; box-shadow: 0 0 8px rgba(251, 113, 133, 0.7); }
.dot-gray { background: #6c7a9e; }

/* ═══ 布局工具 ═══════════════════════════════════════════════════ */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.container-wide { max-width: 1360px; margin: 0 auto; padding: 0 24px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.col { display: flex; flex-direction: column; }
.gap-4 { gap: 4px; } .gap-6 { gap: 6px; } .gap-8 { gap: 8px; }
.gap-12 { gap: 12px; } .gap-16 { gap: 16px; } .gap-20 { gap: 20px; } .gap-24 { gap: 24px; }
.mt-4 { margin-top: 4px; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; }
.muted { color: var(--text-2); }
.dim { color: var(--text-3); }
.mono { font-family: var(--mono); }
.tabular { font-variant-numeric: tabular-nums; }
.text-sm { font-size: 13px; } .text-xs { font-size: 12px; }
.text-lg { font-size: 16px; } .text-xl { font-size: 19px; }
.strong { font-weight: 600; }
.center { text-align: center; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.hidden { display: none !important; }

/* ═══ 分区标题 ═══════════════════════════════════════════════════ */
.eyebrow {
  font-size: 11.5px; font-weight: 650; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--brand);
}
.section-title { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; }
.section-sub { font-size: 14px; color: var(--text-2); margin-top: 6px; }

/* ═══ 代码块 ═════════════════════════════════════════════════════ */
.code-block {
  background: linear-gradient(180deg, #080e1d 0%, #060a15 100%);
  color: #c9d6f0;
  border: 1px solid rgba(120, 140, 255, 0.12);
  border-radius: var(--radius); padding: 16px 18px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.7;
  overflow-x: auto; position: relative;
  white-space: pre;
}
.code-block .c-key { color: #7dd3fc; }
.code-block .c-str { color: #86efac; }
.code-block .c-cmt { color: #5c6a8c; }
.code-block .c-fn { color: #fcd34d; }
.code-inline {
  background: rgba(55, 230, 255, 0.08); border: 1px solid rgba(55, 230, 255, 0.18);
  padding: 1.5px 6px; border-radius: 5px;
  font-family: var(--mono); font-size: 12.5px; color: #8be9ff;
}

/* ═══ 空状态 ═════════════════════════════════════════════════════ */
.empty {
  padding: 44px 20px; text-align: center;
  color: var(--text-3); font-size: 13.5px;
}

/* ═══ 统计块 ═════════════════════════════════════════════════════ */
.stat-label { font-size: 12px; color: var(--text-3); font-weight: 500; }
.stat-value {
  font-size: 25px; font-weight: 650; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; line-height: 1.15;
  color: #f2f7ff;
  text-shadow: 0 0 22px rgba(55, 230, 255, 0.22);
}
.stat-delta { font-size: 12px; font-weight: 500; }

/* ═══ 侧边栏控制台 ═══════════════════════════════════════════════ */
.console-shell { display: flex; min-height: calc(100vh - var(--nav-h)); }
.sidebar {
  width: 208px; flex-shrink: 0;
  border-right: 1px solid var(--border);
  padding: 18px 12px;
  background: rgba(8, 13, 26, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  overflow-y: auto;
}
.sidebar-group { margin-bottom: 18px; }
.sidebar-label {
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.07em;
  text-transform: uppercase; color: var(--text-3);
  padding: 0 9px; margin-bottom: 5px;
}
.sidebar-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border-radius: var(--radius-sm);
  font-size: 13.5px; color: var(--text-2); font-weight: 450;
  cursor: pointer; transition: background 0.14s, color 0.14s;
}
.sidebar-item:hover { background: var(--bg-muted); color: var(--text); }
.sidebar-item.active {
  background: var(--accent-soft); color: var(--brand); font-weight: 550;
  box-shadow: inset 2px 0 0 var(--brand), inset 0 0 0 1px rgba(55, 230, 255, 0.12);
}
.console-main { flex: 1; padding: 28px 32px; min-width: 0; max-width: 1100px; }

/* ═══ 科技感组件 ═════════════════════════════════════════════════ */
.gradient-text {
  background: linear-gradient(100deg, #a5b4fc 0%, #37e6ff 48%, #c084fc 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.glass-panel {
  background: linear-gradient(160deg, rgba(20, 32, 58, 0.72), rgba(9, 15, 30, 0.86));
  border: 1px solid rgba(120, 140, 255, 0.20);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tech-hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.tech-hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; z-index: 0; opacity: 0.9;
}
/* 文字区暗底衬：粒子在两侧可见，中央保持高对比可读 */
.tech-hero-inner {
  position: relative; z-index: 1;
  background: radial-gradient(ellipse 52% 72% at 50% 46%,
    rgba(7, 10, 20, 0.80) 0%, rgba(7, 10, 20, 0.42) 52%, transparent 82%);
}
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 13px; border-radius: 100px;
  border: 1px solid rgba(55, 230, 255, 0.28);
  background: rgba(55, 230, 255, 0.07);
  color: #9be9ff; font-size: 12px; font-weight: 500;
  letter-spacing: 0.01em;
  box-shadow: 0 0 20px rgba(55, 230, 255, 0.08);
}
.hero-ring {
  position: absolute; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(120, 140, 255, 0.10);
}
.hero-ring::after {
  content: ''; position: absolute; inset: 14%; border-radius: 50%;
  border: 1px solid rgba(55, 230, 255, 0.07);
}
.cta-panel {
  position: relative; overflow: hidden;
  background:
    radial-gradient(600px 260px at 20% -30%, rgba(55, 230, 255, 0.18), transparent 70%),
    radial-gradient(520px 260px at 85% 120%, rgba(120, 140, 255, 0.20), transparent 70%),
    linear-gradient(120deg, #0d1730 0%, #0a1124 55%, #101a35 100%);
  border: 1px solid rgba(120, 140, 255, 0.28);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.cta-panel::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(120, 140, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 140, 255, 0.06) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 50%, #000, transparent 78%);
}
.auth-brand-panel {
  background:
    radial-gradient(600px 400px at 78% 6%, rgba(55, 230, 255, 0.16), transparent 70%),
    radial-gradient(500px 400px at 10% 95%, rgba(79, 107, 255, 0.20), transparent 70%),
    linear-gradient(150deg, #0b1428 0%, #080d1c 60%, #0d1530 100%);
  border-left: 1px solid var(--border);
}

/* ═══ 响应式 ═════════════════════════════════════════════════════ */
@media (max-width: 860px) {
  .nav { padding: 0 14px; gap: 12px; }
  .nav-links { display: none; }
  .container, .container-wide { padding: 0 16px; }
  .sidebar { display: none; }
  .console-main { padding: 20px 16px; }
  h1 { font-size: 25px; }
  .grid-models { grid-template-columns: 1fr !important; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
  .tech-horizon { opacity: 0.55; }
}

/* ═══ 动画 ═══════════════════════════════════════════════════════ */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.fade-up { animation: fade-up 0.5s cubic-bezier(0.2, 0.8, 0.3, 1) both; }

@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.42; }
}
.pulse { animation: pulse-soft 1.4s ease-in-out infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  width: 15px; height: 15px;
  border: 1.8px solid rgba(55, 230, 255, 0.2);
  border-top-color: var(--brand); border-radius: 50%;
  box-shadow: 0 0 12px rgba(55, 230, 255, 0.3);
  animation: spin 0.7s linear infinite;
}

/* 尊重系统减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .tech-glow { opacity: 0.5; }
}

/* ═══ 打印 ═══════════════════════════════════════════════════════ */
@media print {
  .nav, .sidebar, #tech-backdrop { display: none; }
}
