@font-face {
  font-family: "Sora";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/sora-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@property --state {
  syntax: "<color>";
  inherits: true;
  initial-value: #737b80;
}
@property --state-light {
  syntax: "<color>";
  inherits: true;
  initial-value: #9ba2a6;
}

:root {
  --text: #f4f6f5;
  --muted: #737b80;
  --good: #20b968;
  --good-light: #5ce69a;
  --mid: #e79b18;
  --mid-light: #ffc857;
  --bad: #e14444;
  --bad-light: #ff6868;
  --perfect: #2f7cf6;
  --perfect-light: #6aa8ff;
  --font: "Sora", "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { color-scheme: dark; }
html, body { width: 100%; background: #0d0f11; overflow: hidden; }
body {
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

.shell { overflow: hidden; background: #0d0f11; }
.head {
  min-height: 54px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  background: #20262a;
  border-bottom: 1px solid #30383d;
}
.logo { display: block; flex: none; filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.32)); }
.title { font-size: 13px; font-weight: 800; letter-spacing: -0.02em; }
.live {
  margin-left: auto;
  color: #929ca2;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.12em;
  transition: opacity 240ms ease;
}
.live.is-off { opacity: 0; }

.content { padding: 13px 15px 15px; }
.game {
  min-height: 30px;
  transition: opacity 260ms ease, transform 260ms ease;
}
.game.is-off { opacity: 0; transform: translateY(-4px); }
.game-name {
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.provider {
  margin-top: 2px;
  color: #6e767b;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card {
  --state: #737b80;
  --state-light: #9ba2a6;
  --progress: 0%;
  --angle: 0deg;
  text-align: center;
  transition: --state 420ms ease, --state-light 420ms ease;
}
.dial {
  width: 164px;
  height: 164px;
  position: relative;
  display: grid;
  place-items: center;
  margin: 6px auto 7px;
  border-radius: 50%;
}
.dial::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(var(--state) 0 var(--progress), #24282b var(--progress) 100%);
}
.dial::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #0d0f11;
  box-shadow: inset 0 0 0 1px #25292c;
}
.dot-orbit {
  position: absolute;
  z-index: 2;
  inset: 4px;
  border: 1px dashed #353a3e;
  border-radius: 50%;
  transform: rotate(var(--angle));
}
.dot-orbit i {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--state-light);
  box-shadow: 0 0 12px var(--state);
  transform: translateX(-50%);
}
.card.empty-card .dot-orbit i { opacity: 0; }
.reading { position: relative; z-index: 3; }
.card__val {
  color: var(--text);
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.055em;
  font-variant-numeric: tabular-nums;
}
.unit { margin-left: 1px; color: var(--muted); font-size: 16px; }
.pct::after { content: "%"; }
.reading small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.15em;
}
.status {
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 5px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--state) 16%, transparent);
  color: var(--state-light);
  font-size: 10px;
  font-weight: 800;
}
.status__icon {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: var(--state);
  color: #fff;
  font-size: 9px;
  font-style: normal;
}
.warning {
  min-height: 13px;
  margin-top: 6px;
  color: var(--state);
  font-size: 9px;
  line-height: 1.3;
  font-weight: 700;
}
.card__note {
  margin-top: 3px;
  color: rgba(244, 246, 245, 0.42);
  font-size: 9px;
  transition: opacity 240ms ease;
}
.card__note.is-off { opacity: 0; }

.card.perfect { --state: var(--perfect); --state-light: var(--perfect-light); }
.card.good { --state: var(--good); --state-light: var(--good-light); }
.card.mid { --state: var(--mid); --state-light: var(--mid-light); }
.card.bad { --state: var(--bad); --state-light: var(--bad-light); }

.thresholds {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  color: #7f888d;
  font-size: 8px;
  font-weight: 700;
}
.thresholds b { color: #98a0a5; font-weight: 800; }
.thresholds i { height: 4px; display: block; flex: 1; border-radius: 999px; }
.thresholds__bad { background: var(--bad); }
.thresholds__mid { background: var(--mid); }
.thresholds__good { background: var(--good); }
.thresholds__perfect { background: var(--perfect); }

.toggle {
  margin-top: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #282d30;
  border-radius: 12px;
  background: #171a1c;
  cursor: pointer;
  user-select: none;
}
.toggle:hover { border-color: #394045; }
.toggle input { width: 0; height: 0; position: absolute; opacity: 0; appearance: none; -webkit-appearance: none; }
.toggle__label { flex: 1; color: #949b9f; font-size: 10px; line-height: 1.3; font-weight: 600; }
.toggle__switch {
  width: 34px;
  height: 20px;
  position: relative;
  flex: none;
  border: 1px solid #3a4247;
  border-radius: 999px;
  background: #252a2d;
}
.toggle__switch::after {
  content: "";
  width: 14px;
  height: 14px;
  position: absolute;
  top: 2px;
  left: 2px;
  border-radius: 50%;
  background: #7d858a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  transition: transform 160ms ease, background 160ms ease;
}
.toggle input:checked ~ .toggle__switch { border-color: #2c6e46; background: #173823; }
.toggle input:checked ~ .toggle__switch::after { background: var(--good-light); transform: translateX(14px); }
.toggle input:focus-visible ~ .toggle__switch { outline: 2px solid var(--good-light); outline-offset: 2px; }
