.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 80;
    height: 78px;
    border-bottom: 1px solid rgba(59, 49, 64, 0.1);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 8px 28px rgba(36, 30, 41, 0.06);
    transition: background-color 0.24s ease, box-shadow 0.24s ease, backdrop-filter 0.24s ease;
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 14px 34px rgba(36, 30, 41, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body {
    padding-top: 78px;
}

.header-inner {
    position: relative;
    height: 100%;
    max-width: 1320px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 2;
}

.brand-logo {
    width: 150px;
    height: 56px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.brand-logo img,
.brand-avatar img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
}

.brand-avatar {
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.nav {
    position: absolute;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    transform: translateX(-50%);
    white-space: nowrap;
}

.nav-item {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
    color: var(--muted-strong);
    font-size: 14px;
    font-weight: 800;
    position: relative;
    transition: color 0.2s ease;
}

.nav-item::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
    height: 2px;
    border-radius: 999px;
    background: var(--accent-strong);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.2s ease;
}

.nav-item:hover,
.nav-item.active,
.nav-featured:hover,
.nav-featured.active {
    color: var(--accent-strong);
}

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

.nav-featured {
    color: var(--ink);
}

.menu-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #fff;
}

.menu-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 5px auto;
    border-radius: 2px;
    background: var(--ink);
    transition: transform 0.22s ease, opacity 0.22s ease;
}

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

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

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

.nav-overlay {
    display: none;
}

@media (max-width: 1100px) {
    .nav {
        gap: 15px;
    }

    .nav-item {
        font-size: 13px;
    }
}

@media (max-width: 960px) {
    .menu-toggle {
        display: block;
        flex: 0 0 auto;
    }

    .nav {
        position: fixed;
        top: 78px;
        left: 12px;
        right: 12px;
        z-index: 90;
        display: grid;
        grid-template-columns: 1fr;
        gap: 4px;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        background: rgba(255, 255, 255, 0.97);
        box-shadow: var(--shadow);
        transform: translateY(-16px);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.22s ease, transform 0.22s ease;
    }

    .nav.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-item {
        width: 100%;
        min-height: 44px;
        justify-content: flex-start;
        padding: 0 10px;
        border-radius: 6px;
    }

    .nav-item:hover,
    .nav-item.active {
        background: var(--paper-soft);
    }

    .nav-item::after {
        display: none;
    }

    .nav-overlay.active {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(37, 33, 40, 0.14);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
    }
}

@media (max-width: 560px) {
    body {
        padding-top: 68px;
    }

    .site-header {
        height: 68px;
    }

    .header-inner {
        min-height: 68px;
    }

    .brand-logo {
        width: 120px;
        height: 44px;
    }

    .brand-avatar {
        width: 52px;
        height: 52px;
    }

    .nav {
        top: 68px;
    }
}
