.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    padding: 0 100px;
    background: rgba(26, 26, 46, 0.25);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-title {
    font-size: 1.5em;
    background: linear-gradient(90deg, #ff0000, #ff8000, #ffff00, #80ff00, #00ff80, #00ffff, #0080ff, #8000ff, #ff0080);
    background-size: 1000% 1000%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbow 8s linear infinite;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 auto;
}

.lang-switcher {
    position: relative;
    margin-right: -95px;
    flex-shrink: 0;
}

.lang-switcher select {
    background: rgba(255,255,255,0.1);
    border: 2px solid #00bbff;
    border-radius: 20px;
    color: #00eaff;
    padding: 6px 30px 6px 10px;
    font-size: 1em;
    cursor: pointer;
    appearance: none;
    transition: all 0.3s ease;
}

#langSelect option {
    padding: 8px;
    margin: 2px;
    border-radius: 8px;
    font-weight: bold;
    background-color: rgba(207, 255, 251, 0.38);
    transition: all 0.3s ease;
}

.lang-switcher select:focus {
    outline: none;
    box-shadow: 0 0 15px rgba(255,255,255,0.3);
}

.lang-switcher::after {
    content: "▼";
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.5));
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    font-size: 0.8em;
    pointer-events: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .navbar {
        justify-content: space-between;
    }

    .navbar-title {
        max-width: 80%;
    }
}

@media (max-width: 480px) {
    .lang-switcher select {
        padding: 8px 30px 8px 12px;
        font-size: 0.9em;
    }

    .lang-switcher::after {
        right: 20px;
    }
}

@media (max-width: 400px) {
    .navbar {
        padding: 0 5px 0 15px;
        justify-content: flex-start;
    }

    .navbar-title {
        margin: 0 0 0 10px;
        max-width: 65%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .lang-switcher {
        margin-left: auto;
        margin-right: 0;
    }
}


.navbar-hidden {
    transform: translateY(-100%);
}

select::-ms-expand {
    display: none;
}

@keyframes rainbow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@supports (-webkit-background-clip: text) {
    .navbar-title {
        -webkit-text-fill-color: transparent;
    }
}

[dir="rtl"] .navbar {
    padding: 0 20px 0 100px;
}

[dir="rtl"] .lang-switcher {
    margin-left: -95px;
    margin-right: auto;
}