:root {
    --bg: #050a14;
    --accent: #2f8cff;
    --accent-2: #22d3ee;
    --text: #eef3fb;
    --muted: #93a1b8;
    --glass: rgba(14, 22, 40, 0.55);
    --glass-strong: rgba(18, 28, 50, 0.75);
    --border: rgba(120, 160, 230, 0.16);
    --border-hi: rgba(90, 160, 255, 0.45);
    --green: #22c55e;
    --discord: #5865f2;
    --radius: 22px;
    --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-display: 'Unbounded', 'Manrope', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

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

::selection { background: rgba(47, 140, 255, 0.4); }

/* ============ ФОН ============ */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }

.bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.55;
    will-change: transform;
}
.b1 { width: 620px; height: 620px; background: #1d5fd8; top: -180px; left: -120px; animation: drift1 24s ease-in-out infinite alternate; }
.b2 { width: 540px; height: 540px; background: #0ea5c6; bottom: -200px; right: -100px; opacity: 0.38; animation: drift2 28s ease-in-out infinite alternate; }
.b3 { width: 420px; height: 420px; background: #5b3df0; top: 40%; left: 55%; opacity: 0.28; animation: drift3 32s ease-in-out infinite alternate; }

@keyframes drift1 { to { transform: translate(180px, 140px) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-200px, -120px) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-260px, 90px) scale(0.85); } }

.bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(120, 170, 255, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(120, 170, 255, 0.07) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 0%, transparent 75%);
            mask-image: radial-gradient(ellipse 70% 60% at 50% 35%, #000 0%, transparent 75%);
}

#particles { position: absolute; inset: 0; width: 100%; height: 100%; }

.bg-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(2, 5, 12, 0.75) 100%);
}

/* ============ HERO ============ */
main { position: relative; }

.hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 20px 90px;
    position: relative;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--border);
    -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #c5d4ee;
    margin-bottom: 26px;
}

.pulse {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.logo-wrap { position: relative; margin-bottom: 18px; }

.logo-glow {
    position: absolute;
    left: 50%; top: 50%;
    width: 130%; height: 130%;
    transform: translate(-50%, -50%);
    background: radial-gradient(closest-side, rgba(47, 140, 255, 0.55), transparent 70%);
    filter: blur(30px);
    animation: glow 4.5s ease-in-out infinite alternate;
}
@keyframes glow { from { opacity: 0.55; transform: translate(-50%, -50%) scale(0.92); } to { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } }

.logo {
    position: relative;
    width: min(440px, 76vw);
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 40px rgba(20, 90, 220, 0.55));
    animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-12px); } }

.title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(26px, 4.2vw, 46px);
    line-height: 1.2;
    letter-spacing: -0.01em;
    max-width: 900px;
    margin-bottom: 18px;
}
.grad {
    background: linear-gradient(100deg, var(--accent) 0%, var(--accent-2) 60%, #7dd3fc 100%);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.tagline {
    color: var(--muted);
    font-size: clamp(15px, 1.6vw, 18px);
    max-width: 560px;
    margin-bottom: 36px;
}

/* CTA */
.cta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 14px;
}

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 26px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    overflow: hidden;
    transition: transform .2s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
}
.btn:active { transform: scale(0.97); }
.btn .end { font-size: 12px; opacity: .6; margin-left: 2px; }

.btn-play {
    padding: 18px 40px;
    font-size: 18px;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: linear-gradient(135deg, #16a34a, #22c55e 55%, #4ade80);
    box-shadow: 0 10px 34px -6px rgba(34, 197, 94, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn-play:hover { transform: translateY(-3px); box-shadow: 0 16px 44px -6px rgba(34, 197, 94, 0.75), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-play .shine {
    position: absolute;
    top: 0; left: -80%;
    width: 50%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-20deg);
    animation: shine 3.6s ease-in-out infinite;
}
@keyframes shine { 0%, 55% { left: -80%; } 100% { left: 160%; } }

.ip-pill {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 14px 14px 14px 22px;
    border-radius: 14px;
    background: var(--glass);
    border: 1px solid var(--border);
    -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
    color: var(--text);
    cursor: pointer;
    font-family: var(--font);
    transition: border-color .25s ease, transform .2s ease, background .25s ease;
}
.ip-pill:hover { border-color: var(--border-hi); background: var(--glass-strong); transform: translateY(-2px); }
.ip-pill > i { color: var(--accent-2); }
.ip-pill code { font-family: 'JetBrains Mono', ui-monospace, Consolas, monospace; font-size: 16px; letter-spacing: .02em; }
.ip-copy {
    display: grid; place-items: center;
    width: 34px; height: 34px;
    border-radius: 9px;
    background: rgba(47, 140, 255, 0.16);
    color: #8ec2ff;
    font-size: 14px;
    transition: background .25s ease;
}
.ip-pill:hover .ip-copy { background: rgba(47, 140, 255, 0.32); }
.ip-pill.copied .ip-copy { background: rgba(34, 197, 94, .25); color: #6ee7a0; }

/* Онлайн сервера */
.status {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding: 10px 20px;
    border-radius: 999px;
    background: var(--glass);
    border: 1px solid var(--border);
    -webkit-backdrop-filter: blur(12px);
            backdrop-filter: blur(12px);
    font-size: 14px;
    font-weight: 600;
    flex-wrap: wrap;
    justify-content: center;
}
.status[hidden] { display: none; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); animation: pulse 2s infinite; }
.status.offline .status-dot { background: #ef4444; box-shadow: 0 0 10px #ef4444; animation: none; }
.status-main b { color: #fff; font-size: 16px; }
.status-bar { width: 90px; height: 6px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; }
.status-bar i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); transition: width 1s cubic-bezier(.2,.8,.2,1); }
.status.offline .status-bar { display: none; }
.status-map { color: var(--muted); font-weight: 500; }
.status-map:empty { display: none; }

.scroll-hint {
    position: absolute;
    bottom: 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    text-decoration: none;
    font-size: 12px;
    letter-spacing: .12em;
    text-transform: uppercase;
    transition: color .2s;
}
.scroll-hint:hover { color: #fff; }
.scroll-hint i { animation: bounce 1.8s infinite; }
@keyframes bounce { 50% { transform: translateY(6px); } }

/* ============ ШАГИ ============ */
.steps {
    max-width: 1180px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.section-head { text-align: center; margin-bottom: 44px; }
.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--accent-2);
    margin-bottom: 10px;
}
.section-head h2 {
    font-family: var(--font-display);
    font-size: clamp(24px, 3.4vw, 36px);
    font-weight: 700;
}

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card {
    --mx: 50%; --my: 0%;
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 32px 28px 28px;
    border-radius: var(--radius);
    background: var(--glass);
    border: 1px solid var(--border);
    -webkit-backdrop-filter: blur(16px);
            backdrop-filter: blur(16px);
    overflow: hidden;
    transition: transform .35s cubic-bezier(.2,.8,.2,1), border-color .3s ease, box-shadow .35s ease;
}
/* подсветка за курсором */
.card::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(420px circle at var(--mx) var(--my), rgba(47, 140, 255, 0.16), transparent 60%);
    opacity: 0;
    transition: opacity .3s ease;
    pointer-events: none;
}
.card:hover { transform: translateY(-8px); border-color: var(--border-hi); box-shadow: 0 24px 60px -20px rgba(20, 90, 220, 0.5); }
.card:hover::before { opacity: 1; }

.card-num {
    position: absolute;
    top: 18px; right: 24px;
    font-family: var(--font-display);
    font-size: 54px;
    font-weight: 800;
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1px rgba(140, 180, 255, 0.18);
    user-select: none;
}

.card-icon {
    width: 58px; height: 58px;
    display: grid; place-items: center;
    border-radius: 16px;
    font-size: 27px;
    margin-bottom: 22px;
    color: #fff;
    background: linear-gradient(135deg, rgba(47,140,255,.35), rgba(34,211,238,.15));
    border: 1px solid rgba(120, 180, 255, 0.3);
    box-shadow: 0 8px 24px -8px rgba(47,140,255,.6);
}
.card-steam .card-icon { background: linear-gradient(135deg, rgba(102,192,244,.32), rgba(23,26,33,.6)); border-color: rgba(102,192,244,.35); }
.card-discord .card-icon { background: linear-gradient(135deg, rgba(88,101,242,.55), rgba(88,101,242,.12)); border-color: rgba(120,132,255,.45); box-shadow: 0 8px 24px -8px rgba(88,101,242,.7); }
.card-connect .card-icon { background: linear-gradient(135deg, rgba(34,197,94,.4), rgba(34,197,94,.1)); border-color: rgba(74,222,128,.4); box-shadow: 0 8px 24px -8px rgba(34,197,94,.6); }

.card h3 { font-family: var(--font-display); font-size: 21px; font-weight: 700; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 15px; margin-bottom: 20px; }
.card p b { color: #fff; font-weight: 700; }

kbd {
    font-family: ui-monospace, Consolas, monospace;
    font-size: 13px;
    padding: 1px 7px;
    border-radius: 6px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    color: #fff;
}

.tips { list-style: none; margin-bottom: 26px; display: grid; gap: 8px; }
.tips li { font-size: 14px; color: #c3cee2; display: flex; gap: 10px; align-items: center; }
.tips i { color: var(--green); font-size: 12px; }

/* кнопки внутри карточек — прижаты вниз */
.card .btn, .card .btn-row { margin-top: auto; }
.card .btn { width: 100%; }

.btn-steam {
    background: linear-gradient(135deg, #1b2838, #2a475e);
    border-color: rgba(102, 192, 244, .45);
}
.btn-steam:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(102,192,244,.55); border-color: #66c0f4; }

.btn-discord { background: linear-gradient(135deg, #5865f2, #4752c4); border-color: rgba(140,150,255,.4); }
.btn-discord:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(88,101,242,.8); }

.btn-row { display: grid; gap: 10px; }
.btn-join { background: linear-gradient(135deg, #16a34a, #22c55e); box-shadow: 0 8px 26px -8px rgba(34,197,94,.6); text-transform: uppercase; letter-spacing: .05em; }
.btn-join:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -8px rgba(34,197,94,.8); }
.btn-copy { background: linear-gradient(135deg, #1d6ff0, #2f8cff); }
.btn-copy:hover { transform: translateY(-2px); box-shadow: 0 10px 30px -8px rgba(47,140,255,.75); }
.btn-copy.copied { background: linear-gradient(135deg, #15803d, #22c55e); }
.card .btn-row .btn { margin-top: 0; }

/* Discord блок */
.dc-box {
    padding: 16px;
    margin-bottom: 22px;
    border-radius: 16px;
    background: rgba(88, 101, 242, 0.1);
    border: 1px solid rgba(120, 132, 255, 0.25);
    min-height: 86px;
}
.dc-online { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; margin-bottom: 12px; }
.dc-online .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px var(--green); }
.dc-box.off .dc-online .dot { background: #64748b; box-shadow: none; }
.dc-avatars { display: flex; align-items: center; min-height: 36px; }
.dc-avatars .av {
    width: 36px; height: 36px;
    border-radius: 50%;
    border: 3px solid #14192e;
    margin-left: -10px;
    object-fit: cover;
    background: #2b3160;
    transition: transform .2s ease;
}
.dc-avatars .av:first-child { margin-left: 0; }
.dc-avatars .av:hover { transform: translateY(-4px) scale(1.1); z-index: 2; }
.dc-avatars .more {
    margin-left: -10px;
    height: 36px; min-width: 36px; padding: 0 9px;
    display: grid; place-items: center;
    border-radius: 999px;
    border: 3px solid #14192e;
    background: #2b3160;
    font-size: 12px; font-weight: 700;
}
.dc-text { font-size: 13px; color: var(--muted); }

/* код */
.code {
    padding: 16px 18px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: rgba(2, 6, 14, 0.7);
    border: 1px solid var(--border);
    font-family: ui-monospace, 'JetBrains Mono', Consolas, monospace;
    font-size: 15px;
    color: #9fd0ff;
    overflow-x: auto;
    white-space: nowrap;
}
.code::before { content: "> "; color: var(--green); }

/* ============ FOOTER ============ */
.footer {
    text-align: center;
    padding: 30px 20px 40px;
    color: rgba(147, 161, 184, .7);
    font-size: 13px;
    letter-spacing: .04em;
}

/* ============ TOAST ============ */
.toast {
    position: fixed;
    left: 50%; bottom: 28px;
    transform: translate(-50%, 30px);
    opacity: 0;
    pointer-events: none;
    padding: 14px 22px;
    border-radius: 14px;
    background: rgba(12, 20, 38, 0.92);
    border: 1px solid var(--border-hi);
    -webkit-backdrop-filter: blur(14px);
            backdrop-filter: blur(14px);
    box-shadow: 0 16px 50px -10px rgba(0,0,0,.7);
    font-size: 14px; font-weight: 600;
    max-width: calc(100vw - 32px);
    text-align: center;
    z-index: 100;
    transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .4s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ============ REVEAL ============ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.cards .reveal:nth-child(2) { transition-delay: .12s; }
.cards .reveal:nth-child(3) { transition-delay: .24s; }
/* .card:hover должен перебивать reveal-transform */
.card.reveal.in:hover { transform: translateY(-8px); }

/* ============ АДАПТИВ ============ */
@media (max-width: 960px) {
    .cards { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
    .cards .reveal:nth-child(n) { transition-delay: 0s; }
}
@media (max-width: 520px) {
    .hero { padding-bottom: 80px; }
    .btn-play { width: 100%; }
    .ip-pill { width: 100%; justify-content: space-between; }
    .card { padding: 28px 22px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
    .reveal { opacity: 1; transform: none; }
    html { scroll-behavior: auto; }
}
