.site-header {
    position: sticky;
    top: 0;
    z-index: 50;

    background: rgba(3, 8, 22, 0.78);
    border-bottom: 1px solid var(--border-soft);
    backdrop-filter: blur(20px);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    padding-left: 8px;
    padding-right: 8px;
    padding-top: 12px;
    padding-bottom: 12px;
}

.logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    text-decoration: none;
}

.logo-image {
    display: block;
    width: auto;
    height: clamp(32px, 4vw, 44px);
    max-width: min(220px, 100%);
}

.nav-links {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    justify-content: center;
    gap: clamp(20px, 4vw, 64px);
    min-width: 0;
}

.nav-links a {
    color: var(--text-muted);
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    transition: color 160ms ease;
}

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

.header-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 10px;
}

#logoutBtn {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
    background: linear-gradient(135deg, #dc2626, #7f1d1d);
    box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.1) inset,
            0 18px 42px rgba(220, 38, 38, 0.22),
            0 0 32px rgba(127, 29, 29, 0.18);
}

#logoutBtn:hover {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.46);
    background: linear-gradient(135deg, #ef4444, #991b1b);
    box-shadow:
            0 0 0 1px rgba(255, 255, 255, 0.16) inset,
            0 22px 52px rgba(220, 38, 38, 0.28),
            0 0 42px rgba(127, 29, 29, 0.24);
}

.hidden {
    display: none;
}

@media (max-width: 960px) {
    .header-inner {
        justify-content: center;
    }

    .nav-links {
        order: 3;
        flex: 1 1 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 16px 28px;
    }
}

@media (max-width: 640px) {
    .header-inner {
        justify-content: space-between;
        gap: 14px;
        padding-left: 6px;
        padding-right: 6px;
    }

    .logo,
    .header-actions {
        width: auto;
    }

    .logo-image {
        height: 36px;
        max-width: 170px;
    }

    .header-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .header-actions .btn {
        min-height: 38px;
        padding-inline: 12px;
        font-size: 15px;
        white-space: nowrap;
    }

    .nav-links a {
        font-size: 14px;
    }
}
@media (max-width: 360px) {
    .logo,
    .header-actions {
        width: 100%;
        justify-content: center;
    }
}
