/* ============ NCS · общая дизайн-система ============ */
:root {
    --bg: #0f0f17;
    --surface: rgba(255,255,255,0.035);
    --surface-hi: rgba(255,255,255,0.07);
    --line: rgba(255,255,255,0.07);
    --line-hi: rgba(255,255,255,0.14);
    --text: #f4f5fb;
    --muted: rgba(244,245,251,0.58);
    --faint: rgba(244,245,251,0.34);
    --accent: #859bff;
    --green: #4ade80;
    --amber: #fbbf24;
    --red: #f87171;
    --glass-green: rgba(74,222,128,0.15);
    --glass-green-hi: rgba(74,222,128,0.25);
    --glass-border: rgba(74,222,128,0.28);
    --radius: 18px;
    --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-top: var(--bar-h, 0px);
    line-height: 1.55;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: rgba(133,155,255,0.4); }

/* ---- Фон: спокойное свечение сверху ---- */
.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(ellipse 70% 45% at 50% -5%, rgba(133,155,255,0.20), transparent 70%),
        radial-gradient(ellipse 50% 40% at 100% 60%, rgba(133,155,255,0.06), transparent 70%),
        var(--bg);
}
.bg-fx .orb { display: none; }

/* ---- Навбар ---- */
.navbar {
    position: fixed; top: calc(var(--bar-h, 0px) + 1rem); left: 50%; transform: translateX(-50%);
    z-index: 1000; display: flex; align-items: center; gap: .3rem;
    padding: .4rem .4rem .4rem 1rem; border-radius: 999px;
    border: 1px solid var(--line); background: rgba(20,20,30,0.7);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    max-width: 96%;
}
.navbar .logo { display: flex; align-items: center; gap: .6rem; padding-right: 1rem; font-weight: 800; font-size: .95rem; white-space: nowrap; }
.navbar .logo img { height: 34px; width: auto; display: block; }
.nav-links { display: flex; gap: .1rem; }
.nav-links a {
    display: flex; align-items: center; gap: .45rem; padding: .55rem 1rem;
    font-size: .88rem; font-weight: 600; color: var(--muted); border-radius: 999px; transition: .2s;
}
.nav-links a:hover { color: var(--text); background: var(--surface-hi); }
.nav-links a.active { color: #fff; background: var(--surface-hi); }
/* Пополнение — только иконка кошелька, без подписи.
   Надпись «Пополнить» заметно растягивала навигацию, а на узком экране
   выталкивала её за край. Смысл кнопки и так понятен по кошельку, а для
   озвучки и всплывающей подсказки есть aria-label и title. */
.nav-cta {
    margin-left: .3rem; width: 40px; height: 40px; padding: 0; flex: none;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; cursor: pointer; color: #fff; text-decoration: none;
    background: var(--glass-green); border: 1px solid var(--glass-border); transition: .2s;
}
.nav-cta i { margin: 0; font-size: 1.05rem; }
.nav-cta span { display: none; }
.nav-cta:hover { background: var(--glass-green-hi); transform: translateY(-1px); }

/* ---- Кнопки ---- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
    padding: .9rem 1.8rem; border-radius: 14px; font-weight: 600; font-size: 1rem;
    border: 1px solid transparent; cursor: pointer; transition: all .25s ease; color: #fff;
}
.btn-primary { background: var(--glass-green); border-color: var(--glass-border); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 20px rgba(74,222,128,.1); }
.btn-primary:hover { background: var(--glass-green-hi); border-color: rgba(74,222,128,.5); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(74,222,128,.18); }
.btn-ghost { background: var(--surface); border-color: var(--line-hi); }
.btn-ghost:hover { background: var(--surface-hi); transform: translateY(-2px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }

/* ---- Карточка ---- */
.glass {
    background: rgba(255,255,255,0.035);
    border: 1px solid var(--line); border-radius: var(--radius);
}

/* ---- Toast ---- */
.toast-notification {
    position: fixed; bottom: 28px; left: 50%; transform: translate(-50%, 120px); opacity: 0;
    background: #1a1a28; padding: .85rem 1.3rem; border-radius: 14px; border: 1px solid var(--line-hi);
    display: flex; align-items: center; gap: .7rem; z-index: 3000; font-weight: 600; font-size: .92rem;
    transition: .35s ease; box-shadow: 0 12px 40px rgba(0,0,0,.5); max-width: 92vw;
}
.toast-notification i { color: var(--green); }
.toast-notification.error i { color: var(--red); }
.toast-notification.show { transform: translate(-50%, 0); opacity: 1; }

/* ---- Футер ---- */
.site-footer { margin-top: 4rem; padding: 2.2rem 1.5rem 2.6rem; border-top: 1px solid var(--line); text-align: center; }
.site-footer p { color: var(--faint); font-size: .85rem; margin-bottom: .3rem; }
.site-footer .footer-links { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-top: .8rem; }
.site-footer .footer-links a { color: var(--muted); font-size: .85rem; transition: .2s; }
.site-footer .footer-links a:hover { color: #fff; }

/* ---- Появление при скролле (только если JS работает) ---- */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } .js .reveal { opacity: 1; transform: none; } }

/* ---- Планшеты ---- */
@media (max-width: 1024px) {
    .navbar .logo span { display: none; }
    .navbar .logo { padding-right: .5rem; }
}
/* ---- Телефоны ---- */
@media (max-width: 640px) {
    .navbar { padding: .3rem; top: calc(var(--bar-h, 0px) + .6rem); gap: .1rem; }
    .navbar .logo { display: none; }
    .nav-links a span { display: none; }
    .nav-links a { padding: .65rem .85rem; }
    .nav-links a i { font-size: 1.1rem; }
    .site-footer { margin-top: 3rem; }
}

/* ---- Страницы статуса оплаты ---- */
.status-page { min-height: 100vh; display: grid; place-items: center; padding: 1.5rem; }
.status-card { max-width: 460px; width: 100%; padding: 2.8rem 2.2rem 2.2rem; text-align: center; animation: pop .5s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(16px); } }
.status-icon { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 1.5rem; font-size: 2rem; }
.status-icon.ok { background: var(--glass-green); border: 1px solid var(--glass-border); color: var(--green); }
.status-icon.wait { background: rgba(251,191,36,.14); border: 1px solid rgba(251,191,36,.3); color: var(--amber); animation: soft 2.4s ease-in-out infinite; }
@keyframes soft { 50% { transform: scale(1.05); } }
.status-icon i { color: inherit; }
.status-card h1 { font-size: 1.6rem; font-weight: 800; margin-bottom: .8rem; }
.status-card .message { color: var(--muted); margin-bottom: 1.6rem; }
.info-list { text-align: left; background: rgba(0,0,0,.2); border: 1px solid var(--line); border-radius: 14px; padding: .4rem 1.1rem; margin-bottom: 1.6rem; }
.info-list p { display: flex; align-items: center; gap: .8rem; padding: .75rem 0; font-size: .92rem; color: var(--muted); border-bottom: 1px solid var(--line); }
.info-list p:last-child { border-bottom: 0; }
.info-list i { width: 20px; text-align: center; color: var(--accent); }
.status-actions { display: flex; flex-direction: column; gap: .7rem; }
.progress { height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 0 0 1.8rem; }
.progress::before { content: ''; display: block; height: 100%; width: 40%; border-radius: 4px; background: var(--amber); animation: slide 1.6s ease-in-out infinite; }
@keyframes slide { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@media (max-width: 420px) { .status-card { padding: 2.2rem 1.3rem 1.8rem; } }

/* ---- Технические работы: полоса, шестерёнки, заглушка ---- */
@keyframes gear-cw { to { transform: rotate(360deg); } }
@keyframes gear-ccw { to { transform: rotate(-360deg); } }
.gears { position: relative; display: inline-block; flex: none; width: 1.9em; height: 1.5em; font-size: 1.35rem; color: var(--amber); }
.gears .g1 { position: absolute; left: 0; top: 0; font-size: 1em; animation: gear-cw 5s linear infinite; }
.gears .g2 { position: absolute; left: .82em; top: .58em; font-size: .68em; animation: gear-ccw 3.4s linear infinite; }
.gears.big { font-size: 4rem; margin-bottom: 1rem; }
.gears.off .g1, .gears.off .g2 { animation-play-state: paused; opacity: .35; }

/* ---- Уведомление о технических работах ----

   Было: полоса во всю ширину вверху экрана. Она сдвигала вниз всю страницу
   вместе с навигацией, имела мутно-оливковый фон и читалась как
   предупреждение браузера, а не как часть сайта.

   Стало: карточка внизу, в том же стекле, что и остальной сайт. Ничего не
   двигает, не спорит с навигацией и закрывается крестиком. */
.maint-note {
    position: fixed; z-index: 1100;
    left: 50%; transform: translateX(-50%);
    bottom: calc(1.1rem + env(safe-area-inset-bottom));
    display: flex; align-items: center; gap: .9rem;
    width: min(560px, calc(100vw - 2rem));
    padding: .85rem 1rem .85rem 1.1rem;
    border-radius: 16px;
    background: rgba(26,22,14,.86);
    border: 1px solid rgba(251,191,36,.3);
    /* Тёплая подсветка слева вместо заливки всей плашки жёлтым. */
    box-shadow: inset 3px 0 0 var(--amber), 0 16px 40px rgba(0,0,0,.45);
    backdrop-filter: blur(14px);
    animation: noteIn .35s cubic-bezier(.2,.8,.2,1);
}
@keyframes noteIn { from { opacity: 0; transform: translate(-50%, 14px); } }

/* Спокойная пульсация вместо крутящихся шестерёнок: внимание привлекает,
   но глаз не цепляет постоянно. */
.maint-note .mn-dot {
    width: 9px; height: 9px; flex: none; border-radius: 50%;
    background: var(--amber); box-shadow: 0 0 0 0 rgba(251,191,36,.5);
    animation: notePulse 2.4s ease-out infinite;
}
@keyframes notePulse {
    0% { box-shadow: 0 0 0 0 rgba(251,191,36,.45); }
    70%, 100% { box-shadow: 0 0 0 9px rgba(251,191,36,0); }
}

.maint-note .mn-body { flex: 1; min-width: 0; }
.maint-note .mn-title { font-weight: 700; font-size: .92rem; color: #fcd34d; }
.maint-note .mn-msg {
    color: var(--muted); font-size: .84rem; line-height: 1.45; margin-top: .12rem;
    /* Длинное сообщение не должно растягивать карточку на пол-экрана. */
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.maint-note .mn-time { flex: none; text-align: right; line-height: 1.3; }
.maint-note .mn-left { display: block; font-weight: 750; font-size: .9rem; font-variant-numeric: tabular-nums; }
.maint-note .mn-until { display: block; color: var(--faint); font-size: .72rem; }
.maint-note .mn-close {
    flex: none; width: 30px; height: 30px; border-radius: 9px;
    background: transparent; border: 1px solid var(--line); color: var(--muted);
    font-size: 1.15rem; line-height: 1; cursor: pointer; transition: .2s;
}
.maint-note .mn-close:hover { color: #fff; background: var(--surface-hi); }

@media (max-width: 560px) {
    .maint-note { gap: .7rem; padding: .8rem .85rem; align-items: flex-start; flex-wrap: wrap; }
    .maint-note .mn-dot { margin-top: .35rem; }
    .maint-note .mn-time { width: 100%; text-align: left; padding-left: 1.6rem; }
    .maint-note .mn-close { position: absolute; top: .5rem; right: .5rem; }
}

/* Тот же блок в админке — предпросмотр «как это увидят посетители».
   Там он стоит в потоке, а не плавает. */
.maint-bar.static {
    position: static; transform: none; width: auto;
    display: flex; align-items: center; gap: .9rem;
    padding: .85rem 1rem; border-radius: 14px;
    background: rgba(26,22,14,.7); border: 1px solid rgba(251,191,36,.3);
    box-shadow: inset 3px 0 0 var(--amber); animation: none;
}
.maint-bar.static .mn-body { flex: 1; min-width: 0; }
.maint-bar.static .mn-title { font-weight: 700; color: #fcd34d; font-size: .92rem; }
.maint-bar.static .mn-msg { color: var(--muted); font-size: .84rem; }
.maint-bar.static .mn-time { text-align: right; line-height: 1.3; }
.maint-bar.static .mn-left { display: block; font-weight: 750; }
.maint-bar.static .mn-until { display: block; color: var(--faint); font-size: .72rem; }
.maint-bar.static .mn-dot {
    width: 9px; height: 9px; flex: none; border-radius: 50%; background: var(--amber);
}

.maint-overlay { position: fixed; inset: 0; z-index: 5000; display: grid; place-items: center; padding: 1.2rem; background: var(--bg); overflow-y: auto; }
.mo-card { max-width: 480px; width: 100%; padding: 2.6rem 2rem; text-align: center; }
.mo-card h1 { font-size: 1.7rem; font-weight: 800; margin-bottom: .6rem; }
.mo-card p { color: var(--muted); }
.mo-time { margin-top: 1.4rem; padding: 1rem; border-radius: 14px; background: rgba(0,0,0,.25); border: 1px solid var(--line); color: var(--muted); font-size: .92rem; line-height: 1.8; }
.mo-time b { color: #fff; font-variant-numeric: tabular-nums; }
.mo-time .mo-left { color: var(--amber); font-size: 1.3rem; }

.status-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.status-dot.online { background: var(--green); }
.status-dot.maintenance { background: var(--amber); }
.status-dot.blocked { background: var(--red); }
.status-dot.development { background: #fb923c; }
[data-server][data-status=maintenance].status-pill { background: rgba(251,191,36,.08); border-color: rgba(251,191,36,.25); color: #fcd34d; }
[data-server][data-status=blocked].status-pill { background: rgba(248,113,113,.08); border-color: rgba(248,113,113,.25); color: #fca5a5; }
[data-server][data-status=development].status-pill { background: rgba(251,146,60,.08); border-color: rgba(251,146,60,.25); color: #fdba74; }
[data-server][data-status=maintenance].status-pill .dot { background: var(--amber); }
[data-server][data-status=blocked].status-pill .dot { background: var(--red); }
[data-server][data-status=development].status-pill .dot { background: #fb923c; }
/* ============ БЛОК ЛАУНЧЕРА ============ */

.launcher-sec { padding: 4.5rem 1.2rem 2rem; max-width: 1180px; margin: 0 auto; }
.launcher-box { padding: 2rem; border-radius: var(--radius); }
.launcher-main { display: grid; grid-template-columns: 1fr 300px; gap: 2.4rem; align-items: center; }
@media (max-width: 900px) { .launcher-main { grid-template-columns: 1fr; gap: 1.8rem; } }

.launcher-feats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.3rem 1.6rem; }
@media (max-width: 620px) { .launcher-feats { grid-template-columns: 1fr; } }
.lf { display: flex; gap: .9rem; align-items: flex-start; }
.lf .ic {
    width: 38px; height: 38px; border-radius: 11px; flex: none;
    display: grid; place-items: center; font-size: .95rem;
    background: var(--glass-green); border: 1px solid var(--glass-border); color: var(--green);
}
.lf h4 { font-size: .95rem; font-weight: 700; margin-bottom: .2rem; }
.lf p { font-size: .85rem; color: var(--muted); line-height: 1.55; }

.launcher-dl { text-align: center; }
.btn-lg { padding: 1rem 1.6rem; font-size: 1rem; width: 100%; justify-content: center; }
.dl-meta { font-size: .8rem; color: var(--faint); margin-top: .7rem; }
.dl-meta.dl-phone {
    color: #fcd34d; background: rgba(251, 191, 36, .1); border: 1px solid rgba(251, 191, 36, .28);
    border-radius: 12px; padding: .6rem .8rem; line-height: 1.5; max-width: 320px; margin-left: auto; margin-right: auto;
}
.dl-how {
    display: inline-flex; align-items: center; gap: .45rem;
    margin-top: 1.1rem; font-size: .86rem; color: var(--accent); font-weight: 600;
}
.dl-how:hover { text-decoration: underline; }

/* Пояснительная строка под текстом карточки в документации. */
.hint { font-size: .84rem; color: var(--faint); line-height: 1.6; margin-top: .6rem; }
.card .btn { margin-top: .4rem; }

/* Кнопка скачивания. Фирменный сине-сиреневый вместо зелёного: зелёный
   закреплён за оплатой, и две одинаковые кнопки рядом сливались. */
.btn-accent {
    background: rgba(133,155,255,.16);
    border-color: rgba(133,155,255,.38);
    color: #cdd6ff;
    backdrop-filter: blur(12px);
}
.btn-accent:hover {
    background: rgba(133,155,255,.26);
    border-color: rgba(133,155,255,.55);
    transform: translateY(-2px);
}

/* ============ МОБИЛЬНЫЕ ПРАВКИ ============ */

@media (max-width: 720px) {
    /* Кнопка пополнения теперь всегда иконка — отдельное правило для
       телефонов больше не нужно, оно задано в основном блоке .nav-cta. */

    /* Ссылки в подвале: переносим целиком, разделитель между ними убираем,
       иначе точка отрывается и повисает у края. */
    .footer-links { display: flex; flex-direction: column; align-items: center; gap: .5rem; }
    .footer-links .sep { display: none; }
    .footer-links a { text-align: center; }
}
