:root {
  --bg: #0c1210;
  --bg-soft: #101a15;
  --surface: #14201a;
  --surface-2: #18271f;
  --line: rgba(210, 226, 210, .13);
  --line-bright: rgba(210, 226, 210, .24);
  --fg: #e9efe5;
  --muted: #93a497;
  --accent: #a8d88f;
  --accent-deep: #5f9e67;
  --gold: #d9bb7b;
  --danger: #e07d72;
  --warn: #e2b86b;
  --blue: #83b9d1;
  --radius: 16px;
  --shadow: 0 18px 46px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1000px 600px at 78% -10%, rgba(111, 154, 91, .13), transparent 62%),
    radial-gradient(900px 600px at 8% 110%, rgba(116, 87, 45, .1), transparent 60%),
    var(--bg);
  color: var(--fg);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .32;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(circle at 50% 20%, #000, transparent 78%);
}
.page { width: min(1180px, calc(100% - 40px)); margin: 0 auto; position: relative; }
a { color: inherit; text-decoration: none; }

.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 22px 0 18px; border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid rgba(168, 216, 143, .52); border-radius: 11px;
  color: var(--accent); font: 700 20px/1 Georgia, serif;
  background: linear-gradient(145deg, rgba(168,216,143,.12), rgba(168,216,143,.02));
  box-shadow: inset 0 0 18px rgba(168,216,143,.07);
}
.brand-copy { display: flex; flex-direction: column; gap: 1px; }
.brand-copy strong { font-size: 15px; letter-spacing: .14em; }
.brand-glyph { width: 30px; height: 30px; display: block; color: var(--accent); }
.brand-copy small { font-size: 10px; letter-spacing: .16em; color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 14px; }
.live { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(168,216,143,.09); }
.refresh {
  appearance: none; border: 1px solid var(--line-bright); border-radius: 999px;
  color: var(--fg); background: rgba(255,255,255,.03); padding: 8px 16px;
  font: inherit; font-size: 12px; cursor: pointer; transition: .2s ease;
}
.refresh:hover { background: rgba(168,216,143,.1); border-color: rgba(168,216,143,.45); }
.sponsor-trigger {
  appearance: none; border: 1px solid rgba(217,187,123,.38); border-radius: 999px;
  color: var(--gold); background: rgba(217,187,123,.07); padding: 8px 14px;
  font: inherit; font-size: 12px; cursor: pointer; transition: .2s ease; white-space: nowrap;
}
.sponsor-trigger span { font-size: 11px; margin-right: 2px; }
.sponsor-trigger:hover { background: rgba(217,187,123,.14); border-color: rgba(217,187,123,.65); color: #f0d9a1; }
.sponsor-modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; }
.sponsor-modal[hidden] { display: none !important; }
.sponsor-backdrop { position: absolute; inset: 0; background: rgba(5, 9, 7, .78); backdrop-filter: blur(7px); }
.sponsor-dialog {
  position: relative; width: min(760px, 100%); max-height: calc(100vh - 40px); overflow: auto;
  padding: 30px; border: 1px solid var(--line-bright); border-radius: 20px;
  background:
    radial-gradient(600px 300px at 90% -10%, rgba(168,216,143,.1), transparent 65%),
    linear-gradient(150deg, #18271f, #101a15);
  box-shadow: 0 30px 90px rgba(0,0,0,.55);
  animation: sponsor-in .22s ease both;
}
@keyframes sponsor-in { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }
.sponsor-close {
  position: absolute; top: 13px; right: 15px; width: 32px; height: 32px;
  display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%;
  background: rgba(255,255,255,.03); color: var(--muted); font: 22px/1 system-ui; cursor: pointer;
}
.sponsor-close:hover { color: var(--fg); border-color: var(--line-bright); }
.sponsor-dialog h2 { margin: 0 0 8px; font-size: 27px; letter-spacing: -.03em; font-weight: 620; }
.sponsor-intro { margin: 0 0 22px; color: var(--muted); font-size: 13px; max-width: 580px; }
.sponsor-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sponsor-method {
  margin: 0; padding: 12px; border: 1px solid var(--line); border-radius: 15px;
  background: rgba(8, 14, 10, .32); text-align: center;
}
.sponsor-method a { display: block; }
.sponsor-method img {
  display: block; width: 100%; height: auto; max-height: 360px; object-fit: contain;
  border-radius: 10px; background: #fff;
}
.sponsor-method figcaption { display: flex; flex-direction: column; gap: 1px; margin-top: 10px; }
.sponsor-method figcaption strong { font-size: 13px; font-weight: 600; color: var(--fg); }
.sponsor-method figcaption span { font-size: 10px; color: var(--muted); letter-spacing: .08em; }
.sponsor-note { margin: 18px 0 0; color: var(--muted); font-size: 11px; }
body.modal-open { overflow: hidden; }
.site-nav { display: flex; align-items: center; gap: 5px; padding: 10px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.site-nav a {
  padding: 7px 12px; border-radius: 8px; color: var(--muted); font-size: 12px;
  white-space: nowrap; transition: .2s ease;
}
.site-nav a:hover { color: var(--fg); background: rgba(255,255,255,.04); }
.site-nav a.active { color: var(--accent); background: rgba(168,216,143,.09); }

.hero { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 48px 0 36px; }
.eyebrow { margin: 0 0 9px; color: var(--gold); font-size: 10px; font-weight: 700; letter-spacing: .22em; }
.hero h1 { margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.06; letter-spacing: -.045em; font-weight: 650; }
.hero h1 span { color: var(--accent); }
.lede { max-width: 560px; margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.pulse { width: 126px; height: 126px; flex: 0 0 126px; display: grid; place-items: center; position: relative; }
.pulse-ring { position: absolute; inset: 10px; border: 1px solid rgba(168,216,143,.24); border-radius: 50%; animation: breathe 4.8s ease-in-out infinite; }
.pulse-ring::before, .pulse-ring::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(168,216,143,.13); }
.pulse-ring::before { inset: 15px; }
.pulse-ring::after { inset: 31px; background: radial-gradient(circle, rgba(168,216,143,.11), transparent 70%); }
.pulse-core { color: var(--accent); font: 700 28px/1 Georgia, serif; position: relative; z-index: 2; }
.pulse-glyph { width: 52px; height: 52px; display: block; color: var(--accent); }
@keyframes breathe { 0%, 100% { transform: scale(.96); opacity: .65; } 50% { transform: scale(1.04); opacity: 1; } }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); }
.metric { background: rgba(20, 32, 26, .9); padding: 18px 20px 16px; display: flex; flex-direction: column; gap: 2px; }
.metric-label { color: var(--muted); font-size: 10px; letter-spacing: .13em; }
.metric strong { font-size: 25px; line-height: 1.2; font-weight: 620; letter-spacing: -.03em; }
.metric small { color: var(--muted); font-size: 11px; }

.services { padding: 38px 0 4px; }
.service-group { margin-bottom: 30px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 13px; }
.group-head h2 { margin: 0; font-size: 15px; letter-spacing: .02em; }
.group-head span { color: var(--muted); font-size: 10px; letter-spacing: .18em; }
.group-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.service-card {
  position: relative; padding: 19px 19px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: linear-gradient(150deg, rgba(24,39,31,.95), rgba(16,26,21,.92));
  box-shadow: var(--shadow); overflow: hidden; transition: border-color .2s ease, transform .2s ease;
}
.service-card::after { content: ""; position: absolute; left: 19px; right: 19px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(168,216,143,.32), transparent); opacity: .6; }
.service-card:hover { border-color: var(--line-bright); transform: translateY(-1px); }
.service-card.is-offline { opacity: .68; }
.service-top { display: flex; align-items: flex-start; gap: 12px; }
.service-icon {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 10px; display: grid; place-items: center;
  color: var(--accent); border: 1px solid rgba(168,216,143,.22); background: rgba(168,216,143,.055);
  font: 700 12px/1 "Segoe UI", sans-serif; letter-spacing: .04em;
}
.service-icon[data-cat="mh3u"] { color: var(--gold); border-color: rgba(217,187,123,.24); background: rgba(217,187,123,.06); }
.service-icon[data-cat="tools"] { color: var(--blue); border-color: rgba(131,185,209,.24); background: rgba(131,185,209,.06); }
.service-title { flex: 1; min-width: 0; }
.service-title h3 { margin: 0; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 15px; font-weight: 620; }
.service-title p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 500; letter-spacing: .03em; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-online { color: #b6dfa3; background: rgba(104, 157, 86, .14); }
.status-degraded { color: var(--warn); background: rgba(226, 184, 107, .12); }
.status-offline { color: var(--danger); background: rgba(224, 125, 114, .12); }
.open-link {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 9px; color: var(--muted); font-size: 11px; transition: .2s ease;
}
.open-link:hover { color: var(--fg); border-color: rgba(168,216,143,.4); }
.service-desc { margin: 15px 0 16px; color: var(--muted); font-size: 12px; min-height: 36px; }
.service-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.meta-left { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.endpoint { color: #b8c9b8; letter-spacing: .04em; }
.meta-dot { opacity: .35; }
.latency { font-variant-numeric: tabular-nums; }

.bottom-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 12px; margin-top: 18px; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: rgba(18, 29, 23, .9); padding: 20px; box-shadow: var(--shadow); }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.panel-head h2 { margin: 0; font-size: 16px; font-weight: 600; }
.hostname, .count { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.gauges { display: grid; gap: 15px; }
.gauge-top { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; margin-bottom: 6px; }
.gauge-top strong { color: var(--fg); font-weight: 500; }
.gauge-track { height: 5px; overflow: hidden; border-radius: 999px; background: rgba(255,255,255,.055); }
.gauge-fill { height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-deep), var(--accent)); transition: width .5s ease; }
.gauge-fill.mem { background: linear-gradient(90deg, #8d6c42, var(--gold)); }
.gauge-fill.disk { background: linear-gradient(90deg, #4d7383, var(--blue)); }
.container-list { display: grid; gap: 10px; }
.container-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 11px; }
.container-row:last-child { border-bottom: 0; }
.container-row i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: var(--accent); }
.container-row.off i { background: var(--danger); }
.container-name { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.container-status { margin-left: auto; color: var(--muted); font-size: 10px; white-space: nowrap; }
.loading, .empty { color: var(--muted); font-size: 12px; padding: 10px 0 20px; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 30px 0 38px; margin-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .06em; }

@media (max-width: 760px) {
  .page { width: min(100% - 26px, 1180px); }
  .topbar { padding-top: 17px; }
  .brand-copy small { display: none; }
  .hero { padding: 34px 0 28px; }
  .pulse { display: none; }
  .lede { font-size: 13px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2) { border-left: 0; }
  .group-grid, .bottom-grid { grid-template-columns: 1fr; }
  .service-desc { min-height: 0; }
  footer { flex-direction: column; gap: 6px; }
}
