:root {
  --green: #2ecc71;
  --red: #e74c3c;
  --gray: #b0b0b0;
  --bg: #f5f6fa;
  --card-bg: #ffffff;
  --text: #2c3e50;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

header {
  padding: 16px 20px;
  background: var(--text);
  color: white;
}

header h1 {
  margin: 0 0 4px 0;
  font-size: 1.3rem;
}

.muted {
  color: #888;
  font-size: 0.85rem;
}

header .muted {
  color: #cfd8e3;
}

main {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

.card h2 {
  margin: 0 0 12px 0;
  font-size: 1.05rem;
}

.lights {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.light-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  background: #fafafa;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 2px rgba(0,0,0,0.3);
}

.dot.green { background: var(--green); }
.dot.red { background: var(--red); }
.dot.gray { background: var(--gray); }

.dot-sm {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
  box-shadow: inset 0 0 2px rgba(0,0,0,0.25);
}
.dot-sm.green { background: var(--green); }
.dot-sm.red { background: var(--red); }
.dot-sm.gray { background: var(--gray); }

.sub-lights {
  margin: 6px 0 2px 0;
  padding: 6px 8px;
  background: #f8f9fb;
  border-radius: 6px;
}
.sub-light-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 0;
  font-size: 0.82rem;
}
.sub-name { font-weight: 500; color: #444; }
.sub-detail { color: #888; font-size: 0.78rem; }

.light-text .name { font-weight: 600; font-size: 0.95rem; }
.light-text .detail { font-size: 0.82rem; color: #666; }

.banner {
  margin-top: 12px;
  padding: 10px;
  border-radius: 8px;
  background: #e9f9ee;
  color: #1e8449;
  font-weight: 600;
  text-align: center;
}
.hidden { display: none; }

.regime-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
  color: white;
  background: #7f8c8d;
}
.regime-badge.regime-趋势上升 { background: #27ae60; }
.regime-badge.regime-强反弹 { background: #2ecc71; }
.regime-badge.regime-弱反弹 { background: #f39c12; }
.regime-badge.regime-震荡 { background: #7f8c8d; }
.regime-badge.regime-趋势下降 { background: #e74c3c; }
.buy-hint {
  margin-top: 10px;
  font-size: 0.88rem;
  color: #34495e;
  background: #f4f6f8;
  padding: 8px 10px;
  border-radius: 8px;
}

.panic {
  font-size: 0.9rem;
  line-height: 1.6;
}
.panic .level {
  font-weight: 700;
  font-size: 1.05rem;
}
.panic .level.active { color: #d35400; }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
th, td {
  text-align: left;
  padding: 6px 4px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}
.table-wrap { overflow-x: auto; }

.tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.75rem;
  background: #eef2ff;
  color: #3949ab;
}
.tag.hot {
  background: #fdeaea;
  color: #c0392b;
}

.watchlist-form {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.watchlist-form input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
}
.watchlist-form button, .btn-del {
  padding: 4px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.82rem;
}
.watchlist-form button {
  background: #3498db;
  color: white;
}
.btn-del {
  background: #e74c3c;
  color: white;
}

.plan-scenario {
  margin: 8px 0;
  padding: 8px 10px;
  background: #f4f6f8;
  border-radius: 8px;
  border-left: 3px solid #3498db;
}
.plan-title { font-weight: 600; font-size: 0.92rem; margin-bottom: 4px; }
.plan-detail { font-size: 0.85rem; color: #555; line-height: 1.5; }
.plan-levels { font-size: 0.85rem; color: #666; margin-top: 6px; }

@media (max-width: 480px) {
  header h1 { font-size: 1.1rem; }
  .card { padding: 12px; }
  .watchlist-form { flex-direction: column; }
}
