/* ============ KLineAPI v3.0 深色科技风 ============ */
:root {
  --bg: #0a0e17;
  --bg-soft: #0e1420;
  --surface: #111a2c;
  --surface-2: #0d1524;
  --border: #1c2740;
  --border-light: #24344f;
  --text: #e6edf7;
  --muted: #8fa3bf;
  --gold: #f6c453;
  --gold-2: #ffd97a;
  --cyan: #35d0f2;
  --green: #2ecc8f;
  --red: #ff5d6c;
  --radius: 14px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--gold-2); }

h1, h2, h3 { line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }

code, pre {
  font-family: var(--mono);
  font-size: 0.9em;
}

.inline-code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--cyan);
}

.grad-text {
  background: linear-gradient(92deg, var(--gold) 0%, var(--gold-2) 45%, var(--cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  padding: 10px 20px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s ease;
  text-decoration: none;
  font-family: inherit;
  line-height: 1.4;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: linear-gradient(135deg, var(--gold) 0%, #eab83e 100%);
  color: #1a1205;
  box-shadow: 0 4px 18px rgba(246, 196, 83, 0.28);
}
.btn-primary:hover { color: #1a1205; box-shadow: 0 6px 24px rgba(246, 196, 83, 0.4); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-light);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

.btn-outline {
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(53, 208, 242, 0.5);
}
.btn-outline:hover { background: rgba(53, 208, 242, 0.08); }

.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 12px; }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }

.inline-form { display: inline; }

/* ============ 顶部导航 ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { color: var(--text); }
.brand-mark { flex: none; }
.brand-text { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.brand-text span { color: var(--gold); }

.site-nav { display: flex; gap: 28px; }
.site-nav a {
  color: var(--muted);
  font-size: 15px;
  font-weight: 500;
  position: relative;
}
.site-nav a:hover { color: var(--text); }
.site-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--cyan));
  transition: width 0.2s ease;
  border-radius: 2px;
}
.site-nav a:hover::after { width: 100%; }

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-user { color: var(--muted); font-size: 14px; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 2px;
  transition: 0.25s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* 移动端折叠菜单里的登录/注册/退出链接（桌面端隐藏） */
.nav-mobile-only { display: none; }
.nav-link-btn {
  display: block;
  width: 100%;
  padding: 10px 4px;
  background: none;
  border: 0;
  color: var(--muted);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}
.nav-link-btn:hover { color: var(--cyan); }

/* ============ Flash 消息 ============ */
.flash-wrap { margin-top: 16px; }
.flash {
  padding: 12px 18px;
  border-radius: 10px;
  margin-bottom: 10px;
  font-size: 14px;
  border: 1px solid;
}
.flash-success { background: rgba(46, 204, 143, 0.1); border-color: rgba(46, 204, 143, 0.4); color: #7ce7b8; }
.flash-error { background: rgba(255, 93, 108, 0.1); border-color: rgba(255, 93, 108, 0.4); color: #ff9aa4; }

/* ============ Hero ============ */
.hero { position: relative; overflow: hidden; padding: 96px 0 80px; }
.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(600px 300px at 15% 10%, rgba(246, 196, 83, 0.1), transparent 60%),
    radial-gradient(700px 380px at 85% 20%, rgba(53, 208, 242, 0.12), transparent 60%),
    radial-gradient(500px 400px at 50% 100%, rgba(53, 208, 242, 0.05), transparent 60%);
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
  position: relative;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px rgba(46, 204, 143, 0.8);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.hero h1 { font-size: clamp(34px, 4.6vw, 52px); margin-bottom: 18px; }
.hero-sub { color: var(--muted); font-size: 17px; max-width: 540px; margin-bottom: 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 30px; }
.hero-points { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.hero-points li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.hero-points svg { color: var(--green); flex: none; }

/* 终端窗口 */
.hero-terminal { position: relative; }
.term-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #0d1420;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  padding: 11px 16px;
}
.term-dot { width: 11px; height: 11px; border-radius: 50%; }
.term-dot.red { background: #ff5f57; }
.term-dot.yellow { background: #febc2e; }
.term-dot.green { background: #28c840; }
.term-title { margin-left: 8px; color: var(--muted); font-size: 12.5px; font-family: var(--mono); }
.term-body {
  background: #0d1420;
  border: 1px solid var(--border);
  border-radius: 0 0 12px 12px;
  padding: 22px 22px 24px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.75;
  color: #c7d6ea;
  min-height: 280px;
}
.term-prompt { color: var(--green); font-weight: 700; }
.term-url { color: var(--cyan); }
.term-key { color: #7fb7ff; }
.term-str { color: #a8e6a1; }
.term-num { color: #f6c453; }
.term-json { color: #c7d6ea; }
.term-cursor {
  display: none;
  position: absolute;
  width: 8px;
  height: 15px;
  background: var(--gold);
  animation: blink 0.9s infinite;
  pointer-events: none;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* ============ 指标区 ============ */
.metrics { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}
.metric-card {
  background: var(--bg-soft);
  padding: 30px 24px;
  text-align: center;
}
.metric-card svg { color: var(--gold); margin-bottom: 10px; }
.metric-value { font-size: 26px; font-weight: 800; color: var(--text); }
.metric-label { color: var(--muted); font-size: 13.5px; }

/* ============ 区块 ============ */
.section { padding: 48px 0; }
.section-alt { background: var(--bg-soft); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 32px; }
.section-head h2 { font-size: 32px; margin-bottom: 12px; }
.section-head p { color: var(--muted); }
.section-subtitle { font-size: 22px; margin-bottom: 18px; }
.page-hero { padding: 44px 0 20px; border-bottom: 1px solid var(--border); background: var(--bg-soft); }
.page-hero-sm { padding: 28px 0 18px; }
.page-hero h1 { font-size: 38px; margin-bottom: 8px; }
.page-hero p { color: var(--muted); font-size: 15.5px; max-width: 640px; margin-bottom: 0; }

/* ============ API 卡片 ============ */
.api-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.api-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 24px;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.api-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-light);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}
.api-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}
.api-icon.gold { background: rgba(246, 196, 83, 0.12); color: var(--gold); border: 1px solid rgba(246, 196, 83, 0.25); }
.api-icon.cyan { background: rgba(53, 208, 242, 0.1); color: var(--cyan); border: 1px solid rgba(53, 208, 242, 0.25); }
.api-card h3 { font-size: 18px; margin-bottom: 8px; }
.api-card p { color: var(--muted); font-size: 14px; margin-bottom: 16px; }
.api-path {
  display: block;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12.5px;
  color: var(--cyan);
  overflow-x: auto;
  white-space: nowrap;
}

/* ============ 步骤 ============ */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  position: relative;
}
.step-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  font-family: var(--mono);
  border: 1px solid rgba(246, 196, 83, 0.35);
  background: rgba(246, 196, 83, 0.08);
  border-radius: 8px;
  padding: 3px 9px;
  display: inline-block;
  margin-bottom: 14px;
}
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { color: var(--muted); font-size: 14px; }

/* ============ 套餐卡片 ============ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  align-items: stretch;
}
.price-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.price-card:hover { transform: translateY(-3px); }
.price-card-hot {
  border-color: rgba(246, 196, 83, 0.55);
  box-shadow: 0 0 0 1px rgba(246, 196, 83, 0.25), 0 18px 44px rgba(246, 196, 83, 0.08);
  background: linear-gradient(180deg, rgba(246, 196, 83, 0.05), var(--surface) 45%);
}
.price-tag {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--gold), #eab83e);
  color: #1a1205;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 14px;
  white-space: nowrap;
}
.price-card h3 { font-size: 20px; margin-bottom: 6px; }
.price-sub { color: var(--muted); font-size: 13.5px; margin-bottom: 18px; }
.price-amount { font-size: 44px; font-weight: 800; margin-bottom: 20px; display: flex; align-items: baseline; }
.price-cur { font-size: 22px; color: var(--gold); margin-right: 2px; }
.price-period { font-size: 14px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.price-features { list-style: none; margin-bottom: 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price-features li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14.5px; }
.price-features svg { color: var(--green); flex: none; }
.center-note { text-align: center; margin-top: 26px; font-size: 14px; }

/* ============ CTA ============ */
.cta-band {
  background:
    radial-gradient(700px 300px at 50% 0%, rgba(246, 196, 83, 0.1), transparent 65%),
    var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 64px 0;
  text-align: center;
}
.cta-inner h2 { font-size: 30px; margin-bottom: 10px; }
.cta-inner p { color: var(--muted); margin-bottom: 24px; }

/* ============ 页脚 ============ */
.site-footer { border-top: 1px solid var(--border); background: #070a10; padding-top: 48px; }
.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: 32px;
  padding-bottom: 36px;
}
.footer-brand { margin-bottom: 12px; }
.footer-desc { color: var(--muted); font-size: 13.5px; max-width: 300px; }
.footer-col h3 { font-size: 15px; margin-bottom: 14px; color: var(--text); }
.footer-col a { display: block; color: var(--muted); font-size: 14px; margin-bottom: 9px; }
.footer-col a:hover { color: var(--cyan); }
.status-line { color: var(--muted); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.footer-time { color: var(--muted); font-size: 13px; margin-top: 6px; font-family: var(--mono); }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 24px; text-align: center; }
.footer-bottom p { color: var(--muted); font-size: 13px; }

/* ============ 公告条 ============ */
.site-banner { background: linear-gradient(135deg, #f6c453 0%, #f59e0b 100%); color: #0a0e17; font-size: 14px; text-align: center; padding: 8px 0; }
.banner-inner { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.banner-icon { font-size: 16px; }
.banner-text { font-weight: 600; }
.banner-link { color: #0a0e17; text-decoration: underline; font-weight: 600; font-size: 13px; white-space: nowrap; }

/* ============ 站内通知铃铛 ============ */
.nav-notify { position: relative; display: inline-flex; align-items: center; color: var(--muted); margin-right: 8px; transition: color .2s; }
.nav-notify:hover { color: var(--text); }
.notify-badge { position: absolute; top: -5px; right: -8px; background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1; }
.checkbox-label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text); cursor: pointer; }
.checkbox-label input[type="checkbox"] { width: 16px; height: 16px; }

/* ============ 页面头部 ============ */
.page-hero-dummy { padding: 0; } /* 旧定义已移至区块上方 */
.dashboard-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }

/* ============ 认证页 ============ */
.auth-section { padding: 64px 0; }
.auth-wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 44px; max-width: 900px; }
.auth-wrap-single { max-width: 460px; grid-template-columns: 1fr; }
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 34px;
}
.auth-card h1 { font-size: 26px; margin-bottom: 6px; }
.auth-sub { color: var(--muted); font-size: 14px; margin-bottom: 24px; }
.auth-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 7px; }
.auth-form input {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  padding: 11px 14px;
  margin-bottom: 18px;
  outline: none;
  transition: border-color 0.15s ease;
  font-family: inherit;
}
.auth-form input:focus { border-color: var(--cyan); }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--muted); }
.auth-switch a { color: var(--cyan); font-weight: 600; }
/* 控制台修改密码表单 */
.password-form { max-width: 560px; }
.password-form .btn { margin-top: 4px; }
.password-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) {
  .password-row { grid-template-columns: 1fr; gap: 0; }
}
.auth-side h2 { font-size: 22px; margin-bottom: 20px; }
.auth-benefits { list-style: none; display: flex; flex-direction: column; gap: 14px; }
.auth-benefits li { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.auth-benefits svg { color: var(--green); flex: none; }

/* 管理后台 */
.admin-tabs { margin-bottom: 24px; }
.admin-tab-group { display: flex; gap: 10px; flex-wrap: wrap; }
.admin-tab {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.admin-tab:hover { color: var(--text); border-color: var(--border-light); }
.admin-tab.active { background: var(--cyan); border-color: var(--cyan); color: #06121f; }
.admin-search { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin-search input, .admin-search select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  padding: 7px 12px;
  outline: none;
  font-family: inherit;
}
.admin-search input:focus, .admin-search select:focus { border-color: var(--cyan); }
.badge-admin {
  display: inline-block;
  background: rgba(246, 196, 83, 0.15);
  color: var(--gold);
  border: 1px solid rgba(246, 196, 83, 0.35);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  margin-left: 6px;
  vertical-align: 1px;
}
.badge-free {
  display: inline-block;
  background: rgba(52, 199, 123, 0.15);
  color: #34c77b;
  border: 1px solid rgba(52, 199, 123, 0.35);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  white-space: nowrap;
}
.badge-pro {
  display: inline-block;
  background: rgba(100, 149, 237, 0.15);
  color: #6495ed;
  border: 1px solid rgba(100, 149, 237, 0.35);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  white-space: nowrap;
}
.order-status {
  display: inline-block;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 9px;
}
.order-status.paid { background: rgba(46, 204, 143, 0.15); color: var(--green); }
.order-status.pending { background: rgba(246, 196, 83, 0.15); color: var(--gold); }
.plan-badge {
  display: inline-block;
  background: rgba(53, 208, 242, 0.12);
  color: var(--cyan);
  border: 1px solid rgba(53, 208, 242, 0.35);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 3px 12px;
}
.empty-cell { text-align: center; color: var(--muted); padding: 26px 0 !important; }

/* 支付页 */
.pay-type-switch { display: flex; gap: 10px; justify-content: center; margin: 22px 0 4px; }
.pay-type-btn {
  display: inline-block;
  padding: 8px 22px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s ease;
}
.pay-type-btn:hover { color: var(--text); border-color: var(--border-light); }
.pay-type-btn.active { background: var(--cyan); border-color: var(--cyan); color: #06121f; }
.pay-type-btn.disabled { opacity: 0.55; cursor: not-allowed; }
.pay-type-btn.disabled small { font-weight: 400; font-size: 11px; }
.error-text { color: var(--red); }

/* ============ 控制台 ============ */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 28px; }
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
}
.stat-label { color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text); }
.stat-hint { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.stat-card-accent {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  border-left: 3px solid var(--cyan);
}
.stat-card-live {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  border-left: 3px solid #10b981;
}
.live-indicator::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  margin-right: 6px;
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}.plan-badge {
  display: inline-block;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 12px;
}
.plan-free { background: rgba(143, 163, 191, 0.15); color: var(--muted); border: 1px solid rgba(143, 163, 191, 0.35); }
.plan-pro { background: rgba(246, 196, 83, 0.14); color: var(--gold); border: 1px solid rgba(246, 196, 83, 0.4); }
.plan-enterprise { background: rgba(53, 208, 242, 0.12); color: var(--cyan); border: 1px solid rgba(53, 208, 242, 0.4); }

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 26px;
  margin-bottom: 28px;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.panel-head h2 { font-size: 19px; }
.muted-text { color: var(--muted); font-size: 13px; }

.key-list { display: flex; flex-direction: column; gap: 12px; }
.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 13px 16px;
  flex-wrap: wrap;
}
.key-cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.key-text { font-family: var(--mono); font-size: 14px; color: var(--cyan); word-break: break-all; }
.key-time { color: var(--muted); font-size: 12.5px; }
.empty-note { color: var(--muted); font-size: 14px; padding: 10px 0; }
.empty-note a { color: var(--cyan); }

.table-scroll { overflow-x: auto; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc-table th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}
.doc-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td code { color: var(--cyan); background: var(--surface-2); border-radius: 5px; padding: 1px 6px; font-size: 12.5px; }
.log-table td { font-family: var(--mono); font-size: 13px; }
.http-badge { font-weight: 700; padding: 2px 9px; border-radius: 999px; font-size: 12px; }
.http-ok { background: rgba(46, 204, 143, 0.12); color: var(--green); }
.http-err { background: rgba(255, 93, 108, 0.12); color: var(--red); }
.compare-table td:first-child { font-weight: 600; }

/* ============ 文档页 ============ */
.docs-layout { display: grid; grid-template-columns: 230px 1fr; gap: 44px; align-items: start; }
.docs-toc {
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
}
.docs-toc a {
  color: var(--muted);
  font-size: 13.5px;
  padding: 7px 12px;
  border-radius: 8px;
  border-left: 2px solid transparent;
}
.docs-toc a:hover { color: var(--cyan); background: var(--surface); }
.docs-toc a:target, .docs-toc a:hover { border-left-color: var(--gold); }

.docs-content { min-width: 0; }
.docs-content h2 {
  font-size: 23px;
  margin: 40px 0 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  scroll-margin-top: 90px;
}
.docs-content h2:first-child { border-top: 0; margin-top: 0; }
.docs-content p { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
.docs-content .note { font-size: 13.5px; }

.code-block {
  background: #0b111c;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  overflow-x: auto;
  margin: 14px 0 22px;
  font-size: 13px;
  line-height: 1.7;
  color: #c7d6ea;
  white-space: pre;
}

/* ============ 订阅页 ============ */
.subscribe-wrap { max-width: 560px; margin: 0 auto; }
.subscribe-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 36px 34px;
}
.subscribe-card h1 { font-size: 26px; margin-bottom: 22px; }
.order-summary { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.order-row { display: flex; justify-content: space-between; align-items: center; font-size: 15px; padding-bottom: 10px; border-bottom: 1px dashed var(--border); }
.order-row span { color: var(--muted); }
.order-price { color: var(--gold); font-size: 22px; }
.order-price small { font-size: 13px; color: var(--muted); }
.qr-area { text-align: center; }
.qr-title { font-size: 15px; font-weight: 600; margin-bottom: 18px; }
.qr-box {
  display: inline-block;
  background: #fff;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.qr-hint { color: var(--muted); font-size: 13px; margin-bottom: 18px; }
.qr-paid { padding: 26px 0; }
.qr-paid p { color: var(--muted); margin: 12px 0 18px; }
.qr-paid svg { margin: 0 auto; }

/* ============ 错误页 ============ */
.error-page { text-align: center; padding: 100px 0; }
.error-code {
  font-size: 90px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--cyan));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.error-text { color: var(--muted); font-size: 17px; margin: 10px 0 28px; }

/* ============ FAQ ============ */
.faq { margin-top: 40px; max-width: 760px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 12px;
}
.faq summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--text); }
.faq p { color: var(--muted); font-size: 14px; margin-top: 10px; }

.compare-wrap { margin-top: 44px; }

/* ============ 响应式 ============ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .api-grid, .pricing-grid, .steps, .metrics-grid { grid-template-columns: 1fr; }
  .metrics-grid { gap: 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .docs-layout { grid-template-columns: 1fr; gap: 28px; }
  .docs-toc { position: static; max-height: none; flex-direction: row; flex-wrap: wrap; }
  .docs-toc a { border-left: 0; border-bottom: 2px solid transparent; }
  .auth-wrap { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }

  /* 防止含长内容的网格项把页面撑出横向滚动 */
  .hero-inner > *,
  .api-card,
  .step,
  .price-card,
  .metric-card,
  .stat-card,
  .docs-toc { min-width: 0; }
}

@media (max-width: 640px) {
  .container { padding: 0 16px; }

  /* 顶部导航折叠 */
  .header-inner { height: 56px; gap: 8px; }
  .brand-text { font-size: 18px; }
  .site-nav {
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(10, 14, 23, 0.98);
    flex-direction: column;
    gap: 0;
    padding: 10px 16px 14px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.45);
    display: none;
    max-height: calc(100vh - 56px);
    overflow-y: auto;
  }
  .site-nav.open { display: flex; }
  .site-nav a { display: block; padding: 10px 4px; font-size: 15px; }
  .site-nav a::after { display: none; }
  .nav-mobile-only { display: block; }
  .nav-divider { border-top: 1px solid var(--border); margin: 8px 0 2px; }
  .nav-logout-form { margin: 0; }
  .nav-toggle { display: block; }
  .nav-user { display: none; }
  .header-actions .btn-ghost { display: none; }

  /* 间距与字号 */
  .section { padding: 48px 0; }
  .section-head { margin-bottom: 32px; }
  .section-head h2 { font-size: 26px; }
  .section-subtitle { font-size: 19px; }
  .hero { padding: 44px 0 48px; }
  .hero-sub { font-size: 15px; }
  .hero-cta { flex-direction: column; align-items: stretch; gap: 10px; }
  .hero-cta .btn { width: 100%; }
  .hero-terminal .term-bar { padding: 9px 12px; }
  .hero-terminal .term-body { padding: 16px 14px 18px; font-size: 12px; min-height: 240px; }
  .metric-card { padding: 22px 16px; }
  .metric-value { font-size: 22px; }
  .page-hero { padding: 44px 0 28px; }
  .page-hero h1 { font-size: 30px; }
  .cta-inner h2 { font-size: 24px; }
  .cta-band { padding: 48px 0; }
  .error-page { padding: 64px 0; }
  .error-code { font-size: 68px; }

  /* 卡片 */
  .api-card { padding: 22px 18px; }
  .step { padding: 24px 20px; }
  .price-card { padding: 24px 20px; }
  .price-amount { font-size: 36px; }
  .price-card .btn { width: 100%; }
  .panel { padding: 20px 16px; }
  .subscribe-card { padding: 26px 20px; }
  .subscribe-card h1, .auth-card h1 { font-size: 22px; }
  .auth-card { padding: 28px 20px; }
  .auth-form input { font-size: 16px; }
  .auth-section { padding: 48px 0; }
  .faq details { padding: 14px 16px; }

  /* 表格：移动端在容器内横向滑动 */
  .table-scroll {
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .table-scroll::-webkit-scrollbar { height: 6px; }
  .table-scroll::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
  .doc-table th, .doc-table td { padding: 9px 10px; }

  /* 代码块 */
  .code-block { padding: 12px 14px; font-size: 12px; }

  /* 文档目录：移动端改为可横向滑动的标签条 */
  .docs-layout { gap: 20px; }
  .docs-toc {
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    margin: 0 -16px;
    padding: 4px 16px 10px;
  }
  .docs-toc a {
    flex: none;
    white-space: nowrap;
    border: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
  }
  .docs-toc a:hover, .docs-toc a:target {
    border-color: var(--cyan);
    color: var(--cyan);
    background: rgba(53, 208, 242, 0.08);
  }
  .docs-content h2 { font-size: 20px; scroll-margin-top: 72px; }

  /* 统计卡片 */
  .stat-grid { grid-template-columns: 1fr; gap: 14px; }
  .stat-value { font-size: 22px; }

  /* 页脚 */
  .footer-inner { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { padding: 16px; }
  .footer-bottom p { font-size: 12px; }
}

@media (max-width: 480px) {
  .brand-text { font-size: 17px; }
  .header-actions { gap: 6px; }
  .header-actions .btn-sm { padding: 7px 10px; }
  .hero h1 { font-size: 30px; }
  .hero-badge { font-size: 12px; padding: 5px 10px; }
  .section-head h2 { font-size: 24px; }
  .page-hero h1 { font-size: 27px; }
  .error-code { font-size: 56px; }
  .qr-box { padding: 10px; }
  .qr-box img { max-width: 100%; height: auto; }
  .order-row { flex-direction: column; align-items: flex-start; gap: 2px; }
  .panel-head { flex-direction: column; align-items: flex-start; }
  .dashboard-head { flex-direction: column; align-items: stretch; }
  .dashboard-head .btn { width: 100%; }
  .admin-search { align-items: stretch; }
  .admin-search input, .admin-search select { flex: 1 1 100%; }
  .admin-search .btn { width: 100%; }
}

/* ---- 管理后台：用户套餐修改 ---- */
.plan-edit-form { display: inline-flex; gap: 6px; align-items: center; }
.plan-edit-form .plan-select {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  padding: 5px 8px;
  outline: none;
  font-family: inherit;
  max-width: 110px;
}
.plan-edit-form .plan-select:focus { border-color: var(--cyan); }
.plan-edit-block { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 20px; }
.plan-edit-block .plan-select { max-width: 160px; }
.plan-expire-input {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  padding: 5px 10px;
  outline: none;
  font-family: inherit;
  width: 230px;
}
.plan-expire-input:focus { border-color: var(--cyan); }

/* ---- 企业版限时优惠 ---- */
.price-card-sale {
  border-color: rgba(255, 93, 108, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 93, 108, 0.25), 0 18px 44px rgba(255, 93, 108, 0.10);
  background: linear-gradient(180deg, rgba(255, 93, 108, 0.06), var(--surface) 45%);
  animation: sale-border-pulse 2s ease-in-out infinite;
}
@keyframes sale-border-pulse {
  0%, 100% { border-color: rgba(255, 93, 108, 0.55); box-shadow: 0 0 0 1px rgba(255, 93, 108, 0.25), 0 18px 44px rgba(255, 93, 108, 0.10); }
  50% { border-color: rgba(255, 93, 108, 0.95); box-shadow: 0 0 0 2px rgba(255, 93, 108, 0.45), 0 18px 56px rgba(255, 93, 108, 0.22); }
}
.price-tag-sale {
  background: linear-gradient(135deg, #ff5d6c, #ff8a4c);
  color: #fff;
  animation: sale-tag-glow 1.6s ease-in-out infinite;
}
@keyframes sale-tag-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 93, 108, 0.55); }
  50% { box-shadow: 0 0 16px 4px rgba(255, 93, 108, 0.45); }
}
.price-old {
  font-size: 24px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: line-through;
  margin-right: 10px;
  opacity: 0.75;
}
.price-now {
  font-size: 44px;
  font-weight: 800;
  color: var(--red);
  background: linear-gradient(135deg, #ff5d6c, #ff8a4c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: price-now-breathe 2s ease-in-out infinite;
}
@keyframes price-now-breathe {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.25); }
}
.btn-sale {
  background: linear-gradient(135deg, #ff5d6c 0%, #ff8a4c 100%);
  color: #fff;
  box-shadow: 0 4px 18px rgba(255, 93, 108, 0.35);
}
.btn-sale:hover { color: #fff; box-shadow: 0 6px 24px rgba(255, 93, 108, 0.5); }

/* ============ 联系我们 / 在线客服 ============ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 36px;
  align-items: start;
  max-width: 1020px;
  margin: 0 auto;
}
.contact-info, .contact-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 30px 32px;
}
.contact-info h2, .contact-form-card h2 {
  font-size: 22px;
  margin-bottom: 8px;
}
.contact-intro { color: var(--muted); font-size: 14.5px; margin-bottom: 22px; line-height: 1.7; }
.contact-list { list-style: none; display: flex; flex-direction: column; gap: 18px; }
.contact-list li { display: flex; align-items: flex-start; gap: 14px; }
.contact-ico {
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  flex: none;
}
.contact-label { font-size: 13px; color: var(--muted); margin-bottom: 2px; }
.contact-value { font-size: 15.5px; font-weight: 600; color: var(--text); word-break: break-all; }
.contact-value a { color: var(--cyan); font-weight: 600; }
.contact-hours {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}
.contact-hours h3 { font-size: 16px; margin-bottom: 10px; }
.contact-hours p { color: var(--muted); font-size: 14px; line-height: 1.9; }
.contact-hours .hours-note { font-size: 13px; color: var(--muted-2, #8fa3bf); }
/* 表单 textarea 复用输入框样式 */
.contact-form textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  padding: 11px 14px;
  margin-bottom: 18px;
  outline: none;
  transition: border-color 0.15s ease;
  font-family: inherit;
  resize: vertical;
  min-height: 120px;
}
.contact-form textarea:focus { border-color: var(--cyan); }
@media (max-width: 820px) {
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-info, .contact-form-card { padding: 24px 20px; }
}
/* 后台：联系设置 / 留言 */
.settings-form { max-width: 640px; }
.settings-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.settings-hint { font-size: 12.5px; color: var(--muted); margin: -10px 0 16px; }
.msg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.msg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
}
.msg-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.msg-name { font-size: 15px; font-weight: 700; }
.msg-meta { font-size: 12.5px; color: var(--muted); }
.msg-subject { font-size: 13.5px; color: var(--cyan); margin-bottom: 8px; font-weight: 600; }
.msg-body { font-size: 14px; line-height: 1.7; color: var(--text); white-space: pre-wrap; margin-bottom: 12px; }
.msg-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.msg-del-btn {
  background: none; border: 1px solid var(--border); color: var(--muted);
  border-radius: 8px; padding: 5px 12px; font-size: 13px; cursor: pointer;
}
.msg-del-btn:hover { border-color: #ff5d6c; color: #ff5d6c; }
