:root {
  --bg-1: #07132a;
  --bg-2: #0d1f40;
  --line: rgba(126, 164, 228, 0.3);
  --text: #e9f3ff;
  --dim: #9eb6db;
  --card: rgba(12, 30, 61, 0.76);
  --accent: #3dd6bf;
  --accent-2: #56a5ff;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--text);
  font-family: "Manrope", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(900px 600px at -10% -20%, rgba(86, 165, 255, 0.22), transparent 55%),
    radial-gradient(900px 600px at 110% 0%, rgba(61, 214, 191, 0.2), transparent 54%),
    linear-gradient(145deg, var(--bg-1), var(--bg-2));
}

.bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.02) 1px, transparent 1px, transparent 4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.016), rgba(255, 255, 255, 0.016) 1px, transparent 1px, transparent 4px);
  mask-image: radial-gradient(circle at center, black 45%, transparent 95%);
}

.page {
  width: min(1180px, 94vw);
  margin: 20px auto 28px;
  display: grid;
  gap: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(4, 14, 33, 0.35);
  backdrop-filter: blur(10px);
}

.hero {
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.tag {
  margin: 0;
  letter-spacing: 0.15em;
  font-size: 11px;
  color: #89b6f1;
}

.hero h1 {
  margin: 6px 0;
  font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1.06;
}

.sub {
  margin: 0;
  color: var(--dim);
  font-size: 14px;
}

.health {
  min-width: 170px;
  border: 1px solid rgba(126, 164, 228, 0.28);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--dim);
  background: rgba(8, 18, 35, 0.45);
  display: grid;
  gap: 4px;
}

.health strong {
  color: #9dffd8;
  font-size: 13px;
}

.toolbar {
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 10px;
}

label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--dim);
}

select,
button {
  height: 38px;
  border-radius: 12px;
  border: 1px solid rgba(126, 164, 228, 0.36);
  background: rgba(9, 24, 48, 0.85);
  color: var(--text);
  padding: 0 10px;
  font: inherit;
}

button {
  cursor: pointer;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border: none;
  color: #081325;
}

.status {
  margin-left: auto;
  font-size: 12px;
  color: var(--dim);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.stat {
  padding: 12px;
  display: grid;
  gap: 6px;
}

.stat .k {
  font-size: 12px;
  color: var(--dim);
}

.stat strong {
  font-size: 24px;
  line-height: 1;
  color: #9dffd8;
}

.chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.chart-card {
  padding: 12px;
}

.chart-wrap {
  position: relative;
  height: 300px;
}

.chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.chart-card h2,
.proc-card h2,
.cpu-card h2 {
  margin: 0 0 10px;
  font-size: 15px;
  color: #d5e8ff;
}

.cpu-card {
  padding: 12px;
}

.core-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.core-item {
  border: 1px solid rgba(126, 164, 228, 0.24);
  border-radius: 12px;
  padding: 8px;
  display: grid;
  gap: 7px;
  background: rgba(8, 18, 35, 0.35);
}

.core-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #c6dcfc;
}

.core-head strong {
  color: #9dffd8;
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
}

.core-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(126, 164, 228, 0.24);
}

.core-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  transition: width 0.24s linear;
}

.proc-card {
  padding: 12px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 580px;
}

th,
td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px dashed rgba(126, 164, 228, 0.26);
  font-size: 12px;
}

th {
  color: #b9d8ff;
}

.empty {
  text-align: center;
  color: var(--dim);
}

.core-grid .empty {
  border: 1px dashed rgba(126, 164, 228, 0.24);
  border-radius: 12px;
  padding: 14px 10px;
}

@media (max-width: 980px) {
  .chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
  }

  .health {
    width: 100%;
  }

  .status {
    margin-left: 0;
  }

  .chart-wrap {
    height: 240px;
  }
}
