:root {
  --bg: #08111f;
  --panel: rgba(18, 31, 50, .78);
  --panel-border: rgba(148, 163, 184, .13);
  --text: #f8fafc;
  --muted: #91a0b5;
  --accent: #31d69a;
  --accent-2: #56a8ff;
  --danger: #fb7185;
  --shadow: 0 18px 45px rgba(0, 0, 0, .28);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
.telegram-gate { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate-card { width: min(100%, 430px); padding: 34px 26px; text-align: center; border: 1px solid var(--panel-border); border-radius: 24px; background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.gate-icon { width: 66px; height: 66px; margin: 0 auto 20px; display: grid; place-items: center; border-radius: 22px; color: #052017; background: linear-gradient(135deg, #56a8ff, #5eead4); font-size: 30px; transform: rotate(-12deg); }
.gate-card h1 { margin-bottom: 12px; }
.gate-card > p:not(.eyebrow) { margin: 0 0 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.gate-card small { color: var(--muted); font-size: 11px; }
html { background: var(--bg); }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -20%, rgba(37, 99, 235, .24), transparent 42%),
    linear-gradient(180deg, #0a1525 0%, #07101c 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow-x: hidden;
}
button { font: inherit; }
.glow { position: fixed; width: 250px; height: 250px; filter: blur(90px); opacity: .15; pointer-events: none; }
.glow-one { background: #00e6a8; top: 22%; right: -140px; }
.glow-two { background: #3182f6; bottom: 8%; left: -160px; }
.app-shell { width: min(100%, 560px); margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom)); position: relative; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.eyebrow { margin: 0 0 5px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .18em; }
h1, h2, p { margin-top: 0; }
h1 { font-size: 27px; margin-bottom: 0; letter-spacing: -.04em; }
h2 { font-size: 19px; margin: 0; letter-spacing: -.02em; }
.avatar { width: 44px; height: 44px; border-radius: 15px; display: grid; place-items: center; color: #07141c; font-weight: 900; background: linear-gradient(135deg, #6ee7b7, #22d3ee); box-shadow: 0 9px 24px rgba(45, 212, 191, .22); }
.panel { background: var(--panel); border: 1px solid var(--panel-border); border-radius: 21px; box-shadow: var(--shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.hero { padding: 20px; margin-bottom: 14px; background: linear-gradient(135deg, rgba(19, 40, 59, .95), rgba(15, 29, 46, .82)); }
.hero-row, .metric-head, .section-title, .network-row { display: flex; align-items: center; justify-content: space-between; }
.status-line { display: flex; align-items: center; gap: 9px; font-size: 16px; font-weight: 750; }
.status-dot { width: 9px; height: 9px; background: var(--accent); border-radius: 50%; box-shadow: 0 0 0 5px rgba(49, 214, 154, .1), 0 0 16px var(--accent); }
.muted { color: var(--muted); font-size: 13px; margin: 7px 0 0; }
.icon-btn { width: 42px; height: 42px; border: 1px solid var(--panel-border); border-radius: 14px; color: var(--text); background: rgba(255,255,255,.05); font-size: 24px; cursor: pointer; }
.icon-btn.spinning { animation: spin .7s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
.uptime { display: flex; justify-content: space-between; margin-top: 19px; padding-top: 16px; border-top: 1px solid rgba(148,163,184,.12); color: var(--muted); font-size: 12px; }
.uptime strong { color: var(--text); font-size: 12px; }
.resource-entry { cursor: pointer; border-radius: 15px; margin-inline: -7px; padding: 16px 8px 0; transition: background .18s ease, transform .18s ease; }
.resource-entry:hover, .resource-entry:focus-visible { background: rgba(110,231,183,.08); transform: translateY(-1px); outline: none; }
.resource-entry strong { color: #a7f3d0; font-size: 13px; }
.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.metric { min-height: 152px; padding: 16px; }
.metric.clickable { cursor: pointer; transition: transform .18s ease, border-color .18s ease, background .18s ease; }
.metric.clickable:hover, .metric.clickable:focus-visible { transform: translateY(-2px); border-color: rgba(196,181,253,.35); background: rgba(31,42,64,.9); outline: none; }
.metric.clickable::after { content: '查看硬盘透镜 →'; display: block; margin-top: 9px; color: #c4b5fd; font-size: 9px; font-weight: 700; }
.metric-head { color: var(--muted); font-size: 12px; font-weight: 700; }
.metric-icon { display: grid; place-items: center; min-width: 34px; height: 25px; padding: 0 6px; border-radius: 8px; font-size: 8px; letter-spacing: .05em; color: #67e8f9; background: rgba(34,211,238,.1); }
.metric-icon.mem { color: #a7f3d0; background: rgba(52,211,153,.1); }
.metric-icon.disk { color: #c4b5fd; background: rgba(139,92,246,.12); }
.metric-icon.net { color: #fdba74; background: rgba(251,146,60,.1); }
.metric > strong { display: block; margin: 18px 0 12px; font-size: 27px; letter-spacing: -.04em; }
.metric > strong em { font-size: 11px; font-style: normal; color: var(--muted); letter-spacing: 0; }
.metric small { display: block; margin-top: 10px; color: var(--muted); font-size: 10px; }
.progress { height: 6px; overflow: hidden; border-radius: 99px; background: rgba(148,163,184,.12); }
.progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), #22d3ee); transition: width .45s ease; }
.metric:nth-child(2) .progress i { background: linear-gradient(90deg, #10b981, #6ee7b7); }
.metric:nth-child(3) .progress i { background: linear-gradient(90deg, #8b5cf6, #c4b5fd); }
.network-row { color: #d5deea; font-size: 11px; }
.process-panel { margin-top: 14px; padding: 18px; }
.section-title { margin-bottom: 11px; }
.live { color: var(--accent); background: rgba(49,214,154,.08); border: 1px solid rgba(49,214,154,.17); padding: 5px 8px; border-radius: 999px; font-size: 8px; letter-spacing: .13em; }
.process { display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center; padding: 12px 0; border-top: 1px solid rgba(148,163,184,.09); }
.process-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; color: #08111f; background: #6ee7b7; font-size: 12px; font-weight: 900; }
.process-icon.blue { background: #7dd3fc; }
.process-icon.orange { background: #fdba74; }
.process-icon.gray { background: #cbd5e1; }
.process b { font-size: 12px; }
.process small { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; }
.process strong { font-size: 12px; color: #d7e0eb; }
.actions { display: grid; gap: 10px; margin-top: 14px; }
.actions button { border: 0; border-radius: 15px; min-height: 50px; font-weight: 800; cursor: pointer; }
.primary { color: #052017; background: linear-gradient(135deg, #34d399, #5eead4); box-shadow: 0 12px 28px rgba(52,211,153,.18); }
.secondary { color: var(--text); background: rgba(148,163,184,.08); border: 1px solid var(--panel-border) !important; }
.footnote { margin: 15px 0 0; text-align: center; color: var(--muted); font-size: 10px; }
dialog { border: 0; padding: 0; background: transparent; color: var(--text); width: calc(100% - 32px); max-width: 500px; }
dialog::backdrop { background: rgba(0,0,0,.68); backdrop-filter: blur(7px); }
.dialog-card { position: relative; padding: 23px; border: 1px solid var(--panel-border); border-radius: 23px; background: #101d2d; box-shadow: var(--shadow); }
.dialog-close { position: absolute; right: 15px; top: 13px; border: 0; color: var(--muted); background: transparent; font-size: 28px; }
dl { margin: 20px 0 0; }
dl div { display: flex; justify-content: space-between; padding: 12px 0; border-top: 1px solid rgba(148,163,184,.1); font-size: 12px; }
dt { color: var(--muted); } dd { margin: 0; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0; padding: 11px 16px; border-radius: 999px; color: #04261a; background: #6ee7b7; font-size: 12px; font-weight: 800; transition: .25s ease; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 360px) { .metric-grid { grid-template-columns: 1fr; } }
@media (prefers-color-scheme: light) {
  :root { --bg: #edf4f8; --panel: rgba(255,255,255,.8); --panel-border: rgba(15,23,42,.08); --text: #0f172a; --muted: #64748b; --shadow: 0 18px 45px rgba(15,23,42,.09); }
  body { background: linear-gradient(180deg,#edf7f5,#eef3f8); }
  .hero { background: rgba(255,255,255,.83); }
  .primary { color: #043326; }
  .dialog-card { background: #f8fafc; }
  .process strong, .network-row { color: #334155; }
}
