/* ── 狗蛋地缘信号 v4 —— 三栏并排黄金+原油 ── */
:root {
  --bg: #0a0e12;
  --bg2: #11161d;
  --card: #161c24;
  --card-hover: #1b2230;
  --border: #242d3a;
  --text: #dce3ec;
  --text2: #8fa1b8;
  --text3: #55687d;
  --gold: #d4a843;
  --gold-light: #f0d070;
  --gold-dark: #8b6914;
  --green: #2ea44f;
  --green-bg: #0d2215;
  --red: #e5534b;
  --red-bg: #251010;
  --orange: #d29922;
  --orange-bg: #1f1608;
  --blue: #58a6ff;
  --blue-bg: #0a1622;
  --radius: 10px;
  --radius-sm: 6px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", sans-serif;
}

/* ── 导航 ── */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,14,18,0.88); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border); padding: 0 20px;
}
.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; height: 52px;
}
.nav-brand { font-size: 17px; font-weight: 700; color: var(--gold); text-decoration: none; display: flex; align-items: center; gap: 6px; }
.nav-brand .icon { font-size: 22px; }
.nav-links { display: flex; gap: 4px; }
.nav-links a { color: var(--text2); text-decoration: none; padding: 5px 12px; border-radius: var(--radius-sm); font-size: 13px; }
.nav-links a:hover, .nav-links a.active { color: var(--text); background: var(--card); }
.nav-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text3); }
.nav-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: pulse-dot 2s infinite; }
@keyframes pulse-dot { 0%,100%{opacity:1} 50%{opacity:.4} }

.main { max-width: 1280px; margin: 0 auto; padding: 20px; }

.hero { text-align: center; padding: 28px 0 20px; }
.hero h1 {
  font-size: 36px; font-weight: 800;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero .tagline { color: var(--text2); font-size: 14px; max-width: 500px; margin: 4px auto 0; }

/* ── 三栏容器 ── */
.triple-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

/* ── 价格卡片 ── */
.price-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
}
.gold-card { border-color: #3a3020; background: linear-gradient(135deg, #1a1810, #13171c); }
.oil-card { border-color: #1a2a38; background: linear-gradient(135deg, #101418, #13171c); }
.brent-card { border-color: #251a2a; background: linear-gradient(135deg, #14101a, #13171c); }
.pc-label { font-size: 11px; color: var(--text3); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.pc-price {
  font-size: 32px; font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.pc-change {
  margin-top: 4px; font-size: 14px; font-weight: 700;
}
.pc-change.up { color: var(--green); }
.pc-change.down { color: var(--red); }
.pc-change.flat { color: var(--text3); }

/* ── 信号卡片 ── */
.signal-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
  transition: border-color 0.3s;
}
.signal-card.bullish { border-color: var(--green); background: linear-gradient(135deg, rgba(46,164,79,0.06), var(--card)); }
.signal-card.bearish { border-color: var(--red); background: linear-gradient(135deg, rgba(229,83,75,0.06), var(--card)); }
.signal-card.strong-bullish { border-color: var(--green); background: linear-gradient(135deg, rgba(46,164,79,0.12), var(--card)); }
.signal-card.strong-bearish { border-color: var(--red); background: linear-gradient(135deg, rgba(229,83,75,0.12), var(--card)); }
.sig-label { font-size: 18px; font-weight: 800; margin-bottom: 4px; }
.sig-score { font-size: 40px; font-weight: 900; line-height: 1.1; }
.sig-score.bull { color: var(--green); }
.sig-score.bear { color: var(--red); }
.sig-score.neutral { color: var(--gold); }
.sig-meta {
  display: flex; justify-content: center; gap: 16px;
  margin-top: 6px; font-size: 13px; color: var(--text3);
}
.sig-meta-item { display: flex; align-items: center; gap: 3px; }
.sig-meta-item b { color: var(--text); }
.sig-reason { font-size: 11px; color: var(--text2); margin-top: 6px; line-height: 1.4; }
.signal-pills { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin-top: 8px; }
.signal-pill {
  padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 500;
}
.signal-pill.bull { background: var(--green-bg); color: var(--green); }
.signal-pill.bear { background: var(--red-bg); color: var(--red); }
.signal-pill.warn { border: 1px dashed var(--orange); color: var(--orange); background: transparent; }

/* ── 警告 ── */
.alert {
  padding: 8px 12px; border-radius: var(--radius-sm); margin: 4px 0;
  font-size: 12px; display: flex; align-items: center; gap: 6px;
}
.alert.warn { background: var(--orange-bg); color: var(--orange); }
.alert.danger { background: var(--red-bg); color: var(--red); }

/* ── 网格/卡片 ── */
.grid { display: grid; gap: 12px; }
.grid-2 { grid-template-columns: 1.6fr 1fr; }
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px;
}
.card.full { grid-column: 1/-1; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-header h3 { font-size: 14px; font-weight: 600; }

/* ── 统计行 ── */
.stat-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.03);
  font-size: 13px;
}
.stat-row:last-child { border: none; }
.stat-val { font-weight: 700; font-size: 15px; }
.stat-val.green { color: var(--green); }
.stat-val.red { color: var(--red); }
.stat-val.gold { color: var(--gold); }

/* ── 进度条 ── */
.progress { height: 5px; background: #1e2530; border-radius: 3px; margin-top: 3px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.progress-fill.green { background: var(--green); }
.progress-fill.orange { background: var(--orange); }
.progress-fill.red { background: var(--red); }

/* ── 价位 ── */
.level-section { margin-bottom: 8px; }
.lvl-title { font-size: 11px; color: var(--text3); margin-bottom: 4px; font-weight: 600; }
.lvl-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; border-radius: var(--radius-sm); background: rgba(255,255,255,0.01); margin: 2px 0; font-size: 12px; }
.lvl-row .lvl-price { font-weight: 700; font-size: 13px; }
.lvl-row .lvl-dist { font-size: 11px; color: var(--text3); }
.lvl-current { text-align: center; padding: 6px; margin: 6px 0; background: rgba(212,168,67,0.06); border-radius: var(--radius-sm); font-weight: 700; font-size: 15px; color: var(--gold); }

/* ── 新闻 ── */
.news-item { padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.03); font-size: 12px; }
.news-item:last-child { border: none; }
.news-title { font-size: 13px; }
.news-meta { font-size: 11px; color: var(--text3); margin-top: 2px; }
.news-tag { display: inline-block; padding: 1px 6px; border-radius: 8px; font-size: 10px; margin-right: 4px; }
.news-tag.up { background: var(--green-bg); color: var(--green); }
.news-tag.down { background: var(--red-bg); color: var(--red); }

/* ── 标签 ── */
.tag { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }
.tag.green { background: var(--green-bg); color: var(--green); }
.tag.red { background: var(--red-bg); color: var(--red); }
.tag.gold { background: rgba(212,168,67,0.12); color: var(--gold); }

.footer {
  text-align: center; padding: 24px; margin-top: 32px;
  border-top: 1px solid var(--border); color: var(--text3); font-size: 11px;
}

@media (max-width: 768px) {
  .triple-row { grid-template-columns: 1fr; gap: 8px; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 22px; }
  .hero .tagline { font-size: 12px; }
  .pc-price { font-size: 22px; }
  .pc-change { font-size: 12px; }
  .sig-score { font-size: 28px; }
  .sig-label { font-size: 15px; }
  .price-card { padding: 12px 14px; }
  .signal-card { padding: 12px; }
  .nav-links { display: none; }
  .main { padding: 12px; }
}
