:root {
  --bg: #07111f;
  --panel: rgba(12, 24, 39, 0.82);
  --panel-strong: rgba(17, 34, 54, 0.92);
  --line: rgba(170, 204, 255, 0.18);
  --text: #eef6ff;
  --muted: #9cb3c9;
  --cyan: #48d7ff;
  --green: #50f0a5;
  --amber: #ffd166;
  --rose: #ff6b8b;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(72, 215, 255, 0.24), transparent 30rem),
    radial-gradient(circle at 85% 20%, rgba(80, 240, 165, 0.18), transparent 28rem),
    linear-gradient(145deg, #07111f 0%, #102238 52%, #0a1829 100%);
  display: grid;
  place-items: center;
  padding: 28px;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(960px, 100%);
  display: grid;
  gap: 18px;
}

.hero,
.metric {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(18px);
}

.hero {
  border-radius: 8px;
  padding: clamp(24px, 5vw, 48px);
}

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

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #06131f;
  font-weight: 900;
  letter-spacing: 0;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 14px 30px rgba(72, 215, 255, 0.24);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 64px);
  line-height: 0.95;
  letter-spacing: 0;
}

.lead {
  max-width: 650px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.ip-panel {
  margin-top: 30px;
  padding: 18px 20px;
  border-radius: 8px;
  border: 1px solid rgba(72, 215, 255, 0.28);
  background: rgba(5, 15, 27, 0.58);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.ip-panel span {
  color: var(--muted);
}

.ip-panel strong {
  color: var(--text);
  font-size: clamp(18px, 3vw, 26px);
  overflow-wrap: anywhere;
}

.start-btn {
  min-height: 58px;
  min-width: 210px;
  margin-top: 26px;
  border: 0;
  border-radius: 8px;
  color: #06131f;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 16px 34px rgba(72, 215, 255, 0.24);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.start-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(80, 240, 165, 0.24);
}

.start-btn:active {
  transform: translateY(0);
}

.start-btn:disabled {
  cursor: wait;
  opacity: 0.72;
}

.share-btn {
  justify-self: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid rgba(72, 215, 255, 0.34);
  border-radius: 8px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  background: rgba(12, 24, 39, 0.72);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.share-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(80, 240, 165, 0.58);
  background: rgba(17, 34, 54, 0.9);
}

.share-btn:active {
  transform: translateY(0);
}

.share-btn[hidden] {
  display: none;
}

.status-wrap {
  margin-top: 24px;
}

.progress-line {
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-line span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--amber));
  transition: width 320ms ease;
}

.status {
  min-height: 24px;
  margin: 12px 0 0;
  color: var(--muted);
}

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

.metric {
  min-height: 206px;
  border-radius: 8px;
  padding: 22px;
  display: grid;
  align-content: center;
  gap: 8px;
  background: var(--panel-strong);
}

.metric.active {
  border-color: rgba(72, 215, 255, 0.58);
  box-shadow: 0 22px 54px rgba(72, 215, 255, 0.14);
}

.label {
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.value {
  color: var(--text);
  font-size: clamp(36px, 6vw, 54px);
  line-height: 1;
}

.unit {
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
}

.note {
  min-height: 42px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.note.good {
  color: var(--green);
}

.note.ok {
  color: var(--amber);
}

.note.bad {
  color: var(--rose);
}

.admin-card {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10;
  width: min(260px, calc(100vw - 44px));
  padding: 16px;
  border: 1px solid rgba(72, 215, 255, 0.26);
  border-radius: 8px;
  color: var(--text);
  background: rgba(12, 24, 39, 0.86);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(16px);
  display: grid;
  gap: 6px;
}

.admin-card span {
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.admin-card strong {
  font-size: 17px;
}

.telegram-btn {
  min-height: 42px;
  margin-top: 6px;
  padding: 0 14px;
  border-radius: 8px;
  color: #06131f;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  display: inline-grid;
  place-items: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.telegram-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(72, 215, 255, 0.22);
}

@media (max-width: 720px) {
  body {
    padding: 18px 18px 174px;
    place-items: start center;
  }

  .brand {
    align-items: flex-start;
  }

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

  .start-btn {
    width: 100%;
  }

  .share-btn {
    width: 100%;
  }

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

  .admin-card {
    right: 18px;
    bottom: 18px;
    width: calc(100vw - 36px);
  }
}
