:root {
    --bg: #0a0c11;
    --bg-2: #0f131b;
    --surface: #151a24;
    --surface-2: #1b2130;
    --border: #232a38;
    --text: #e8ebf2;
    --muted: #9aa4b6;
    --accent: #e11d48;
    --accent-2: #ff3b5c;
    --accent-soft: rgba(225, 29, 72, .14);
    --good: #34d399;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    --maxw: 1120px;
    --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --head: 'Montserrat', var(--font);
}

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

html { scroll-behavior: smooth; }

body {
    background-color: #0a0c11;
    background-image: 
        /* Картинка остаётся открытой почти до самого низа первого экрана */
        linear-gradient(to bottom, 
            rgba(10, 12, 17, 0.2) 0px, 
            rgba(10, 12, 17, 0.2) 850px, 
            rgba(10, 12, 17, 0.7) 1000px, 
            #0a0c11 1150px
        ),
        radial-gradient(1200px 600px at 80% -10%, rgba(225, 29, 72, .25), transparent 60%),
        radial-gradient(900px 500px at 0% 10%, rgba(124, 77, 255, .15), transparent 55%),
        url('/img/serverlogo.png');
    background-repeat: no-repeat;
    background-position: top center;
    background-attachment: scroll;
    background-size: 100% auto;
    color: var(--text);
    font-family: var(--font);
    line-height: 1.55;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* 2. Делаем полупрозрачную подложку с размытием для блоков «Почему у нас» и «Сервер» */
section:not(:first-of-type), 
.features, 
.servers-list {
    background: rgba(10, 12, 17, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container { width: min(100% - 2.5rem, var(--maxw)); margin-inline: auto; }

/* ---------- navbar ---------- */
.nav {
    position: fixed;
    top: 14px; left: 50%;
    transform: translateX(-50%);
    z-index: 900;
    width: min(100% - 1.5rem, var(--maxw));
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(15, 19, 27, .6);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow);
}
.nav .brand {
    display: flex; align-items: center; gap: 10px;
    font-family: var(--head); font-weight: 800; font-size: 1.25rem; letter-spacing: .3px;
}
.nav .brand .heart { color: var(--accent-2); filter: drop-shadow(0 0 8px rgba(255, 59, 92, .5)); }
.nav .links { display: flex; align-items: center; gap: 6px; }
.nav .links a {
    padding: 8px 14px; border-radius: 999px; color: var(--muted);
    font-weight: 500; transition: .18s; white-space: nowrap;
}
.nav .links a:hover { color: var(--text); background: var(--surface-2); }
.nav .links a.cta { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); }
.nav .links a.cta:hover { filter: brightness(1.08); }

@media (max-width: 560px) {
    .nav .brand span.word { display: none; }
    .nav .links a { padding: 8px 11px; font-size: .92rem; }
}

/* ---------- buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
    font-family: var(--font); font-weight: 600; font-size: 1rem; cursor: pointer;
    transition: .18s; color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--text); }
.btn.ghost:hover { background: var(--surface-2); }
.btn:disabled, .btn.loading { opacity: .6; pointer-events: none; }

/* ---------- hero ---------- */
.hero { min-height: 92vh; display: grid; place-items: center; text-align: center; padding: 120px 0 60px; }
.hero .eyebrow {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; margin-bottom: 22px;
    border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .9rem;
    background: var(--surface);
}
.hero .eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }
.hero h1 {
    font-family: var(--head); font-weight: 800; letter-spacing: .5px;
    font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1.02;
    background: linear-gradient(135deg, #fff 30%, var(--accent-2));
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero p { color: var(--muted); font-size: clamp(1rem, 2.2vw, 1.2rem); max-width: 640px; margin: 20px auto 32px; }
.hero .actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- sections ---------- */
.section { padding: 70px 0; }
.section h2 {
    font-family: var(--head); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem);
    text-align: center; margin-bottom: 12px;
}
.section .sub { color: var(--muted); text-align: center; max-width: 620px; margin: 0 auto 42px; }

.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .grid.cols-3 { grid-template-columns: 1fr; } }

.card {
    background: linear-gradient(180deg, var(--surface), var(--bg-2));
    border: 1px solid var(--border); border-radius: var(--radius); padding: 26px;
    transition: .2s;
}
.card:hover { border-color: #33405a; transform: translateY(-3px); box-shadow: var(--shadow); }
.card .ic {
    width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 16px;
    background: var(--accent-soft); color: var(--accent-2);
}
.card h3 { font-family: var(--head); font-size: 1.25rem; margin-bottom: 8px; }
.card p { color: var(--muted); }

/* ---------- servers ---------- */
.servers { display: grid; gap: 16px; grid-template-columns: 1fr; max-width: 640px; margin: 0 auto; }
.server {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px;
}
.server .s-name { font-family: var(--head); font-weight: 700; font-size: 1.1rem; }
.server .s-ip { color: var(--muted); font-size: .9rem; cursor: pointer; transition: .15s; }
.server .s-ip:hover { color: var(--accent-2); }
.server .s-online { text-align: right; }
.server .s-online .count { font-weight: 700; font-size: 1.15rem; }
.server .s-online .bar { width: 120px; height: 6px; border-radius: 999px; background: var(--surface-2); margin-top: 6px; overflow: hidden; }
.server .s-online .bar > i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.server.offline .s-online .count { color: var(--muted); }

/* ---------- footer ---------- */
.footer { 
    background-color: #0a0c11; 
    border-top: 1px solid var(--border); 
    margin-top: auto; 
    padding: 40px 0 60px; 
    color: var(--muted); 
    position: relative;
    z-index: 10;
    /* Закрываем всё пространство ниже футера, если экран высокий */
    box-shadow: 0 500px 0 500px #0a0c11; 
}
.footer .cols { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; }
.footer h4 { color: var(--text); font-family: var(--head); margin-bottom: 12px; font-size: 1rem; }
.footer a { color: var(--muted); display: block; padding: 3px 0; transition: .15s; }
.footer a:hover { color: var(--accent-2); }
.footer .pays { display: flex; gap: 10px; margin-top: 10px; }
.footer .pays img { height: 34px; opacity: .85; }
.footer .copy { margin-top: 28px; font-size: .85rem; opacity: .8; }

/* ---------- modal ---------- */
.overlay {
    position: fixed; inset: 0; z-index: 1000; display: none;
    background: rgba(3, 5, 9, .7); backdrop-filter: blur(4px);
    align-items: center; justify-content: center; padding: 20px;
}
.overlay.open { display: flex; }
.modal {
    width: min(440px, 100%); background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px;
    animation: pop .18s ease;
}
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal .m-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.modal .m-head h3 { font-family: var(--head); font-size: 1.3rem; }
.modal .m-head .x { cursor: pointer; color: var(--muted); padding: 4px; border-radius: 8px; }
.modal .m-head .x:hover { color: var(--text); background: var(--surface-2); }
.modal .m-body { color: var(--muted); margin: 14px 0 20px; }
.modal .m-body b { color: var(--text); }
.modal label { display: block; color: var(--text); font-weight: 500; margin: 14px 0 6px; }
.modal input, .modal textarea {
    width: 100%; padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--bg-2); border: 1px solid var(--border); color: var(--text); font-family: var(--font); font-size: 1rem;
}
.modal input:focus, .modal textarea:focus { outline: none; border-color: var(--accent); }
.modal textarea { resize: vertical; min-height: 80px; }
.modal .btn { width: 100%; margin-top: 20px; }

/* ---------- toast ---------- */
.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(140%);
    z-index: 1100; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
    padding: 14px 20px; border-radius: 999px; box-shadow: var(--shadow); transition: .3s; max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { border-color: var(--accent); }
.toast.ok { border-color: var(--good); }

.loader { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
