/* 导航栏样式 */
.global-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 44px;
    background: var(--modal-background);
    backdrop-filter: var(--apple-blur);
    -webkit-backdrop-filter: var(--apple-blur);
    border-bottom: none;
    z-index: 9999;
}

.header-container {
    max-width: 1024px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
}

/* 用户昵称样式 */
.user-nickname {
    margin-right: 20px;
    position: relative !important;
    display: inline-block !important;
}

/* 未读消息角标样式 - 增加了!important提高优先级 */
.unread-badge,
.forced-badge {
    position: absolute !important;
    top: -8px !important;
    right: -12px !important;
    background-color: #ff3b30 !important;
    color: white !important;
    font-size: 10px !important;
    min-width: 16px !important;
    height: 16px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 4px !important;
    font-weight: bold !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    z-index: 10000 !important;
    pointer-events: none !important;
    user-select: none !important;
}

/* 强化显示未读角标ID选择器 - ID选择器优先级更高 */
#header-unread-badge {
    position: absolute !important;
    top: -8px !important;
    right: -12px !important;
    background-color: #ff3b30 !important;
    color: white !important;
    font-size: 10px !important;
    min-width: 16px !important;
    height: 16px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 4px !important;
    font-weight: bold !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
    z-index: 10000 !important;
    pointer-events: none !important;
    user-select: none !important;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    opacity: 0.92;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 1;
}

.logo-image {
    width: 28px;
    height: 28px;
    display: block;
}

.logo-text {
    font-size: 17px;
    font-weight: 500;
    color: #1d1d1f;
    letter-spacing: -0.01em;
}

.nav-menu {
    display: flex;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item a {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
    font-weight: 400;
}

.nav-item a:hover {
    color: rgba(0, 0, 0, 1);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-container {
        padding: 0 16px;
    }
    
    .nav-menu {
        gap: 20px;
    }

    .logo-text {
        display: none;
    }
}

/* Remove existing language switcher styles */
.language-switcher,
.language-dropdown,
.current-language,
.language-options,
.language-option {
    all: unset;
}

/* Apple-style Language Toggle */
.language-toggle-container {
    display: inline-flex;
    align-items: center;
    margin-left: 15px;
}

.language-toggle-input {
    display: none;
}

.language-toggle-label {
    display: inline-flex;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    padding: 4px;
    width: 100px;
    height: 32px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.language-toggle-text {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: rgba(0, 0, 0, 0.6);
    z-index: 2;
    transition: color 0.3s ease;
}

.language-toggle-label::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 48px;
    height: 28px;
    background-color: white;
    border-radius: 18px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.language-toggle-input:checked + .language-toggle-label::before {
    transform: translateX(46px);
}

.language-toggle-input:checked + .language-toggle-label .language-toggle-zh {
    color: rgba(0, 0, 0, 0.4);
}

.language-toggle-input:checked + .language-toggle-label .language-toggle-en {
    color: rgba(0, 0, 0, 0.9);
}

.language-toggle-input:not(:checked) + .language-toggle-label .language-toggle-zh {
    color: rgba(0, 0, 0, 0.9);
}

.language-toggle-input:not(:checked) + .language-toggle-label .language-toggle-en {
    color: rgba(0, 0, 0, 0.4);
}

/* Responsive styles for language toggle */
@media (max-width: 768px) {
    .language-toggle-container {
        margin-left: 0;
        margin-top: 10px;
    }
} 