:root {
  --bg: #070c0e;
  --panel: #0d1417;
  --panel-2: #101a1d;
  --line: rgba(255, 255, 255, 0.075);
  --line-strong: rgba(255, 255, 255, 0.13);
  --text: #eef4f0;
  --muted: #91a39d;
  --faint: #5d6f6a;
  --green: #76e6a5;
  --green-dim: rgba(118, 230, 165, 0.1);
  --amber: #f3c96b;
  --red: #ff7b7b;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, monospace;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% -18%, rgba(118, 230, 165, 0.12), transparent 36rem),
    radial-gradient(circle at 8% 18%, rgba(90, 160, 255, 0.045), transparent 22rem),
    var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.28;
  background-image: linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.page {
  position: relative;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 22px 0 26px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(16, 26, 29, 0.95), rgba(10, 16, 18, 0.96));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.16);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid rgba(118, 230, 165, 0.28);
  border-radius: 10px;
  background: var(--green-dim);
  color: var(--green);
  font-family: var(--mono);
  font-size: 17px;
  font-weight: 700;
}

.brand b {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
}

.brand small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.18em;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--amber);
}

.live-pill[data-state="ok"] { color: var(--green); border-color: rgba(118, 230, 165, 0.18); background: var(--green-dim); }
.live-pill[data-state="ok"] i { background: var(--green); box-shadow: 0 0 10px rgba(118, 230, 165, 0.7); }
.live-pill[data-state="bad"] { color: var(--red); border-color: rgba(255, 123, 123, 0.18); background: rgba(255, 123, 123, 0.08); }
.live-pill[data-state="bad"] i { background: var(--red); }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(290px, 0.55fr);
  gap: 28px;
  padding: 34px;
  overflow: hidden;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(118, 230, 165, 0.08), transparent 68%);
  pointer-events: none;
}

.eyebrow {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

h1 {
  margin: 10px 0 9px;
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 650;
  letter-spacing: -0.055em;
  line-height: 1.02;
}

.address {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.address span { color: var(--faint); padding: 0 4px; }

.hero-note {
  max-width: 440px;
  margin: 18px 0 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.7;
}

.hero-status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 28px;
  border-left: 1px solid var(--line);
}

.status-line {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green);
  font-size: 12px;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--faint);
}

.status-dot.online { background: var(--green); box-shadow: 0 0 12px rgba(118, 230, 165, 0.8); }
.status-dot.offline { background: var(--red); box-shadow: 0 0 12px rgba(255, 123, 123, 0.6); }

.hero-number {
  display: flex;
  align-items: baseline;
  gap: 9px;
  margin-top: 12px;
}

.hero-number strong {
  color: var(--text);
  font-family: var(--mono);
  font-size: 54px;
  font-weight: 550;
  letter-spacing: -0.075em;
  line-height: 1;
}

.hero-number span {
  color: var(--faint);
  font-family: var(--mono);
  font-size: 11px;
}

.hero-number b { color: var(--muted); font-weight: 550; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  margin-top: 18px;
  color: var(--faint);
  font-size: 9px;
}

.hero-meta b { color: var(--muted); font-family: var(--mono); font-weight: 500; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.metric {
  padding: 16px 17px 14px;
  min-height: 105px;
}

.metric > span {
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.02em;
}

.metric strong {
  display: block;
  margin-top: 9px;
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 550;
  letter-spacing: -0.055em;
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--faint);
  font-size: 8px;
}

.chart-panel {
  margin-top: 10px;
  padding: 22px 24px 16px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

h2 {
  margin: 7px 0 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.035em;
}

.chart-current {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 9px;
}

.chart-current i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.chart-current b { color: var(--green); font-weight: 550; }

.chart-wrap {
  position: relative;
  height: 280px;
  margin-top: 16px;
}

#chart {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--faint);
  font-size: 11px;
}

.chart-empty[hidden] {
  display: none;
}

.chart-axis {
  display: flex;
  justify-content: space-between;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
  padding-top: 8px;
}

.info-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 10px;
  padding: 16px 20px;
}

.info-strip p {
  margin: 6px 0 0;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.6;
}

.info-strip a {
  flex: none;
  color: var(--green);
  font-family: var(--mono);
  font-size: 9px;
  text-decoration: none;
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 2px 0;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 8px;
}

.chart-line {
  fill: none;
  stroke: var(--green);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.chart-area { fill: url(#chartFill); }
.chart-grid { stroke: rgba(255, 255, 255, 0.055); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-dot { fill: var(--bg); stroke: var(--green); stroke-width: 2; vector-effect: non-scaling-stroke; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding: 26px; }
  .hero-status { padding: 20px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .chart-wrap { height: 240px; }
}

@media (max-width: 560px) {
  .page { width: calc(100% - 24px); padding-top: 14px; }
  .hero { padding: 21px 18px; border-radius: 15px; }
  .hero-number strong { font-size: 44px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .metric { min-height: 92px; padding: 13px 14px; }
  .metric strong { font-size: 21px; }
  .chart-panel { padding: 17px 14px 13px; border-radius: 15px; }
  .chart-wrap { height: 200px; }
  .info-strip { align-items: flex-start; flex-direction: column; }
  footer { flex-direction: column; align-items: flex-start; gap: 5px; }
}
