/* ============================================
   Delta Quant - 美股永续合约日内投研社区
   深色交易终端风格
   ============================================ */

:root {
  /* 色彩体系 —— 深色交易终端 */
  --bg-primary: #0a0e17;
  --bg-secondary: #141821;
  --bg-tertiary: #1a1f2e;
  --bg-elevated: #1e2535;
  --bg-card: #171c28;

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-light: rgba(255, 255, 255, 0.1);
  --border-medium: rgba(255, 255, 255, 0.15);

  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --text-tertiary: #64748b;
  --text-muted: #475569;

  /* 功能色 */
  --accent: #22c55e;
  --accent-dim: rgba(34, 197, 94, 0.15);
  --accent-glow: rgba(34, 197, 94, 0.3);

  --positive: #22c55e;
  --negative: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  --win-color: #22c55e;
  --loss-color: #ef4444;
  --manual-color: #f59e0b;

  /* 评级色 */
  --rating-a: #22c55e;
  --rating-b: #3b82f6;
  --rating-c: #f59e0b;
  --rating-d: #ef4444;

  /* 关键位色 */
  --vah-color: #22c55e;
  --val-color: #ef4444;
  --poc-color: #f59e0b;
  --vwap-color: #a855f7;

  /* 字体 */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-mono: 'SF Mono', 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* 尺寸 */
  --header-height: 64px;
  --content-max: 1200px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;

  /* 动效 */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 400ms ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }

.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding-top: var(--header-height);
}

/* ============================================
   Header
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
}

.header-inner {
  max-width: var(--content-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 18px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-text-only .brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #e2e8f0 0%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-text-only .brand-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 3px;
  letter-spacing: 0.05em;
}

.brand-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: 2px;
}

.site-nav {
  display: flex;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 14px;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-tertiary);
}

.nav-link.active {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.cta-link {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
  cursor: pointer;
}

.cta-link:hover {
  color: var(--accent);
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.cta-btn:hover {
  background: #16a34a;
  transform: translateY(-1px);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 80px 24px 60px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: 100px;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 24px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.hero-title {
  font-size: 44px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-title .hl {
  color: var(--accent);
  position: relative;
}

.hero-subtitle {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.btn-primary:hover {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.btn-lg {
  padding: 15px 28px;
  font-size: 16px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.btn-ghost:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-medium);
}

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  transition: gap var(--transition-fast);
}

.btn-link:hover {
  gap: 8px;
}

.btn-link-sm {
  font-size: 13px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
}

.note-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--text-tertiary);
}

/* Hero Chart Card */
.hero-chart {
  display: flex;
  justify-content: center;
}

.chart-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.chart-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.chart-card-title {
  font-size: 13px;
  font-weight: 600;
}

.chart-card-badge {
  font-size: 11px;
  padding: 3px 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  color: var(--text-secondary);
}

.chart-card-footer {
  display: flex;
  gap: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}

.chart-stat {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-positive { background: var(--positive); }
.dot-negative { background: var(--negative); }

/* ============================================
   Sections
   ============================================ */
.section {
  padding: 60px 24px;
}

.section-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.section-header {
  margin-bottom: 36px;
}

.section-header.centered {
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.section-desc {
  font-size: 15px;
  color: var(--text-secondary);
}

.eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 12px;
}

/* ============================================
   Stats Band
   ============================================ */
.stats-band {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  background: var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

.stats-band.compact {
  border-radius: var(--radius-md);
}

.stat-item {
  background: var(--bg-card);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-value.positive { color: var(--positive); }
.stat-value.negative { color: var(--negative); }

.stat-unit {
  font-size: 14px;
  font-weight: 500;
  margin-left: 2px;
  opacity: 0.7;
}

.stat-sub {
  font-size: 12px;
  color: var(--text-tertiary);
}

.stats-disclaimer {
  grid-column: 1 / -1;
  background: var(--bg-secondary);
  padding: 10px 20px;
  font-size: 11px;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.disclaimer-badge {
  display: inline-block;
  padding: 2px 6px;
  background: var(--warning);
  color: #000;
  font-size: 10px;
  font-weight: 700;
  border-radius: 3px;
}

.disclaimer-badge.live {
  background: var(--accent);
  color: #fff;
}

/* ============================================
   Diff Cards
   ============================================ */
.diff-section {
  background: var(--bg-secondary);
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.diff-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition-base);
}

.diff-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
}

.diff-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 12px;
  opacity: 0.8;
}

.diff-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.diff-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ============================================
   Flow Section
   ============================================ */
.flow-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}

.flow-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 16px;
}

.flow-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.flow-right {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.flow-step {
  display: flex;
  gap: 16px;
  padding: 16px;
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}

.flow-step:hover {
  background: var(--bg-card);
}

.flow-step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
}

.flow-step-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.flow-step-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================================
   CTA Section
   ============================================ */
.cta-block {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.cta-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.cta-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.cta-block-right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  flex-shrink: 0;
}

/* ============================================
   Page Header (内页通用)
   ============================================ */
.page-header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-subtle);
  padding: 60px 0 40px;
}

.page-header-compact {
  padding: 36px 0 24px;
}

.page-header-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
}

.page-eyebrow {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 8px;
  display: none;
}

.page-header-compact .page-eyebrow {
  display: none;
}

.page-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.page-title-compact {
  font-size: 28px;
  margin-bottom: 4px;
}

.page-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.page-desc-compact {
  font-size: 14px;
}

.btn-ghost-sm {
  padding: 8px 14px;
  font-size: 12px;
}

.btn-primary-sm {
  padding: 9px 18px;
  font-size: 13px;
}

/* ============================================
   Record Page
   ============================================ */
.record-stats {
  padding-top: 40px;
  padding-bottom: 20px;
}

.record-stats-compact {
  padding-top: 24px;
  padding-bottom: 16px;
}

.chart-section-compact {
  padding-top: 16px;
}

.chart-section {
  padding-top: 20px;
}

.chart-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.chart-tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-tertiary);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.chart-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.chart-tab.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.chart-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.note-badge {
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-size: 11px;
  color: var(--text-secondary);
}

.chart-container {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.chart-legend {
  display: flex;
  gap: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  margin-top: 8px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.legend-win { background: var(--win-color); }
.legend-loss { background: var(--loss-color); }

.legend-area {
  width: 20px;
  height: 10px;
  border-radius: 2px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.monthly-table-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.monthly-table {
  width: 100%;
  border-collapse: collapse;
}

.monthly-table th,
.monthly-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 14px;
}

.monthly-table th {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-tertiary);
}

.monthly-table tr:last-child td {
  border-bottom: none;
}

.monthly-table .positive { color: var(--positive); font-weight: 600; }
.monthly-table .negative { color: var(--negative); font-weight: 600; }

/* ============================================
   Trades List
   ============================================ */
.trades-section {
  padding-top: 40px;
}

.trades-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.trades-title {
  font-size: 20px;
  font-weight: 600;
}

.trades-filters {
  display: flex;
  gap: 4px;
  background: var(--bg-tertiary);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.filter-btn {
  padding: 7px 14px;
  font-size: 13px;
  color: var(--text-secondary);
  border-radius: 4px;
  transition: all var(--transition-fast);
}

.filter-btn:hover {
  color: var(--text-primary);
}

.filter-btn.active {
  background: var(--bg-elevated);
  color: var(--text-primary);
}

.trades-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-light);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.trade-row {
  display: grid;
  grid-template-columns: minmax(85px, 1fr) minmax(75px, 0.9fr) minmax(75px, 1fr) minmax(75px, 1fr) minmax(75px, 1fr) minmax(75px, 1fr) minmax(80px, 1fr) minmax(75px, 0.9fr);
  gap: 12px;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-card);
  cursor: pointer;
  transition: background var(--transition-fast);
  min-width: 680px;
}

.trade-row:hover {
  background: var(--bg-elevated);
}

.trade-col {
  min-width: 0;
}

.trade-id {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trade-id-text {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-tertiary);
}

.trade-date {
  font-size: 13px;
  font-weight: 500;
}

.trade-symbol {
  display: flex;
  align-items: center;
  gap: 8px;
}

.symbol-code {
  font-weight: 700;
  font-size: 14px;
}

.direction-badge {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
}

.direction-badge.long {
  background: rgba(34, 197, 94, 0.15);
  color: var(--positive);
}

.direction-badge.short {
  background: rgba(239, 68, 68, 0.15);
  color: var(--negative);
}

.rating-chip {
  display: inline-block;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 4px;
}

.rating-chip.rating-A { background: rgba(34, 197, 94, 0.15); color: var(--rating-a); }
.rating-chip.rating-B { background: rgba(59, 130, 246, 0.15); color: var(--rating-b); }
.rating-chip.rating-C { background: rgba(245, 158, 11, 0.15); color: var(--rating-c); }
.rating-chip.rating-D { background: rgba(239, 68, 68, 0.15); color: var(--rating-d); }

.trade-label {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-bottom: 2px;
}

.trade-value {
  font-size: 14px;
  font-family: var(--font-mono);
  font-weight: 500;
}

.pnl-amount {
  font-size: 14px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.pnl-amount.positive { color: var(--positive); }
.pnl-amount.negative { color: var(--negative); }

.pnl-r {
  font-size: 12px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
}

.result-badge {
  display: inline-block;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
}

.result-badge.tp {
  background: rgba(34, 197, 94, 0.15);
  color: var(--win-color);
}

.result-badge.sl {
  background: rgba(239, 68, 68, 0.15);
  color: var(--loss-color);
}

.result-badge.manual {
  background: rgba(245, 158, 11, 0.15);
  color: var(--manual-color);
}

.result-badge.breakeven {
  background: rgba(148, 163, 184, 0.15);
  color: #94a3b8;
}

.result-badge.large {
  padding: 6px 14px;
  font-size: 13px;
}

.trade-arrow {
  color: var(--text-tertiary);
  display: flex;
  justify-content: flex-end;
}

.trade-row:hover .trade-arrow {
  color: var(--text-secondary);
}

.trade-row-noclick {
  cursor: default;
}

.trade-row-noclick:hover {
  background: var(--bg-card);
}

/* ============================================
   Pagination
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

.page-btn {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.page-btn:hover:not(:disabled) {
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-numbers {
  display: flex;
  gap: 4px;
}

.page-num {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.page-num:hover {
  border-color: var(--border-medium);
}

.page-num.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ============================================
   Trade Detail Modal
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: fadeIn 200ms ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 250ms ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 24px 28px;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 1;
}

.modal-title-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-subtitle {
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 400;
  font-family: var(--font-mono);
}

.modal-close {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.modal-close:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.modal-body {
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.detail-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.section-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* PnL Summary */
.pnl-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.pnl-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pnl-big {
  font-size: 36px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
  line-height: 1;
}

.pnl-big.positive { color: var(--positive); }
.pnl-big.negative { color: var(--negative); }

.pnl-sub {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-secondary);
}

.r-badge {
  padding: 2px 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-primary);
}

.pnl-meta {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
}

.pnl-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
}

.meta-label {
  color: var(--text-tertiary);
}

/* Price Grid */
.price-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.price-item {
  padding: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.price-label {
  font-size: 11px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.price-value {
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font-mono);
}

.price-item.entry .price-value { color: var(--info); }
.price-item.stop .price-value { color: var(--negative); }
.price-item.target .price-value { color: var(--positive); }
.price-item.exit .price-value { color: var(--text-primary); }

.price-time {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Rating Detail */
.rating-detail {
  display: flex;
  gap: 20px;
  align-items: center;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.rating-big {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.rating-big.rating-A { background: rgba(34, 197, 94, 0.15); color: var(--rating-a); }
.rating-big.rating-B { background: rgba(59, 130, 246, 0.15); color: var(--rating-b); }
.rating-big.rating-C { background: rgba(245, 158, 11, 0.15); color: var(--rating-c); }
.rating-big.rating-D { background: rgba(239, 68, 68, 0.15); color: var(--rating-d); }

.rating-info {
  flex: 1;
  min-width: 0;
}

.rating-desc {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}

.key-levels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.key-levels span {
  font-size: 12px;
  font-family: var(--font-mono);
  padding: 3px 8px;
  background: var(--bg-tertiary);
  border-radius: 4px;
  color: var(--text-secondary);
}

/* K线图占位 */
.kline-placeholder {
  padding: 40px 20px;
  background: var(--bg-card);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-md);
  text-align: center;
  color: var(--text-tertiary);
}

.kline-placeholder-icon {
  color: var(--text-muted);
  margin-bottom: 12px;
}

.kline-placeholder p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.kline-note {
  font-size: 12px !important;
  color: var(--text-tertiary) !important;
}

.notes-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.modal-footer {
  padding: 16px 28px;
  border-top: 1px solid var(--border-subtle);
}

.modal-disclaimer {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-tertiary);
}

/* ============================================
   Rebate Modal
   ============================================ */
.rebate-modal {
  max-width: 520px;
}

.rebate-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rebate-line {
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-secondary);
}

.rebate-line:first-child {
  color: var(--text-primary);
  font-weight: 500;
}

.rebate-link-block {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  margin-top: 4px;
}

.rebate-link-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.rebate-link-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.rebate-link {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  word-break: break-all;
  line-height: 1.4;
}

.rebate-link-btn {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.rebate-link-btn:hover {
  background: #16a34a;
}

.rebate-invite {
  font-size: 13px;
  color: var(--text-secondary);
}

.rebate-invite strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 700;
}

.rebate-contact {
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rebate-tg-link {
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
}

.rebate-tg-link:hover {
  text-decoration: underline;
}

/* ============================================
   Risk Banner
   ============================================ */
.risk-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.risk-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--negative);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  border-radius: 50%;
}

.risk-banner strong {
  color: var(--negative);
}

/* ============================================
   Methodology Page
   ============================================ */

/* Flow Timeline */
.flow-timeline {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.flow-timeline-item {
  display: flex;
  gap: 20px;
}

.timeline-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 48px;
  flex-shrink: 0;
}

.timeline-step-num {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-mono);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.timeline-connector {
  flex: 1;
  width: 2px;
  background: var(--border-light);
  margin: 8px 0;
  min-height: 30px;
}

.timeline-content {
  padding-bottom: 32px;
  flex: 1;
}

.timeline-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 6px;
}

.timeline-detail {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* 关键位卡片 */
.rating-section {
  background: var(--bg-secondary);
}

.keylevels-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 40px;
}

.keylevel-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 20px;
}

.keylevel-tag {
  display: inline-block;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  border-radius: 4px;
  margin-bottom: 10px;
}

.keylevel-tag.vah { background: rgba(34, 197, 94, 0.15); color: var(--vah-color); }
.keylevel-tag.val { background: rgba(239, 68, 68, 0.15); color: var(--val-color); }
.keylevel-tag.poc { background: rgba(245, 158, 11, 0.15); color: var(--poc-color); }
.keylevel-tag.vwap { background: rgba(168, 85, 247, 0.15); color: var(--vwap-color); }

.keylevel-card h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.keylevel-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 四档评级卡片 */
.ratings-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.rating-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px 20px;
  transition: all var(--transition-base);
}

.rating-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-medium);
}

.rating-grade {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 10px;
  font-family: var(--font-mono);
}

.rating-card.grade-A .rating-grade { color: var(--rating-a); }
.rating-card.grade-B .rating-grade { color: var(--rating-b); }
.rating-card.grade-C .rating-grade { color: var(--rating-c); }
.rating-card.grade-D .rating-grade { color: var(--rating-d); }

.rating-name {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.rating-condition {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.5;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.rating-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 12px;
}

.rating-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rating-stat .stat-label {
  font-size: 11px;
  color: var(--text-tertiary);
}

.rating-stat .stat-value {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.rating-desc {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* 可计算性演示 */
.calc-demo {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 40px;
  align-items: start;
}

.calc-controls {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.calc-control-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-control-row label {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.control-value {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
}

.calc-control-row input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
  outline: none;
}

.calc-control-row input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: var(--accent);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid var(--bg-card);
  box-shadow: 0 0 0 1px var(--accent);
}

.calc-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-result-item {
  padding: 16px 20px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.calc-result-item.highlight {
  background: var(--accent-dim);
  border-color: rgba(34, 197, 94, 0.2);
}

.calc-result-label {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 6px;
}

.calc-result-value {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono);
  letter-spacing: -0.01em;
}

.calc-result-value.big {
  font-size: 32px;
}

.calc-result-value.positive { color: var(--positive); }
.calc-result-value.negative { color: var(--negative); }

.calc-result-sub {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: 4px;
}

.calc-note {
  grid-column: 1 / -1;
  padding: 14px 18px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.calc-note strong {
  color: var(--warning);
}

/* TradingView Section */
.tv-section {
  background: var(--bg-secondary);
}

.tv-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.tv-title {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
  margin-bottom: 16px;
}

.tv-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.tv-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.tv-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}

.feature-check {
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}

.tv-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}

.tv-mockup {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.tv-mockup-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-subtle);
}

.tv-tab {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-right: auto;
}

.tv-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.tv-dot.red { background: #ef4444; }
.tv-dot.yellow { background: #f59e0b; }
.tv-dot.green { background: #22c55e; }

.tv-mockup-body {
  padding: 12px;
}

.tv-chart-svg {
  width: 100%;
  height: auto;
}

.tv-mockup-image {
  overflow: hidden;
}

.tv-image-body {
  padding: 0;
  background: #000;
  line-height: 0;
}

.kline-real-img {
  width: 100%;
  height: auto;
  display: block;
}

.calc-risk-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: var(--accent-dim);
  border: 1px solid rgba(34, 197, 94, 0.2);
  border-radius: var(--radius-md);
  margin-top: 4px;
}

.calc-risk-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.calc-risk-value {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--accent);
}

/* ============================================
   FAQ Page
   ============================================ */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.faq-item:hover {
  border-color: var(--border-medium);
}

.faq-item.open {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.35);
}

.faq-question {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  cursor: pointer;
  user-select: none;
}

.faq-q-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 28px;
  padding: 0 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--accent);
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  border-radius: 6px;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
}

.faq-item.open .faq-q-num {
  background: var(--accent);
  color: #0a0e17;
  border-color: var(--accent);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.35);
}

.faq-q-text {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.faq-item.open .faq-q-text {
  color: #ffffff;
}

.faq-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-tertiary);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), 
              color 0.25s ease, 
              background-color 0.25s ease, 
              border-color 0.25s ease;
  will-change: transform;
}

.faq-item:hover .faq-icon {
  color: var(--text-secondary);
  border-color: rgba(255, 255, 255, 0.18);
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
  color: var(--accent);
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.open .faq-answer {
  max-height: 600px;
}

.faq-answer-inner {
  padding: 0 24px 24px 90px;
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.faq-answer-cta {
  margin-top: 16px;
}

/* Compliance Card */
.compliance-section {
  background: var(--bg-secondary);
}

.compliance-card {
  display: flex;
  gap: 24px;
  padding: 32px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
}

.compliance-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  border-radius: var(--radius-md);
}

.compliance-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.compliance-content p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 10px;
}

.compliance-content p:last-child {
  margin-bottom: 0;
}

.compliance-content strong {
  color: var(--text-primary);
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 24px 24px;
}

.footer-main {
  display: grid;
  grid-template-columns: 1.5fr 2fr 1.5fr;
  gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-brand {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.footer-brand-text {
  display: block;
}

.footer-brand-text .footer-brand-name {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #e2e8f0 0%, #22c55e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.footer-brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.footer-brand-sub {
  font-size: 13px;
  color: var(--text-tertiary);
}

.footer-navs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.footer-link {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: left;
  transition: color var(--transition-fast);
}

.footer-link:hover {
  color: var(--text-primary);
}

.footer-cta-block {
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
}

.footer-cta-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
}

.footer-cta-desc {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 14px;
  line-height: 1.5;
}

.footer-cta-btns {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cta-btn-sm {
  justify-content: center;
  padding: 10px 16px;
  font-size: 13px;
}

.footer-compliance {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.footer-compliance p {
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.7;
  margin-bottom: 8px;
}

.footer-compliance p:last-child {
  margin-bottom: 0;
}

.footer-compliance strong {
  color: var(--text-secondary);
}

.compliance-note {
  color: var(--warning) !important;
  display: none;
}

.footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
}

.footer-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  display: none;
}

/* ============================================
   Responsive - Tablet (≤900px)
   ============================================ */
@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 50px 20px 40px;
  }

  .hero-title { font-size: 32px; }
  .hero-subtitle { font-size: 15px; }

  .diff-grid { grid-template-columns: 1fr; }
  .flow-content { grid-template-columns: 1fr; gap: 32px; }
  .cta-block { flex-direction: column; align-items: flex-start; padding: 32px; }
  .cta-block-right { align-items: flex-start; }

  .stats-band { grid-template-columns: repeat(3, 1fr); }
  .stat-item { padding: 20px 16px; }
  .stat-value { font-size: 22px; }

  .page-header-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .page-title { font-size: 28px; }

  .calc-demo { grid-template-columns: 1fr; }

  .tv-block { grid-template-columns: 1fr; gap: 32px; }

  .footer-main { grid-template-columns: 1fr; gap: 32px; }
  .footer-navs { grid-template-columns: 1fr 1fr; }

  .site-nav { display: flex; flex-shrink: 0; }
  .header-cta { display: none; }
  .hamburger-btn { display: none; }

  .keylevels-grid { grid-template-columns: repeat(2, 1fr); }
  .ratings-grid { grid-template-columns: repeat(2, 1fr); }

  .price-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================
   Responsive - Mobile (≤640px)
   ============================================ */
@media (max-width: 640px) {
  :root {
    --header-height: 56px;
  }

  .header-inner { padding: 0 12px; gap: 12px; }
  .brand-text-only .brand-name { font-size: 17px; }
  .brand-text-only .brand-sub { display: none; }
  .brand-mark { width: 28px; height: 28px; font-size: 15px; }

  /* 移动端导航：横向滚动 */
  .site-nav {
    flex: 1;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 2px;
    padding: 0 4px;
    min-width: 0;
  }
  .site-nav::-webkit-scrollbar { display: none; }
  .nav-link {
    flex-shrink: 0;
    padding: 8px 12px;
    font-size: 13px;
    min-height: 40px;
    display: flex;
    align-items: center;
  }

  .hero-section {
    padding: 40px 16px 32px;
    gap: 32px;
  }
  .hero-title { font-size: 26px; }
  .hero-subtitle { font-size: 14px; line-height: 1.6; }
  .hero-actions { flex-direction: column; align-items: stretch; }
  .btn-primary, .btn-ghost { justify-content: center; height: 48px; }
  .hero-note { font-size: 12px; text-align: center; }

  .chart-card { padding: 16px; }
  #heroMiniChart { height: 150px; }

  .section { padding: 36px 16px; }
  .section-title { font-size: 22px; }
  .section-desc { font-size: 14px; }

  .stats-band {
    grid-template-columns: repeat(2, 1fr);
    border-radius: var(--radius-md);
  }
  .stat-item { padding: 16px 14px; }
  .stat-value { font-size: 20px; }
  .stat-label { font-size: 11px; }
  .stat-sub { font-size: 11px; }
  .stats-disclaimer {
    grid-column: 1 / -1;
    font-size: 10px;
    padding: 10px 14px;
  }

  .diff-section .section-inner { padding: 0 16px; }
  .diff-card { padding: 24px; }
  .diff-num { font-size: 32px; }
  .diff-title { font-size: 16px; }
  .diff-desc { font-size: 13px; }

  .flow-step {
    padding: 16px;
    gap: 12px;
  }
  .flow-step-num {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }
  .flow-step-title { font-size: 15px; }
  .flow-step-desc { font-size: 13px; }

  .cta-block { padding: 24px; }
  .cta-title { font-size: 20px; }
  .cta-desc { font-size: 13px; }
  .cta-block-right { flex-direction: column; align-items: stretch; width: 100%; }
  .btn-lg { height: 48px; font-size: 15px; }

  /* 页头紧凑模式 */
  .page-header-compact { padding: 28px 0 20px; }
  .page-header-compact .page-header-inner { gap: 12px; }
  .page-title-compact { font-size: 22px; }
  .page-desc-compact { font-size: 13px; }
  .btn-primary-sm { height: 40px; }

  /* 交易记录页 */
  .record-stats-compact { padding-top: 16px; padding-bottom: 8px; }
  .chart-section-compact { padding-top: 8px; }
  .chart-section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .chart-tabs { width: 100%; overflow-x: auto; }
  .chart-tab { min-height: 40px; padding: 8px 14px; font-size: 13px; white-space: nowrap; }
  .chart-note { font-size: 11px; line-height: 1.6; }
  #equityChart { height: 280px !important; }
  .chart-legend { flex-wrap: wrap; gap: 10px 16px; font-size: 11px; }

  .monthly-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .monthly-table { min-width: 500px; font-size: 13px; }
  .monthly-table th, .monthly-table td { padding: 12px 10px; }

  /* 交易列表横向滚动 */
  .trades-list { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .trade-row-noclick {
    grid-template-columns: 80px 90px 80px 80px 80px 80px 100px 90px;
    min-width: 680px;
    gap: 8px;
    padding: 12px 14px;
  }
  .trade-label { font-size: 10px; }
  .trade-value { font-size: 13px; }
  .symbol-code { font-size: 13px; }

  .trades-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .trades-title { font-size: 18px; }
  .trades-filters {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }
  .filter-btn { flex-shrink: 0; min-height: 36px; padding: 6px 14px; font-size: 12px; }

  /* 分页按钮触控大小 */
  .pagination { flex-wrap: wrap; gap: 6px; }
  .page-btn { min-height: 44px; min-width: 80px; }
  .page-num { width: 40px; height: 40px; }

  /* 方法论页 */
  .flow-timeline-item { gap: 12px; }
  .timeline-step-num { width: 36px; height: 36px; font-size: 14px; }
  .timeline-title { font-size: 16px; }
  .timeline-desc { font-size: 13px; }

  .calc-demo { gap: 24px; padding: 20px; }
  .calc-controls { gap: 16px; }
  .calc-control-row label { font-size: 13px; }
  .control-value { font-size: 14px; }
  .calc-control-row input[type="range"] {
    height: 44px; /* 增大触控区域 */
    margin: -12px 0;
  }
  .calc-risk-summary { flex-direction: column; gap: 4px; text-align: center; }

  .calc-result-item { padding: 16px; }
  .calc-result-value { font-size: 22px; }
  .calc-result-value.big { font-size: 28px; }
  .calc-result-label { font-size: 12px; }
  .calc-result-sub { font-size: 11px; }

  .calc-note { font-size: 12px; line-height: 1.6; }

  /* 指标授权区 */
  .tv-block { gap: 24px; }
  .tv-left { gap: 12px; }
  .eyebrow { font-size: 11px; }
  .tv-title { font-size: 20px; }
  .tv-desc { font-size: 13px; line-height: 1.7; }
  .tv-features li { font-size: 13px; }
  .tv-actions { flex-direction: column; align-items: stretch; }
  .tv-actions .btn-primary { justify-content: center; height: 48px; }
  .btn-link { justify-content: center; min-height: 44px; }

  .tv-mockup-header { padding: 10px 12px; }
  .tv-tab { font-size: 11px; }

  /* FAQ 移动端适配 */
  .faq-item { padding: 0; }
  .faq-question { padding: 16px; gap: 12px; }
  .faq-q-num { min-width: 42px; height: 26px; font-size: 13.5px; border-radius: 5px; }
  .faq-q-text { font-size: 14.5px; line-height: 1.5; }
  .faq-icon { width: 30px; height: 30px; min-width: 30px; }
  .faq-answer-inner { font-size: 13.5px; line-height: 1.7; padding: 0 16px 18px 16px; }

  .compliance-card { padding: 24px; flex-direction: column; gap: 16px; align-items: flex-start; }
  .compliance-content h3 { font-size: 16px; }
  .compliance-content p { font-size: 12px; line-height: 1.7; }

  /* 返佣弹窗移动端 */
  .modal-overlay { padding: 16px; }
  .rebate-modal { max-width: 100%; width: 100%; max-height: 85vh; display: flex; flex-direction: column; }
  .modal-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 20px; }
  .rebate-line { font-size: 13px; line-height: 1.7; }
  .rebate-link-block { padding: 14px; }
  .rebate-link-row { flex-direction: column; align-items: stretch; gap: 10px; }
  .rebate-link { font-size: 11px; word-break: break-all; }
  .rebate-link-btn { justify-content: center; height: 40px; }
  .rebate-invite { font-size: 12px; }
  .rebate-contact { flex-direction: column; align-items: flex-start; gap: 6px; }

  /* 页脚 */
  .site-footer { padding: 40px 16px 24px; }
  .footer-inner { padding: 0; }
  .footer-main { gap: 28px; }
  .footer-navs { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-col-title { font-size: 11px; }
  .footer-link { font-size: 13px; min-height: 36px; display: flex; align-items: center; }
  .footer-cta-block { padding: 18px; }
  .footer-cta-title { font-size: 14px; }
  .footer-cta-desc { font-size: 12px; }
  .cta-btn-sm { height: 44px; }

  .footer-compliance { padding: 20px 0; }
  .footer-compliance p { font-size: 11px; line-height: 1.7; }

  .footer-bottom { font-size: 11px; padding-top: 16px; }

  /* 风险横幅 */
  .risk-banner { padding: 14px 16px; gap: 10px; font-size: 12px; line-height: 1.6; }
  .risk-icon { flex-shrink: 0; }

  /* 移除装饰性渐变避免溢出 */
  .hero-glow { display: none; }

  /* 确保所有section内部container全宽 */
  .section-inner { padding: 0; }
}


/* ============================================
   防挤压、自适应与组件防重叠优化增强
   ============================================ */
.trade-row-noclick {
  min-width: 680px;
  display: grid;
  grid-template-columns: minmax(85px, 1fr) minmax(75px, 0.9fr) minmax(75px, 1fr) minmax(75px, 1fr) minmax(75px, 1fr) minmax(75px, 1fr) minmax(80px, 1fr) minmax(75px, 0.9fr);
  gap: 12px;
  align-items: center;
}

.trade-col {
  min-width: 0;
  white-space: nowrap;
}

.trade-value, .pnl-amount {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.result-badge {
  white-space: nowrap;
  display: inline-block;
}

.trades-header {
  flex-wrap: wrap;
  gap: 14px;
}

.trades-filters {
  flex-wrap: wrap;
  gap: 4px;
  overflow-x: auto;
  max-width: 100%;
}

.filter-btn {
  white-space: nowrap;
  flex-shrink: 0;
}

.chart-section-header {
  flex-wrap: wrap;
  gap: 14px;
}

.chart-tabs {
  flex-wrap: wrap;
  gap: 4px;
}

.chart-tab {
  white-space: nowrap;
  flex-shrink: 0;
}

.page-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  flex-wrap: wrap;
  gap: 16px;
}

.page-header-inner > div {
  text-align: left;
}

.page-title, .page-title-compact, .page-desc, .page-desc-compact {
  text-align: left;
}

.page-header-cta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.header-inner {
  flex-wrap: wrap;
  gap: 16px;
}

.site-nav {
  flex-wrap: wrap;
  gap: 4px;
}

.nav-link {
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .trades-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 768px) {
  .site-header {
    height: auto;
    padding: 10px 0;
  }
  .header-inner {
    height: auto;
    gap: 12px;
  }
  .trades-header {
    flex-direction: column;
    align-items: stretch;
  }
  .trades-filters {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
  }
}
