/* ─────────────  Untitled VPN — дизайн-система  ───────────── */
:root {
    --bg: #0a0a0a;
    --bg-deep: #050505;
    --surface: #131313;
    --surface-2: #171717;
    --surface-3: #1e1e1e;
    --line: #262626;
    --line-soft: #1f1f1f;
    --text: #ffffff;
    --muted: #8b8b8b;
    --muted-2: #5f5f5f;
    --accent: #f5a623;
    --accent-2: #ffb840;
    --accent-dim: rgba(245, 166, 35, .14);
    --accent-line: rgba(245, 166, 35, .38);
    --green: #4ade80;
    --red: #ef4444;
    --blue: #48a7e8;
    --r-sm: 10px;
    --r: 14px;
    --r-lg: 20px;
    --r-xl: 26px;
    --shadow: 0 24px 60px rgba(0, 0, 0, .55);
    --glow: 0 0 60px rgba(245, 166, 35, .18);
    --wrap: 1180px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
::selection { background: var(--accent); color: #000; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #3a3a3a; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.accent { color: var(--accent); }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.mt-8 { margin-top: 8px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

/* ─────────────  типографика  ───────────── */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.h-hero { font-size: clamp(38px, 6.2vw, 74px); letter-spacing: -.035em; }
.h-sec { font-size: clamp(32px, 4.6vw, 52px); }
.h-page { font-size: clamp(30px, 4vw, 46px); }
.lead { color: var(--muted); font-size: 15px; max-width: 620px; }

/* ─────────────  кнопки  ───────────── */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 9px;
    padding: 13px 26px; border-radius: 999px; border: 1px solid transparent;
    background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 14px;
    cursor: pointer; transition: .18s ease; white-space: nowrap; text-align: center;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary {
    background: linear-gradient(180deg, var(--accent-2), var(--accent));
    color: #140d00; font-weight: 700; box-shadow: 0 6px 24px rgba(245, 166, 35, .22);
}
.btn-primary:hover { box-shadow: 0 10px 32px rgba(245, 166, 35, .34); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); }
.btn-outline { background: transparent; border-color: var(--line); }
.btn-outline:hover { border-color: #3a3a3a; background: var(--surface-2); }
.btn-tg { background: var(--blue); color: #fff; font-weight: 600; }
.btn-danger { background: rgba(239, 68, 68, .14); color: #ff6b6b; border-color: rgba(239, 68, 68, .3); }
.btn-danger:hover { background: rgba(239, 68, 68, .22); }
/* третья кнопка героя: заметная, но подчинённая — не спорит с основной */
.btn-soft {
    background: linear-gradient(180deg, #1e1e1e, #171717);
    border-color: #2f2f2f; color: var(--text); font-weight: 600;
}
.btn-soft:hover {
    background: linear-gradient(180deg, #262626, #1d1d1d);
    border-color: var(--accent-line); color: var(--accent);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
.btn-trial {
    background: rgba(74, 222, 128, .12); color: var(--green);
    border-color: rgba(74, 222, 128, .34); font-weight: 600;
}
.btn-trial:hover {
    background: rgba(74, 222, 128, .18); border-color: rgba(74, 222, 128, .55);
    box-shadow: 0 10px 30px rgba(74, 222, 128, .14);
}
.btn-trial.is-used {
    background: transparent; color: var(--muted); border-color: var(--line); box-shadow: none;
}
.btn-block { width: 100%; }
.btn-lg { padding: 16px 34px; font-size: 15px; border-radius: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-xs { padding: 5px 12px; font-size: 12px; border-radius: 8px; }

/* ─────────────  карточки  ───────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    padding: 24px;
    position: relative;
}
.card-soft { background: var(--surface-2); border-color: var(--line-soft); }

/* ─────────────  формы  ───────────── */
.field { margin-bottom: 18px; }
.label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.hint { font-size: 12px; color: var(--muted-2); margin-top: 6px; }
.input, .select, .textarea {
    width: 100%; padding: 14px 16px; background: var(--surface-2);
    border: 1px solid var(--line); border-radius: var(--r); outline: none;
    transition: .15s; font-size: 14px;
}
.textarea { min-height: 96px; resize: vertical; font-family: var(--font); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--accent-line); background: #1b1b1b;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, .08);
}
.input.err, .textarea.err { border-color: rgba(239, 68, 68, .55); }

/* поле пароля с кнопкой показа */
.pw-field { position: relative; }
.pw-field .input { padding-right: 48px; }
.pw-toggle {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 38px; height: 38px; display: grid; place-items: center;
    background: none; border: 0; border-radius: 9px; cursor: pointer;
    color: var(--muted-2); transition: .15s;
}
.pw-toggle:hover { color: var(--accent); background: rgba(255, 255, 255, .04); }
.pw-toggle:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 1px; }
.select { appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%238b8b8b' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}
.select option { background: #1a1a1a; }
.err-text { color: #ff6b6b; font-size: 12.5px; margin-top: 6px; min-height: 16px; }
.switch { position: relative; width: 46px; height: 26px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.switch span {
    position: absolute; inset: 0; background: #2c2c2c; border-radius: 999px; transition: .2s;
}
.switch span::after {
    content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
    background: #8b8b8b; border-radius: 50%; transition: .2s;
}
.switch input:checked + span { background: var(--accent); }
.switch input:checked + span::after { background: #fff; transform: translateX(20px); }

/* ─────────────  бейджи  ───────────── */
.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
    border-radius: 999px; font-size: 11.5px; font-weight: 600;
    background: var(--surface-3); color: var(--muted); border: 1px solid var(--line);
}
.badge-accent { background: var(--accent); color: #140d00; border-color: transparent; }
.badge-green { background: rgba(74, 222, 128, .12); color: var(--green); border-color: rgba(74, 222, 128, .25); }
.badge-red { background: rgba(239, 68, 68, .12); color: #ff7070; border-color: rgba(239, 68, 68, .25); }
.badge-orange { background: var(--accent-dim); color: var(--accent); border-color: var(--accent-line); }

/* ─────────────  тосты  ───────────── */
#toasts {
    position: fixed; right: 20px; bottom: 20px; z-index: 9999;
    display: flex; flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 40px));
}
.toast {
    background: #1c1c1c; border: 1px solid var(--line); border-left: 3px solid var(--accent);
    border-radius: 12px; padding: 13px 16px; font-size: 13.5px; box-shadow: var(--shadow);
    animation: toastIn .25s ease;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } }

/* ─────────────  модалка  ───────────── */
.modal-back {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .72); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 900;
    animation: fade .2s ease;
}
@keyframes fade { from { opacity: 0; } }
.modal {
    background: #161616; border: 1px solid var(--line); border-radius: var(--r-xl);
    width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
    padding: 32px; box-shadow: var(--shadow); animation: modalIn .25s cubic-bezier(.2,.8,.3,1);
}
.modal-lg { max-width: 760px; }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.98); } }
.modal h3 { font-size: 24px; text-align: center; }
.modal .sub { text-align: center; color: var(--muted); margin-top: 6px; margin-bottom: 24px; font-size: 14px; }

/* ─────────────  копи-поле  ───────────── */
.copy-row {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px;
    background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r);
}
.copy-row .k { color: var(--muted); font-size: 14px; flex: none; }
.copy-row .v {
    margin-left: auto; color: var(--muted); font-size: 14px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; direction: rtl; text-align: right;
}
.copy-row .v.accent { color: var(--accent); }
.copy-btn {
    flex: none; width: 32px; height: 32px; display: grid; place-items: center; cursor: pointer;
    background: var(--surface-3); border: 1px solid var(--line); border-radius: 8px; transition: .15s;
}
.copy-btn:hover { border-color: var(--accent-line); color: var(--accent); }

/* ─────────────  скелетон / лоадер  ───────────── */
.spinner {
    width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.2);
    border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.page-loader { display: grid; place-items: center; padding: 80px 0; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted-2); font-size: 14px; }

/* ─────────────  логотип и бургер (общие)  ───────────── */
.logo { display: flex; align-items: center; gap: 11px; font-weight: 700; font-size: 16.5px; flex: none; }
/* знак из фирменного логотипа — картинка, без подложки и рамки */
.logo-mark { width: 30px; height: 30px; flex: none; display: block; }
.burger {
    display: none; width: 40px; height: 40px; border-radius: 11px; background: var(--surface-2);
    border: 1px solid var(--line); place-items: center; cursor: pointer; color: var(--muted); flex: none;
}

/* ─────────────  строка «ключ — значение»  ───────────── */
.info-row {
    display: flex; justify-content: space-between; gap: 16px; padding: 13px 0;
    border-bottom: 1px solid var(--line-soft); font-size: 14px;
}
.info-row:last-child { border-bottom: 0; }
.info-row .k { color: var(--muted); }
.info-row .v { text-align: right; overflow: hidden; text-overflow: ellipsis; }

/* ─────────────  статусы платежей  ───────────── */
.st-success { color: var(--green); font-size: 12.5px; }
.st-pending { color: var(--accent); font-size: 12.5px; }
.st-failed, .st-canceled { color: #ff6b6b; font-size: 12.5px; }

/* ─────────────  выбор периода (лендинг + кабинет)  ───────────── */
.periods { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.period {
    background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r);
    padding: 11px 13px; cursor: pointer; transition: .16s; text-align: left; color: inherit;
}
.period:hover { border-color: #333; }
.period.active { background: rgba(245, 166, 35, .10); border-color: var(--accent-line); }
.period .p-name { font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 6px; }
.period.active .p-name { color: var(--accent); }
.period .p-off { color: var(--accent); font-weight: 600; }
.period .p-price { font-size: 17px; font-weight: 700; margin-top: 3px; }

/* ─────────────  галочка в списках возможностей  ───────────── */
.tick {
    width: 17px; height: 17px; border-radius: 5px; background: var(--accent-dim);
    color: var(--accent); display: grid; place-items: center; flex: none; margin-top: 1px;
}

/* ─────────────  конфигуратор  ───────────── */
.cfg-row {
    display: flex; align-items: center; gap: 12px; padding: 13px 15px;
    background: var(--surface-2); border: 1px solid var(--line-soft); border-radius: var(--r);
}
.cfg-row .t { font-size: 13.5px; font-weight: 600; }
.cfg-row .n { font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.stepper { display: flex; align-items: center; gap: 8px; flex: none; }
.stepper button {
    width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3);
    border: 1px solid var(--line); color: var(--muted); cursor: pointer; display: grid;
    place-items: center; font-size: 15px; transition: .15s;
}
.stepper button:hover { border-color: var(--accent-line); color: var(--accent); }
.stepper .val { min-width: 22px; text-align: center; font-weight: 700; }

/* ─────────────  временно отключённые пункты тарифа  ───────────── */
.off, .off * { color: var(--muted-2) !important; }
.off { opacity: .55; }
.off .tick { background: rgba(255, 255, 255, .05); color: var(--muted-2); border-color: transparent; }
.off-note {
    display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 999px;
    background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
    font-size: 10.5px; font-style: normal; letter-spacing: .02em; white-space: nowrap;
}
.cfg-row.off .switch { pointer-events: none; }
.cfg-row.off .switch input + span { background: #2a2a2a; }

/* ─────────────  общий адаптив: планшеты и телефоны  ───────────── */

/* длинные значения (ссылка подписки, реферальная ссылка) не должны распирать вёрстку */
.copy-row .v, .info-row .v, .legal a { overflow-wrap: anywhere; }

/* широкие таблицы прокручиваются внутри себя, а не ломают страницу */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (max-width: 900px) {
    .modal { padding: 24px 20px; }
    .btn-lg { padding: 15px 26px; font-size: 14.5px; }
}

@media (max-width: 620px) {
    /* iOS Safari зумит страницу при фокусе, если шрифт поля меньше 16px */
    .input, .select, .textarea { font-size: 16px; padding: 13px 14px; }
    .btn { padding: 13px 20px; }
    .btn-lg { padding: 15px 22px; font-size: 15px; border-radius: 14px; }
    .modal { padding: 22px 16px; border-radius: 18px; }
    .row { flex-wrap: wrap; }
    /* кнопки в модалках в столбик — рядом они не помещаются */
    .modal .row > .btn { flex: 1 1 100%; }
}

@media (max-width: 380px) {
    .wrap { padding: 0 14px; }
    .btn-lg { padding: 14px 18px; font-size: 14px; }
}

/* на устройствах без мыши убираем эффекты наведения: они «залипают» после касания */
@media (hover: none) {
    .btn:hover, .quick:hover, .feature:hover, .plan:hover { transform: none; }
}

/* ─────────────  фоновое свечение  ───────────── */
.glow-bg {
    position: fixed; inset: 0; pointer-events: none; z-index: 0;
    background:
        radial-gradient(720px 420px at 50% -10%, rgba(245,166,35,.10), transparent 70%),
        radial-gradient(900px 500px at 10% 105%, rgba(245,166,35,.07), transparent 70%);
}
