/* Дизайн-система Tecnt VPN: Nordic Obsidian & Aurora Gold (mobile-first + светлая/тёмная тема). */
:root {
  --bg: #07090f;
  --bg-elev: #0d121d;
  --bg-card: rgba(17, 23, 37, 0.88);
  --bg-card-solid: #111725;
  --bg-card-2: #182135;
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(242, 196, 90, 0.44);
  --text: #f3f6fc;
  --muted: #8e9cb6;
  --gold: #f2c45a;
  --gold-hover: #f8d47b;
  --gold-dim: rgba(242, 196, 90, 0.14);
  --teal: #2dd4bf;
  --teal-dim: rgba(45, 212, 191, 0.14);
  --green: #34d399;
  --green-dim: rgba(52, 211, 153, 0.14);
  --red: #f87171;
  --red-dim: rgba(248, 113, 113, 0.14);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.46), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --radius: 20px;
}

[data-theme="light"] {
  --bg: #f3f6fb;
  --bg-elev: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.94);
  --bg-card-solid: #ffffff;
  --bg-card-2: #eaf0f8;
  --border: rgba(15, 23, 42, 0.11);
  --border-strong: rgba(176, 125, 16, 0.42);
  --text: #0f172a;
  --muted: #52607a;
  --gold: #b58010;
  --gold-hover: #9a6b08;
  --gold-dim: rgba(181, 128, 16, 0.11);
  --teal: #0d9488;
  --teal-dim: rgba(13, 148, 136, 0.11);
  --green: #15803d;
  --green-dim: rgba(21, 128, 61, 0.1);
  --red: #dc2626;
  --red-dim: rgba(220, 38, 38, 0.1);
  --shadow: 0 12px 32px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Северное свечение авроры + мягкое золотое пятно сверху страницы */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto 0;
  height: 440px;
  background:
    radial-gradient(60% 70% at 15% 0%, rgba(45, 212, 191, 0.14), transparent 70%),
    radial-gradient(55% 65% at 88% 4%, rgba(242, 196, 90, 0.14), transparent 72%);
  pointer-events: none;
  z-index: 0;
}
[data-theme="light"] body::before {
  background:
    radial-gradient(60% 70% at 15% 0%, rgba(13, 148, 136, 0.1), transparent 70%),
    radial-gradient(55% 65% at 88% 4%, rgba(181, 128, 16, 0.1), transparent 72%);
}

a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  position: relative;
  z-index: 1;
  max-width: 1060px;
  margin: 0 auto;
  padding: 18px 16px 96px;
}

/* Шапка */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 22px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  background: linear-gradient(135deg, #f5cd6a 0%, #c88d19 100%);
  color: #0b0e15;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 16px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(242, 196, 90, 0.32);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(242, 196, 90, 0.28);
  white-space: nowrap;
}
.pill.green {
  background: var(--teal-dim);
  color: var(--teal);
  border-color: rgba(45, 212, 191, 0.34);
}
.pill.red {
  background: var(--red-dim);
  color: var(--red);
  border-color: rgba(248, 113, 113, 0.34);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(45, 212, 191, 0.22);
  display: inline-block;
  flex: none;
  animation: pulse-dot 2.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.22); }
  50% { box-shadow: 0 0 0 7px rgba(45, 212, 191, 0.06); }
}

/* Кнопки */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-card-2);
  color: var(--text);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.08s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  text-decoration: none;
  line-height: 1.2;
}
.btn:hover { border-color: var(--gold); text-decoration: none; }
.btn:active { transform: scale(0.985); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }

.btn-primary {
  background: linear-gradient(135deg, #f5ce6d 0%, #d99f26 100%);
  border-color: transparent;
  color: #0b0e15;
  box-shadow: 0 8px 24px rgba(242, 196, 90, 0.28);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #f9da88 0%, #e4ac34 100%);
  color: #0b0e15;
  box-shadow: 0 10px 28px rgba(242, 196, 90, 0.38);
}
.btn-teal {
  background: var(--teal-dim);
  border-color: rgba(45, 212, 191, 0.38);
  color: var(--teal);
}
.btn-ghost {
  background: transparent;
  min-height: 36px;
  padding: 7px 11px;
  font-size: 13px;
  font-weight: 600;
}
.btn-danger {
  background: var(--red-dim);
  border-color: rgba(248, 113, 113, 0.38);
  color: var(--red);
}
.btn-sm { min-height: 38px; padding: 8px 12px; font-size: 13px; border-radius: 11px; }
.btn-lg { min-height: 52px; font-size: 15.5px; border-radius: 15px; }
.btn-block { width: 100%; }

/* Карточки */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.card-gold {
  border-color: var(--border-strong);
  box-shadow: var(--shadow), 0 0 0 1px rgba(242, 196, 90, 0.1);
}

/* Главная: сетка + Signature маршрут туннеля */
.hero-grid {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 22px;
  align-items: start;
}

.hero-title {
  margin: 12px 0 10px;
  font-size: clamp(27px, 4.4vw, 42px);
  font-weight: 850;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.hero-accent {
  background: linear-gradient(95deg, var(--gold) 0%, var(--teal) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-sub {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15.5px;
  max-width: 560px;
}

/* Signature блок: визуальный живой маршрут Reality */
.route-card {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 16px 18px;
  background: linear-gradient(145deg, rgba(17, 25, 42, 0.92), rgba(11, 16, 28, 0.96));
  border: 1px solid rgba(45, 212, 191, 0.24);
  margin-bottom: 16px;
}
[data-theme="light"] .route-card {
  background: linear-gradient(145deg, #ffffff, #eef5f7);
}
.route-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--teal);
  margin-bottom: 12px;
}
.route-track {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}
.route-node {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.route-node strong { font-size: 13.5px; }
.route-node span { font-size: 11.5px; color: var(--muted); }
.route-line {
  position: relative;
  height: 2px;
  background: linear-gradient(90deg, rgba(242, 196, 90, 0.4), rgba(45, 212, 191, 0.85));
  border-radius: 99px;
}
.route-pulse {
  position: absolute;
  top: -3px;
  left: 0;
  width: 24px;
  height: 8px;
  border-radius: 99px;
  background: var(--teal);
  filter: blur(1px);
  animation: route-flow 2.2s linear infinite;
}
@keyframes route-flow {
  0% { left: 0%; opacity: 0; }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { left: calc(100% - 24px); opacity: 0; }
}
.route-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.tech-chip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
}
[data-theme="light"] .tech-chip { background: rgba(15, 23, 42, 0.04); }

/* Преимущества с SVG-иконками */
.features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.feat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  gap: 11px;
  align-items: flex-start;
}
.feat-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--gold-dim);
  color: var(--gold);
  display: grid;
  place-items: center;
  flex: none;
}
.feat-ico.teal { background: var(--teal-dim); color: var(--teal); }
.feat b { display: block; font-size: 14px; margin-bottom: 3px; line-height: 1.25; }
.feat span { color: var(--muted); font-size: 12.8px; line-height: 1.4; display: block; }

/* Табы и формы */
.tabs {
  display: flex;
  gap: 6px;
  background: var(--bg-card-2);
  padding: 4px;
  border-radius: 14px;
  margin-bottom: 16px;
}
.tab-btn {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 14.5px;
  font-weight: 700;
  padding: 10px 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.tab-btn.active {
  background: var(--bg-card-solid);
  color: var(--text);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}

.field { margin-bottom: 13px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 5px;
}
.input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(242, 196, 90, 0.16);
}

.alert {
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.alert.error { background: var(--red-dim); border-color: rgba(248, 113, 113, 0.4); color: var(--red); }
.alert.success { background: var(--green-dim); border-color: rgba(52, 211, 153, 0.4); color: var(--green); }
.alert.info { background: var(--gold-dim); border-color: rgba(242, 196, 90, 0.34); color: var(--text); }

.section-title {
  margin: 30px 0 14px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}
.plan-card.featured {
  border-color: var(--border-strong);
  background: linear-gradient(180deg, rgba(242, 196, 90, 0.08), var(--bg-card-solid) 45%);
}
.plan-price { font-size: 26px; font-weight: 850; letter-spacing: -0.025em; }
.plan-price small { font-size: 13px; font-weight: 500; color: var(--muted); }

/* Личный кабинет: статус VPN и шаги */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.status-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

.vpn-hero-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.vpn-shield-row {
  display: flex;
  align-items: center;
  gap: 14px;
}
.vpn-shield-ico {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.22), rgba(242, 196, 90, 0.16));
  border: 1px solid rgba(45, 212, 191, 0.42);
  color: var(--teal);
  display: grid;
  place-items: center;
  flex: none;
}

.os-switch {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 5px;
  border-radius: 15px;
  margin: 16px 0;
}
.os-btn {
  min-height: 44px;
  padding: 9px 10px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}
.os-btn.active {
  background: var(--gold-dim);
  border-color: var(--border-strong);
  color: var(--gold);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: var(--gold-dim);
  color: var(--gold);
  font-weight: 800;
  font-size: 13px;
  margin-right: 9px;
  flex: none;
}
.step-head {
  display: flex;
  align-items: center;
  font-size: 16.5px;
  font-weight: 800;
  margin: 0 0 8px;
}

.btn-stack { display: grid; gap: 10px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }

.qr-box {
  background: #ffffff;
  padding: 14px;
  border-radius: 16px;
  width: 204px;
  height: 204px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 12px auto;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.qr-box img { width: 100%; height: 100%; display: block; }

.code-line {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 11px;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11.5px;
  color: var(--muted);
  word-break: break-all;
  max-height: 74px;
  overflow: auto;
}

details.manual-box {
  margin-top: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
}
details.manual-box summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14.5px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
details.manual-box summary::after { content: "+"; font-size: 18px; color: var(--gold); font-weight: 800; }
details.manual-box[open] summary::after { content: "-"; }
details.manual-box summary::-webkit-details-marker { display: none; }

.help-strip {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--teal-dim);
  border: 1px solid rgba(45, 212, 191, 0.28);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 98;
}
.modal-backdrop.open { display: flex; }
.modal-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-card-solid);
  border: 1px solid var(--border-strong);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  transform: translateX(-50%) translateY(16px);
  background: var(--bg-card-2);
  color: var(--text);
  border: 1px solid var(--gold);
  padding: 11px 16px;
  border-radius: 13px;
  font-size: 13.5px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  max-width: 92vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.site-footer {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}

.muted { color: var(--muted); font-size: 13.5px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.hidden { display: none !important; }

/* Мобильная адаптация: приоритет форме и крупным тач-кнопкам */
@media (max-width: 860px) {
  .hero-grid, .plans-grid, .grid-2 { grid-template-columns: 1fr; }
  .auth-panel { order: -1; }
}

@media (max-width: 480px) {
  .container { padding: 12px 12px 98px; }
  .topbar { padding: 9px 12px; margin-bottom: 14px; border-radius: 14px; }
  .brand { font-size: 16px; }
  .card { padding: 16px; border-radius: 18px; }
  .features { grid-template-columns: 1fr; gap: 10px; }
  .hero-title { font-size: 27px; margin-top: 8px; }
  .hero-sub { font-size: 14.5px; margin-bottom: 14px; }
  .btn { width: 100%; }
  .topbar-actions .btn, .topbar-actions .pill { width: auto; }
  .hide-xs { display: none !important; }
}

.consent-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 14px;
}
.consent-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-card-2);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--muted);
  cursor: pointer;
}
.consent-item.consent-law {
  border-color: rgba(242, 196, 90, 0.35);
  background: rgba(242, 196, 90, 0.06);
  color: var(--text);
}
.consent-item input[type="checkbox"] {
  margin-top: 2px;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: var(--gold);
  cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .route-pulse, .live-dot { animation: none; }
}
