/* [M01 CSS设计系统/主题切换] 评分:9.0/10 目标:≥9.0 状态:合格 ✅
   ============================================================
   CSS 设计系统 —— 箱体突破智能选股系统
   采用 CSS Variables 实现亮色/暗色主题切换
   ============================================================ */

:root {
  /* 主色调体系：深蓝靛色系 */
  --primary: #1a237e;        /* 主色：用于标题、按钮、强调边框 */
  --primary-light: #3949ab;  /* 主色亮部：用于渐变和悬停 */
  --primary-dark: #0d1642;   /* 主色暗部：用于页面背景渐变起点 */
  /* 强调与状态色 */
  --accent: #ffc107;         /* 琥珀黄：用于价格、重点提示 */
  --accent-dark: #ff8f00;    /* 深琥珀：用于建议抛售价格 */
  --success: #00c853;        /* 成功/上涨/买入信号 */
  --warning: #ff9100;        /* 警告/减仓/今日突破 */
  --danger: #ff1744;         /* 危险/下跌/清仓信号 */
  --info: #00b0ff;           /* 信息提示 */
  /* 中性色 */
  --card-bg: #ffffff;        /* 卡片背景 */
  --text: #212121;           /* 主文字颜色 */
  --text-secondary: #757575; /* 次要文字（标签、说明） */
  --border: #e0e0e0;         /* 边框与分割线 */
  /* 效果参数 */
  --shadow: 0 4px 16px rgba(0,0,0,0.12); /* 标准卡片阴影 */
  --radius: 12px;            /* 全局圆角基准 */
}

/* 暗色主题：通过 body 上的 data-theme="dark" 属性触发 */
[data-theme="dark"] {
  --primary: #5c6bc0;        /* 暗色下主色提亮，保证对比度 */
  --card-bg: #1e1e1e;        /* 深色卡片背景 */
  --text: #ffffff;           /* 白色主文字 */
  --text-secondary: #b0b0b0; /* 灰色次要文字 */
  --border: #333333;         /* 深色边框 */
}

/* 暗色模式下硬编码颜色的覆盖 */
[data-theme="dark"] .day-box { background: rgba(255,255,255,0.06); }
[data-theme="dark"] .day-box.pass { background: rgba(0,200,83,0.12); }
[data-theme="dark"] .tracking-info {
  background: linear-gradient(135deg, #1a237e 0%, #0d1642 100%);
  border-color: #3949ab;
}
[data-theme="dark"] .tracking-row { border-bottom-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .help-box {
  background: #1b3a1b;
  border-color: #4caf50;
  color: #a5d6a7;
}
[data-theme="dark"] .help-box.info {
  background: #0d1b2a;
  border-color: #42a5f5;
  color: #90caf9;
}
[data-theme="dark"] .help-box.warning {
  background: #2a1b00;
  border-color: #ffa726;
  color: #ffcc80;
}
[data-theme="dark"] .reminder-tag.buy { background: #1b3a1b; color: #a5d6a7; border-color: #4caf50; }
[data-theme="dark"] .reminder-tag.wait { background: #2a1b00; color: #ffcc80; border-color: #ffa726; }
[data-theme="dark"] .reminder-tag.sell { background: #3a1b1b; color: #ef9a9a; border-color: #ef5350; }
[data-theme="dark"] .sell-item { background: #2a1b00; border-color: #5d4037; }
[data-theme="dark"] .signal-item { border-bottom-color: #333; }
[data-theme="dark"] .signal-item:hover { background: rgba(255,255,255,0.04); }
[data-theme="dark"] .notification-item { background: #2a2a2a; color: var(--text); border-color: var(--border); }
[data-theme="dark"] .notif-history { background: #2a2a2a; border-color: var(--border); }
[data-theme="dark"] .notif-history-item { border-bottom-color: #333; }

/* 全局过渡动画：主题切换时所有使用 CSS 变量的属性平滑过渡 */
body, .card, .day-box, .tracking-info, .help-box, .sell-item, .signal-item, .notification-item, .metric-box, .btn, input, .filter-btn, .sort-btn {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* 系统主题自动检测：当用户未手动设置主题时，跟随操作系统偏好 */
@media (prefers-color-scheme: dark) {
  body:not([data-theme=""]):not([data-theme="light"]) {
    --primary: #5c6bc0;
    --card-bg: #1e1e1e;
    --text: #ffffff;
    --text-secondary: #b0b0b0;
    --border: #333333;
  }
}

/* 基础重置与页面级样式 */
* { margin:0; padding:0; box-sizing:border-box; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', PingFang SC, Microsoft YaHei, sans-serif;
  /* 纵向渐变背景：从深蓝到靛蓝，营造金融专业感 */
  background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  min-height: 100vh;
  color: var(--text);
  padding: 0;
}

/* ==================== 顶部标题栏 ==================== */
.header {
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(20px);
  padding: 16px 16px;
  text-align: center;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header h1 { font-size: 1.4em; color: #fff; margin: 0; }
.header p { font-size: .85em; color: rgba(255,255,255,0.7); margin-top: 4px; }

/* 右侧按钮组：flex 行，不再单独 absolute */
.header-actions {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 101;
}

/* 通用图标圆形按钮 */
.hdr-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: 1.1em;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
  position: relative;
}
.hdr-btn:hover { background: rgba(255,255,255,.26); transform: scale(1.08); }

/* 登录按钮：胶囊形，显示文字 */
.auth-toggle {
  height: 34px;
  width: auto;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(255,255,255,.14);
  color: #fff;
  font-size: .78em;
  font-weight: 700;
  padding: 0 13px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: .02em;
  transition: background .2s, transform .15s;
}
.auth-toggle:hover { background: rgba(255,255,255,.26); transform: translateY(-1px); }

/* 主题切换：复用 hdr-btn，覆盖旧的 position:absolute */
.theme-toggle {
  position: static;
  width: 38px; height: 38px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  cursor: pointer; font-size: 1.1em;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s, transform .15s;
}
.theme-toggle:hover { background: rgba(255,255,255,.26); transform: scale(1.08); }

/* ==================== 容器与卡片 ==================== */
.container { padding: 12px; max-width: 800px; margin: 0 auto; }
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.15); }
.card h2 {
  color: var(--primary);
  font-size: 1.1em;
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e8eaf6;
}

/* ==================== Tab 导航 ==================== */
/* 胶囊式横向切换栏，用于 5 个主功能页签 */
.tab-nav {
  display: flex;
  background: #f0f2f5;
  border-radius: 50px;
  padding: 4px;
  margin-bottom: 16px;
  gap: 4px;
}
.tab-btn {
  flex: 1;
  padding: 10px 6px;
  border: none;
  background: transparent;
  border-radius: 50px;
  font-size: .8em;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
}
.tab-btn:hover { background: rgba(255,255,255,0.5); }
.tab-btn.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Tab 内容区：默认隐藏，.active 时显示并带淡入动画 */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==================== 今日选股工作台 ==================== */
.today-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.today-sidebar { min-width: 0; }
.today-main { min-width: 0; }
.strategy-overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.strategy-panel {
  min-width: 0;
  margin: 0;
  padding: 14px;
  border-radius: var(--radius);
  border: 1.5px solid rgba(26, 35, 126, .16);
  background: var(--card-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .06);
}
.strategy-panel .section-head h2 {
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .65);
}
.today-breakout-panel {
  border-color: rgba(26, 35, 126, .24);
  border-top: 4px solid var(--primary-light);
  background: linear-gradient(135deg, rgba(26, 35, 126, .055), rgba(255, 255, 255, .72));
}
.today-breakout-panel .section-head h2 {
  color: var(--primary);
}
.today-detail-panel {
  padding: 14px;
  border: 1px solid rgba(26, 35, 126, .1);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .58);
}
.strategy-panel .potential-card {
  background: rgba(255, 255, 255, .72);
}
.today-preview-card {
  border-color: rgba(26, 35, 126, .22);
}
.today-score {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
}
.potential-tag.today-primary {
  background: rgba(26, 35, 126, .1);
  color: var(--primary);
}
.strategy-panel-more {
  padding: 9px 10px;
  border-radius: 10px;
  background: rgba(26, 35, 126, .04);
  color: var(--text-secondary);
  font-size: .74rem;
  text-align: center;
}
.strategy-panel-more-btn {
  width: 100%;
  padding: 9px 10px;
  border: 1px dashed rgba(26, 35, 126, .18);
  border-radius: 10px;
  background: rgba(26, 35, 126, .04);
  color: var(--primary);
  font-size: .74rem;
  font-weight: 800;
  cursor: pointer;
}
.strategy-panel-more-btn:hover {
  background: rgba(26, 35, 126, .08);
}
[data-theme="dark"] .strategy-panel-more {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .16);
}
[data-theme="dark"] .strategy-panel-more-btn {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .16);
  color: #dce2ff;
}
[data-theme="dark"] .today-detail-panel {
  background: rgba(255, 255, 255, .04);
  border-color: var(--border);
}
[data-theme="dark"] .strategy-panel .potential-card {
  background: rgba(255, 255, 255, .06);
}
[data-theme="dark"] .strategy-panel .section-head h2 {
  text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
}
[data-theme="dark"] .today-breakout-panel .section-head h2 {
  color: #dbe4ff;
}
[data-theme="dark"] .super-potential.strategy-panel .section-head h2 {
  color: #ffd18a;
}
[data-theme="dark"] .strict-potential.strategy-panel .section-head h2 {
  color: #c9d2ff;
}
[data-theme="dark"] .swing-potential.strategy-panel .section-head h2 {
  color: #8df0bc;
}
.strategy-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.strategy-row label {
  font-size: .85em;
  font-weight: 700;
  color: var(--text-secondary);
}
.strategy-row select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text);
  font-size: .85em;
  cursor: pointer;
}
.strategy-row span {
  font-size: .75em;
  color: var(--text-secondary);
}
.list-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.list-head h2 {
  margin: 0 0 4px;
  padding: 0;
  border: 0;
  color: var(--text);
  font-size: 1.08rem;
}
.list-head p {
  margin: 0;
  color: var(--text-secondary);
  font-size: .78rem;
}
.list-head .share-poster-btn {
  flex-shrink: 0;
}
.compliance-note {
  margin: 0 0 12px;
  padding: 9px 11px;
  border-radius: 8px;
  border: 1px solid rgba(255, 145, 0, .22);
  background: rgba(255, 248, 225, .72);
  color: #7a5a00;
  font-size: .76rem;
  line-height: 1.55;
}
.compliance-note.compact {
  margin: 0 0 10px;
  font-size: .73rem;
}
[data-theme="dark"] .compliance-note {
  background: rgba(255, 145, 0, .12);
  border-color: rgba(255, 193, 7, .24);
  color: #ffdc85;
}

/* ==================== 统计栏 ==================== */
/* 4 列网格：总分析数 / 连续突破 / 今日已突破 / 跟踪中 */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  padding: 12px 4px;
  border-radius: var(--radius);
  text-align: center;
  font-size: .65em;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.stat-card:hover { transform: translateY(-2px); }
/* 状态变体：成功（连续突破）与警告（今日已突破） */
.stat-card.success { background: linear-gradient(135deg, var(--success) 0%, #69f0ae 100%); }
.stat-card.warning { background: linear-gradient(135deg, var(--warning) 0%, #ffb74d 100%); }
.stat-card .number { font-size: 1.6em; font-weight: 700; display: block; margin-top: 4px; }

/* ==================== 搜索栏 ==================== */
.search-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.search-input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  font-size: .9em;
  background: var(--card-bg);
  color: var(--text);
  transition: border-color 0.2s ease;
}
.search-input:focus { outline: none; border-color: var(--primary); }
.search-btn {
  padding: 12px 20px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}
.search-btn:hover { background: var(--primary-light); transform: scale(1.05); }

/* ==================== 超级潜力 ==================== */
.super-potential {
  margin: 14px 0 16px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1.5px solid rgba(255, 193, 7, .45);
  background: linear-gradient(135deg, rgba(255, 193, 7, .12), rgba(0, 200, 83, .08));
}
.super-potential.strategy-panel {
  margin: 0;
  border-top: 4px solid var(--accent);
}
.super-potential.strategy-panel .section-head h2 {
  color: #b05c00;
}
.strict-potential {
  margin-top: 0;
  border-color: rgba(26, 35, 126, .28);
  background: linear-gradient(135deg, rgba(26, 35, 126, .08), rgba(0, 200, 83, .07));
}
.strict-potential.strategy-panel {
  border-top-color: var(--primary);
}
.strict-potential.strategy-panel .section-head h2 {
  color: #283593;
}
.swing-potential {
  margin-top: 0;
  border-color: rgba(0, 121, 107, .28);
  background: linear-gradient(135deg, rgba(0, 121, 107, .08), rgba(255, 193, 7, .08));
}
.swing-potential.strategy-panel {
  border-top-color: #00796b;
}
.swing-potential.strategy-panel .section-head h2 {
  color: #00796b;
}
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.section-head h2 { font-size: 1.02rem; margin: 0 0 4px; color: var(--text); }
.section-head p { margin: 0; font-size: .78rem; line-height: 1.5; color: var(--text-secondary); }
.section-actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.section-count {
  flex-shrink: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255, 193, 7, .2);
  color: var(--accent-dark);
  font-size: .75rem;
  font-weight: 800;
}
.share-poster-btn {
  border: none;
  border-radius: 999px;
  padding: 7px 12px;
  background: var(--primary);
  color: #fff;
  font-size: .75rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 18px rgba(26, 35, 126, .18);
  transition: opacity .18s, transform .16s, box-shadow .18s;
}
.share-poster-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(26, 35, 126, .24);
}
.share-poster-btn:disabled {
  opacity: .55;
  cursor: default;
  box-shadow: none;
}
.potential-list { display: grid; gap: 10px; }
.potential-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-radius: 10px;
  background: var(--card-bg);
  border: 1px solid rgba(255, 193, 7, .38);
}
.strict-card {
  border-color: rgba(26, 35, 126, .22);
}
.swing-card {
  border-color: rgba(0, 121, 107, .24);
}
.potential-score {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--warning), var(--accent));
  color: #fff;
  font-weight: 900;
  font-size: .95rem;
}
.strict-score {
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.swing-score {
  background: linear-gradient(135deg, #00796b, var(--accent));
}
.potential-name { font-weight: 800; color: var(--text); }
.potential-meta { margin-top: 3px; font-size: .75rem; color: var(--text-secondary); }
.potential-reasons {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.potential-tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0, 200, 83, .1);
  color: #087f3f;
  font-size: .7rem;
  font-weight: 700;
}
.potential-tag.primary {
  background: rgba(255, 145, 0, .14);
  color: #b05c00;
}
.potential-tag.swing-primary {
  background: rgba(0, 121, 107, .12);
  color: #00695c;
}
.potential-tag.swing-tag {
  background: rgba(0, 121, 107, .08);
  color: #00695c;
}
.potential-price { text-align: right; font-weight: 900; color: var(--danger); }
.potential-change { display: block; margin-top: 2px; font-size: .76rem; }
.potential-empty {
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,.45);
  color: var(--text-secondary);
  font-size: .82rem;
  text-align: center;
}

/* ==================== 排序栏 ==================== */
/* 横向滚动按钮组：AI评分 / 涨幅 / 量能 / 类型 */
.sort-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto; /* 小屏时可横向滚动 */
}
.sort-btn {
  padding: 8px 14px;
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: 20px;
  font-size: .8em;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap; /* 禁止按钮文字换行 */
  transition: all 0.2s ease;
}
.sort-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.sort-btn.active {
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 700;
  background: rgba(26,35,126,0.05);
}
.sort-guide {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: -2px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(26,35,126,.12);
  border-radius: 8px;
  background: rgba(26,35,126,.035);
  color: var(--text-secondary);
  font-size: .76rem;
  line-height: 1.45;
}
.sort-guide strong {
  flex: 0 0 auto;
  color: var(--primary);
  font-weight: 900;
}
.sort-guide span {
  min-width: 0;
}

/* ==================== 股票卡片 ==================== */
/* 核心展示组件：每只股票的完整信息卡片 */
.stock-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  border: 2px solid transparent; /* 默认透明边框，状态变化时显色 */
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
}
.stock-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,0.12); }
/* 状态边框色：连续突破(绿) / 今日已突破(橙) / 即将突破(紫) / 跟踪中(蓝) */
.stock-card.both { border-color: var(--success); background: rgba(0,200,83,0.05); }
.stock-card.today { border-color: var(--warning); background: rgba(255,145,0,0.05); }
.stock-card.yesterday { border-color: #8d6e63; background: rgba(141,110,99,0.06); }
.stock-card.potential { border-color: #8e24aa; background: rgba(142,36,170,0.05); }
.stock-card.tracking { border-color: #2196f3; background: rgba(33,150,243,0.05); }
/* 卖出警报边框（新增，修复原缺失样式） */
.stock-card.sell-alert { border-color: var(--danger); background: rgba(255,23,68,0.05); }
.stock-card-detail { display: block; }
.mobile-signal-row {
  display: none;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 10px 50px;
}
.mobile-signal-row span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(0,200,83,.1);
  color: #087f3f;
  font-size: .7rem;
  font-weight: 800;
}
.mobile-expand-btn { display: none; }

/* 排名/状态徽章：右上角浮动标签 */
.rank-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  padding: 5px 14px;
  border-radius: 20px;
  font-size: .7em;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.rank-badge.both { background: var(--success); }
.rank-badge.today { background: var(--warning); }
.rank-badge.yesterday { background: #8d6e63; }
.rank-badge.potential { background: #8e24aa; }
.rank-badge.tracking { background: #2196f3; }
.rank-badge.sell { background: var(--danger); } /* 抛售信号徽章：红色警示 */

/* AI 评分圆标：左上角圆形分数 */
.ai-score {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75em;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}
.ai-score.high { background: var(--success); }   /* >= 85 分 */
.ai-score.medium { background: var(--warning); } /* 70~84 分 */
.ai-score.low { background: var(--danger); }     /* < 70 分 */

/* 股票头部：名称代码（左） + 当前价格（右） */
.stock-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
  /* 左右留出 ai-score 和 rank-badge 的占位空间 */
  padding-left: 50px;
  padding-right: 80px;
}
.stock-name { font-size: 1.25em; font-weight: 700; color: var(--text); }
.stock-code {
  background: rgba(0,0,0,0.06);
  padding: 3px 10px;
  border-radius: 6px;
  font-size: .75em;
  color: var(--text-secondary);
  margin-top: 4px;
  display: inline-block;
}
.stock-price { text-align: right; }
.current-price { font-size: 1.5em; font-weight: 800; color: var(--danger); }
.price-change { font-size: .9em; color: var(--danger); font-weight: 700; }

/* 微型走势图：用 div 柱子模拟近 5 日涨跌幅 */
.mini-chart {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 40px;
  margin: 10px 0;
  padding: 0 10px;
}
.mini-bar {
  flex: 1;
  background: var(--border);
  border-radius: 2px;
  min-width: 4px;
  transition: height 0.3s ease;
}
.mini-bar.up { background: var(--danger); }   /* 上涨用红色（A股习惯） */
.mini-bar.down { background: var(--success); } /* 下跌用绿色 */

/* [M05 双日对比展示] 评分:9.0/10 目标:≥9.0 状态:合格 ✅ */
/* ==================== 双日对比（昨天 vs 今天） ==================== */
.dual-day {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 12px 0;
}
.day-box {
  background: rgba(255,255,255,0.7);
  border-radius: var(--radius);
  padding: 12px 8px;
  text-align: center;
  border: 2px solid transparent;
  font-size: .85em;
  position: relative;
  transition: all 0.2s ease;
}
.day-box.pass { border-color: var(--success); background: rgba(0,200,83,0.08); }
.day-box.fail { border-color: var(--border); opacity: 0.7; }
.day-icon {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75em;
  font-weight: 700;
}
.day-box.pass .day-icon { background: var(--success); color: #fff; }
.day-box.fail .day-icon { background: var(--border); color: var(--text-secondary); }
.day-label { font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; font-size: .8em; }
.day-price { font-size: 1.2em; font-weight: 700; color: var(--text); margin: 4px 0; }
.day-change { font-size: 1em; font-weight: 800; color: var(--danger); }
.day-vol { font-size: .75em; color: var(--text-secondary); margin-top: 6px; }

/* [M06 技术指标展示] 评分:9.0/10 目标:≥9.0 状态:合格 ✅
   ==================== 指标网格 ==================== */
/* 3 列展示：量比、振幅、MACD 等关键技术指标 */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 14px 0;
}
.metric-box {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 12px 6px;
  text-align: center;
  font-size: .75em;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
/* 指标通过/不通过的视觉状态 */
.metric-box.success { border-color: var(--success); background: rgba(0,200,83,0.05); }
.metric-box.fail { border-color: var(--danger); background: rgba(255,23,68,0.05); }
.metric-box.warning { border-color: var(--warning); background: rgba(255,145,0,0.05); }
.metric-value { font-size: 1.3em; font-weight: 800; display: block; margin-top: 4px; }
.data-source-value { font-size: .72rem; line-height: 1.35; white-space: pre-line; }

/* 成交量可视化条形图 */
.vol-bar { width: 100%; height: 4px; background: var(--border); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.vol-bar-fill { height: 100%; border-radius: 2px; transition: width 0.3s ease; }
.vol-bar-fill.success { background: var(--success); }
.vol-bar-fill.fail { background: var(--danger); }

/* ==================== 操作按钮栏 ==================== */
.action-bar {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
.action-bar button {
  flex: 1;
  margin: 0;
  padding: 12px 8px;
  font-size: .85em;
  font-weight: 700;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  color: #fff;
  transition: all 0.2s ease;
}
.action-bar button:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.action-bar button:active { transform: translateY(0); }
.btn-success { background: var(--success); }
.btn-success:hover { background: #00a344; }
.btn-warning { background: var(--warning); }
.btn-warning:hover { background: #e68300; }
.btn-danger { background: var(--danger); }
.btn-danger:hover { background: #d60036; }

/* 快捷操作按钮（详情/自选/分享） */
.quick-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.quick-btn {
  padding: 6px 12px;
  background: rgba(0,0,0,0.05);
  border: none;
  border-radius: 20px;
  font-size: .75em;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.quick-btn:hover { background: var(--primary); color: #fff; transform: translateY(-1px); }

/* ==================== 跟踪信息区 ==================== */
.tracking-info {
  background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 12px;
  border: 1px solid #90caf9;
}
.tracking-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: .9em;
  border-bottom: 1px solid rgba(33,150,243,0.2);
}
.tracking-row:last-child { border-bottom: none; }

/* 提醒标签：买入/观望/卖出三种状态 */
.reminder-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: .85em;
  font-weight: 700;
  margin-top: 10px;
  animation: pulse 2s infinite; /* 呼吸灯效果，吸引注意 */
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.02); }
}
.reminder-tag.buy { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.reminder-tag.wait { background: #fff3e0; color: #e65100; border: 1px solid #ffcc80; }
.reminder-tag.sell { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

/* ==================== 抛售监控区 ==================== */
.sell-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 14px;
  margin-top: 12px;
  border: 2px solid var(--warning);
}
.sell-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 12px;
}
.sell-item {
  background: #fff8e1;
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  font-size: .8em;
  border: 1px solid #ffe0b2;
  transition: all 0.2s ease;
}
.sell-item:hover { transform: translateY(-2px); box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.sell-item-value { font-size: 1.3em; font-weight: 800; color: var(--accent-dark); display: block; margin-top: 4px; }

/* 卖出信号列表 */
.signal-list { margin: 12px 0; background: var(--card-bg); border-radius: 8px; overflow: hidden; }
.signal-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  font-size: .85em;
  border-bottom: 1px solid #f5f5f5;
  transition: background 0.2s ease;
}
.signal-item:hover { background: rgba(0,0,0,0.02); }
.signal-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8em;
  margin-right: 10px;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}
.signal-icon.warning { background: var(--warning); }
.signal-icon.danger { background: var(--danger); }
.signal-icon.success { background: var(--success); }
.signal-text { flex: 1; font-weight: 500; }
.signal-action {
  font-weight: 800;
  color: var(--accent-dark);
  margin-left: auto;
  white-space: nowrap;
  background: rgba(255,143,0,0.1);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: .9em;
}

/* 建议抛售价格展示栏 */
.suggest-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  padding: 14px;
  background: #fff3e0;
  border-radius: var(--radius);
  border: 2px solid var(--warning);
}
.price-col { text-align: center; flex: 1; }
.price-label { font-size: .8em; color: var(--text-secondary); margin-bottom: 4px; }
.price-value { font-size: 1.5em; font-weight: 800; color: var(--accent-dark); }

/* ==================== 设置页条件项 ==================== */
.condition-item {
  display: flex;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: .95em;
}
.condition-item:last-child { border-bottom: none; }
.condition-num {
  width: 32px;
  height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85em;
  font-weight: 800;
  margin-right: 12px;
  flex-shrink: 0;
}
.condition-num.new { background: #ff6b6b; }  /* 新增条件的视觉区分 */
.condition-num.sell { background: var(--warning); }

/* 设置页条件提示说明 */
.condition-tip {
  font-size: .82em;
  color: var(--text-secondary);
  font-style: italic;
  padding: 0 0 10px 44px;
  line-height: 1.4;
}

/* 设置页实时预览区 */
.settings-preview {
  margin-bottom: 14px;
  padding: 14px;
  background: linear-gradient(135deg, rgba(26,35,126,0.08) 0%, rgba(57,73,171,0.04) 100%);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-size: .95em;
  color: var(--text);
  text-align: center;
}
[data-theme="dark"] .settings-preview {
  background: linear-gradient(135deg, rgba(92,107,192,0.12) 0%, rgba(92,107,192,0.06) 100%);
}

/* 设置页数字输入框 */
input[type="number"] {
  width: 70px;
  padding: 10px;
  border: 2px solid var(--border);
  border-radius: 8px;
  font-size: 1em;
  text-align: center;
  font-weight: 700;
  color: var(--primary);
  margin: 0 8px;
  background: var(--card-bg);
  transition: border-color 0.2s ease;
}
input[type="number"]:focus { outline: none; border-color: var(--primary); }

/* 主按钮样式 */
.btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 1.05em;
  font-weight: 700;
  margin-top: 16px;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
  box-shadow: 0 4px 16px rgba(26,35,126,0.3);
  transition: all 0.3s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(26,35,126,0.4); }
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  color: var(--text);
}
.btn.secondary:hover { background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%); }

/* 跟踪页筛选按钮 */
.filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.filter-btn {
  padding: 10px 18px;
  border: 2px solid var(--border);
  background: var(--card-bg);
  border-radius: 50px;
  font-size: .85em;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}
.filter-btn:hover { border-color: var(--primary-light); color: var(--primary); }
.filter-btn.active { border-color: var(--primary); background: var(--primary); color: #fff; font-weight: 700; }

/* [M16 帮助提示系统] 评分:9.0/10 目标:≥9.0 状态:合格 ✅ */
/* 帮助提示框 */
.help-box {
  background: #e8f5e9;
  border-left: 4px solid var(--success);
  padding: 14px 16px;
  margin: 12px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .9em;
  color: #2e7d32;
  line-height: 1.5;
  border: 1px solid #c8e6c9;
  border-left-width: 4px;
}
.help-box.info { background: #e3f2fd; border-color: #2196f3; color: #1565c0; }
.help-box.warning { background: #fff3e0; border-color: var(--warning); color: #e65100; }

/* 空状态占位 */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-secondary); }
.empty-state-icon { font-size: 4em; margin-bottom: 16px; opacity: 0.5; }

/* ==================== 通知系统 ==================== */
/* 通知容器：固定右上角，纵向堆叠 */
#notificationContainer {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 320px;
  pointer-events: none; /* 容器本身不拦截点击，子元素恢复 */
}
#notificationContainer > * { pointer-events: auto; }

/* 单条通知 */
.notification-item {
  background: var(--card-bg);
  padding: 14px 18px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--success);
  transform: translateX(400px);
  transition: transform 0.3s ease, opacity 0.3s ease;
  max-width: 300px;
  word-break: break-word;
  overflow-wrap: break-word;
  font-size: .95em;
  line-height: 1.4;
  opacity: 0;
}
.notification-item.show { transform: translateX(0); opacity: 1; }
.notification-item.leaving { transform: translateX(400px); opacity: 0; }

/* 通知历史铃铛按钮 */
.notif-toggle {
  position: static;
  width: 38px; height: 38px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  font-size: 1.1em;
  cursor: pointer;
  color: #fff;
  z-index: 101;
  transition: background .2s, transform .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.notif-toggle:hover { background: rgba(255,255,255,.26); transform: scale(1.08); }

/* 未读徽章 */
.notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--danger);
  color: #fff;
  font-size: .65em;
  font-weight: 800;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 通知历史面板 */
.notif-history {
  position: fixed;
  top: 72px;
  right: 20px;
  width: 320px;
  max-height: 400px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.notif-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: .95em;
}
.notif-history-clear {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: .85em;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}
.notif-history-clear:hover { background: rgba(0,0,0,0.05); color: var(--danger); }
.notif-history-list {
  overflow-y: auto;
  padding: 8px 0;
  flex: 1;
}
.notif-history-item {
  padding: 10px 16px;
  font-size: .88em;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.4;
  word-break: break-word;
}
.notif-history-item:last-child { border-bottom: none; }
.notif-history-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
}
.notif-history-item .time {
  font-size: .75em;
  color: var(--text-secondary);
  margin-top: 2px;
}

.breakout-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  margin: -2px 0 10px 50px;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: .78rem;
  line-height: 1.45;
  background: rgba(255,255,255,.62);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}
.breakout-note strong {
  color: var(--text);
  white-space: nowrap;
}
.breakout-note.both { border-color: rgba(0,200,83,.28); background: rgba(0,200,83,.08); }
.breakout-note.today { border-color: rgba(255,145,0,.32); background: rgba(255,145,0,.08); }
.breakout-note.yesterday { border-color: rgba(141,110,99,.28); background: rgba(141,110,99,.08); }
.breakout-note.potential { border-color: rgba(142,36,170,.24); background: rgba(142,36,170,.07); }
.breakout-note.tracking { border-color: rgba(33,150,243,.28); background: rgba(33,150,243,.08); }
.notif-history-empty {
  text-align: center;
  padding: 30px 20px;
  color: var(--text-secondary);
  font-size: .9em;
}

/* 回测结果展示 */
.backtest-result {
  background: #f3e5f5;
  border-radius: var(--radius);
  padding: 16px;
  margin: 12px 0;
  border: 1px solid #ce93d8;
}
.backtest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}
.backtest-item {
  text-align: center;
  padding: 10px;
  background: rgba(255,255,255,0.5);
  border-radius: 8px;
  transition: all 0.2s ease;
}
.backtest-item:hover { background: rgba(255,255,255,0.8); transform: translateY(-2px); }
.backtest-value { font-size: 1.4em; font-weight: 800; color: var(--primary); }
.backtest-label { font-size: .75em; color: var(--text-secondary); margin-top: 4px; }

/* Loading 旋转动画 */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== 滚动条美化 ==================== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 4px; }
::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }

/* ==================== 响应式断点 ==================== */
/* [M15 响应式布局] 评分:9.0/10 目标:≥9.0 状态:合格 ✅ */
@media(min-width: 768px) { .container { padding: 20px; } }
@media(min-width: 1024px) {
  .container { max-width: 1240px; padding: 22px; }
  .today-layout {
    gap: 18px;
  }
  .strategy-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .today-main {
    padding-left: 0;
  }
  .today-sidebar .metrics-grid { grid-template-columns: repeat(4, 1fr); }
  .today-sidebar .stats-bar { grid-template-columns: repeat(4, 1fr); }
}
@media(max-width: 520px) {
  .header { padding: 20px 104px 18px 16px; text-align: left; }
  .header h1 { font-size: 1.1em; line-height: 1.3; }
  .header p { font-size: .76em; margin-top: 5px; }
  .header-actions { right: 10px; gap: 6px; }
  .auth-toggle { height: 32px; padding: 0 11px; font-size: .76em; }
  .theme-toggle,
  .notif-toggle { width: 34px; height: 34px; font-size: 1em; }
  .section-head { flex-direction: column; }
  .section-actions { width: 100%; justify-content: space-between; }
  .share-poster-btn { padding: 8px 12px; }
  .list-head { margin-top: 4px; }
  .list-head p { font-size: .74rem; }
  .stock-card { padding: 12px; margin-bottom: 10px; }
  .stock-header {
    margin-bottom: 8px;
    padding-left: 46px;
    padding-right: 62px;
  }
  .stock-name { font-size: 1.08em; }
  .stock-code { font-size: .68em; padding: 2px 8px; }
  .current-price { font-size: 1.18em; }
  .price-change { font-size: .78em; }
  .rank-badge {
    top: -8px;
    right: 8px;
    padding: 4px 9px;
    font-size: .64em;
  }
  .ai-score {
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
  }
  .mobile-signal-row { display: flex; }
  .stock-card-detail { display: none; }
  .stock-card.expanded .stock-card-detail { display: block; }
  .stock-card:not(.expanded) .breakout-note {
    margin-left: 0;
    grid-template-columns: 1fr;
  }
  .mobile-expand-btn { display: inline-flex; }
  .quick-actions { gap: 6px; }
  .quick-btn { padding: 7px 9px; font-size: .72em; }
  .breakout-note {
    grid-template-columns: 1fr;
    margin-left: 0;
    gap: 3px;
  }
  .modal-overlay { padding: 10px; align-items: flex-start; }
  .auth-modal-box { width: min(100%, 400px); max-height: calc(100vh - 20px); }
  .auth-modal-brand { padding: 24px 22px 18px; }
  .auth-form { padding: 18px; gap: 12px; }
  .wxpay-qr { width: min(210px, 100%); }
}
@media(max-width: 380px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stock-header { flex-direction: column; gap: 8px; padding-left: 50px; padding-right: 60px; }
  .stock-price { text-align: left; }
  .action-bar { flex-direction: column; }
  .dual-day { grid-template-columns: 1fr; }
}

/* ==================== 模态框 ==================== */
.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 10000; align-items: center; justify-content: center;
  padding: 18px;
  overflow-y: auto;
  animation: fadeIn .2s ease;
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--card-bg); border-radius: var(--radius); padding: 24px;
  width: 90%; max-width: 380px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: slideUp .25s ease;
}
.modal-title { font-size: 1.1em; font-weight: 700; color: var(--text); margin-bottom: 16px; }
.modal-input {
  width: 100%; padding: 12px 14px; border: 2px solid var(--border); border-radius: 8px;
  background: var(--card-bg); color: var(--text); font-size: 1.1em; font-weight: 700;
  text-align: center; box-sizing: border-box; outline: none; transition: border-color .2s;
}
.modal-input:focus { border-color: var(--primary); }
.modal-hint { font-size: .8em; color: var(--text-secondary); margin-top: 8px; text-align: center; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }

.site-disclaimer {
  max-width: 800px;
  margin: 0 auto 28px;
  padding: 0 12px 8px;
  color: rgba(255,255,255,.72);
  font-size: .76rem;
  line-height: 1.7;
  text-align: center;
}
.site-legal-links {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-left: 10px;
}
.site-legal-links a {
  color: rgba(255,255,255,.88);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 700;
}

@media(min-width: 768px) {
  .site-disclaimer { padding-left: 20px; padding-right: 20px; }
}

/* ==================== 登录 / 会员模态框 ==================== */
.auth-modal-box {
  position: relative;
  background: var(--card-bg);
  border-radius: 20px;
  width: 90%; max-width: 400px;
  max-height: calc(100vh - 36px);
  padding: 0;
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
  animation: slideUp .28s ease;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* 关闭按钮 */
.auth-modal-close {
  position: absolute; top: 14px; right: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  border: none; background: rgba(128,128,128,.15);
  color: var(--text-secondary); font-size: .95em;
  cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background .15s;
  z-index: 2;
}
.auth-modal-close:hover { background: rgba(128,128,128,.28); }

/* 顶部品牌横幅 */
.auth-modal-brand {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 28px 28px 22px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  color: #fff;
}
.auth-modal-brand-name { font-size: 1.15em; font-weight: 800; letter-spacing: .04em; }
.auth-modal-brand-sub { font-size: .8em; opacity: .8; }

/* 表单容器 */
.auth-form {
  display: flex; flex-direction: column; gap: 14px;
  padding: 22px 28px 24px;
}

/* 字段组 */
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-label { font-size: .8em; font-weight: 700; color: var(--text-secondary); }

/* 输入框组合 */
.auth-input-wrap {
  display: flex; align-items: center;
  border: 1.5px solid var(--border); border-radius: 10px;
  background: var(--card-bg); overflow: hidden;
  transition: border-color .2s;
}
.auth-input-wrap:focus-within { border-color: var(--primary); }

.auth-prefix {
  padding: 0 12px; font-size: .88em; font-weight: 700;
  color: var(--text-secondary); border-right: 1.5px solid var(--border);
  white-space: nowrap; user-select: none;
  background: rgba(128,128,128,.06);
  align-self: stretch; display: flex; align-items: center;
}

.auth-input {
  flex: 1; border: none; outline: none; padding: 13px 14px;
  font-size: .98em; background: transparent; color: var(--text);
  font-weight: 500;
}

/* 验证码行 */
.auth-code-wrap .auth-input { border-right: 1.5px solid var(--border); min-width: 0; }
.auth-send-btn {
  padding: 0 10px; min-width: 108px; border: none; outline: none;
  background: transparent; color: var(--primary); font-size: .82em;
  font-weight: 700; cursor: pointer; white-space: nowrap;
  flex: 0 0 108px;
  transition: background .15s;
}
.auth-send-btn:hover:not(:disabled) { background: rgba(26,35,126,.07); }
.auth-send-btn:disabled { color: var(--text-secondary); cursor: default; }

/* 协议说明 */
.auth-agreement {
  font-size: .76em; color: var(--text-secondary); text-align: center;
  line-height: 1.5;
}
.auth-price { color: var(--warning); font-weight: 800; }
.auth-remember {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: .82em;
  line-height: 1.4;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
}
.auth-remember input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}
.auth-remember span {
  min-width: 0;
}
.auth-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 11px;
  border-radius: 8px;
  border: 1px solid rgba(26,35,126,.12);
  background: rgba(26,35,126,.04);
  color: var(--text-secondary);
  font-size: .76em;
  line-height: 1.55;
  cursor: pointer;
  user-select: none;
}
.auth-consent input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  accent-color: var(--primary);
  flex: 0 0 auto;
}
.auth-consent a {
  display: inline-block;
  white-space: nowrap;
  color: var(--primary);
  font-weight: 800;
  text-decoration: none;
  margin: 0 1px;
}
.auth-consent a:hover { text-decoration: underline; }

/* 登录主按钮 */
.auth-submit-btn {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff; border: none; border-radius: 10px;
  font-size: 1em; font-weight: 700; cursor: pointer;
  letter-spacing: .04em; transition: opacity .2s, transform .15s;
}
.auth-submit-btn:hover { opacity: .9; transform: translateY(-1px); }
.auth-submit-btn:active { transform: translateY(0); }

/* 跳过按钮 */
.auth-skip-btn {
  width: 100%; padding: 11px;
  background: transparent; color: var(--text-secondary);
  border: 1.5px solid var(--border); border-radius: 10px;
  font-size: .9em; cursor: pointer; transition: background .15s;
}
.auth-skip-btn:hover { background: rgba(128,128,128,.07); }

/* ==================== 会员定价卡 ==================== */
.member-price-card {
  margin-top: 4px; padding: 14px;
  border: 1.5px solid rgba(255,193,7,.35);
  border-radius: 8px;
  background: rgba(255,193,7,.08);
}
.member-price-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.member-price-title { font-size: .95em; font-weight: 850; color: var(--text); }
.member-price-note { margin-top: 4px; font-size: .78em; color: var(--text-secondary); line-height: 1.45; }
.member-price-amount {
  font-size: 1.9em; font-weight: 900; color: var(--warning);
  line-height: 1; white-space: nowrap;
}
.member-price-amount span { font-size: .45em; color: var(--text-secondary); font-weight: 700; }
.member-price-unit { font-size: 1em; color: var(--text-secondary); font-weight: 600; }

/* 权益列表 */
.member-perks {
  list-style: none; margin: 12px 0; padding: 0;
  display: flex; flex-direction: column; gap: 9px;
}
.member-perks li {
  font-size: .88em; color: var(--text);
  padding: 9px 12px; border-radius: 8px;
  background: rgba(26,35,126,.05); border-left: 3px solid var(--primary);
}
[data-theme="dark"] .member-perks li { background: rgba(92,107,192,.1); }
.member-compliance-note {
  margin: -2px 0 12px;
  color: var(--text-secondary);
  font-size: .76rem;
  line-height: 1.5;
  text-align: center;
}
.member-pay-btn { margin-top: 2px; }
.member-invite-card {
  margin-top: 10px;
  padding: 13px;
  border: 1px solid rgba(26,35,126,.18);
  border-radius: 8px;
  background: rgba(26,35,126,.04);
}
.member-invite-title {
  font-size: .95em;
  font-weight: 850;
  color: var(--text);
}
.member-invite-note,
.member-invite-stats {
  margin-top: 6px;
  font-size: .8em;
  line-height: 1.45;
  color: var(--text-secondary);
}
.member-invite-link {
  margin: 9px 0;
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  color: var(--primary);
  font-size: .78em;
  font-weight: 800;
  word-break: break-all;
}
.agent-dashboard-card {
  margin-top: 10px;
  padding: 13px;
  border: 1px solid rgba(0,200,83,.24);
  border-radius: 8px;
  background: rgba(0,200,83,.07);
}
.agent-dashboard-title {
  font-size: .95em;
  font-weight: 850;
  color: var(--text);
}
.agent-dashboard-note {
  margin: 6px 0 10px;
  font-size: .8em;
  line-height: 1.45;
  color: var(--text-secondary);
}
.member-order-box {
  margin-top: 10px; padding: 14px;
  border-radius: 8px; background: var(--card-bg);
  border: 1px solid var(--border);
  font-size: .8em; color: var(--text-secondary);
  text-align: center;
  transition: border-color .2s, box-shadow .2s, background .2s;
  scroll-margin: 18px;
}

#posterPreviewOverlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(13, 22, 66, .92);
  padding: 12px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.poster-preview-sheet {
  width: min(760px, 100%);
  margin: 0 auto 20px;
  color: #fff;
}
.poster-preview-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 12px;
  background: rgba(13, 22, 66, .96);
}
.poster-preview-head strong {
  display: block;
  font-size: .98rem;
}
.poster-preview-head span {
  display: block;
  margin-top: 3px;
  color: rgba(255,255,255,.78);
  font-size: .78rem;
  line-height: 1.45;
}
.poster-preview-close {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.36);
  border-radius: 8px;
  background: rgba(255,255,255,.16);
  color: #fff;
  padding: 8px 12px;
  font-weight: 800;
}
.poster-preview-body img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(0,0,0,.28);
  -webkit-user-select: auto;
  user-select: auto;
  -webkit-touch-callout: default;
}
.member-order-box.is-highlighted {
  border-color: rgba(255,193,7,.9);
  box-shadow: 0 0 0 4px rgba(255,193,7,.16), 0 12px 28px rgba(255,193,7,.18);
  background: rgba(255,193,7,.05);
}
.wxpay-title {
  color: var(--text);
  font-size: .98rem;
  font-weight: 850;
  margin-bottom: 10px;
}
.wxpay-qr {
  display: block;
  width: min(220px, 100%);
  aspect-ratio: 1;
  margin: 0 auto 10px;
  border-radius: 8px;
  border: 8px solid #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.12);
  background: #fff;
}
.wxpay-tip {
  line-height: 1.5;
  color: var(--text-secondary);
  font-size: .78rem;
}

/* ==================== 会员成功弹窗 ==================== */
.member-success-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 11000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0,0,0,.56);
  animation: fadeIn .2s ease;
}
.member-success-overlay.show { display: flex; }
.member-success-box {
  width: min(390px, 100%);
  position: relative;
  padding: 24px;
  border-radius: 12px;
  background: var(--card-bg);
  color: var(--text);
  text-align: center;
  box-shadow: 0 18px 54px rgba(0,0,0,.28);
  animation: slideUp .22s ease;
}
.member-success-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: rgba(128,128,128,.12);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 800;
}
.member-success-close:hover { background: rgba(128,128,128,.2); }
.member-success-title {
  margin: 8px 34px 8px;
  font-size: 1.16rem;
  line-height: 1.35;
  font-weight: 900;
  color: var(--primary);
}
.member-success-subtitle {
  margin-bottom: 14px;
  font-size: .92rem;
  color: var(--text-secondary);
  font-weight: 700;
}
.member-success-qr {
  display: block;
  width: min(260px, 100%);
  margin: 0 auto 18px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
}

/* 状态chip（移入表单内） */
.auth-status-chip {
  display: inline-block; font-size: .78em; font-weight: 700;
  opacity: .82;
}
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }


/* ==================== 会员状态与付费收口 ==================== */
.member-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: -2px 0 14px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.92);
  color: var(--text);
  box-shadow: var(--shadow);
}
.member-status-bar div { min-width: 0; }
.member-status-bar strong { display: block; font-size: .9rem; color: var(--primary); margin-bottom: 2px; }
.member-status-bar span { display: block; font-size: .78rem; line-height: 1.45; color: var(--text-secondary); }
.member-status-bar button {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.member-status-bar.member { border-color: rgba(0,200,83,.34); background: rgba(232,245,233,.96); }
.member-status-bar.trial { border-color: rgba(255,145,0,.34); background: rgba(255,248,225,.96); }
.member-status-bar.expired { border-color: rgba(255,23,68,.28); background: rgba(255,235,238,.96); }
.recommendation-reason {
  display: grid;
  gap: 4px;
  margin: 0 0 10px 50px;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(26,35,126,.045);
  border: 1px solid rgba(26,35,126,.10);
  color: var(--text-secondary);
  font-size: .78rem;
  line-height: 1.5;
}
.recommendation-reason strong { color: var(--primary); font-weight: 900; }
.data-update-note { color: var(--text-secondary); background: rgba(0,0,0,.025); }
.premium-blur-card { position: relative; overflow: hidden; min-height: 150px; }
.premium-blur-content { filter: blur(4px); opacity: .62; pointer-events: none; }
.premium-card-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.64);
  color: var(--primary);
  font-weight: 900;
  text-align: center;
  padding: 16px;
}
.premium-blur-line {
  height: 12px;
  margin: 10px 12px 0 50px;
  border-radius: 999px;
  background: rgba(26,35,126,.16);
}
.premium-blur-line.short { width: 58%; }
.premium-lock-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px 0;
  padding: 16px;
  border-radius: var(--radius);
  border: 1.5px solid rgba(255,145,0,.45);
  background: linear-gradient(135deg, rgba(255,248,225,.98), rgba(255,235,238,.92));
  box-shadow: var(--shadow);
}
.premium-lock-card strong { display: block; margin-bottom: 4px; color: var(--text); }
.premium-lock-card span { display: block; color: var(--text-secondary); font-size: .84rem; line-height: 1.5; }
.premium-lock-card button {
  flex-shrink: 0;
  border: none;
  border-radius: 999px;
  padding: 10px 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}
@media(max-width: 520px) {
  .member-status-bar,
  .premium-lock-card { flex-direction: column; align-items: stretch; }
  .member-status-bar button,
  .premium-lock-card button { width: 100%; }
  .recommendation-reason { margin-left: 0; }
}
