:root {
  color-scheme: dark;
  --bg: #0c1114;
  --panel: rgba(21, 28, 32, 0.82);
  --panel-strong: rgba(23, 31, 35, 0.95);
  --line: rgba(215, 224, 222, 0.13);
  --text: #eef3f1;
  --muted: #9aa6a4;
  --temp: #d76b5b;
  --util: #6fa8b8;
  --power: #c6a15b;
  --vram: #7ea58a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(135deg, #0c1114 0%, #121a1e 50%, #0a0f12 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 36px;
}

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

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(34px, 5vw, 72px);
  line-height: 0.95;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 150px;
  justify-content: flex-end;
  color: var(--muted);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #778489;
  box-shadow: 0 0 0 5px rgba(119, 132, 137, 0.1);
}

.dot.ok {
  background: var(--vram);
  box-shadow: 0 0 12px rgba(126, 165, 138, 0.45);
}

.dot.bad {
  background: var(--temp);
  box-shadow: 0 0 12px rgba(215, 107, 91, 0.45);
}

.hero {
  position: relative;
  min-height: 260px;
  padding: 34px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.gpu-name {
  max-width: 850px;
  font-size: clamp(30px, 6vw, 86px);
  line-height: 0.98;
  font-weight: 800;
}

.meter-wrap {
  display: grid;
  place-items: center;
}

.meter-ring {
  width: 220px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--util) var(--meter, 0%), rgba(255, 255, 255, 0.1) 0);
  box-shadow: 0 0 34px rgba(111, 168, 184, 0.16);
}

.meter-core {
  width: 158px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  align-content: center;
  border-radius: 50%;
  background: rgba(12, 17, 20, 0.94);
  border: 1px solid var(--line);
}

.meter-core span {
  font-size: 46px;
  font-weight: 800;
}

.meter-core small {
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.metric,
.chart-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  backdrop-filter: blur(18px);
}

.metric {
  min-height: 126px;
  padding: 18px;
  display: grid;
  gap: 8px;
  align-content: start;
  border-top: 4px solid var(--accent);
}

.metric span,
.metric small,
.chart-head span {
  color: var(--muted);
}

.metric strong {
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
  white-space: nowrap;
}

.accent-temp {
  --accent: var(--temp);
}

.accent-util {
  --accent: var(--util);
}

.accent-power {
  --accent: var(--power);
}

.accent-vram {
  --accent: var(--vram);
}

.controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.controls button {
  min-width: 72px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  cursor: pointer;
  font: inherit;
}

.controls button.active,
.controls button:hover {
  border-color: rgba(111, 168, 184, 0.64);
  background: rgba(111, 168, 184, 0.14);
}

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

.chart-panel {
  min-height: 330px;
  padding: 18px;
  background: var(--panel-strong);
}

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.chart-head h2 {
  font-size: 18px;
}

canvas {
  width: 100%;
  height: 260px;
  display: block;
}

.tooltip {
  position: fixed;
  z-index: 20;
  min-width: 190px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 9, 12, 0.94);
  box-shadow: 0 16px 45px rgba(0, 0, 0, 0.36);
  color: var(--text);
  pointer-events: none;
  font-size: 13px;
}

.tooltip strong {
  display: block;
  margin-bottom: 4px;
}

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

  .cards,
  .charts {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 20px, 1440px);
    padding-top: 18px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding: 22px;
  }

  .cards,
  .charts {
    grid-template-columns: 1fr;
  }

  .meter-ring {
    width: min(220px, 70vw);
  }
}
