/* style.css — NovaAlpha 量化策略租赁平台 全局样式 (深色主题) */
:root {
  /* 背景色系 */
  --bg: #0A0E1A;
  --bg-alt: #0D1220;
  --card: #131826;
  --card-alt: #1A2030;
  --border: #243044;
  --border-soft: #1B2436;

  /* 主色调（靛蓝） */
  --primary: #6366F1;
  --primary-light: #818CF8;
  --primary-dark: #4F46E5;
  --primary-gradient: linear-gradient(135deg, #6366F1, #8B5CF6);
  --primary-gradient-2: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #8B5CF6 100%);
  --primary-glow: rgba(99, 102, 241, 0.35);

  /* 状态色 */
  --success: #10B981;
  --success-light: rgba(16, 185, 129, 0.12);
  --danger: #EF4444;
  --danger-light: rgba(239, 68, 68, 0.12);
  --warning: #F59E0B;
  --warning-light: rgba(245, 158, 11, 0.12);
  --info: #3B82F6;
  --info-light: rgba(59, 130, 246, 0.12);

  /* 文字色 */
  --text: #E5E7EB;
  --text-muted: #9CA3AF;
  --text-dim: #6B7280;

  /* 圆角 */
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-primary: 0 4px 20px var(--primary-glow);

  /* 玻璃拟态 */
  --glass-bg: rgba(19, 24, 38, 0.72);
  --glass-border: rgba(99, 102, 241, 0.18);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

* { box-sizing: border-box; }

html, body {
  background: var(--bg);
  color: var(--text);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 默认隐藏 body，由 requireAuth() 验证后显示，避免未登录闪烁 */
  visibility: hidden;
}
body.no-auth-guard { visibility: visible; }

a { color: var(--primary-light); text-decoration: none; transition: color .15s; }
a:hover { color: var(--primary-light); text-decoration: underline; }

h1, h2, h3, h4, h5 { color: var(--text); margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }

/* ========== 容器 ========== */
.container-page { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: 560px; margin: 0 auto; padding: 0 20px; }

/* ========== 按钮 ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px; font-size: 14px; font-weight: 500; line-height: 1.2;
  border-radius: var(--radius-sm); border: 1px solid transparent; cursor: pointer;
  transition: all .2s ease; white-space: nowrap; user-select: none; text-decoration: none;
  font-family: inherit;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--primary-gradient); color: #fff;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-gradient-2); color: #fff;
  transform: translateY(-1px); box-shadow: var(--shadow-primary);
  text-decoration: none;
}
.btn-outline {
  background: var(--card); color: var(--text); border-color: var(--border);
}
.btn-outline:hover:not(:disabled) {
  border-color: var(--primary); color: var(--primary-light); background: var(--card-alt);
  text-decoration: none;
}
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--card-alt); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #DC2626; color: #fff; text-decoration: none; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #059669; color: #fff; text-decoration: none; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 26px; font-size: 15px; border-radius: 10px; }
.btn-block { width: 100%; }

/* ========== 输入框 ========== */
.label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.input, .textarea, .select {
  width: 100%; padding: 10px 12px; font-size: 14px; color: var(--text);
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: all .2s ease; font-family: inherit;
}
.input::placeholder, .textarea::placeholder { color: var(--text-dim); }
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: var(--card);
}
.textarea { min-height: 100px; resize: vertical; }
.field { margin-bottom: 14px; }
.help { font-size: 12px; color: var(--text-muted); margin-top: 5px; }

/* ========== 卡片 ========== */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
.card-pad { padding: 18px; }
.card-hover { transition: all .25s ease; }
.card-hover:hover {
  box-shadow: var(--shadow-lg); border-color: var(--primary);
  transform: translateY(-2px);
}

/* ========== 徽章 ========== */
.badge {
  display: inline-flex; align-items: center; padding: 2px 8px; font-size: 12px;
  font-weight: 500; border-radius: 6px; line-height: 1.5;
}
.badge-blue { background: var(--info-light); color: #60A5FA; }
.badge-green { background: var(--success-light); color: var(--success); }
.badge-amber { background: var(--warning-light); color: var(--warning); }
.badge-red { background: var(--danger-light); color: var(--danger); }
.badge-gray { background: var(--card-alt); color: var(--text-muted); }
.badge-purple { background: rgba(139, 92, 246, 0.12); color: #A78BFA; }
.badge-indigo { background: rgba(99, 102, 241, 0.12); color: var(--primary-light); }

/* 风险等级徽章 */
.badge-risk-low { background: var(--success-light); color: var(--success); }
.badge-risk-medium { background: var(--warning-light); color: var(--warning); }
.badge-risk-high { background: var(--danger-light); color: var(--danger); }

/* ========== 导航栏 ========== */
.site-header {
  background: var(--glass-bg); border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30; backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.logo { display: flex; align-items: center; gap: 9px; color: var(--text); text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; background: var(--primary-gradient); color: #fff;
  border-radius: 8px; font-weight: 700; font-size: 14px;
  box-shadow: 0 2px 8px var(--primary-glow);
}
.logo-mark-sm { width: 26px; height: 26px; font-size: 12px; border-radius: 6px; }
.logo-text { font-weight: 600; font-size: 16px; color: var(--text); }
.nav { display: flex; align-items: center; gap: 2px; }
.nav-link {
  color: var(--text-muted); font-size: 14px; padding: 7px 12px; border-radius: 6px;
  transition: all .15s; text-decoration: none;
}
.nav-link:hover { color: var(--text); background: var(--card-alt); text-decoration: none; }
.nav-link-active { color: var(--primary-light); font-weight: 500; background: rgba(99, 102, 241, 0.1); }
.nav-auth-group { display: flex; gap: 6px; align-items: center; margin-left: 10px; }

/* 语言切换 */
.lang-switch {
  font-size: 12px !important; font-weight: 600; padding: 4px 8px;
  border: 1px solid var(--border); border-radius: 6px;
  color: var(--primary-light); letter-spacing: 0.5px; cursor: pointer;
  background: transparent; transition: all .15s;
}
.lang-switch:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ========== Hero 区 ========== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0A0E1A 0%, #131826 50%, #0A0E1A 100%);
  border-bottom: 1px solid var(--border);
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -20%, rgba(99, 102, 241, 0.15) 0%, transparent 60%),
              radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
  pointer-events: none;
}
.hero-inner { padding: 64px 20px 52px; text-align: center; position: relative; z-index: 1; }
.hero-title {
  font-size: 42px; font-weight: 800; color: var(--text);
  margin: 0 0 14px; letter-spacing: -1px; line-height: 1.15;
}
.hero-accent {
  background: linear-gradient(135deg, #818CF8, #A78BFA);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 16px; color: var(--text-muted); margin: 0 auto 28px;
  max-width: 620px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 36px; }

/* Hero 统计数据（玻璃卡片） */
.hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  max-width: 680px; margin: 0 auto;
  padding: 22px; border-radius: var(--radius-lg);
  background: var(--glass-bg); backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.hero-stat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-stat-num {
  font-size: 26px; font-weight: 800;
  background: var(--primary-gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-stat-label { font-size: 12px; color: var(--text-muted); }

/* ========== 主体内容 ========== */
.main-content { padding: 32px 20px 64px; }

/* ========== 区块标题 ========== */
.section-title { font-size: 28px; font-weight: 800; margin: 0 0 8px; color: var(--text); letter-spacing: -0.5px; }
.section-desc { font-size: 15px; color: var(--text-muted); margin: 0 0 28px; max-width: 580px; }

/* ========== 策略市场网格 ========== */
.grid-strategies {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.strategy-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; display: flex; flex-direction: column; gap: 12px;
  transition: all .25s ease; position: relative; overflow: hidden;
}
.strategy-card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--primary-gradient); opacity: 0; transition: opacity .3s ease;
}
.strategy-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.strategy-card:hover::before { opacity: 1; }
.strategy-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.strategy-name { font-size: 16px; font-weight: 600; color: var(--text); line-height: 1.4; }
.strategy-code { font-size: 12px; color: var(--text-dim); font-family: ui-monospace, "SF Mono", Menlo, monospace; margin-top: 2px; }
.strategy-desc { font-size: 13px; color: var(--text-muted); line-height: 1.6; flex: 1; }
.strategy-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.strategy-metrics {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px;
  padding: 12px; background: var(--bg-alt); border-radius: var(--radius-sm);
}
.strategy-metric { display: flex; flex-direction: column; gap: 2px; }
.strategy-metric-value { font-size: 16px; font-weight: 700; color: var(--text); }
.strategy-metric-value.positive { color: var(--success); }
.strategy-metric-value.negative { color: var(--danger); }
.strategy-metric-label { font-size: 11px; color: var(--text-muted); }
.strategy-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding-top: 12px; border-top: 1px solid var(--border-soft);
}
.strategy-price { font-size: 18px; font-weight: 700; color: var(--primary-light); }
.strategy-price-unit { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.strategy-free-tag { font-size: 18px; font-weight: 700; color: var(--success); }

/* ========== 分类标签 ========== */
.category-tabs {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 12px;
  margin-bottom: 16px; -webkit-overflow-scrolling: touch;
}
.category-tabs::-webkit-scrollbar { height: 4px; }
.category-tabs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.cat-tab {
  flex-shrink: 0; padding: 7px 16px; font-size: 13px; font-weight: 500;
  background: var(--card); color: var(--text-muted); border: 1px solid var(--border);
  border-radius: 20px; cursor: pointer; transition: all .2s; white-space: nowrap;
}
.cat-tab:hover { color: var(--primary-light); border-color: var(--primary); }
.cat-tab-active { background: var(--primary-gradient); color: #fff; border-color: transparent; }

/* ========== 筛选栏 ========== */
.filter-bar {
  margin-bottom: 18px; display: flex; gap: 10px;
  flex-wrap: wrap; align-items: center;
}
.filter-search { flex: 1; min-width: 200px; position: relative; }
.filter-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  color: var(--text-dim); font-size: 14px; pointer-events: none;
}
.filter-search .input { padding-left: 32px; }
.filter-select { width: auto; min-width: 120px; }

/* ========== 仪表盘网格 ========== */
.dashboard-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px;
}
.stats-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 6px;
}
.stats-card-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; background: rgba(99, 102, 241, 0.12); color: var(--primary-light);
  margin-bottom: 4px;
}
.stats-value { font-size: 24px; font-weight: 700; color: var(--text); }
.stats-value.positive { color: var(--success); }
.stats-value.negative { color: var(--danger); }
.stats-label { font-size: 12px; color: var(--text-muted); }

/* ========== 收益曲线区 ========== */
.chart-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; margin-bottom: 24px;
}
.chart-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px;
}
.chart-title { font-size: 15px; font-weight: 600; color: var(--text); }
.chart-body { min-height: 240px; }

/* ========== 持仓 & 交易表格 ========== */
.trade-table-wrap {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.trade-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.trade-table th {
  background: var(--card-alt); color: var(--text-muted); font-weight: 500;
  text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.trade-table td {
  padding: 12px 16px; border-bottom: 1px solid var(--border-soft); color: var(--text);
}
.trade-table tr:last-child td { border-bottom: 0; }
.trade-table tr:hover td { background: var(--card-alt); }
.trade-table .text-positive { color: var(--success); }
.trade-table .text-negative { color: var(--danger); }
.trade-table .text-muted { color: var(--text-muted); }

/* 交易方向标签 */
.side-buy { color: var(--success); font-weight: 600; }
.side-sell { color: var(--danger); font-weight: 600; }

/* ========== 订阅卡片 ========== */
.subscription-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 12px;
}
.subscription-card.active { border-left: 3px solid var(--success); }
.subscription-card.paused { border-left: 3px solid var(--warning); }
.subscription-card.expired { border-left: 3px solid var(--text-dim); }
.subscription-card.cancelled { border-left: 3px solid var(--danger); }
.subscription-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.subscription-meta { font-size: 12px; color: var(--text-muted); }
.subscription-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ========== 钱包卡片 ========== */
.wallet-balance-card {
  background: var(--primary-gradient); border-radius: var(--radius-lg);
  padding: 24px; color: #fff; position: relative; overflow: hidden;
}
.wallet-balance-card::before {
  content: ''; position: absolute; top: -40%; right: -10%; width: 200px; height: 200px;
  background: rgba(255, 255, 255, 0.08); border-radius: 50%;
}
.wallet-balance-label { font-size: 13px; opacity: 0.85; margin-bottom: 6px; position: relative; }
.wallet-balance-value { font-size: 32px; font-weight: 800; position: relative; }
.wallet-balance-actions { display: flex; gap: 10px; margin-top: 18px; position: relative; }
.wallet-balance-actions .btn { background: rgba(255, 255, 255, 0.18); color: #fff; border-color: transparent; }
.wallet-balance-actions .btn:hover { background: rgba(255, 255, 255, 0.28); }

/* ========== API Key 列表 ========== */
.apikey-row {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 10px;
}
.apikey-info { display: flex; flex-direction: column; gap: 4px; }
.apikey-label { font-size: 14px; font-weight: 500; color: var(--text); }
.apikey-value { font-size: 12px; color: var(--text-muted); font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.apikey-actions { display: flex; gap: 6px; }

/* ========== 表单页（登录/注册） ========== */
.auth-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 32px; max-width: 440px; margin: 48px auto;
}
.auth-title { font-size: 22px; font-weight: 700; text-align: center; margin-bottom: 6px; }
.auth-sub { font-size: 13px; color: var(--text-muted); text-align: center; margin-bottom: 24px; }
.auth-foot { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 18px; }

/* OAuth 分隔线 */
.oauth-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; color: var(--text-dim); font-size: 12px; }
.oauth-divider::before, .oauth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.oauth-btn {
  height: 42px; font-size: 14px; font-weight: 500; border-radius: 8px;
  cursor: pointer; transition: opacity .15s; width: 100%;
  background: var(--card-alt); color: var(--text); border: 1px solid var(--border);
}
.oauth-btn:hover { opacity: .88; }

/* ========== 模态框 ========== */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(4px);
  z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-xl);
  width: 100%; max-width: 440px; max-height: 90vh; overflow: auto;
  animation: modal-in .25s ease;
}
.modal-lg { max-width: 640px; }
.modal-head {
  padding: 16px 20px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 15px;
  display: flex; justify-content: space-between; align-items: center;
}
.modal-body { padding: 20px; }
.modal-foot {
  padding: 14px 20px; border-top: 1px solid var(--border);
  display: flex; gap: 10px; justify-content: flex-end;
}
@keyframes modal-in {
  from { opacity: 0; transform: scale(.95) translateY(10px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ========== Toast 通知 ========== */
.toast-container {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
.toast {
  background: var(--card-alt); color: var(--text); padding: 10px 16px;
  border-radius: var(--radius-sm); font-size: 14px; box-shadow: var(--shadow-lg);
  animation: toast-in .2s ease; pointer-events: auto;
  border: 1px solid var(--border);
}
.toast.toast-success { background: var(--success); color: #fff; border-color: transparent; }
.toast.toast-error { background: var(--danger); color: #fff; border-color: transparent; }
.toast.toast-warning { background: var(--warning); color: #fff; border-color: transparent; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== 空状态 ========== */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state .icon { font-size: 40px; margin-bottom: 12px; opacity: .5; }

/* ========== 分隔线 ========== */
.divider { height: 1px; background: var(--border); margin: 16px 0; border: 0; }

/* ========== 加载动画 ========== */
.spinner {
  width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; display: inline-block;
}
.spinner-dark { border-color: rgba(229, 231, 235, 0.2); border-top-color: var(--text); }
.spinner-lg { width: 28px; height: 28px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ========== 骨架屏 ========== */
.skeleton {
  background: linear-gradient(90deg, var(--card) 25%, var(--card-alt) 37%, var(--card) 63%);
  background-size: 400% 100%; animation: sk 1.4s ease infinite; border-radius: 6px;
}
@keyframes sk {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* ========== 标签页 ========== */
.tab {
  padding: 10px 14px; font-size: 14px; color: var(--text-muted); cursor: pointer;
  border-bottom: 2px solid transparent; transition: all .15s; white-space: nowrap;
  background: transparent; border-left: 0; border-right: 0; border-top: 0;
}
.tab:hover { color: var(--text); }
.tab-active { color: var(--primary-light); border-bottom-color: var(--primary); font-weight: 500; }

/* ========== 分页 ========== */
.pagination-wrap { margin-top: 24px; }

/* ========== 滚动渐显 ========== */
.scroll-fade { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.scroll-fade.scroll-in { opacity: 1; transform: translateY(0); }

/* ========== 等宽字体 ========== */
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; }

/* ========== 页脚 ========== */
.site-footer {
  border-top: 1px solid var(--border); background: var(--bg-alt);
  padding: 40px 0 20px; color: var(--text-muted); font-size: 12px;
}
.footer-inner { max-width: 1160px; margin: 0 auto; padding: 0 20px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 24px;
}
.footer-col { display: flex; flex-direction: column; gap: 8px; }
.footer-brand { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.footer-brand-text { font-weight: 600; font-size: 14px; color: var(--text); }
.footer-tagline { color: var(--text); font-size: 13px; margin: 0 0 4px; }
.footer-desc { color: var(--text-muted); font-size: 12px; line-height: 1.6; margin: 0; max-width: 280px; }
.footer-title { font-weight: 600; color: var(--text); font-size: 13px; margin-bottom: 4px; }
.footer-link { color: var(--text-muted); text-decoration: none; font-size: 12px; transition: color .15s; }
.footer-link:hover { color: var(--primary-light); }
.footer-bottom {
  border-top: 1px solid var(--border); padding-top: 16px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px;
}
.footer-bottom-links { display: flex; gap: 4px; align-items: center; }

/* ========== 客服悬浮按钮 ========== */
#nva-support-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--primary-gradient); color: #fff;
  box-shadow: 0 4px 14px var(--primary-glow); cursor: pointer; text-decoration: none;
  font-weight: 600; transition: transform .2s, box-shadow .2s;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
#nva-support-fab:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 30px var(--primary-glow);
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .hero-title { font-size: 30px; }
  .hero-sub { font-size: 15px; }
  .hero-inner { padding: 44px 16px 36px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 16px; }
  .hero-stat-num { font-size: 20px; }
  .nav { gap: 0; }
  .nav-link { padding: 6px 8px; font-size: 13px; }
  .nav-auth-group { margin-left: 4px; gap: 4px; }
  .nav-auth-group .btn { padding: 6px 10px; font-size: 12px; }
  .filter-bar { flex-direction: column; }
  .filter-search { min-width: 100%; }
  .filter-select { width: 100%; min-width: 0; }
  .filter-bar .btn { width: 100%; }
  .category-tabs { gap: 6px; }
  .cat-tab { padding: 6px 12px; font-size: 12px; }
  .grid-strategies { grid-template-columns: 1fr; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .trade-table { font-size: 12px; }
  .trade-table th, .trade-table td { padding: 9px 10px; }
  .section-title { font-size: 24px; }
  .main-content { padding: 24px 16px 48px; }
  .auth-card { margin: 24px 16px; padding: 24px; }
  .wallet-balance-value { font-size: 26px; }
  #nva-support-fab { width: 44px; height: 44px; right: 16px; bottom: 16px; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
  .hero-title { font-size: 26px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 14px; }
  .hero-stat-num { font-size: 18px; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .trade-table { font-size: 11px; }
  .trade-table th, .trade-table td { padding: 8px; }
  .card-pad { padding: 14px; }
  .section-title { font-size: 22px; }
}
