/* =========================================================
   PREMIUM HEADER
========================================================= */

.site-header {
    position: fixed;
    top: 18px;
    left: 50%;

    transform: translateX(-50%);

    width: min(1480px, calc(100% - 28px));
    height: 84px;

    padding: 0 22px;

    z-index: 999;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;

    border-radius: 28px;

    background:
        rgba(255,255,255,.68);

    border: 1px solid rgba(255,255,255,.82);

    backdrop-filter: blur(26px);

    box-shadow:
        0 20px 60px rgba(15,23,42,.08),
        inset 0 1px 0 rgba(255,255,255,.72);

    transition:
        background .25s ease,
        box-shadow .25s ease,
        transform .25s ease;
}

.site-header::before {
    content: '';

    position: absolute;
    inset: 0;

    border-radius: inherit;

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,.4),
            transparent 45%
        );

    pointer-events: none;
}

.site-header:hover {
    transform:
        translateX(-50%)
        translateY(-2px);

    box-shadow:
        0 28px 80px rgba(15,23,42,.12),
        inset 0 1px 0 rgba(255,255,255,.8);
}

/* BRAND */

.brand {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    gap: 14px;

    text-decoration: none;
}

.brand-mark {
    position: relative;

    width: 52px;
    height: 52px;

    border-radius: 18px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #4f46e5,
            #8b5cf6
        );

    box-shadow:
        0 18px 40px rgba(79,70,229,.24);
}

.brand-mark::before {
    content: '';

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            120deg,
            transparent,
            rgba(255,255,255,.28),
            transparent
        );

    transform: translateX(-120%);
    transition: .8s ease;
}

.brand:hover .brand-mark::before {
    transform: translateX(120%);
}

.brand-mark span {
    position: relative;
    z-index: 2;

    color: white;

    font-size: 15px;
    font-weight: 900;
    letter-spacing: .08em;
}

.brand-text {
    display: grid;
    gap: 3px;
}

.brand-text strong {
    color: #0f172a;
    font-size: 16px;
    line-height: 1;
    letter-spacing: -.02em;
}

.brand-text small {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

/* NAVIGATION */

.nav-links {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a {
    position: relative;

    height: 48px;

    padding: 0 18px;

    border-radius: 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #334155;

    font-size: 14px;
    font-weight: 800;

    text-decoration: none;

    transition: .25s ease;
}

.nav-links a::before {
    content: '';

    position: absolute;
    inset: 0;

    border-radius: inherit;

    background:
        linear-gradient(
            135deg,
            rgba(79,70,229,.08),
            rgba(139,92,246,.06)
        );

    opacity: 0;

    transition: .25s ease;
}

.nav-links a:hover::before,
.nav-links a.active::before {
    opacity: 1;
}

.nav-links a:hover,
.nav-links a.active {
    color: #4f46e5;
}

/* RIGHT */

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

/* LANG */

.lang-switcher,
.mobile-lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;

    padding: 6px;

    border-radius: 18px;

    background:
        rgba(255,255,255,.52);

    border: 1px solid rgba(15,23,42,.06);
}

.lang-switcher a,
.mobile-lang-switcher a {
    min-width: 42px;
    height: 38px;

    padding: 0 12px;

    border-radius: 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #64748b;

    font-size: 12px;
    font-weight: 900;

    text-decoration: none;

    transition: .25s ease;
}

.lang-switcher a:hover,
.lang-switcher a.active,
.mobile-lang-switcher a.active {
    color: white;

    background:
        linear-gradient(
            135deg,
            #4f46e5,
            #8b5cf6
        );

    box-shadow:
        0 12px 25px rgba(79,70,229,.24);
}

/* BUTTONS */

.auth-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-link-btn {
    height: 48px;

    padding: 0 18px;

    border-radius: 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #334155;

    font-size: 14px;
    font-weight: 800;

    text-decoration: none;

    transition: .25s ease;
}

.header-link-btn:hover {
    background: rgba(79,70,229,.08);
    color: #4f46e5;
}

.header-link-btn.secondary,
.header-btn {
    position: relative;

    overflow: hidden;

    color: white;

    background:
        linear-gradient(
            135deg,
            #4f46e5,
            #8b5cf6
        );

    box-shadow:
        0 18px 45px rgba(79,70,229,.22);
}

.header-link-btn.secondary::before,
.header-btn::before {
    content: '';

    position: absolute;
    inset: 0;

    background:
        linear-gradient(
            120deg,
            transparent,
            rgba(255,255,255,.28),
            transparent
        );

    transform: translateX(-120%);
    transition: .9s ease;
}

.header-link-btn.secondary:hover::before,
.header-btn:hover::before {
    transform: translateX(120%);
}

.header-link-btn.secondary:hover,
.header-btn:hover {
    transform: translateY(-2px);
}

/* USER */

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 8px 14px 8px 8px;

    border-radius: 18px;

    background:
        rgba(255,255,255,.52);

    border: 1px solid rgba(15,23,42,.06);
}

.user-avatar {
    width: 42px;
    height: 42px;

    border-radius: 14px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        linear-gradient(
            135deg,
            #4f46e5,
            #8b5cf6
        );

    color: white;

    font-size: 14px;
    font-weight: 900;
}

.user-meta {
    display: grid;
    gap: 3px;
}

.user-meta strong {
    color: #0f172a;
    font-size: 13px;
    line-height: 1;
}

.user-meta small {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.premium-badge {
    color: #7c3aed !important;
}

.logout-btn {
    height: 44px;

    padding: 0 16px;

    border: 0;
    border-radius: 14px;

    cursor: pointer;

    background:
        rgba(239,68,68,.08);

    color: #ef4444;

    font-size: 13px;
    font-weight: 900;

    transition: .25s ease;
}

.logout-btn:hover {
    transform: translateY(-2px);
    background: rgba(239,68,68,.14);
}

/* MOBILE */

.mobile-menu-btn {
    display: none;

    width: 52px;
    height: 52px;

    border: 0;
    border-radius: 18px;

    background:
        rgba(255,255,255,.72);

    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;

    width: 22px;
    height: 2px;

    margin: 5px auto;

    border-radius: 999px;

    background: #0f172a;
}

.mobile-panel {
    position: fixed;

    top: 110px;
    left: 14px;
    right: 14px;

    z-index: 998;

    padding: 22px;

    border-radius: 30px;

    background:
        rgba(255,255,255,.92);

    border: 1px solid rgba(255,255,255,.95);

    box-shadow:
        0 28px 90px rgba(15,23,42,.12);

    backdrop-filter: blur(26px);

    opacity: 0;
    visibility: hidden;

    transform:
        translateY(12px)
        scale(.98);

    transition: .25s ease;
}

body.menu-open .mobile-panel {
    opacity: 1;
    visibility: visible;

    transform:
        translateY(0)
        scale(1);
}

.mobile-nav {
    display: grid;
    gap: 10px;

    margin-bottom: 24px;
}

.mobile-nav a {
    height: 54px;

    padding: 0 18px;

    border-radius: 18px;

    display: flex;
    align-items: center;

    color: #0f172a;

    font-weight: 800;

    text-decoration: none;

    background:
        rgba(248,250,252,.9);
}

.mobile-actions {
    display: grid;
    gap: 12px;
}

/* RESPONSIVE */

@media (max-width: 1200px) {

    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

}

@media (max-width: 900px) {

    .site-header {
        height: 78px;
        padding: 0 16px;
    }

    .header-right .auth-actions,
    .header-right .lang-switcher,
    .header-right .user-menu {
        display: none;
    }

    .header-btn {
        display: none;
    }

}

@media (max-width: 640px) {

    .site-header {
        top: 10px;

        width: calc(100% - 20px);

        border-radius: 24px;
    }

    .brand-text small {
        display: none;
    }

    .brand-mark {
        width: 48px;
        height: 48px;
    }

}