/* Header styles split out from styles.css */

#header {
    position: fixed;
    top: 18px;
    left: 50%;
    width: min(1180px, calc(100% - 48px));
    height: 66px;
    transform: translateX(-50%);
    background:
        radial-gradient(circle at 12% 0%, rgba(255, 255, 255, 0.22), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(88, 210, 205, 0.13), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.055) 42%, rgba(255, 255, 255, 0.09));
    backdrop-filter: saturate(185%) blur(26px);
    -webkit-backdrop-filter: saturate(185%) blur(26px);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s, border-color 0.3s, opacity 0.3s, transform 0.3s, box-shadow 0.3s;
    z-index: 1000;
    border: 1px solid rgba(255, 255, 255, 0.19);
    border-radius: 999px;
    box-shadow:
        0 24px 70px rgba(0, 0, 0, 0.34),
        0 8px 24px rgba(31, 126, 164, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.32),
        inset 0 -1px 0 rgba(255, 255, 255, 0.08);
    isolation: isolate;
    overflow: hidden;
}

#header::before {
    content: '';
    position: absolute;
    inset: 1px;
    border-radius: inherit;
    background:
        linear-gradient(115deg, rgba(255, 255, 255, 0.18), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.07), transparent 52%);
    pointer-events: none;
    z-index: -1;
}

#header::after {
    content: '';
    position: absolute;
    left: 7%;
    right: 7%;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), transparent);
    opacity: 0.78;
    pointer-events: none;
}

#header>div {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
    max-width: 1240px;
    justify-content: space-between;
    padding: 0 24px 0 26px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.nav-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.035);
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 15px;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: color 0.22s, background 0.28s, border-color 0.28s, transform 0.28s, box-shadow 0.28s;
}

.nav-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background:
        radial-gradient(circle at 30% 0%, rgba(255, 255, 255, 0.32), transparent 45%),
        linear-gradient(120deg, rgba(255, 255, 255, 0.2), rgba(122, 224, 212, 0.11), transparent);
    opacity: 0;
    transform: translateX(-18%) scaleX(0.82);
    transition: opacity 0.3s ease, transform 0.42s cubic-bezier(0.2, 0.8, 0.2, 1);
    pointer-events: none;
    z-index: -1;
}

.nav-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
    box-shadow:
        0 10px 26px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.nav-btn:hover::before {
    opacity: 1;
    transform: translateX(0) scaleX(1);
}


/* 移动端适配 */

@media (max-width: 768px) {
    #header {
        top: 10px;
        width: calc(100% - 24px);
        height: auto;
        padding: 12px 0 14px;
        border-radius: 28px;
    }
    #header>div {
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 16px;
    }
    #header>div>div:first-child {
        width: 100%;
        font-size: 18px;
    }
    #header>div>div:nth-child(2) {
        width: 100%;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }
    .nav-btn {
        padding: 8px 10px;
        font-size: 13px;
        flex: 1;
        min-width: 80px;
        text-align: center;
    }
}
