/* ==========================================================
   VOIDVPN — NAVBAR
========================================================== */

.site-header {
    position: fixed;
    top: 14px;
    right: 0;
    left: 0;
    z-index: 1000;

    padding: 0 16px;

    transition:
        transform 240ms ease,
        opacity 240ms ease;
}

.site-header.is-hidden {
    transform: translateY(-120%);
    opacity: 0;
}

.navbar-shell {
    position: relative;

    display: grid;
    grid-template-columns:
        minmax(190px, 1fr)
        auto
        minmax(260px, 1fr);
    align-items: center;

    width: min(1760px, 100%);
    min-height: 64px;
    margin: 0 auto;
    padding: 0 10px 0 13px;

    overflow: hidden;

    border: 1px solid rgba(168, 85, 247, 0.16);
    border-radius: 18px;

    background:
        linear-gradient(
            180deg,
            rgba(9, 9, 13, 0.94),
            rgba(4, 4, 7, 0.91)
        );

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.42),
        0 0 36px rgba(109, 40, 217, 0.055),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);

    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);
}

.navbar-shell::before {
    content: "";

    position: absolute;
    inset: 0;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            rgba(168, 85, 247, 0.065),
            transparent 25%,
            transparent 75%,
            rgba(109, 40, 217, 0.065)
        );

    pointer-events: none;
}

.navbar-shell::after {
    content: "";

    position: absolute;
    top: 0;
    right: 12%;
    left: 12%;

    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(216, 180, 254, 0.25),
            transparent
        );

    pointer-events: none;
}


/* ==========================================================
   DESKTOP NAVIGATION
========================================================== */

.nav-links {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 2px;
}

.nav-link {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 39px;
    padding: 0 13px;

    border-radius: 11px;

    color: rgba(255, 255, 255, 0.58);

    font-size: 13px;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;

    transition:
        color 180ms ease,
        background 180ms ease,
        transform 180ms ease;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.94);
    background: rgba(255, 255, 255, 0.04);
}

.nav-link.is-active,
.nav-link.nav-link-active {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            rgba(168, 85, 247, 0.13),
            rgba(109, 40, 217, 0.045)
        );
}

.nav-link::after {
    content: "";

    position: absolute;
    right: 13px;
    bottom: 4px;
    left: 13px;

    height: 2px;

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            #d8b4fe,
            #8b5cf6,
            #6d28d9
        );

    transform: scaleX(0);
    transform-origin: center;

    transition: transform 180ms ease;
}

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


/* ==========================================================
   ACTIONS
========================================================== */

.nav-actions {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-self: end;

    gap: 7px;
}

.nav-login,
.nav-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 39px;
    padding: 0 15px;

    border-radius: 11px;

    font-size: 13px;
    font-weight: 750;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.nav-login {
    border: 1px solid rgba(255, 255, 255, 0.09);

    color: rgba(255, 255, 255, 0.76);
    background: rgba(255, 255, 255, 0.03);
}

.nav-login:hover {
    color: #ffffff;

    border-color: rgba(168, 85, 247, 0.3);
    background: rgba(168, 85, 247, 0.075);

    transform: translateY(-1px);
}

.nav-primary {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #b84cff,
            #7c3aed 55%,
            #5b21b6
        );

    box-shadow:
        0 12px 30px rgba(109, 40, 217, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-primary:hover {
    transform: translateY(-2px);

    box-shadow:
        0 17px 42px rgba(109, 40, 217, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.24);
}


/* ==========================================================
   MOBILE TOGGLE
========================================================== */

.nav-toggle {
    position: relative;
    z-index: 2;

    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    justify-self: end;

    gap: 5px;

    width: 42px;
    height: 42px;
    padding: 0;

    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 12px;

    color: #ffffff;
    background: rgba(255, 255, 255, 0.035);

    cursor: pointer;
}

.nav-toggle:hover {
    border-color: rgba(168, 85, 247, 0.28);
    background: rgba(168, 85, 247, 0.08);
}

.nav-toggle span {
    display: block;

    width: 19px;
    height: 2px;

    border-radius: 999px;

    background: currentColor;

    transition:
        transform 190ms ease,
        opacity 190ms ease;
}

.nav-toggle.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================
   MOBILE MENU
========================================================== */

.mobile-menu {
    display: none;

    width: min(1760px, 100%);
    margin: 8px auto 0;
    padding: 10px;

    border: 1px solid rgba(168, 85, 247, 0.16);
    border-radius: 17px;

    background:
        linear-gradient(
            180deg,
            rgba(10, 9, 16, 0.98),
            rgba(5, 5, 9, 0.98)
        );

    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.48),
        inset 0 1px 0 rgba(255, 255, 255, 0.04);

    backdrop-filter: blur(28px);
    -webkit-backdrop-filter: blur(28px);

    transform-origin: top;
}

.mobile-menu.is-open {
    display: block;

    animation:
        voidMobileMenuOpen
        190ms
        cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu > a {
    display: flex;
    align-items: center;

    min-height: 47px;
    padding: 0 13px;

    border-radius: 11px;

    color: rgba(255, 255, 255, 0.68);

    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
}

.mobile-menu > a:hover,
.mobile-menu > a.is-active {
    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            rgba(168, 85, 247, 0.12),
            rgba(109, 40, 217, 0.04)
        );
}

.mobile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 8px;

    margin-top: 9px;
    padding-top: 9px;

    border-top: 1px solid rgba(255, 255, 255, 0.065);
}

.mobile-actions .nav-login,
.mobile-actions .nav-primary {
    width: 100%;
    min-height: 45px;
}

@keyframes voidMobileMenuOpen {
    from {
        opacity: 0;
        transform:
            translateY(-8px)
            scaleY(0.96);
    }

    to {
        opacity: 1;
        transform:
            translateY(0)
            scaleY(1);
    }
}


/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 1100px) {
    .navbar-shell {
        grid-template-columns:
            minmax(170px, 1fr)
            auto
            minmax(220px, 1fr);
    }

    .nav-link {
        padding: 0 9px;
        font-size: 12px;
    }

    .nav-link::after {
        right: 9px;
        left: 9px;
    }

    .nav-login,
    .nav-primary {
        padding: 0 12px;
    }
}

@media (max-width: 900px) {
    .navbar-shell {
        display: flex;
        justify-content: space-between;
    }

    .nav-links,
    .nav-actions {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }
}

@media (max-width: 520px) {
    .site-header {
        top: 8px;
        padding: 0 10px;
    }

    .navbar-shell {
        min-height: 60px;
        padding: 0 8px 0 11px;

        border-radius: 16px;
    }

    .mobile-menu {
        border-radius: 15px;
    }

    .mobile-actions {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   MOBILE NAVBAR — VISIBILITY FIX
========================================================== */

@media (max-width: 900px) {
    .navbar-shell {
        display: flex !important;
        align-items: center;
        justify-content: space-between;

        overflow: visible;
    }

    .navbar-shell .brand {
        flex: 0 1 auto;
        min-width: 0;
    }

    .navbar-shell .nav-links,
    .navbar-shell .nav-actions {
        display: none !important;
    }

    .navbar-shell .nav-toggle {
        position: relative;
        z-index: 10;

        display: flex !important;
        flex: 0 0 42px;

        margin-left: auto;

        visibility: visible;
        opacity: 1;
    }

    .mobile-menu {
        position: relative;
        z-index: 1001;

        max-height: calc(100vh - 90px);
        overflow-y: auto;
    }

    .mobile-menu.is-open {
        display: block !important;
    }
}

@media (max-width: 520px) {
    .galaxy-logo {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .brand {
        gap: 6px;
    }

    .brand-text {
        font-size: 17px;
    }

    .navbar-shell {
        min-height: 60px;
        padding:
            0
            8px
            0
            9px;
    }

    .nav-toggle {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }
}


/* ==========================================================
   MOBILE MENU — OPEN STATE FIX
========================================================== */

@media (max-width: 900px) {
    #void-mobile-menu {
        position: absolute;
        top: calc(100% + 8px);
        right: 16px;
        left: 16px;
        z-index: 2000;

        display: none;
    }

    #void-mobile-menu.is-open {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

@media (max-width: 520px) {
    #void-mobile-menu {
        right: 10px;
        left: 10px;
    }
}


/* ==========================================================
   FINAL MOBILE NAVIGATION FIX
========================================================== */

@media (max-width: 900px) {
    .site-header {
        overflow: visible !important;
    }

    .navbar-shell {
        position: relative !important;

        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;

        overflow: visible !important;
    }

    .nav-links,
    .nav-actions {
        display: none !important;
    }

    #void-nav-toggle {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;

        flex: 0 0 42px !important;

        width: 42px !important;
        height: 42px !important;

        margin-left: auto !important;

        visibility: visible !important;
        opacity: 1 !important;

        pointer-events: auto !important;
        touch-action: manipulation !important;
    }

    #void-mobile-menu {
        position: fixed !important;
        top: 82px !important;
        right: 16px !important;
        left: 16px !important;
        z-index: 99999 !important;

        display: none !important;

        max-height: calc(100vh - 100px);
        overflow-y: auto;

        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    #void-mobile-menu.is-open {
        display: block !important;

        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

@media (max-width: 520px) {
    #void-mobile-menu {
        top: 76px !important;
        right: 10px !important;
        left: 10px !important;
    }
}


/* ==========================================================
   INLINE MOBILE MENU CONTROL
========================================================== */

@media (max-width: 900px) {
    #void-nav-toggle {
        display: flex !important;
        position: relative !important;
        z-index: 100001 !important;
        pointer-events: auto !important;
        cursor: pointer !important;
        touch-action: manipulation !important;
    }

    #void-mobile-menu {
        position: fixed !important;
        top: 78px !important;
        right: 12px !important;
        left: 12px !important;
        z-index: 100000 !important;

        display: none;
        visibility: hidden;
        opacity: 0;
        pointer-events: none;
    }

    #void-mobile-menu.is-open {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}


/* ==========================================================
   MOBILE NAVIGATION — PURE CSS VERSION
========================================================== */

.mobile-nav-checkbox {
    position: fixed !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

@media (max-width: 900px) {
    .site-header {
        overflow: visible !important;
    }

    .navbar-shell {
        position: relative !important;
        z-index: 10002 !important;

        display: flex !important;
        align-items: center !important;

        overflow: visible !important;
    }

    .navbar-shell .nav-links,
    .navbar-shell .nav-actions {
        display: none !important;
    }

    .css-nav-toggle {
        position: relative !important;
        z-index: 10004 !important;

        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;

        flex: 0 0 42px !important;

        width: 42px !important;
        height: 42px !important;

        margin-left: auto !important;

        cursor: pointer !important;
        pointer-events: auto !important;
        touch-action: manipulation !important;

        visibility: visible !important;
        opacity: 1 !important;
    }

    .css-nav-toggle span {
        display: block !important;

        width: 19px !important;
        height: 2px !important;

        border-radius: 999px !important;
        background: #ffffff !important;

        transform-origin: center;
        transition:
            transform 0.2s ease,
            opacity 0.2s ease;
    }

    .css-mobile-menu {
        position: fixed !important;
        top: 78px !important;
        right: 12px !important;
        left: 12px !important;
        z-index: 10001 !important;

        display: none !important;

        max-height: calc(100vh - 96px);
        overflow-y: auto;

        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    #void-mobile-nav-checkbox:checked
        ~ .css-mobile-menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    #void-mobile-nav-checkbox:checked
        ~ .navbar-shell
        .css-nav-toggle
        span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    #void-mobile-nav-checkbox:checked
        ~ .navbar-shell
        .css-nav-toggle
        span:nth-child(2) {
        opacity: 0;
    }

    #void-mobile-nav-checkbox:checked
        ~ .navbar-shell
        .css-nav-toggle
        span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

@media (max-width: 520px) {
    .css-mobile-menu {
        top: 72px !important;
        right: 8px !important;
        left: 8px !important;
    }
}


/* ==========================================================
   VOIDVPN NAVBAR — FINAL SPACE COLOR
========================================================== */

.site-header {
    background: transparent !important;
}

/* Основная стеклянная панель */

.navbar-shell {
    border:
        1px solid rgba(192, 132, 252, 0.14) !important;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.045),
            rgba(255, 255, 255, 0.012)
        ),
        rgba(8, 6, 18, 0.76) !important;

    box-shadow:
        0 18px 55px rgba(0, 0, 0, 0.42),
        0 8px 34px rgba(88, 28, 135, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.055) !important;

    backdrop-filter: blur(22px) saturate(130%) !important;
    -webkit-backdrop-filter:
        blur(22px) saturate(130%) !important;
}

/* Мягкое фиолетовое свечение */

.navbar-shell::before {
    background:
        radial-gradient(
            circle at 12% 50%,
            rgba(168, 85, 247, 0.11),
            transparent 36%
        ),
        radial-gradient(
            circle at 86% 50%,
            rgba(99, 102, 241, 0.07),
            transparent 34%
        ) !important;
}

/* Убираем слишком яркие декоративные полосы */

.navbar-shell::after {
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(192, 132, 252, 0.3),
            rgba(99, 102, 241, 0.17),
            transparent
        ) !important;

    opacity: 0.42 !important;
}

/* Обычные ссылки */

.nav-link {
    color: rgba(255, 255, 255, 0.58) !important;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.94) !important;

    background:
        rgba(168, 85, 247, 0.075) !important;
}

/* Активная страница */

.nav-link.is-active {
    color: rgba(233, 213, 255, 1) !important;

    background:
        linear-gradient(
            135deg,
            rgba(168, 85, 247, 0.14),
            rgba(99, 102, 241, 0.07)
        ) !important;

    box-shadow:
        inset 0 0 0 1px
        rgba(192, 132, 252, 0.1) !important;
}

/* Войти */

.nav-login {
    color: rgba(255, 255, 255, 0.72) !important;
}

.nav-login:hover {
    color: #ffffff !important;

    background:
        rgba(255, 255, 255, 0.045) !important;
}

/* Регистрация / Панель управления */

.nav-primary {
    border:
        1px solid rgba(216, 180, 254, 0.38) !important;

    color: #ffffff !important;

    background:
        linear-gradient(
            135deg,
            #7c3aed 0%,
            #9333ea 55%,
            #6d28d9 100%
        ) !important;

    box-shadow:
        0 12px 30px rgba(126, 34, 206, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.18) !important;
}

.nav-primary:hover {
    transform: translateY(-1px);

    border-color:
        rgba(233, 213, 255, 0.58) !important;

    background:
        linear-gradient(
            135deg,
            #8b5cf6 0%,
            #a855f7 55%,
            #7c3aed 100%
        ) !important;

    box-shadow:
        0 16px 38px rgba(126, 34, 206, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.22) !important;
}

/* Мобильная кнопка */

.css-nav-toggle,
.nav-toggle {
    border:
        1px solid rgba(192, 132, 252, 0.17) !important;

    background:
        rgba(168, 85, 247, 0.07) !important;
}

.css-nav-toggle:hover,
.nav-toggle:hover {
    border-color:
        rgba(192, 132, 252, 0.34) !important;

    background:
        rgba(168, 85, 247, 0.13) !important;
}

/* Выпадающее мобильное меню */

.mobile-menu {
    border:
        1px solid rgba(192, 132, 252, 0.15) !important;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.045),
            rgba(255, 255, 255, 0.012)
        ),
        rgba(8, 6, 18, 0.94) !important;

    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.58),
        0 10px 45px rgba(88, 28, 135, 0.16) !important;

    backdrop-filter: blur(24px) saturate(135%) !important;
    -webkit-backdrop-filter:
        blur(24px) saturate(135%) !important;
}

.mobile-menu > a {
    color: rgba(255, 255, 255, 0.67) !important;
}

.mobile-menu > a:hover,
.mobile-menu > a.is-active {
    color: #ffffff !important;

    background:
        rgba(168, 85, 247, 0.1) !important;
}

/* Телефон */

@media (max-width: 900px) {
    .navbar-shell {
        background:
            linear-gradient(
                135deg,
                rgba(255, 255, 255, 0.04),
                rgba(255, 255, 255, 0.01)
            ),
            rgba(8, 6, 18, 0.88) !important;

        backdrop-filter:
            blur(20px) saturate(125%) !important;

        -webkit-backdrop-filter:
            blur(20px) saturate(125%) !important;
    }
}


/* ==========================================================
   VOIDVPN NAVBAR — CLICK SAFETY
========================================================== */

.site-header {
    position: relative !important;
    z-index: 10000 !important;

    pointer-events: auto !important;
}

.navbar-shell {
    position: relative !important;
    z-index: 2 !important;

    pointer-events: auto !important;
    isolation: isolate;
}

.navbar-shell::before,
.navbar-shell::after {
    pointer-events: none !important;
}

.navbar-brand,
.navbar-shell nav,
.navbar-shell a,
.nav-link,
.nav-login,
.nav-primary,
.nav-toggle,
.css-nav-toggle {
    position: relative !important;
    z-index: 5 !important;

    pointer-events: auto !important;
    cursor: pointer !important;
    touch-action: manipulation !important;
}

/* Невидимое мобильное меню не должно перекрывать Navbar */

.mobile-menu:not(.is-open),
.css-mobile-menu {
    pointer-events: none !important;
}

.mobile-menu.is-open {
    pointer-events: auto !important;
}

@media (min-width: 901px) {
    .mobile-menu,
    .css-mobile-menu,
    #void-mobile-nav-checkbox {
        pointer-events: none !important;
    }
}


/* ==========================================================
   GLOBAL LEGAL FOOTER
========================================================== */

.site-legal-footer {
    position: relative;
    z-index: 5;

    width: 100%;
    padding: 22px 20px 25px;

    border-top: 1px solid rgba(255, 255, 255, 0.045);

    background:
        linear-gradient(
            180deg,
            rgba(5, 5, 8, 0.88),
            #050508
        );
}

.site-legal-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    width: min(100%, 1280px);
    margin: 0 auto;
}

.site-legal-footer nav {
    display: flex;
    align-items: center;
    gap: 9px;
}

.site-legal-footer a,
.site-legal-footer nav > span,
.site-legal-footer small {
    color: rgba(255, 255, 255, 0.28);

    font-size: 9px;
    font-weight: 600;
    line-height: 1.5;
}

.site-legal-footer a {
    text-decoration: none;

    transition: color 0.2s ease;
}

.site-legal-footer a:hover {
    color: rgba(216, 180, 254, 0.82);
}

@media (max-width: 640px) {
    .site-legal-footer-inner {
        flex-direction: column;
        justify-content: center;
        gap: 8px;

        text-align: center;
    }

    .site-legal-footer nav {
        justify-content: center;
        flex-wrap: wrap;
    }
}
