:root {
  color-scheme: dark;
  --bg: #050b14;
  --panel: rgba(14, 25, 42, 0.88);
  --line: rgba(148, 163, 184, 0.16);
  --text: #f8fafc;
  --muted: #94a3b8;
  --blue: #60a5fa;
  --green: #34d399;
  --amber: #fbbf24;
  --red: #fb7185;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  background:
    radial-gradient(circle at 15% 0%, rgba(30, 64, 175, .35), transparent 34rem),
    radial-gradient(circle at 100% 20%, rgba(6, 95, 70, .24), transparent 30rem),
    var(--bg);
}
button, a { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #facc15; outline-offset: 3px; }
.status-shell { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 48px; }
.topbar { display: flex; align-items: center; justify-content: space-between; }
.back-link { color: #bfdbfe; text-decoration: none; }
#refreshButton {
  border: 1px solid rgba(96, 165, 250, .45);
  border-radius: 10px;
  padding: 9px 14px;
  color: #dbeafe;
  background: rgba(30, 64, 175, .28);
  cursor: pointer;
}
#refreshButton:hover { background: rgba(37, 99, 235, .45); }
.hero {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin: 56px 0 28px;
}
.eyebrow { margin: 0 0 8px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(36px, 6vw, 64px); line-height: 1; }
.subtitle { margin: 16px 0 0; color: var(--muted); line-height: 1.7; }
.overall { display: flex; align-items: center; gap: 12px; min-width: 190px; padding: 15px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.overall strong, .overall small { display: block; }
.overall small { margin-top: 3px; color: var(--muted); }
.status-dot { width: 11px; height: 11px; flex: 0 0 auto; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 5px rgba(148, 163, 184, .08); }
.status-dot.ok { background: var(--green); box-shadow: 0 0 18px rgba(52, 211, 153, .65); }
.status-dot.warn { background: var(--amber); box-shadow: 0 0 18px rgba(251, 191, 36, .5); }
.status-dot.bad { background: var(--red); box-shadow: 0 0 18px rgba(251, 113, 133, .5); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.metric-card, .service-panel { border: 1px solid var(--line); background: var(--panel); box-shadow: 0 18px 45px rgba(0, 0, 0, .25); backdrop-filter: blur(16px); }
.metric-card { min-height: 168px; padding: 21px; border-radius: 18px; }
.metric-card > span { color: var(--muted); font-size: 14px; }
.metric-card > strong { display: block; margin: 18px 0 8px; font-size: 29px; letter-spacing: -.03em; }
.metric-card small { color: var(--muted); line-height: 1.5; }
.progress { height: 7px; margin: 14px 0 9px; overflow: hidden; border-radius: 999px; background: rgba(148, 163, 184, .13); }
.progress i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #2563eb, #34d399); transition: width .35s ease; }
.service-panel { margin-top: 16px; padding: 24px; border-radius: 20px; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-title h2 { margin: 0; font-size: 24px; }
.section-title > p { margin: 0; color: var(--muted); font-size: 13px; }
.service-list { display: grid; gap: 10px; }
.service-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border: 1px solid rgba(148, 163, 184, .12); border-radius: 14px; background: rgba(2, 6, 23, .32); }
.service-name { display: flex; align-items: center; gap: 13px; min-width: 0; }
.service-name strong, .service-name small { display: block; }
.service-name small { margin-top: 4px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.badge { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; background: rgba(148, 163, 184, .12); color: #cbd5e1; font-size: 12px; }
.badge.ok { color: #a7f3d0; background: rgba(5, 150, 105, .2); }
.badge.warn { color: #fde68a; background: rgba(217, 119, 6, .2); }
.badge.bad { color: #fecdd3; background: rgba(225, 29, 72, .2); }
.error-message { padding: 13px 16px; border: 1px solid rgba(251, 113, 133, .35); border-radius: 12px; color: #fecdd3; background: rgba(159, 18, 57, .2); }
.site-footer { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 0 0 28px; text-align: center; }
.site-footer a { color: var(--muted); font-size: 13px; text-decoration: none; transition: color .2s ease; }
.site-footer a:hover { color: #bfdbfe; }
@media (max-width: 820px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { align-items: flex-start; flex-direction: column; margin-top: 38px; }
}
@media (max-width: 520px) {
  .status-shell { width: min(100% - 20px, 1120px); padding-top: 14px; }
  .metric-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 145px; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .service-row { align-items: flex-start; }
  .badge { margin-top: 2px; }
}
