/* ============================================
   黄金风向标 - Gold Theme Stylesheet
   ============================================ */

:root {
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-card: #1e1e1e;
  --bg-card-hover: #252525;
  --gold: #d4a853;
  --gold-light: #f0d68a;
  --gold-dark: #b8912f;
  --gold-glow: rgba(212,168,83,0.15);
  --text-primary: #e8e8e8;
  --text-secondary: #a0a0a0;
  --text-muted: #666;
  --green: #2ecc71;
  --red: #e74c3c;
  --blue: #5dade2;
  --border: #2a2a2a;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --transition: 0.25s ease;
}

* { margin:0; padding:0; box-sizing:border-box; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

.container { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.header {
  background: linear-gradient(135deg, #1a1000 0%, #0f0f0f 50%, #1a1000 100%);
  border-bottom: 1px solid var(--gold-dark);
  padding: 36px 0 28px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, var(--gold-glow), transparent 60%);
  opacity: 0.3;
}
.logo {
  font-size: 2.2rem;
  font-weight: 800;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 2px;
  position: relative;
  z-index: 1;
}
.logo-icon { -webkit-text-fill-color: var(--gold); font-size: 1.4rem; margin-right: 6px; }
.subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

/* ===== Price Panel ===== */
.price-panel {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
}
.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  transition: var(--transition);
}
.price-card:hover {
  border-color: var(--gold-dark);
  box-shadow: 0 0 20px var(--gold-glow);
}
.main-price {
  border-color: var(--gold-dark);
  background: linear-gradient(145deg, #1e1a10, var(--bg-card));
}
.price-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.price-header h2 { font-size: 0.9rem; color: var(--text-secondary); font-weight: 500; }
.price-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 4px;
}
.price-body { display: flex; align-items: baseline; gap: 10px; }
.price-value {
  font-size: 1.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-family: "SF Mono","Consolas","Monaco",monospace;
}
.price-change { font-size: 0.85rem; font-weight: 600; }
.price-change.up { color: var(--green); }
.price-change.down { color: var(--red); }
.price-time {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ===== Overall Section ===== */
.overall-section { margin: 0 0 24px; }
.overall-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}
.overall-card.bullish { border-color: var(--green); background: linear-gradient(145deg, #0a1a10, var(--bg-card)); }
.overall-card.bearish { border-color: var(--red); background: linear-gradient(145deg, #1a0a0a, var(--bg-card)); }
.overall-card.neutral { border-color: var(--blue); background: linear-gradient(145deg, #0a0a1a, var(--bg-card)); }
.overall-icon { font-size: 3rem; }
.overall-content { flex: 1; }
.overall-content h3 { font-size: 1.1rem; margin-bottom: 4px; }
.overall-content p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 10px; }

.progress-bar {
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.6s ease, background 0.6s ease;
  background: var(--gold);
}
.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* ===== Date Nav ===== */
.date-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 0 20px;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.date-btn {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  transition: var(--transition);
}
.date-btn:hover:not(:disabled) {
  background: var(--bg-card-hover);
  color: var(--gold);
  border-color: var(--gold-dark);
}
.date-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.today-btn { color: var(--gold); border-color: var(--gold-dark); }
.date-display {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gold-light);
  min-width: 120px;
  text-align: center;
}

/* ===== News Section ===== */
.news-section { margin-bottom: 24px; }
.section-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.news-count { font-size: 0.75rem; color: var(--text-muted); font-weight: 400; margin-left: auto; }

.news-list { display: flex; flex-direction: column; gap: 14px; }

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 22px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.news-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 0 2px 2px 0;
}
.news-card.bullish::before { background: var(--green); }
.news-card.bearish::before { background: var(--red); }
.news-card.neutral::before { background: var(--blue); }
.news-card:hover { border-color: #444; box-shadow: var(--shadow); }

.news-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.news-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  flex: 1;
}
.news-tag {
  flex-shrink: 0;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.news-tag.positive { background: #1a3a1a; color: var(--green); }
.news-tag.negative { background: #3a1a1a; color: var(--red); }
.news-tag.neutral { background: #1a1a3a; color: var(--blue); }

.news-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.news-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.news-card-analysis {
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}
.news-card-analysis strong { color: var(--gold-light); }
.news-card-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.news-keyword {
  font-size: 0.7rem;
  background: rgba(212,168,83,0.1);
  color: var(--gold);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(212,168,83,0.2);
}

.news-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

/* ===== Rules Section ===== */
.rules-section { margin: 0 0 32px; }
.rules-section details {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.rules-section summary {
  padding: 14px 22px;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-secondary);
  transition: var(--transition);
}
.rules-section summary:hover { color: var(--gold); }
.rules-content {
  padding: 0 22px 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.8;
}
.rules-content .rule-group { margin-bottom: 12px; }
.rules-content .rule-group h4 { color: var(--text-secondary); margin-bottom: 4px; }
.rules-content .rule-group .tag { display: inline-block; padding: 1px 6px; border-radius: 3px; margin-right: 4px; margin-bottom: 4px; font-size: 0.72rem; }
.rules-content .rule-group .tag.bull { background: #1a3a1a; color: var(--green); }
.rules-content .rule-group .tag.bear { background: #3a1a1a; color: var(--red); }

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 28px 20px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.78rem;
  line-height: 1.8;
}

/* ===== Loading ===== */
.loading { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--border); border-top-color: var(--gold); border-radius: 50%; animation: spin 0.8s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .price-panel { grid-template-columns: 1fr; }
  .logo { font-size: 1.6rem; }
  .price-value { font-size: 1.4rem; }
  .overall-card { flex-direction: column; text-align: center; }
  .date-nav { flex-wrap: wrap; }
}
