/* ───────────────────────────────────────────────────────────
   Vortex — кабинет.
   Палитра лендинга: почти чёрный фон + виолет акцентом.
   Правило по акценту: фиолетовым красится только главное действие
   и активная вкладка. Как только им красится всё — он перестаёт
   означать «жми сюда».
   ─────────────────────────────────────────────────────────── */

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/golos-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/golos-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 {
  /* Здесь живёт знак ₽ (U+20BD) — без этого файла рубль ломается. */
  font-family: "Golos Text";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/golos-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
    U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --bg: #050505;
  --surface: #0d0d10;
  --surface-2: #141419;
  --line: #232329;
  --line-soft: #1a1a1f;
  --text: #f5f5f7;
  --muted: #8a8a94;
  --accent: #8b5cf6;
  --accent-dim: rgba(139, 92, 246, 0.12);
  --ok: #34d399;
  --warn: #fbbf24;

  --r-card: 16px;
  --r-inner: 12px;

  --tabbar-h: 58px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

button { font-family: inherit; color: inherit; cursor: pointer; }

/* ─── Шапка ─────────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 12px) 16px 12px;
  background: rgba(5, 5, 5, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}

.brand { display: flex; align-items: center; gap: 8px; }
.brand-mark { display: flex; color: var(--accent); }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}
.icon-btn:active { background: var(--surface-2); }

/* ─── Контент ───────────────────────────────────────────── */

.view {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 24px);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: 16px;
}

.card-title { margin: 0; font-size: 15px; font-weight: 600; }
.card-hint { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.section-gap { margin-top: 4px; }

/* ─── Статус ────────────────────────────────────────────── */

.status { padding: 24px 16px 20px; text-align: center; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
}
.status-badge.is-off { background: rgba(138, 138, 148, 0.1); color: var(--muted); }
.status-badge.is-warn { background: rgba(251, 191, 36, 0.12); color: var(--warn); }

.status-num {
  margin: 14px 0 0;
  font-size: 46px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.status-word { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.status-until { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

.status-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--muted);
}
.status-meta strong { color: var(--text); font-weight: 600; }

/* ─── Кнопки ────────────────────────────────────────────── */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 15px;
  border: 0;
  border-radius: var(--r-inner);
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}
.btn:active { opacity: 0.85; }
.btn[disabled] { background: var(--surface-2); color: var(--muted); cursor: default; }

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--line);
}

.btn-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* ─── Полоска бонусов ───────────────────────────────────── */

.strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  background: var(--surface);
  font-size: 14px;
}
.strip-icon { color: var(--accent); display: flex; }
.strip-text { flex: 1; }
.strip-arrow { color: var(--muted); display: flex; }

/* ─── Тарифы ────────────────────────────────────────────── */

.plans { display: grid; gap: 8px; margin-top: 14px; }

.plan {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  background: var(--surface-2);
  text-align: left;
}
.plan.is-active { border-color: var(--accent); background: var(--accent-dim); }

.plan-term { font-size: 15px; font-weight: 600; }
.plan-per { margin-top: 2px; font-size: 12px; color: var(--muted); }
.plan-right { text-align: right; flex-shrink: 0; }
.plan-price { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }

.badge {
  display: inline-block;
  margin-top: 3px;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

/* ─── Раскрывашка ───────────────────────────────────────── */

.fold { border-top: 1px solid var(--line-soft); margin-top: 14px; padding-top: 12px; }
.fold-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  color: var(--muted);
}
.fold-body { margin-top: 12px; }
.fold-body[hidden] { display: none; }

/* ─── Ключ ──────────────────────────────────────────────── */

.key {
  width: 100%;
  margin-top: 12px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  background: var(--surface-2);
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  line-height: 1.55;
  word-break: break-all;
  text-align: left;
}

.copied {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  font-size: 12px;
  color: var(--ok);
}

/* ─── QR ────────────────────────────────────────────────── */

.qr {
  width: 208px;
  height: 208px;
  margin: 16px auto 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  background: var(--surface-2);
}
.qr svg { width: 100%; height: 100%; display: block; }

/* ─── Платформы ─────────────────────────────────────────── */

.pills { display: flex; gap: 6px; overflow-x: auto; margin-top: 14px; padding-bottom: 2px; }
.pills::-webkit-scrollbar { display: none; }

.pill {
  flex-shrink: 0;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}
.pill.is-active { border-color: var(--accent); background: var(--accent-dim); color: var(--accent); }

.app-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  background: var(--surface-2);
}
.app-name { font-size: 15px; font-weight: 600; }
.app-desc { margin-top: 2px; font-size: 12px; color: var(--muted); }

/* ─── Друзья ────────────────────────────────────────────── */

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.stat {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  background: var(--surface-2);
  text-align: center;
}
.stat-num { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 2px; font-size: 12px; color: var(--muted); }

.rules { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; }
.rules li { display: flex; gap: 9px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.rules svg { flex-shrink: 0; margin-top: 2px; color: var(--accent); }

/* ─── Нижние вкладки ────────────────────────────────────── */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(5, 5, 5, 0.92);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line-soft);
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  transition: color 0.15s;
}
.tab.is-active { color: var(--accent); }

/* ─── Служебные состояния ───────────────────────────────── */

.center {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  color: var(--muted);
}
.center svg { color: var(--line); }
.center-title { margin: 0; font-size: 16px; font-weight: 600; color: var(--text); }
.center-sub { margin: 0; max-width: 280px; font-size: 13.5px; line-height: 1.5; }
.center .btn { width: auto; padding: 11px 22px; margin-top: 4px; }

/* Скелетоны: на медленной мобильной сети крутилка читается как
   зависание, а серые блоки — как «сейчас будет». */
.sk { border-radius: var(--r-card); background: var(--surface); position: relative; overflow: hidden; }
.sk::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.035), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  .sk::after { animation: none; }
  .tab { transition: none; }
}
