/* 天气预测看板 · 共享样式（v2.0 · WBSS M1）
 * 所有页面（index + pricing/login/payment/account）共用
 * 变量定义：背景/边框/文本/状态色/尺寸
 * 组件：guard-btn/tier-chip/lock-cta/upgrade-btn/card/...
 */
:root {
  --bg-0: #0b1220;
  --bg-1: #0f172a;
  --bg-2: #131c2f;
  --bg-card: rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.06);
  --border: rgba(148,163,184,0.16);
  --border-strong: rgba(148,163,184,0.28);
  --text-0: #f1f5f9;
  --text-1: #cbd5e1;
  --text-2: #94a3b8;
  --text-3: #64748b;
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --highlight: #fbbf24;
  --hot: #ef4444;
  --cold: #38bdf8;
  --pos: #22c55e;
  --warn: #f59e0b;
  --radius: 10px;
  --radius-sm: 6px;
  --sidebar-w: 258px;
  --header-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, "Cascadia Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg-1);
  color: var(--text-0);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  overflow: hidden;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* 单页容器（pricing/login/payment/account 用） */
body.simple { overflow-y: auto; }
.shell {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
}
.shell .topbar {
  height: var(--header-h);
  display: flex; align-items: center;
  padding: 0 18px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-0);
  gap: 14px;
}
.shell .topbar .back { color: var(--text-2); font-size: 12px; }
.shell .topbar .back:hover { color: var(--text-0); }
.shell .topbar .spacer { flex: 1; }
.shell .topbar .meta { color: var(--text-3); font-size: 12px; }
.shell .container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 28px 18px 36px;
}
.shell h1 { font-size: 22px; margin: 0 0 4px; color: var(--text-0); font-weight: 600; }
.shell .sub { color: var(--text-2); margin-bottom: 24px; font-size: 13px; }

/* ========== Header 共享 ========== */
.app {
  display: grid;
  grid-template-rows: var(--header-h) 1fr;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-areas: "header header" "sidebar main";
  height: 100vh;
}
.header {
  grid-area: header;
  display: flex;
  align-items: center;
  padding: 0 18px;
  background: linear-gradient(180deg, #0b1220 0%, #0f172a 100%);
  border-bottom: 1px solid var(--border);
  gap: 14px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text-0); white-space: nowrap; }
.brand .logo {
  width: 26px; height: 26px;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #fbbf24, #f97316);
  border-radius: 7px;
  box-shadow: 0 2px 8px rgba(251,191,36,0.32);
}
.brand .logo svg { width: 16px; height: 16px; }
.brand .ver { font-size: 11px; color: var(--text-3); font-weight: 400; padding: 2px 6px; border: 1px solid var(--border); border-radius: 4px; margin-left: 4px; }
.header .spacer { flex: 1; }
.header .meta { color: var(--text-2); font-size: 12px; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.header .meta .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--pos); box-shadow: 0 0 8px rgba(34,197,94,0.6); }
.header .actions { display: flex; gap: 6px; align-items: center; }

/* tier chip + upgrade btn */
.tier-chip {
  font-size: 11px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border);
  color: var(--text-2); background: var(--bg-card); cursor: default; user-select: none;
}
.tier-chip.free { color: #fcd34d; border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.08); }
.tier-chip.member { color: #86efac; border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.08); }
.tier-chip.lifetime { color: #c4b5fd; border-color: rgba(167,139,250,0.4); background: rgba(167,139,250,0.10); }
.upgrade-btn {
  font-size: 11px; padding: 4px 12px; border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #f97316); color: #1a1a1a;
  font-weight: 600; text-decoration: none; cursor: pointer; transition: transform 0.15s;
}
.upgrade-btn:hover { transform: translateY(-1px); text-decoration: none; }
.upgrade-btn.hidden { display: none; }

/* 守门员按钮 */
.guard-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-2);
  cursor: help;
  user-select: none;
  white-space: nowrap;
}
.guard-btn .gdot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: none; }
.guard-btn.ok { color: #86efac; border-color: rgba(34,197,94,0.35); background: rgba(34,197,94,0.08); }
.guard-btn.ok .gdot { background: var(--pos); box-shadow: 0 0 6px rgba(34,197,94,0.6); }
.guard-btn.err { color: #fca5a5; border-color: rgba(239,68,68,0.35); background: rgba(239,68,68,0.08); }
.guard-btn.err .gdot { background: var(--hot); box-shadow: 0 0 6px rgba(239,68,68,0.6); }
.guard-btn .gshield { width: 13px; height: 13px; flex: none; }
.guard-pop {
  display: none;
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 60;
  width: 380px;
  background: var(--panel, #131c2f);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  padding: 12px 14px;
  text-align: left;
  cursor: default;
}
.guard-btn:hover .guard-pop { display: block; }
.guard-pop .g-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 12px; color: var(--text-0); font-weight: 600; }
.guard-pop .g-head .g-time { font-size: 10px; color: var(--text-3); font-weight: 400; }
.guard-pop .g-sum { font-size: 11px; color: var(--text-2); margin-bottom: 8px; }
.guard-pop .g-list { display: flex; flex-direction: column; gap: 4px; }
.guard-pop .grow { display: flex; align-items: baseline; gap: 6px; font-size: 11px; padding: 4px 7px; border-radius: 5px; background: rgba(255,255,255,0.03); }
.guard-pop .grow .gn { color: var(--text-0); font-weight: 500; white-space: nowrap; }
.guard-pop .grow .gst { font-size: 10px; padding: 0 5px; border-radius: 4px; white-space: nowrap; }
.guard-pop .grow .gst.ok { color: #86efac; background: rgba(34,197,94,0.12); }
.guard-pop .grow .gst.err { color: #fca5a5; background: rgba(239,68,68,0.12); }
.guard-pop .grow .gst.alt { color: #fcd34d; background: rgba(245,158,11,0.12); }
.guard-pop .grow .gd { color: var(--text-3); font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.guard-pop .grow .gfb { color: var(--warn); font-size: 10px; white-space: nowrap; }
.guard-pop .g-foot { margin-top: 9px; padding-top: 8px; border-top: 1px solid var(--border); font-size: 10px; color: var(--text-3); line-height: 1.6; }

/* 锁定（免费版） */
.lock-mask { position: relative; pointer-events: none; user-select: none; }
.lock-mask > *:not(.lock-cta) { filter: blur(6px) grayscale(0.7); opacity: 0.5; }
.lock-cta {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 8px;
  background: rgba(15,23,42,0.55); border: 1px dashed rgba(251,191,36,0.45);
  border-radius: 8px; padding: 14px; text-align: center; pointer-events: auto;
}
.lock-cta .lock-icon { width: 28px; height: 28px; color: #fbbf24; }
.lock-cta .lock-title { color: var(--text-0); font-size: 13px; font-weight: 600; }
.lock-cta .lock-sub { color: var(--text-2); font-size: 11px; }
.lock-cta .lock-btn {
  display: inline-block; padding: 5px 14px; margin-top: 4px;
  background: linear-gradient(135deg, #fbbf24, #f97316); color: #1a1a1a;
  font-size: 12px; font-weight: 600; border-radius: 999px; text-decoration: none;
}
.lock-cta .lock-btn:hover { transform: translateY(-1px); text-decoration: none; }

/* icon-btn */
.icon-btn {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-1);
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--bg-card-hover); border-color: var(--border-strong); color: var(--text-0); }
.icon-btn svg { width: 16px; height: 16px; }

/* 卡片（通用） */
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; position: relative; overflow: hidden; }
.card-title { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-1); margin-bottom: 10px; font-weight: 500; }

/* 表单（login/payment 用） */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 12px; color: var(--text-2); }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 9px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-0); font-size: 13px;
  font-family: var(--mono);
  outline: none;
  transition: border-color 0.15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--accent); }
.form-row .hint { font-size: 11px; color: var(--text-3); margin-top: 4px; line-height: 1.6; }
.form-row .err { font-size: 11px; color: #fca5a5; margin-top: 4px; min-height: 14px; }
.btn {
  display: inline-block; padding: 10px 18px;
  background: linear-gradient(135deg, #fbbf24, #f97316); color: #1a1a1a;
  font-size: 13px; font-weight: 600; border-radius: 999px;
  border: none; cursor: pointer; text-decoration: none;
  transition: transform 0.15s;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--text-1); border: 1px solid var(--border); }
.btn.ghost:hover { border-color: var(--border-strong); background: var(--bg-card-hover); }
.btn.danger { background: rgba(239,68,68,0.12); color: #fca5a5; border: 1px solid rgba(239,68,68,0.32); }

/* 价格卡（pricing 用） */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 28px; }
@media (max-width: 900px){ .price-grid { grid-template-columns: 1fr; } }
.price-card {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  padding: 22px 20px; position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 10px;
  transition: all 0.18s;
}
.price-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.price-card.featured { border-color: rgba(251,191,36,0.45); box-shadow: 0 4px 24px rgba(251,191,36,0.10); }
.price-card.featured::before {
  content: '推荐'; position: absolute; top: 10px; right: 12px;
  font-size: 10px; padding: 2px 8px; border-radius: 999px;
  background: linear-gradient(135deg, #fbbf24, #f97316); color: #1a1a1a; font-weight: 600;
}
.price-card .tier-name { font-size: 13px; color: var(--text-2); text-transform: uppercase; letter-spacing: 1.5px; }
.price-card .price { font-size: 32px; font-weight: 700; color: var(--text-0); font-variant-numeric: tabular-nums; }
.price-card .price .unit { font-size: 14px; color: var(--text-2); font-weight: 400; margin-left: 4px; }
.price-card .price-note { font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.price-card .feat { display: flex; gap: 8px; font-size: 12px; color: var(--text-1); padding: 4px 0; }
.price-card .feat .ok { color: var(--pos); flex: none; }
.price-card .feat .no { color: var(--text-3); flex: none; text-decoration: line-through; }
.price-card .feat .new { color: var(--highlight); font-size: 9px; padding: 1px 5px; border-radius: 3px; background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.3); margin-left: 4px; }
.price-card .cta { margin-top: auto; }

/* 页脚（简单页） */
.foot { padding: 18px 0; text-align: center; color: var(--text-3); font-size: 11px; }

/* tier-badge（复刻） */
.tier-badge { font-size: 9px; font-weight: 600; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--border); color: var(--text-2); flex-shrink: 0; }
.tier-badge.S { color: var(--highlight); border-color: rgba(251,191,36,0.4); background: rgba(251,191,36,0.08); }
.tier-badge.A { color: var(--accent-2); border-color: rgba(59,130,246,0.4); background: rgba(59,130,246,0.08); }
.tier-badge.B { color: var(--text-3); }
.tier-badge.training { color: var(--hot); border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.08); }
.tier-badge.focus { color: var(--highlight); border-color: rgba(251,191,36,0.5); background: rgba(251,191,36,0.1); }
.tier-badge.stable { color: var(--pos); border-color: rgba(52,211,153,0.5); background: rgba(52,211,153,0.1); }
.tier-badge.watch { color: var(--text-2); }
.tier-badge.degraded { color: var(--hot); border-color: rgba(239,68,68,0.5); background: rgba(239,68,68,0.1); font-weight: 700; }