/* =====================================================================
 * Foliage v1.0 — components.css
 * BEM 组件库: 按钮 / 卡片 / 徽章 / 表单 / 价格 / Header/Footer
 *            信号卡 / 加载骨架 / FAB / Callout / Modal / Hero
 * 基于 v0.9.72 components.css · 搬运 + 精简 · 2026-06-11
 *
 * v1.0 调整:
 *   - 删除 PWA Install Banner (已砍功能)
 *   - 卡片 padding: var(--space-6) → var(--space-7)
 *   - 按钮 hover: translateY(-1px) → translateY(-1.5px)
 *   - 所有硬编码 hex 替换为 Token
 * ===================================================================== */

/* =====================================================================
 * §1 按钮
 * ===================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-button);
  font-family: inherit;
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}
.btn:disabled, .btn[aria-disabled="true"] {
  opacity: 0.5; cursor: not-allowed; pointer-events: none;
}

/* Primary */
.btn-primary {
  background: var(--bg-button-primary);
  color: var(--text-inverse);
  box-shadow: 0 2px 8px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--bg-button-primary-hover);
  transform: translateY(-1.5px);
  box-shadow: 0 4px 16px var(--accent-glow);
  text-decoration: none;
  color: var(--text-inverse);
}
.btn-primary:active { transform: translateY(0); }

/* Secondary */
.btn-secondary {
  background: var(--bg-button-secondary);
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover {
  background: var(--surface-3);
  border-color: var(--accent);
  text-decoration: none;
  color: var(--text);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn-ghost:hover {
  background: var(--surface-2);
  color: var(--text);
  text-decoration: none;
}

/* Danger */
.btn-danger {
  background: var(--red);
  color: var(--text-inverse);
}
.btn-danger:hover {
  background: #ef4444;
  text-decoration: none;
  color: var(--text-inverse);
}

/* Sizes */
.btn-sm { padding: 6px 12px; font-size: var(--text-sm); }
.btn-lg { padding: 14px 28px; font-size: var(--text-md); }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; }


/* =====================================================================
 * §2 卡片
 * ===================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: var(--space-7);   /* v1.0: 24px → 28px */
  transition: all var(--transition);
  position: relative;
}
.card:hover {
  transform: translateY(-2px);         /* v1.0: 新增 hover 微动效 */
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.card-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: var(--text-link);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.card-subtitle {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}
.card-body { color: var(--text); }
.card-footer {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 卡片变体 */
.card-glass {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-color: var(--glass-border);
}
.card-glow:hover {
  box-shadow: var(--shadow-glow);
}
.card-elevated {
  box-shadow: var(--shadow-md);
}
.card-flat {
  background: var(--surface-2);
  border: none;
}


/* =====================================================================
 * §3 徽章 / 标签
 * ===================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  background: var(--surface-2);
  color: var(--text-muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge-primary { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
/* DOCS-002 V1 修复: badge 业务状态色 (CN 风格: 成功=绿, 危险=红)
   注意: 不破坏 .badge-up/.badge-down (CN 涨跌色) */
.badge-success { background: var(--badge-success-bg); color: var(--badge-success); border-color: var(--badge-success); }
.badge-danger  { background: var(--badge-danger-bg);  color: var(--badge-danger);  border-color: var(--badge-danger); }
.badge-warning { background: var(--badge-warning-bg); color: var(--badge-warning); border-color: var(--badge-warning); }
.badge-info    { background: var(--badge-info-bg);    color: var(--badge-info);    border-color: var(--badge-info); }
.badge-up      { background: var(--up-bg); color: var(--up-color); }
.badge-down    { background: var(--down-bg); color: var(--down-color); }
.badge-pro     { background: linear-gradient(135deg, var(--yellow), var(--orange)); color: #000; }
.badge-deep    { background: linear-gradient(135deg, #a78bfa, #7c3aed); color: #fff; } /* 深度分析 紫色渐变 */
.badge-enterprise { background: linear-gradient(135deg, var(--purple), var(--accent)); color: var(--text-inverse); }


/* =====================================================================
 * §4 表单
 * ===================================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.form-label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--text-muted);
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: var(--text-base);
  transition: all var(--transition-fast);
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-dim); }
.form-hint  { font-size: var(--text-xs); color: var(--text-dim); margin-top: 2px; }
.form-error { color: var(--red); font-size: var(--text-xs); margin-top: 2px; }


/* =====================================================================
 * §5 价格 / 涨跌
 * ===================================================================== */
.price {
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-semibold);
}
.price-up      { color: var(--up-color); }
.price-down    { color: var(--down-color); }
.price-neutral { color: var(--text); }

.price-chip {
  display: inline-flex;
  align-items: center; gap: 4px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.price-chip.profit { color: #b91c1c; border-color: #fca5a5; background: #fee2e2; }
.price-chip.stop   { color: #15803d; border-color: #86efac; background: #dcfce7; }
[data-theme="dark"] .price-chip.profit { color: #fca5a5; border-color: #b91c1c; background: rgba(185,28,28,0.15); }
[data-theme="dark"] .price-chip.stop   { color: #86efac; border-color: #15803d; background: rgba(21,128,61,0.15); }

.change-row {
  display: flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums;
}
.change-row .arrow { font-size: 0.75em; font-weight: bold; }
.change-row.up   { color: var(--up-color); }
.change-row.down { color: var(--down-color); }


/* =====================================================================
 * §6 Header / Footer
 * ===================================================================== */
.site-header {
  position: sticky; top: 0; z-index: var(--z-sticky);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
  display: flex; align-items: center;
}
[data-theme="light"] .site-header {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.site-header .inner {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-6);
}

.brand-link {
  display: flex; align-items: center; gap: var(--space-2);
  text-decoration: none;
  font-weight: var(--weight-bold);
  font-size: var(--text-lg);
  color: var(--text);
  transition: opacity var(--transition-fast);
}
.brand-link:hover { opacity: 0.85; text-decoration: none; }
/* 移动端 logo-only 模式: 隐藏品牌文字,logo 居左 */
.brand-link.mobile-logo-only {
  gap: 0;
}
.brand-link.mobile-logo-only .logo {
  width: 36px;
  height: 36px;
}
.brand-link .logo { width: 32px; height: 32px; }
.brand-link .brand-text-zh {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.brand-link .brand-text-en {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: var(--weight-medium);
}

.site-nav {
  display: flex; align-items: center; gap: var(--space-1);
}
.nav-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  text-decoration: none;
  transition: all var(--transition-fast);
  cursor: pointer;
}
.nav-item:hover {
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
}
.nav-item.active {
  color: var(--accent);
  background: var(--accent-soft);
}
/* 卡片内 icon + title 同行居中 */
.card-body-centered {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}
.card-icon-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  justify-content: center;
}
.card-icon-title .card-title {
  margin: 0;
  font-weight: 600;
  white-space: nowrap;
}


.beta-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  margin-right: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(245,158,11,0.04));
  border: 1px solid rgba(245,158,11,0.25);
  color: var(--yellow, #f59e0b);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: help;
  transition: all var(--transition-fast);
  user-select: none;
}
.beta-badge:hover {
  background: linear-gradient(135deg, rgba(245,158,11,0.18), rgba(245,158,11,0.08));
  border-color: rgba(245,158,11,0.4);
}
.beta-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--yellow, #f59e0b);
  box-shadow: 0 0 0 0 rgba(245,158,11,0.7);
  animation: beta-pulse 2s infinite;
  flex-shrink: 0;
}
@keyframes beta-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(245,158,11,0.7); }
  70%  { box-shadow: 0 0 0 6px rgba(245,158,11,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
}
.nav-item.pro {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}


/* =====================================================================
 * §6.5 Mobile Nav (汉堡菜单 + 抽屉) — MOBILE-001 Batch 1
 * ≤1024px 折叠,>1024px 保持横排
 * ===================================================================== */
.mobile-nav-toggle {
  display: none; /* 默认隐藏,JS 启用后按断点控制 */
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  cursor: pointer;
  margin-left: var(--space-2);
  transition: all var(--transition-fast);
}
.mobile-nav-toggle:hover {
  background: var(--surface-2);
  border-color: var(--accent);
}
.mobile-nav-toggle .icon { width: 20px; height: 20px; }

.mobile-nav-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-sticky) + 1);
  opacity: 0;
  transition: opacity 0.2s ease;
}
.mobile-nav-backdrop.open {
  display: block;
  opacity: 1;
}

.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 280px;
  max-width: 80vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: calc(var(--z-sticky) + 2);
  padding: var(--space-6) var(--space-4);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.2);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mobile-nav-drawer.open {
  display: block;
  transform: translateX(0);
}
.mobile-nav-drawer .site-nav {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-1);
}
.mobile-nav-drawer .beta-badge {
  margin: 0 0 var(--space-3) 0;
  align-self: flex-start;
}
.mobile-nav-drawer .nav-item {
  width: 100%;
  padding: 14px 16px;
  font-size: var(--text-base);
  min-height: 48px;
  border-radius: var(--radius-md);
  justify-content: flex-start;
}

/* =====================================================================
 * §6.6 Bottom Tab Bar (手机底部导航) — MOBILE-001 复盘
 * ≤1024px 显示,固定底部,图标+两字
 * ===================================================================== */
.bottom-tab-bar {
  display: none; /* 默认隐藏,JS 在 ≤1024px 启用 */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-sticky);
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 0;
  padding-bottom: env(safe-area-inset-bottom, 0);
  justify-content: space-around;
  align-items: stretch;
  /* 60px 高度(含 safe-area),4 等分 */
  height: calc(56px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
}
.bottom-tab-bar .tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px;
  min-height: 48px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}
.bottom-tab-bar .tab-item:active {
  background: rgba(91, 154, 255, 0.06);
}
.bottom-tab-bar .tab-item.active {
  color: var(--accent);
}
.bottom-tab-bar .tab-icon {
  width: 22px;
  height: 22px;
  stroke-width: 1.75;
  flex-shrink: 0;
}
.bottom-tab-bar .tab-label {
  line-height: 1;
  font-size: 10px;
}

.site-footer {
  margin-top: var(--space-16);
  padding: var(--space-10) var(--space-6) var(--space-6);
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* Risk banner (顶部红色提示) — MOBILE-001 Batch 1 */
.risk-banner {
  font-size: 0.8125rem;
  letter-spacing: 0.01em;
  padding: 6px 16px;
}
@media (max-width: 1024px) {
  .risk-banner {
    padding: 8px 12px;
    font-size: 0.75rem;
    line-height: 1.4;
  }
  .risk-banner .icon { width: 14px; height: 14px; }
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.site-footer a:hover { color: var(--accent); }
.site-footer .footer-meta {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: var(--space-2) var(--space-3);
  margin-bottom: var(--space-3);
}

/* Mobile footer (≤1024px) — MOBILE-001 Batch 1 */
@media (max-width: 1024px) {
  .site-footer {
    margin-top: var(--space-10);
    padding: var(--space-8) var(--space-3) calc(var(--space-5) + env(safe-area-inset-bottom, 0px));
  }
  .site-footer p { font-size: var(--text-xs); }
  .site-footer .footer-meta a { padding: 4px 8px; min-height: 32px; display: inline-flex; align-items: center; }
  /* main 内容区底部留出 Tab Bar 空间 (56px + safe-area) */
  #main-content {
    padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  }
  /* 移动端: 隐藏桌面端 nav 和 site-header,仅底部 Tab Bar 生效 */
  .site-nav,
  .site-header {
    display: none !important;
  }
  /* 底部 Tab Bar: 始终显示 */
  .bottom-tab-bar {
    display: flex !important;
  }
}

/* =====================================================================
 * §6.7 更多抽屉 (Bottom Sheet) — MOBILE-001 复盘
 * ===================================================================== */
.more-sheet {
  /* 不使用 display:none/flex 切换 — visibility 可参与 transition，实现真正的"动画后隐藏" */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-sticky) + 2);
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  padding: 0 0 calc(16px + env(safe-area-inset-bottom, 0px)) 0;
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.25);
  /* 关闭状态：隐藏 + 滑出底部 */
  visibility: hidden;
  opacity: 0;
  transform: translateY(100%);
  /* transform 先完成，visibility 在 0.25s 后才变为 visible（动画结束后才可聚焦） */
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1),
              opacity 0.25s ease 0.05s,
              visibility 0.25s ease 0.05s;
}
.more-sheet.open {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
}
.more-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.more-sheet-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}
.more-sheet-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: none;
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}
.more-sheet-close svg {
  width: 16px;
  height: 16px;
}
.more-sheet-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
}
.more-sheet-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 12px;
  min-height: 48px;
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: var(--text-base);
  text-decoration: none;
  transition: background 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.more-sheet-link:active {
  background: var(--surface-2);
}
.more-sheet-link svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  flex-shrink: 0;
}
.more-sheet-link-text {
  flex: 1;
}
.more-sheet-link-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 1px;
}
.more-sheet-backdrop {
  /* backdrop 始终渲染，用 opacity 控制显示 — 配合 sheet 的 visibility */
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-sticky) + 1);
  background: rgba(0, 0, 0, 0.4);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.more-sheet-backdrop.open {
  visibility: visible;
  opacity: 1;
}


/* =====================================================================
 * §7 信号卡
 * ===================================================================== */
.signal-card {
  text-align: center;
  padding: var(--space-8) var(--space-6);
}
.signal-badge {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-size: var(--text-2xl);
  font-weight: var(--weight-black);
  letter-spacing: 1px;
  margin-bottom: var(--space-4);
}
.signal-badge.buy, .signal-badge.strong-buy {
  background: var(--up-bg); color: var(--up-color);
}
.signal-badge.sell, .signal-badge.strong-sell {
  background: var(--down-bg); color: var(--down-color);
}
.signal-badge.hold, .signal-badge.neutral {
  background: rgba(251, 191, 36, 0.15); color: var(--yellow);
}
.signal-score {
  font-size: var(--text-6xl);
  font-weight: var(--weight-black);
  line-height: 1;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: var(--space-2) 0;
}


/* =====================================================================
 * §8 状态插画
 * ===================================================================== */
.state-illustration {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-4);
  padding: var(--space-10);
  text-align: center;
}
.state-illustration img {
  max-width: 280px; width: 100%; height: auto;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.3));
}
.state-illustration h3 { color: var(--text); margin-bottom: var(--space-2); }
.state-illustration p  { color: var(--text-muted); margin-bottom: var(--space-4); max-width: 400px; }


/* =====================================================================
 * §9 加载骨架
 * ===================================================================== */
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}
.skeleton-text  { height: 14px; margin-bottom: var(--space-2); }
.skeleton-title { height: 24px; width: 60%; margin-bottom: var(--space-3); }
.skeleton-card  { height: 80px; margin-bottom: var(--space-3); }
.skeleton-chart { height: 200px; }

.skeleton-row {
  display: flex; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.skeleton-row > .cell {
  flex: 1; height: 14px;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-sm);
}

/* Spinner */
@keyframes spin { to { transform: rotate(360deg); } }
.spinner {
  display: inline-block; width: 16px; height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }


/* =====================================================================
 * §10 动效
 * ===================================================================== */
@keyframes pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.02); }
}
@keyframes fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes glow {
  0%, 100% { box-shadow: 0 0 16px var(--accent-glow); }
  50%      { box-shadow: 0 0 32px var(--accent-glow); }
}
.animate-fade-in { animation: fade-in 0.4s var(--transition-spring) both; }
.animate-pulse   { animation: pulse 1.5s ease-in-out infinite; }
.animate-glow    { animation: glow 2s ease-in-out infinite; }


/* =====================================================================
 * §11 浮动按钮 (FAB)
 * ===================================================================== */
.fab {
  position: fixed; bottom: 24px;
  width: 48px; height: 48px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
  font-size: var(--text-lg);
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  z-index: var(--z-fixed);
  transition: all var(--transition);
}
.fab:hover {
  transform: scale(1.08);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: var(--shadow-glow);
}
.fab.fab-primary {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
}
.fab.fab-primary:hover { background: var(--accent-hover); color: var(--text-inverse); }

.fab-theme  { right: 24px; bottom: 24px; }
.fab-scheme { right: 24px; bottom: 84px; }
.fab-top    { right: 24px; bottom: 144px; opacity: 0; pointer-events: none; transition: opacity var(--transition); }
.fab-top.show { opacity: 1; pointer-events: auto; }


/* =====================================================================
 * §12 Callout / Banner
 * ===================================================================== */
.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: var(--leading-relaxed);
}
.callout-success { background: var(--up-bg); border-left-color: var(--color-success, #16a34a); }
.callout-warning { background: rgba(251, 191, 36, 0.1); border-left-color: var(--yellow); }
.callout-danger  { background: var(--down-bg); border-left-color: var(--down-color); }
.callout-info    { background: var(--accent-soft); border-left-color: var(--accent); }


/* =====================================================================
 * §13 Hero Section — 现代 SaaS 玻璃态视觉
 *
 * 设计层次：
 *   1. 背景层 (.hero-bg)：径向渐变 + 浮动光球 ×3 + 网格图案 + 顶部遮罩
 *   2. 内容层 (.hero-content)：徽章 / 主标题 / 副标题 / 搜索 / 模式 / 信任行
 *   3. 交互：focus 发光 / hover 上浮 / 渐入动画
 *
 * 性能：动画仅用 transform / opacity（GPU 加速）
 * 主题：深色为主，Light 通过 token 自动覆盖
 * ===================================================================== */

/* ---- 13.1 容器 + 背景层 ---- */
.hero-section {
  position: relative;
  overflow: hidden;
  /* 基础径向渐变（深色基调，从顶部中心向四周扩散） */
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%,
                    rgba(91, 154, 255, 0.18) 0%,
                    rgba(167, 139, 250, 0.08) 35%,
                    transparent 70%),
    linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
  padding: var(--space-16) var(--space-6) var(--space-12);
  isolation: isolate; /* 让 z-index 在此作用域内 */
}

/* 装饰层容器，absolute 铺满 */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1; /* 沉到内容下方 */
  pointer-events: none;
  overflow: hidden;
}

/* 浮动光球：3 个不同色相的模糊圆 */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  will-change: transform;
}
.hero-orb-1 {
  width: 480px; height: 480px;
  top: -120px; left: -120px;
  background: radial-gradient(circle, rgba(91, 154, 255, 0.55), transparent 70%);
  animation: heroOrbFloat1 12s ease-in-out infinite alternate;
}
.hero-orb-2 {
  width: 420px; height: 420px;
  top: 20%; right: -100px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.45), transparent 70%);
  animation: heroOrbFloat2 14s ease-in-out infinite alternate;
}
.hero-orb-3 {
  width: 360px; height: 360px;
  bottom: -80px; left: 30%;
  background: radial-gradient(circle, rgba(52, 211, 153, 0.30), transparent 70%);
  animation: heroOrbFloat3 16s ease-in-out infinite alternate;
}

/* 网格图案：用双层 linear-gradient 模拟 1px 网格线 */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  /* 顶部淡出，避免网格线过于抢眼 */
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 30%, rgba(0,0,0,0.4) 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 30%, rgba(0,0,0,0.4) 70%, transparent 100%);
}

/* 顶部渐变遮罩：柔化上边缘，避免与导航栏生硬衔接 */
.hero-fade-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(180deg, var(--bg) 0%, transparent 100%);
  opacity: 0.6;
}

/* ---- 13.2 内容布局 ---- */
.hero-content {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-5);
}

/* ---- 13.3 顶部徽章 ---- */
.hero-badge-group {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  justify-content: center;
  animation: heroFadeIn 0.6s ease-out both;
  cursor: help;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px 6px 12px;
  border-radius: var(--radius-full);
  background: rgba(91, 154, 255, 0.08);
  border: 1px solid rgba(91, 154, 255, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: var(--text-sm);
  color: var(--accent-hover);
  font-weight: var(--weight-medium);
  letter-spacing: 0.01em;
}
.hero-badge-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
  animation: heroBadgePulse 2s ease-in-out infinite;
}
/* 灰度测试徽章 (首页 hero, 强调) */
.hero-badge-beta {
  background: linear-gradient(135deg, rgba(245,158,11,0.12), rgba(245,158,11,0.04));
  border: 1px solid rgba(245,158,11,0.35);
  color: var(--yellow, #f59e0b);
  font-weight: 600;
}
.hero-badge-dot-pulse {
  background: var(--yellow, #f59e0b);
  box-shadow: 0 0 0 0 rgba(245,158,11,0.6);
  animation: heroBadgeDotPulse 1.8s ease-in-out infinite;
}
@keyframes heroBadgeDotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(245,158,11,0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(245,158,11,0); }
  100% { box-shadow: 0 0 0 0 rgba(245,158,11,0); }
}

/* ---- 13.4 主标题 ---- */
.hero-title {
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: var(--weight-black);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  text-shadow: 0 2px 24px rgba(91, 154, 255, 0.15);
  animation: heroFadeInUp 0.7s ease-out 0.1s both;
}
.hero-title-line { display: block; }
.hero-title-accent {
  font-size: 0.6em;
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  -webkit-text-fill-color: var(--text-muted);
  letter-spacing: -0.01em;
}

/* ---- 13.5 副标题 ---- */
.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 640px;
  animation: heroFadeInUp 0.7s ease-out 0.2s both;
}

/* ---- 13.6 搜索框：玻璃态 + 焦点发光 ---- */
.hero-search {
  width: 100%;
  max-width: 720px;
  display: flex;
  gap: var(--space-3);
  align-items: stretch;
  padding: 6px;
  border-radius: var(--radius-lg);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow-md);
  transition: border-color var(--transition), box-shadow var(--transition);
  animation: heroFadeInUp 0.7s ease-out 0.3s both;
}
.hero-search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow-lg), var(--shadow-glow);
}
.hero-search-input {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: center;
}
.hero-search-icon {
  position: absolute;
  left: 18px;
  color: var(--text-dim);
  pointer-events: none;
  z-index: 1;
  transition: color var(--transition);
}
.hero-search:focus-within .hero-search-icon { color: var(--accent); }

.hero-search-input .form-input-lg {
  width: 100%;
  font-size: var(--text-lg);
  padding: 14px 18px 14px 50px;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-weight: 600;
}
.hero-search-input .form-input-lg::placeholder {
  color: var(--text-dim);
  font-weight: 500;
}

.ticker-suggestions {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: var(--z-dropdown);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-height: 280px;
  overflow-y: auto;
  width: 100%;
  font-size: var(--text-sm);
  box-shadow: var(--shadow-lg);
  text-align: left;
}
.ticker-suggestions.active { display: block; }
.ticker-suggestions .suggestion-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--transition-fast);
}
.ticker-suggestions .suggestion-item:last-child { border-bottom: 0; }
.ticker-suggestions .suggestion-item:hover { background: var(--surface-2); }

/* 主按钮在玻璃容器内的样式微调 */
.hero-search .btn {
  border-radius: calc(var(--radius-lg) - 6px);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  white-space: nowrap;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.hero-search .btn-primary {
  background: var(--gradient);
  background-color: var(--accent-btn);
  box-shadow: 0 4px 12px rgba(91, 154, 255, 0.25);
}
.hero-search .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(91, 154, 255, 0.45);
  background: var(--gradient);
  filter: brightness(1.08);
}
.hero-search .btn-primary:active { transform: translateY(0); }

/* ---- 13.7 模式选择 pill ---- */
.report-mode-pills {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-2);
  padding: 2px 0;  /* 给 hover translateY(-1px) 留呼吸空间 */
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  animation: heroFadeInUp 0.7s ease-out 0.4s both;
}
.report-mode-pills::-webkit-scrollbar { display: none; }
.mode-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--weight-normal);
  cursor: pointer;
  transition: transform var(--transition),
              background var(--transition),
              color var(--transition),
              border-color var(--transition),
              box-shadow var(--transition);
  user-select: none;
}
.mode-pill:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}
.mode-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: var(--weight-medium);
  box-shadow: 0 4px 12px rgba(91, 154, 255, 0.35);
}
.mode-pill.active:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
/* 高级模式（Fib 旗舰）：金色配色，区分普通蓝 */
.mode-pill-premium {
  border-color: rgba(251, 191, 36, 0.35);
  color: var(--yellow);
}
.mode-pill-premium:hover {
  border-color: var(--yellow);
  color: var(--yellow);
  background: rgba(251, 191, 36, 0.08);
}
.mode-pill-premium.active {
  background: linear-gradient(135deg, var(--yellow) 0%, #f59e0b 100%);
  border-color: var(--yellow);
  color: #1a1d27;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}
.mode-pill-premium.active:hover {
  background: linear-gradient(135deg, #fcd34d 0%, var(--yellow) 100%);
  color: #1a1d27;
}

/* pill 上的 Token 价格标签 */
.pill-cost {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border-radius: var(--radius-full, 9999px);
  font-size: 10px;
  font-weight: var(--weight-semibold, 600);
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-dim);
  margin-left: 2px;
}
.mode-pill.active .pill-cost {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}
.mode-pill-premium.active .pill-cost {
  background: rgba(26, 29, 39, 0.2);
  color: #1a1d27;
}

/* 模式说明文字 */
.mode-desc {
  text-align: center;
  margin-top: var(--space-2);
  font-size: var(--text-xs, 12px);
  color: var(--text-muted);
  min-height: 18px;
  animation: heroFadeInUp 0.7s ease-out 0.5s both;
}
.mode-desc b {
  color: var(--text);
  font-weight: var(--weight-semibold, 600);
}
.mode-desc .text-accent {
  color: var(--accent);
  font-weight: var(--weight-semibold, 600);
}

/* ---- 13.8 信任行：核心指标 ---- */
.hero-trust {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  animation: heroFadeInUp 0.7s ease-out 0.5s both;
}
.hero-trust-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 70px;
  /* 渐入延迟错开（按 nth-child） */
  opacity: 0;
  animation: heroTrustFadeIn 0.6s ease-out forwards;
}
.hero-trust-item:nth-child(1) { animation-delay: 0.55s; }
.hero-trust-item:nth-child(3) { animation-delay: 0.65s; }
.hero-trust-item:nth-child(5) { animation-delay: 0.75s; }
.hero-trust-item:nth-child(7) { animation-delay: 0.85s; }
.hero-trust-num {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text);
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.hero-trust-label {
  font-size: var(--text-xs);
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.hero-trust-divider {
  width: 1px;
  height: 24px;
  background: var(--border);
  flex-shrink: 0;
  opacity: 0.6;
}

/* ---- 13.9 动画 keyframes ---- */
@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes heroFadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroTrustFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroBadgePulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
  50%      { box-shadow: 0 0 0 6px transparent; }
}
@keyframes heroOrbFloat1 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(60px, 40px) scale(1.1); }
}
@keyframes heroOrbFloat2 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-50px, 60px) scale(0.95); }
}
@keyframes heroOrbFloat3 {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(40px, -30px) scale(1.05); }
}

/* ---- 13.10 响应式 ---- */
@media (max-width: 768px) {
  .hero-section { padding: var(--space-10) var(--space-4) var(--space-8); }
  .hero-title   { font-size: clamp(1.75rem, 8vw, 2.25rem); }
  .hero-subtitle { font-size: var(--text-md); }
  .hero-search {
    flex-direction: column;
    padding: 8px;
    border-radius: var(--radius-md);
  }
  .hero-search .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 24px;
    border-radius: calc(var(--radius-md) - 4px);
  }
  .hero-trust {
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
  }
  .hero-trust-item { min-width: 60px; }
  .hero-trust-divider { display: none; }
  .hero-orb-1 { width: 300px; height: 300px; }
  .hero-orb-2 { width: 260px; height: 260px; }
  .hero-orb-3 { width: 220px; height: 220px; }
}

/* ---- 13.11 热门股快捷入口 ---- */
.hero-hot-stocks {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 4px;
  animation: heroFadeInUp 0.7s ease-out 0.5s both;
}
.hero-hot-stocks-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  color: var(--text-dim);
  font-weight: 500;
}
.hero-hot-stocks-label svg {
  color: var(--yellow);
}
.hero-hot-stocks-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.hot-stock-chip {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--text);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}
.hot-stock-chip:hover {
  background: rgba(91, 154, 255, 0.15);
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(91, 154, 255, 0.2);
}
.hot-stock-chip .hot-stock-code {
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.02em;
}
.hot-stock-chip .hot-stock-name {
  color: var(--text-muted);
  font-size: 0.8125rem;
}
.hot-stock-chip:hover .hot-stock-code {
  color: var(--accent-hover);
}
.hot-stock-chip:hover .hot-stock-name {
  color: var(--text);
}
@media (max-width: 768px) {
  .hero-hot-stocks {
    flex-direction: column;
    gap: 8px;
  }
}


/* =====================================================================
 * §14 Modal
 * ===================================================================== */
.modal-overlay-full {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: var(--scrim);
  z-index: var(--z-modal);
  display: none;
  align-items: center; justify-content: center;
  padding: var(--space-4);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.modal-overlay-full.show,
.modal-overlay-full[style*="display: flex"],
.modal-overlay-full[style*="display:flex"] {
  display: flex !important;
}
.modal-overlay-full .modal-close-btn {
  position: absolute; top: var(--space-3); right: var(--space-3);
  background: transparent; border: none;
  color: var(--text-muted); font-size: 1.2rem;
  cursor: pointer; padding: 4px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  line-height: 1; z-index: 1;
}
.modal-overlay-full .modal-close-btn:hover {
  background: var(--surface-2); color: var(--text);
}
.modal-overlay-full > .card {
  max-width: 500px; width: 90%;
  position: relative;
  animation: modal-fade-in 0.2s ease both;
  max-height: 90vh; overflow-y: auto;
}
@keyframes modal-fade-in {
  from { opacity: 0; transform: translateY(12px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* =====================================================================
 * §15 常用工具类
 * ===================================================================== */
.text-up           { color: var(--up-color); }
.text-down         { color: var(--down-color); }
.text-accent       { color: var(--text-link); }
.text-muted        { color: var(--text-muted); }
.text-dim          { color: var(--text-dim); }
.text-center       { text-align: center; }
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.mono        { font-family: var(--font-mono); }
.bold        { font-weight: var(--weight-bold); }
.semibold    { font-weight: var(--weight-semibold); }
.medium      { font-weight: var(--weight-medium); }
.hidden      { display: none !important; }
.w-full      { width: 100%; }
.cursor-pointer { cursor: pointer; }
.overflow-x-auto { overflow-x: auto; }


/* =====================================================================
 * §11 图标系统 (VISUAL-AUDIT-001)
 * 60 个 SVG 图标统一在 web/static/images/icons/
 * 规范: viewBox 24x24 + stroke=currentColor + stroke-width=1.5
 * 颜色通过 CSS color 控制 (主题自适应)
 * ===================================================================== */

/* 通用图标基类 */
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 尺寸修饰 */
.icon-xs { width: 12px; height: 12px; }
.icon-sm { width: 14px; height: 14px; }
.icon-md { width: 18px; height: 18px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 32px; height: 32px; }
.icon-2xl { width: 48px; height: 48px; }

/* 语义色修饰 (与 DESIGN.md §2.4 辅助色对齐) */
.icon-accent  { color: var(--accent); }
.icon-success { color: var(--success, #22c55e); }
.icon-danger  { color: var(--danger, #ef4444); }
.icon-warning { color: var(--warning, #f59e0b); }
.icon-muted   { color: var(--text-muted); }
.icon-dim     { color: var(--text-dim); }
.icon-purple  { color: var(--purple); }

/* 涨跌语义 (CN 默认) */
.icon-up   { color: var(--up-color, #ef4444); }
.icon-down { color: var(--down-color, #22c55e); }

/* 侧边栏/导航图标 */
.nav-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  color: var(--text-dim);
  flex-shrink: 0;
}
.nav-item.active .nav-item-icon,
.nav-item:hover .nav-item-icon {
  color: var(--accent);
}

/* KPI 卡图标 */
.kpi-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin-right: 6px;
  color: var(--accent);
  flex-shrink: 0;
}
.kpi-card.success .kpi-icon { color: var(--success, #22c55e); }
.kpi-card.danger .kpi-icon  { color: var(--danger, #ef4444); }
.kpi-card.warning .kpi-icon { color: var(--warning, #f59e0b); }

/* 卡片标题图标 (与 .card-title 配合) */
.card-title-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  color: var(--accent);
  flex-shrink: 0;
  vertical-align: -2px;
}

/* 徽章内图标 (badge 组件) */
.badge-icon {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-right: 4px;
  vertical-align: -1px;
}

/* 风险提示条 */
.risk-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
}

/* Inline 文本图标 (段落中内联) */
.inline-icon {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  vertical-align: -2px;
}

/* Hover 动画 (推荐用于导航/按钮) */
.icon-hover-up:hover { transform: translateY(-1px); transition: transform 0.15s; }

/* ========== 登录方式 Tab (auth.html) ========== */
.auth-tabs {
  border-bottom: 1px solid var(--border, rgba(255,255,255,0.08));
  margin-bottom: 16px;
}
.auth-tab {
  flex: 1;
  padding: 10px 12px;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--text-muted, rgba(255,255,255,0.6));
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: color 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
.auth-tab:hover { color: var(--text, rgba(255,255,255,0.85)); }
.auth-tab.active {
  color: var(--accent, #5b9aff);
  border-bottom-color: var(--accent, #5b9aff);
}
.auth-tab .icon { opacity: 0.8; }

/* =====================================================================
 * §Pricing 定价页 (OPT-001 2026-06-21: CSS 变量化 + 响应式)
 * ===================================================================== */

/* Hero */
.pricing-hero { text-align: center; padding: var(--space-10) var(--space-8) var(--space-5); }
.pricing-hero h1 { font-size: 1.8rem; margin: 0 0 var(--space-2); }
.pricing-hero-subtitle { margin: 0; max-width: 520px; margin-left: auto; margin-right: auto; }

/* 折扣 Banner */
.pricing-discount-banner {
  margin: 0 var(--space-8) var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: linear-gradient(135deg, var(--badge-warning-bg), var(--badge-info-bg));
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: var(--radius);
  font-size: var(--text-sm);
  text-align: center;
}

/* 套餐卡片 Grid（响应式） */
.pricing-tiers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-4);
  padding: 0 var(--space-8);
  margin-bottom: var(--space-8);
}
@media (min-width: 1000px) {
  .pricing-tiers-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
@media (max-width: 640px) {
  .pricing-tiers-grid {
    grid-template-columns: 1fr;
    padding: 0 var(--space-4);
  }
}

/* 套餐卡片 */
.pricing-tier-card { text-align: center; position: relative; }
.pricing-tier-highlight { border: 2px solid var(--purple) !important; }
.pricing-tier-flagship { border: 2px solid var(--yellow) !important; }

.pricing-tier-body { padding: var(--space-5); }
.pricing-tier-name { margin-bottom: var(--space-1); }

.pricing-tier-price {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--accent);
  margin-top: var(--space-2);
  line-height: 1.2;
}
.pricing-tier-features { text-align: left; }

/* Badge 徽标 */
.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 16px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  white-space: nowrap;
  z-index: 1;
}
.pricing-badge-purple {
  background: linear-gradient(135deg, var(--purple), #7c3aed);
  color: #fff;
}
.pricing-badge-yellow {
  background: var(--yellow);
  color: #000;
}

/* Token 说明区 */
.pricing-token-info {
  margin: 0 var(--space-8) var(--space-6);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.pricing-token-info-flex {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.pricing-token-info-text { flex: 1; min-width: 200px; }
.pricing-token-info-title {
  margin: 0 0 var(--space-2);
  font-size: var(--text-md);
}
.pricing-token-info-desc {
  margin: 0;
  line-height: var(--leading-relaxed);
}
.pricing-token-info-costs {
  text-align: right;
  flex-shrink: 0;
  padding-top: 2px;
}
@media (max-width: 640px) {
  .pricing-token-info-costs { text-align: left; }
}

/* Token 按量购买包 */
.pricing-token-packages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-3);
}
.pricing-token-package {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-3);
  text-align: center;
}
.pricing-token-package-price {
  color: var(--accent);
  font-weight: var(--weight-bold);
  margin-top: var(--space-1);
}

/* Pro 订阅区 */
.pricing-subscription-card {
  margin: 0 var(--space-8) var(--space-6);
  border: 1px solid var(--accent) !important;
  background: linear-gradient(135deg, var(--accent-soft), var(--gradient-soft));
}
.pricing-subscription-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-4);
}
@media (min-width: 600px) {
  .pricing-subscription-grid { grid-template-columns: repeat(2, 1fr); }
}

.pricing-subscription-plan { text-align: center; }
.pricing-subscription-plan-popular {
  border: 2px solid var(--yellow) !important;
  position: relative;
}
.pricing-subscription-price {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  color: var(--accent);
  margin-top: var(--space-1);
  line-height: 1.2;
}

/* 版本信息 */
.pricing-meta {
  text-align: center;
  padding-bottom: var(--space-8);
  font-size: var(--text-xs);
  color: var(--text-dim);
}

/* 页脚法律链接 */
.pricing-footer {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--space-6) 0 var(--space-8);
  border-top: 1px solid var(--border);
  margin: var(--space-4) var(--space-8) 0;
}
.footer-link {
  font-size: var(--text-xs);
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--transition-fast);
}
.footer-link:hover { color: var(--accent); }

/* 响应式：小屏适配 */
@media (max-width: 640px) {
  .pricing-hero { padding: var(--space-6) var(--space-4) var(--space-4); }
  .pricing-discount-banner { margin: 0 var(--space-4) var(--space-3); }
  .pricing-token-info { margin: 0 var(--space-4) var(--space-4); }
  .pricing-subscription-card { margin: 0 var(--space-4) var(--space-4); }
  .pricing-footer { margin: var(--space-4) var(--space-4) 0; }
}
