:root {
    --primary: #ff2a85;
    --secondary: #b721ff;
    --gradient: linear-gradient(135deg, #ff2a85 0%, #d92ff2 48%, #9c3dff 100%);
    --bg-dark: #09090c;
    --bg-panel: rgba(17, 17, 24, 0.88);
    --card-bg: rgba(20, 20, 28, 0.92);
    --border: rgba(255, 255, 255, 0.08);
    --text: #ffffff;
    --text-dim: #b4b4bf;
    --success: #00d084;
    --error: #ff4d6d;
    --warning: #ffb703;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--text);
    background:
        radial-gradient(circle at 14% 16%, rgba(255, 42, 133, 0.12), transparent 24%),
        radial-gradient(circle at 84% 22%, rgba(183, 33, 255, 0.12), transparent 22%),
        linear-gradient(180deg, #09090b 0%, #040406 100%);
    font-family: "Poppins", sans-serif;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

body.content-protected {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

body.content-protected input,
body.content-protected textarea,
body.content-protected select,
body.content-protected [contenteditable="true"] {
    -webkit-user-select: text;
    user-select: text;
    -webkit-touch-callout: default;
}

body.page-ready {
    opacity: 1;
    transform: translateY(0);
}

body.page-leaving {
    opacity: 0;
    transform: translateY(12px);
}

a {
    color: inherit;
}

button,
input,
textarea,
select {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 18px;
    z-index: 999;
    width: min(1180px, calc(100% - 24px));
    margin: 24px auto 0;
    padding: 14px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(15, 15, 20, 0.75);
    backdrop-filter: blur(20px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    white-space: nowrap;
}

.logo i,
.logo span {
    color: var(--primary);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0;
    margin: 0;
}

.nav-links a {
    position: relative;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
    transition: color 0.25s ease;
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -7px;
    width: 100%;
    height: 2px;
    border-radius: 999px;
    background: var(--gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}

.nav-links a.active,
.nav-links a:hover {
    color: var(--text);
}

.nav-links a.active::after,
.nav-links a:hover::after {
    transform: scaleX(1);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-auth,
.btn-dc,
.nav-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 0.86rem;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}

.btn-auth {
    border: 1px solid rgba(255, 42, 133, 0.35);
    background: transparent;
    color: white;
    cursor: pointer;
}

.btn-auth:hover {
    background: rgba(255, 42, 133, 0.12);
}

.btn-dc,
.nav-cta {
    background: var(--gradient);
    color: white;
    box-shadow: 0 14px 28px rgba(183, 33, 255, 0.18);
}

.btn-dc:hover,
.nav-cta:hover,
.btn-auth:hover {
    transform: translateY(-2px);
}

#toasts {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 20000;
    display: grid;
    gap: 12px;
}

#protection-overlay {
    position: fixed;
    inset: 0;
    z-index: 19000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(4, 4, 8, 0.82);
    backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.protection-overlay-card {
    width: min(100%, 420px);
    padding: 24px 26px;
    border: 1px solid rgba(255, 77, 109, 0.35);
    border-radius: 22px;
    background: rgba(15, 15, 20, 0.96);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
    text-align: center;
    display: grid;
    gap: 10px;
}

.protection-overlay-card strong {
    font-size: 1.15rem;
}

.protection-overlay-card span {
    color: var(--text-dim);
    line-height: 1.6;
}

body.devtools-open #protection-overlay {
    opacity: 1;
    pointer-events: auto;
}

body.devtools-open > *:not(#protection-overlay):not(#toasts) {
    filter: blur(14px);
}

.toast {
    min-width: 280px;
    max-width: 340px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(15, 15, 20, 0.96);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
    display: grid;
    gap: 4px;
    transform: translateX(0);
    opacity: 1;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast strong {
    font-size: 0.92rem;
}

.toast span {
    color: var(--text-dim);
    font-size: 0.85rem;
    line-height: 1.5;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-warning {
    border-left: 4px solid var(--warning);
}

.toast-hide {
    opacity: 0;
    transform: translateX(16px);
}

.site-footer {
    width: min(1180px, calc(100% - 24px));
    margin: 86px auto 36px;
    padding: 28px 8px 10px;
    background: transparent;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.7fr) minmax(220px, 0.7fr);
    gap: 72px;
    align-items: start;
}

.footer-logo {
    margin-bottom: 24px;
    font-size: 1.6rem;
}

.footer-brand p {
    max-width: 560px;
    margin: 0 0 34px;
    color: var(--text-dim);
    line-height: 1.75;
    font-size: 1.06rem;
}

.footer-socials {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-socials a {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
    text-decoration: none;
    font-size: 1.12rem;
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

.footer-socials a:hover,
.footer-links a:hover {
    transform: translateY(-2px);
}

.footer-socials a:hover {
    border-color: rgba(255, 42, 133, 0.34);
    background: rgba(255, 42, 133, 0.1);
}

.footer-links {
    display: grid;
    align-content: start;
    gap: 18px;
}

.footer-links h3 {
    margin: 0 0 12px;
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.98rem;
    line-height: 1.35;
    transition: color 0.25s ease, transform 0.25s ease;
}

.footer-links a:hover {
    color: white;
}

@media (max-width: 860px) {
    .site-header {
        flex-wrap: wrap;
        border-radius: 28px;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 34px;
    }
}

@media (max-width: 640px) {
    .site-header {
        padding: 16px;
    }

    .nav-links {
        display: none;
    }

    .nav-right {
        width: 100%;
        flex-wrap: wrap;
    }

    .btn-auth,
    .btn-dc,
    .nav-cta {
        flex: 1 1 100%;
    }

    .site-footer {
        margin: 52px auto 24px;
        padding: 18px 0 8px;
    }

    .footer-links h3 {
        font-size: 1rem;
    }

    .footer-socials a {
        width: 48px;
        height: 48px;
    }
}
