/* ===== 统一导航头部样式 ===== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Public+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap');

.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 999;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
.site-header.scrolled {
    background: rgba(16,16,16,0.92);
    backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 1px 30px rgba(0,0,0,0.5);
}
body.header-on-light .site-header {
    background: rgba(16,16,16,0.92);
    backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 1px 30px rgba(0,0,0,0.18);
}
body.header-on-light .site-header.scrolled {
    box-shadow: 0 1px 30px rgba(0,0,0,0.45);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1180px;
    margin: 0 auto;
    padding: 22px 24px;
    transition: padding 0.3s;
}
.site-header.scrolled .header-inner { padding: 14px 24px; }

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    font-family: 'Manrope', sans-serif;
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(90deg, #B247F9 0%, #3346FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    position: relative;
    top: -2px;
}
.site-logo-mark {
    width: 72px;
    height: 72px;
    display: block;
    flex-shrink: 0;
    border-radius: 18px;
}
.site-logo-text {
    display: inline-block;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
}
.site-nav > li > a {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255,255,255,0.75);
    font-family: 'Manrope', sans-serif;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: color 0.2s;
    text-decoration: none;
}
.site-nav > li > a:hover { color: #FFFFFE; }
.site-nav > li > a.nav-active { color: #FFFFFE; }

.nav-prefix {
    background: linear-gradient(90deg, #B247F9 0%, #3346FF 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 22px;
}

.nav-arrow {
    font-size: 10px;
    opacity: 0.5;
    display: inline-block;
    transition: transform 0.22s ease;
}
.nav-has-dropdown:hover .nav-arrow,
.nav-has-dropdown:focus-within .nav-arrow { transform: rotate(180deg); }

.nav-has-dropdown { position: relative; }
.nav-has-dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 14px;
}
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 220px;
    background: rgba(14,14,14,0.94);
    backdrop-filter: blur(18px) saturate(180%);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 12px;
    padding: 8px 0;
    list-style: none;
    z-index: 1000;
    box-shadow: 0 20px 48px rgba(0,0,0,0.55);
}
.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 6px;
    background: rgba(14,14,14,0.94);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown { display: block; }
.nav-dropdown li a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    color: rgba(255,255,255,0.65) !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    white-space: nowrap;
    transition: color 0.18s, background 0.18s;
    text-decoration: none;
}
.nav-dropdown li a:hover {
    color: #FFFFFE !important;
    background: rgba(255,255,255,0.06);
}
.dd-tag {
    font-size: 11px;
    opacity: 0.38;
    margin-left: 2px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.header-user {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Manrope', sans-serif;
    transition: all 0.23s ease;
    cursor: pointer;
    border: none;
    text-decoration: none;
}
.btn-primary {
    background: linear-gradient(90deg, #B247F9 0%, #3346FF 100%);
    color: #FFFFFE;
    padding: 10px 24px;
    font-size: 15px;
}
.btn-primary:hover {
    opacity: 0.88;
    transform: translateY(-2px);
    color: #FFFFFE;
}
.btn-outline {
    background: rgba(255,255,255,0.08);
    color: #FFFFFE;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(8px);
    padding: 10px 24px;
    font-size: 15px;
}
.btn-outline:hover {
    background: rgba(255,255,255,0.14);
    color: #FFFFFE;
    transform: translateY(-2px);
}
.btn-sm-header {
    padding: 7px 16px;
    font-size: 13px;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: rgba(255,255,255,0.75);
    border-radius: 2px;
    transition: all 0.3s;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .site-logo {
        gap: 12px;
        font-size: 28px;
    }
    .site-logo-mark {
        width: 52px;
        height: 52px;
        border-radius: 14px;
    }
    .site-nav { display: none; }
    .site-nav.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        inset: 0;
        background: rgba(10,10,10,0.97);
        backdrop-filter: blur(16px);
        z-index: 1001;
        align-items: center;
        justify-content: center;
        gap: 20px;
        overflow-y: auto;
        padding: 40px 0;
    }
    .site-nav.open > li > a { font-size: 20px; }
    .site-nav.open .nav-dropdown {
        display: block;
        position: static;
        transform: none;
        background: rgba(255,255,255,0.05);
        border: none;
        border-radius: 8px;
        box-shadow: none;
        min-width: unset;
        width: 220px;
        padding: 4px 0;
        margin-top: 6px;
    }
    .site-nav.open .nav-dropdown::before { display: none; }
    .site-nav.open .nav-has-dropdown { text-align: center; }
    .site-nav.open .nav-dropdown li a {
        font-size: 15px !important;
        justify-content: center;
        padding: 10px 0;
    }
    .site-nav.open .nav-arrow { display: none; }
    .hamburger { display: flex; }
    .header-actions .btn:not(.hamburger) { display: none; }
    .header-actions .header-user { display: none; }
}
