:root {
  --bg: #08060f;
  --panel: rgba(18, 15, 28, .84);
  --panel-2: rgba(28, 23, 42, .78);
  --line: rgba(167, 139, 250, .16);
  --line-2: rgba(255, 255, 255, .08);
  --text: #f8f7ff;
  --muted: #a4a0b3;
  --muted-2: #716b82;
  --primary: #7c3aed;
  --accent: #a78bfa;
  --cyan: #22d3ee;
  --green: #16c784;
  --red: #ff5b5b;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 24px 80px rgba(0, 0, 0, .38);
  --grad: linear-gradient(135deg, #7c3aed, #a78bfa);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  border: 0;
  font: inherit;
}

.space-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 10%, rgba(124, 58, 237, .18), transparent 34%),
    radial-gradient(circle at 80% 30%, rgba(34, 211, 238, .08), transparent 30%),
    linear-gradient(135deg, #06040b 0%, #120b1f 48%, #08060f 100%);
}

.grid {
  position: absolute;
  inset: 0;
  opacity: .22;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: linear-gradient(to bottom, transparent, black 14%, black 82%, transparent);
}

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(110px);
  opacity: .22;
}

.glow-a {
  width: 520px;
  height: 520px;
  left: -170px;
  top: -140px;
  background: #7c3aed;
}

.glow-b {
  width: 560px;
  height: 560px;
  right: -180px;
  bottom: -180px;
  background: #3b0764;
}

.stars {
  position: absolute;
  inset: 0;
  opacity: .7;
  background-image:
    radial-gradient(circle, rgba(255,255,255,.86) 0 1.2px, transparent 1.6px),
    radial-gradient(circle, rgba(255,255,255,.6) 0 1px, transparent 1.4px);
  background-position: 14px 28px, 78px 114px;
  background-size: 180px 220px, 240px 260px;
}

.page {
  width: min(100% - 32px, 1240px);
  margin: 0 auto;
  padding: 22px 0 44px;
}

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

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

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(124, 58, 237, .18);
  border: 1px solid rgba(167, 139, 250, .28);
  box-shadow: 0 12px 32px rgba(124, 58, 237, .22);
}

.brand-mark img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-size: 20px;
  line-height: 1.1;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 12px;
}

.support-link,
.copy-btn {
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.support-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--accent);
  border: 1px solid rgba(167, 139, 250, .25);
  background: rgba(255, 255, 255, .04);
  font-size: 13px;
  font-weight: 700;
}

.support-link:hover,
.copy-btn:hover {
  transform: translateY(-1px);
}

.hero-card,
.link-card,
.section {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(28, 23, 42, .86), rgba(11, 9, 18, .88));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  border-radius: var(--radius);
}

.hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  padding: 26px;
  overflow: hidden;
  position: relative;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -60% 22%;
  height: 260px;
  background: radial-gradient(circle, rgba(124, 58, 237, .25), transparent 68%);
  pointer-events: none;
}

.hero-main,
.qr-card {
  position: relative;
  z-index: 1;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  color: #d9fff0;
  background: rgba(22, 199, 132, .12);
  border: 1px solid rgba(22, 199, 132, .25);
  font-size: 13px;
  font-weight: 800;
}

.status-pill.off {
  color: #ffdada;
  background: rgba(255, 91, 91, .13);
  border-color: rgba(255, 91, 91, .28);
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px rgba(22, 199, 132, .85);
}

.status-pill.off .status-dot {
  background: var(--red);
  box-shadow: 0 0 14px rgba(255, 91, 91, .75);
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  margin-top: 18px;
  max-width: 720px;
  font-size: clamp(34px, 5vw, 64px);
  line-height: .98;
  letter-spacing: 0;
}

.hero-main > p {
  margin-top: 16px;
  max-width: 680px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

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

.stat-card {
  min-width: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .045);
  padding: 14px;
}

.stat-card span {
  display: block;
  color: var(--muted-2);
  font-size: 12px;
  margin-bottom: 8px;
}

.stat-card strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 18px;
  line-height: 1.2;
}

.progress-block {
  margin-top: 18px;
}

.progress-top,
.progress-bottom {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted-2);
  font-size: 12px;
}

.progress-top b {
  color: var(--accent);
}

.progress-track {
  height: 9px;
  margin: 8px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
}

.progress-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--grad);
  box-shadow: 0 0 24px rgba(124, 58, 237, .45);
  transition: width .45s ease;
}

.qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 260px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .1);
  background:
    radial-gradient(circle at 50% 0, rgba(167, 139, 250, .18), transparent 54%),
    rgba(255, 255, 255, .045);
}

.qr-wrap {
  position: relative;
  width: 196px;
  aspect-ratio: 1;
  padding: 12px;
  border-radius: 24px;
  background: #fff;
}

.qr-wrap > img {
  width: 100%;
  height: 100%;
  display: block;
}

.qr-logo {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: var(--grad);
  border: 6px solid #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.2);
}

.qr-logo img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.qr-caption {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.link-card,
.section {
  margin-top: 16px;
  padding: 22px;
}

.section-kicker {
  margin-bottom: 9px;
  color: var(--muted-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.key-box {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .04);
}

.key-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  color: #7dd3fc;
  background: rgba(14, 165, 233, .15);
}

.key-icon svg {
  width: 19px;
  height: 19px;
}

.key-box code {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
}

.copy-btn {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 13px;
  color: #fff;
  background: var(--grad);
  font-weight: 800;
}

.copy-status {
  min-height: 18px;
  margin-top: 8px;
  color: var(--green);
  font-size: 12px;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.section-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--accent);
  border: 1px solid rgba(167, 139, 250, .25);
  background: rgba(124, 58, 237, .13);
  font-weight: 900;
}

h2 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.1;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.tab {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  border-radius: 999px;
  color: var(--muted);
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .045);
  font-weight: 800;
}

.tab-icon,
.app-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tab-icon {
  display: inline-grid;
  place-items: center;
}

.tab.on {
  color: #fff;
  border-color: transparent;
  background: var(--grad);
}

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

.app-card {
  min-width: 0;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .04);
  overflow: hidden;
}

.app-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .055);
}

.app-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  color: #fff;
  background: rgba(124, 58, 237, .2);
  font-weight: 900;
}

.app-icon svg {
  width: 22px;
  height: 22px;
}

.app-title {
  min-width: 0;
}

.app-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-title span {
  display: block;
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 12px;
}

.featured {
  margin-left: auto;
  padding: 4px 9px;
  border-radius: 999px;
  color: #efe8ff;
  background: rgba(124, 58, 237, .25);
  font-size: 10px;
  font-weight: 900;
}

.steps {
  padding: 8px 16px 16px;
}

.step {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .045);
}

.step:last-child {
  border-bottom: 0;
}

.step-num {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: rgba(124, 58, 237, .18);
  font-size: 12px;
  font-weight: 900;
}

.step-num svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.step h3 {
  margin: 1px 0 4px;
  font-size: 14px;
}

.step p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 9px;
}

.step-actions a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border-radius: 10px;
  color: #d8ccff;
  border: 1px solid rgba(167, 139, 250, .24);
  background: rgba(124, 58, 237, .12);
  font-size: 12px;
  font-weight: 800;
}

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

.server-card {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 76px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, .04);
}

.server-flag {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: rgba(255, 255, 255, .055);
  font-size: 26px;
  line-height: 1;
}

.server-info {
  min-width: 0;
  flex: 1;
}

.server-info strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-info span {
  display: block;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 12px;
}

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

.online::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(22, 199, 132, .65);
}

.empty {
  grid-column: 1 / -1;
  min-height: 120px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  color: var(--muted);
  border: 1px dashed rgba(255, 255, 255, .14);
  background: rgba(255, 255, 255, .025);
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  color: var(--muted-2);
  font-size: 13px;
}

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

  .qr-card {
    min-height: auto;
    padding: 22px;
  }

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

}

@media (max-width: 640px) {
  .page {
    width: min(100% - 20px, 1240px);
    padding-top: 12px;
  }

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

  .support-link {
    min-height: 34px;
    padding: 0 12px;
  }

  .hero-card,
  .link-card,
  .section {
    padding: 16px;
    border-radius: 18px;
  }

  .stats-grid,
  .guide-grid,
  .server-list {
    grid-template-columns: 1fr;
  }

  .key-box {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .key-box code {
    flex-basis: calc(100% - 54px);
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .copy-btn {
    width: 100%;
  }

  .qr-wrap {
    width: 176px;
  }

  .footer {
    flex-direction: column;
  }
}

/* иконки из «Библиотеки SVG» конфига (рисуются маской, цвет — из currentColor) */
.cfg-icon { display: inline-block; background: currentColor; -webkit-mask: var(--svg) center / contain no-repeat; mask: var(--svg) center / contain no-repeat; }
.tab-icon .cfg-icon { width: 18px; height: 18px; }
.app-icon .cfg-icon { width: 22px; height: 22px; }
.step-num .cfg-icon { width: 14px; height: 14px; }
.btn-ico { display: inline-grid; vertical-align: middle; margin-right: 6px; }
.btn-ico .cfg-icon, .btn-ico svg { width: 15px; height: 15px; }
.btn-ico svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
