:root {
  color-scheme: light;
  --bg: #f8fafc;
  --surface: rgba(255, 255, 255, 0.78);
  --ink: #202233;
  --muted: #76798a;
  --line: rgba(226, 232, 240, 0.82);
  --soft: #f3f6fb;
  --blue: #6d8dff;
  --green: #5ccfa6;
  --amber: #f1b95f;
  --rose: #f078a1;
  --violet: #b69cff;
  --shadow: 0 18px 45px rgba(54, 67, 100, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 14%, rgba(182, 156, 255, 0.18), transparent 26%),
    radial-gradient(circle at 86% 10%, rgba(92, 207, 166, 0.16), transparent 24%),
    radial-gradient(circle at 52% 98%, rgba(240, 120, 161, 0.14), transparent 30%),
    var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.75) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.75) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55), transparent 72%);
}

main {
  position: relative;
  width: min(1120px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 30px 0 42px;
}

.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 132px;
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.90), rgba(250, 252, 255, 0.68));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: rise 420ms ease both;
}

.hero-copy {
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.96), transparent 34%),
    linear-gradient(135deg, #ffd5e4, #d9ddff 50%, #c9f7e7);
  color: #5363c7;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.75), 0 14px 30px rgba(119, 119, 180, 0.22);
  animation: floaty 4.6s ease-in-out infinite;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 820;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.hero-line {
  margin-top: 12px;
  color: #6f5eb8;
  font-size: 14px;
  font-weight: 720;
}

.sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #c4c8d0;
}

.status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 13px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(78, 88, 120, 0.08);
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
  backdrop-filter: blur(12px);
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-toggle {
  min-width: 48px;
  height: 39px;
  padding: 0 13px;
  border: 1px solid rgba(226, 232, 240, 0.88);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 24px rgba(78, 88, 120, 0.08);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 720;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.lang-toggle:hover {
  transform: translateY(-1px);
  border-color: #d7cdfc;
  background: white;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(92, 207, 166, 0.18);
  animation: pulse 1.8s ease-in-out infinite;
}

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

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 210px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
  animation: rise 520ms ease both;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), rgba(255, 255, 255, 0.28));
}

.card:hover {
  transform: translateY(-3px);
  border-color: rgba(217, 221, 255, 0.95);
  box-shadow: 0 22px 54px rgba(54, 67, 100, 0.16);
}

.cpu {
  --accent: var(--blue);
}

.mem {
  --accent: var(--green);
}

.disk {
  --accent: var(--amber);
}

.net {
  --accent: var(--rose);
}

.label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.value {
  margin-top: 12px;
  font-size: 36px;
  font-weight: 780;
  line-height: 1;
  letter-spacing: 0;
}

.unit {
  margin-left: 5px;
  color: var(--muted);
  font-size: 16px;
  font-weight: 650;
}

.ring {
  width: 96px;
  height: 96px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  margin: 14px 0 12px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--p, 0) * 1%), rgba(244, 247, 252, 0.94) 0);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.ring::after {
  content: "";
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 0 0 1px rgba(226, 232, 240, 0.82);
}

.details {
  display: grid;
  gap: 9px;
  color: var(--muted);
  font-size: 13px;
}

.compact {
  margin-top: 22px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 22px;
}

.row strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-weight: 720;
  text-align: right;
}

.wide {
  grid-column: span 2;
  min-height: 158px;
  flex-direction: row;
  align-items: stretch;
  gap: 22px;
}

.wide .metric {
  display: flex;
  flex: 1;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
}

.split {
  display: grid;
  align-content: center;
  width: min(260px, 46%);
  gap: 10px;
}

.pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--muted);
  font-size: 13px;
}

.pill strong {
  overflow-wrap: anywhere;
  color: var(--ink);
}

.services-panel {
  margin-top: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 213, 228, 0.42), transparent 28%),
    rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: rise 620ms ease both;
}

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

.services-heading h2 {
  margin: 6px 0 0;
  font-size: clamp(22px, 3vw, 32px);
  line-height: 1.1;
  letter-spacing: 0;
}

.bubble {
  display: grid;
  min-width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: #fff0f6;
  color: #d94683;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px #ffd1e3, 0 10px 22px rgba(240, 120, 161, 0.13);
}

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

.service-item {
  display: flex;
  align-items: center;
  min-height: 72px;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.82);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(251, 252, 255, 0.78));
  color: var(--ink);
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease;
}

.service-item[href]:hover {
  transform: translateY(-2px);
  border-color: #d9ddff;
  box-shadow: 0 14px 30px rgba(109, 141, 255, 0.12);
}

.service-icon {
  position: relative;
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #eef6ff, #fff0f6);
  color: #6d8dff;
  font-weight: 800;
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.service-name {
  overflow: hidden;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.service-state {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.service-state::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(92, 207, 166, 0.14);
}

.service-item.offline .service-state::before {
  background: var(--rose);
  box-shadow: 0 0 0 4px rgba(240, 120, 161, 0.14);
}

.service-empty {
  grid-column: 1 / -1;
  padding: 18px;
  border: 1px dashed #d1d5db;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(0.78);
  }
}

@keyframes floaty {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-4px) rotate(2deg);
  }
}

@media (max-width: 980px) {
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wide {
    grid-column: span 2;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  main {
    width: min(100vw - 22px, 520px);
    padding: 22px 0;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px;
  }

  .actions {
    width: 100%;
    justify-content: space-between;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .wide {
    grid-column: auto;
    flex-direction: column;
  }

  .split {
    width: 100%;
  }

  .value {
    font-size: 38px;
  }

  .card {
    min-height: 198px;
  }

  .services-heading {
    align-items: flex-start;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }
}
