/* 跟单社区首页 / 策略详情 */
:root {
  --primary: #0c4a6e;
  --primary-dark: #082f49;
  --accent: #0e7490;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --up: #059669;
  --down: #dc2626;
  --gradient: linear-gradient(145deg, #0c4a6e 0%, #0e7490 48%, #155e75 100%);
  --hero-mesh: radial-gradient(ellipse 80% 60% at 20% 20%, rgba(34,211,238,0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 80% 10%, rgba(14,165,233,0.18), transparent 50%),
    linear-gradient(160deg, #082f49 0%, #0c4a6e 40%, #155e75 100%);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
body.community-page {
  background:
    linear-gradient(180deg, rgba(241,245,249,0.92), rgba(241,245,249,0.96)),
    repeating-linear-gradient(-12deg, transparent, transparent 18px, rgba(12,74,110,0.03) 18px, rgba(12,74,110,0.03) 19px);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 顶栏 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.logo span { color: var(--primary); }
.logo-img {
  display: block;
  height: 32px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
}
.site-brand-logo[hidden] { display: none !important; }
.hero-title {
  text-align: center;
}
.nav-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.lang-switch {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}
.lang-switch-face {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid #dadce0;
  border-radius: 8px;
  background: #f8f9fa;
  font-size: 13px;
  color: #5f6368;
  line-height: 1;
  pointer-events: none;
  user-select: none;
}
.lang-switch-icon,
.lang-switch-chevron {
  flex-shrink: 0;
  display: block;
}
.lang-switch-name {
  white-space: nowrap;
}
.lang-switch-select {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  font-size: 13px;
}
.btn {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: filter 0.15s;
}
.btn:hover { filter: brightness(1.06); text-decoration: none; }
.btn-outline {
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--primary);
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(15,108,189,0.35);
}

/* Hero */
.hero {
  background: var(--gradient);
  color: #fff;
  padding: 72px 0 80px;
  text-align: center;
}
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.hero .tagline {
  font-size: clamp(16px, 2.5vw, 20px);
  opacity: 0.95;
  margin: 0 0 12px;
}
.hero .sub {
  font-size: 15px;
  opacity: 0.85;
  max-width: 640px;
  margin: 0 auto 32px;
}
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero .btn-primary {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 12px 28px;
  font-size: 16px;
}
.hero .btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}

/* 区块 */
section { padding: 64px 0; }
section.alt { background: #fff; }
.section-title {
  text-align: center;
  margin: 0 0 12px;
  font-size: 28px;
  font-weight: 700;
}
.section-desc {
  text-align: center;
  color: var(--muted);
  margin: 0 auto 40px;
  max-width: 560px;
  font-size: 15px;
}

/* 功能卡片 */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 26px 24px;
  box-shadow: 0 2px 8px rgba(15,23,42,0.04);
  transition: box-shadow 0.2s, transform 0.2s;
}
.feature-card:hover {
  box-shadow: 0 8px 24px rgba(15,23,42,0.08);
  transform: translateY(-2px);
}
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}
.feature-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
}
.feature-card p {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
}

/* 重要功能 — 两列列表 */
.highlight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.highlight-item {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}
.highlight-item h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
}
.highlight-item p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

/* 优势 */
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 24px;
}
.why-item { text-align: center; padding: 20px 16px; }
.why-item .icon { font-size: 32px; margin-bottom: 12px; }
.why-item h4 { margin: 0 0 8px; font-size: 16px; }
.why-item p { margin: 0; font-size: 13px; color: var(--muted); }

/* CTA */
.cta {
  background: var(--gradient);
  color: #fff;
  text-align: center;
  padding: 56px 20px;
}
.cta h2 { margin: 0 0 12px; font-size: 26px; }
.cta p { margin: 0 0 24px; opacity: 0.9; font-size: 15px; }

/* 部署方式 */
.deploy-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}
.deploy-box {
  flex: 1;
  min-width: 260px;
  max-width: 340px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
}
.deploy-box h4 { margin: 0 0 8px; font-size: 16px; }
.deploy-box p { margin: 0; font-size: 13px; color: var(--muted); }

/* 页脚 */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 32px 0;
  font-size: 13px;
  text-align: center;
}
.site-footer a { color: #cbd5e1; }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid transparent;
  padding: 8px 12px;
}
.btn-ghost:hover { background: rgba(12,74,110,0.06); }
.btn-outline.light {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.65);
}
.btn-lg { padding: 12px 22px; font-size: 15px; }
.nav-user {
  font-size: 13px;
  color: var(--muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Community hero */
.community-hero {
  position: relative;
  overflow: hidden;
  background: transparent;
  color: #fff;
  padding: 56px 0 64px;
  text-align: left;
}
.community-hero .hero-bg {
  position: absolute;
  inset: 0;
  background: var(--hero-mesh);
  z-index: 0;
}
.community-hero .hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  margin: 0 0 14px;
  font-size: 13px;
  letter-spacing: 0.04em;
  opacity: 0.8;
}
.hero-brand {
  margin: 0 0 12px;
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.hero-brand small {
  display: block;
  margin-top: 6px;
  font-size: 0.42em;
  font-weight: 500;
  opacity: 0.85;
  letter-spacing: 0.08em;
}
.hero-tagline {
  margin: 0 0 28px;
  font-size: 16px;
  opacity: 0.9;
  max-width: 520px;
}
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 28px;
  margin-bottom: 28px;
}
.hero-stat strong {
  display: block;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}
.hero-stat span {
  font-size: 12px;
  opacity: 0.75;
}
.community-hero .hero-actions { justify-content: flex-start; }
.community-hero .btn-primary {
  background: #fff;
  color: var(--primary-dark);
}

/* Board */
.board-section { padding: 48px 0 56px; }
.board-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.board-head .section-title,
.board-head .section-desc { text-align: left; margin-left: 0; margin-right: 0; }
.board-head .section-desc { margin-bottom: 0; }
.board-meta { font-size: 13px; color: var(--muted); }
.board-list { display: flex; flex-direction: column; gap: 12px; }
.board-card {
  display: grid;
  grid-template-columns: 48px 1fr 120px;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.board-card:hover {
  text-decoration: none;
  transform: translateY(-2px);
  border-color: rgba(14,116,144,0.35);
  box-shadow: 0 12px 28px rgba(15,23,42,0.08);
}
.board-card .rank {
  font-size: 22px;
  font-weight: 800;
  color: var(--primary);
  text-align: center;
}
.board-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.board-title-row h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}
.board-sub {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--muted);
}
.board-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.board-metrics strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
}
.board-metrics span {
  font-size: 11px;
  color: var(--muted);
}
.board-spark {
  height: 56px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}
.board-empty {
  text-align: center;
  color: var(--muted);
  padding: 40px 16px;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: 12px;
}
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.badge.st-on { background: #d1fae5; color: #065f46; }
.badge.st-apply { background: #ffedd5; color: #9a3412; }
.badge.st-off { background: #f1f5f9; color: #64748b; }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }

.chart-bars {
  min-height: 120px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  padding: 8px 0;
}
.chart-bars .bar {
  flex: 1;
  min-width: 4px;
  background: linear-gradient(180deg, #22d3ee, #0e7490);
  border-radius: 3px 3px 0 0;
  opacity: 0.9;
}
.chart-bars .bar.neg { background: linear-gradient(180deg, #f87171, #dc2626); }
.chart-empty { color: var(--muted); font-size: 13px; margin: 24px 0; }

.flow-section { padding: 20px 0 64px; }
.flow-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.flow-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 20px;
}
.flow-card span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 10px;
}
.flow-card h3 { margin: 0 0 6px; font-size: 16px; }
.flow-card p { margin: 0; font-size: 13px; color: var(--muted); }
.footer-note { margin-top: 10px; opacity: 0.7; font-size: 12px; }

/* Strategy detail */
.strategy-main { padding: 28px 0 56px; }
.back-link {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 14px;
  color: var(--muted);
}
.strategy-hero-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  margin-bottom: 20px;
}
.strategy-hero-top {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.strategy-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
}
.strategy-hero-card h1 {
  margin: 0 0 10px;
  font-size: clamp(24px, 4vw, 34px);
}
.strategy-summary {
  margin: 0 0 12px;
  color: var(--muted);
  max-width: 560px;
}
.strategy-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
}
.strategy-cta { text-align: right; min-width: 200px; }
.big-metric { margin-bottom: 14px; }
.big-metric strong {
  display: block;
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
}
.big-metric span { font-size: 12px; color: var(--muted); }
.cta-hint { margin: 8px 0 0; font-size: 12px; color: var(--muted); max-width: 220px; margin-left: auto; }
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.metric {
  background: #f8fafc;
  border-radius: 10px;
  padding: 12px 14px;
}
.metric strong { display: block; font-size: 18px; }
.metric span { font-size: 12px; color: var(--muted); }
.strategy-panels {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
}
.panel h2 { margin: 0 0 8px; font-size: 16px; }

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 16px;
}
.modal-backdrop[hidden] { display: none !important; }
.modal-card {
  width: min(440px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.2);
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.modal-head h3 { margin: 0; font-size: 18px; }
.modal-close {
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.follow-form label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 12px;
}
.follow-form input,
.follow-form select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.form-tip { font-size: 12px; color: var(--muted); margin: 0 0 12px; }
.form-msg { font-size: 13px; color: var(--down); margin: 0 0 12px; }
.form-msg.ok { color: var(--up); }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

@media (max-width: 800px) {
  .board-card { grid-template-columns: 36px 1fr; }
  .board-spark { display: none; }
  .board-metrics { grid-template-columns: repeat(2, 1fr); }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .strategy-panels { grid-template-columns: 1fr; }
  .flow-row { grid-template-columns: 1fr; }
  .strategy-cta { text-align: left; }
  .cta-hint { margin-left: 0; }
}

@media (max-width: 600px) {
  .hero { padding: 48px 0 56px; }
  section { padding: 44px 0; }
  .community-hero { padding: 40px 0 48px; }
  .nav-actions .btn-ghost { display: none; }
}
