/* 导航栏文字可见性增强 - 橙黄色背景优化 */

/* ======================== 导航栏文字优化 ======================== */

/* Logo文字 - 深色加粗 */
.logo-text {
    color: #4A2C00 !important;
    font-weight: 800 !important;
    text-shadow: 
        0 1px 2px rgba(255, 255, 255, 0.3),
        0 -1px 1px rgba(0, 0, 0, 0.1) !important;
    letter-spacing: 1px !important;
}

/* 导航链接 - 深色 */
.nav a {
    color: #3E2723 !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4) !important;
}

/* 导航链接悬停 */
.nav a:hover {
    background: rgba(62, 39, 35, 0.15) !important;
    color: #1A1A1A !important;
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.5) !important;
}

/* 导航链接激活状态 */
.nav a.active {
    background: rgba(62, 39, 35, 0.2) !important;
    color: #1A1A1A !important;
    font-weight: 700 !important;
    border-bottom: 2px solid #4A2C00 !important;
}

/* 下划线效果 */
.nav a::after {
    background: #4A2C00 !important;
}

/* ======================== 搜索框优化 ======================== */

/* 搜索框输入文字 */
.search-box input {
    color: #333 !important;
    font-weight: 500 !important;
}

/* 搜索框占位符 */
.search-box input::placeholder {
    color: #666 !important;
    opacity: 0.8;
}

/* 搜索图标 */
.search-box .fa-search {
    color: #F57F17 !important;
    font-weight: 600 !important;
}

/* ======================== 登录注册按钮优化 ======================== */

/* 登录注册按钮 - 深色文字 + 白色背景 */
.auth-buttons a {
    background: rgba(255, 255, 255, 0.95) !important;
    color: #F57F17 !important;
    font-weight: 600 !important;
    border: 2px solid rgba(245, 127, 23, 0) !important;
    text-shadow: none !important;
}

/* 登录注册按钮悬停 */
.auth-buttons a:hover {
    background: rgba(255, 255, 255, 1) !important;
    color: #E65100 !important;
    border-color: #F57F17 !important;
    box-shadow: 0 4px 12px rgba(245, 127, 23, 0.3) !important;
}

/* ======================== 移动端菜单按钮优化 ======================== */

/* 移动端菜单按钮 */
.mobile-menu-toggle span,
.mobile-search-toggle i {
    background-color: #4A2C00 !important;
    color: #4A2C00 !important;
}

/* ======================== 用户信息显示优化 ======================== */

/* 用户信息文字 */
.user-info .user-text {
    color: #3E2723 !important;
    font-weight: 600 !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4) !important;
}

/* 用户下拉菜单触发器 */
.user-dropdown-trigger {
    color: #3E2723 !important;
    font-weight: 600 !important;
}

.user-dropdown-trigger:hover {
    background: rgba(62, 39, 35, 0.1) !important;
}

/* ======================== 滚动时导航栏优化 ======================== */

/* 滚动后的导航栏保持相同样式 */
.header.scrolled .logo-text,
.header.scrolled .nav a,
.header.scrolled .user-info .user-text {
    color: #4A2C00 !important;
}

.header.scrolled .nav a {
    color: #3E2723 !important;
}

/* ======================== 登录页面特殊优化 ======================== */

/* 登录页面导航栏（如果背景是视频或图片）*/
body.login-page .header .nav a,
body.login-page .header .logo-text {
    color: #4A2C00 !important;
    text-shadow: 
        0 1px 3px rgba(255, 255, 255, 0.5),
        0 0 10px rgba(255, 255, 255, 0.3) !important;
}

body.login-page .header .nav a:hover {
    background: rgba(62, 39, 35, 0.15) !important;
    color: #1A1A1A !important;
}

/* ======================== 高对比度增强 ======================== */

/* 为低视力用户提供更高对比度 */
@media (prefers-contrast: high) {
    .logo-text,
    .nav a {
        color: #000 !important;
        font-weight: 800 !important;
        text-shadow: 
            0 1px 3px rgba(255, 255, 255, 0.8),
            0 0 5px rgba(255, 255, 255, 0.5) !important;
    }
    
    .auth-buttons a {
        background: #fff !important;
        color: #000 !important;
        border: 3px solid #000 !important;
    }
}

/* ======================== 移动端特别优化 ======================== */

@media (max-width: 768px) {
    /* 移动端导航文字更粗 */
    .logo-text {
        font-weight: 900 !important;
        color: #3E2723 !important;
    }
    
    .nav a {
        font-weight: 700 !important;
        color: #3E2723 !important;
    }
    
    /* 移动端按钮对比度更高 */
    .auth-buttons a {
        background: #fff !important;
        color: #F57F17 !important;
        border: 2px solid #F57F17 !important;
        font-weight: 700 !important;
    }
}

/* ======================== 小屏幕优化 ======================== */

@media (max-width: 576px) {
    .logo-text {
        font-size: 14px !important;
        font-weight: 900 !important;
        color: #2C1A00 !important;
    }
    
    .nav a {
        font-size: 13px !important;
        font-weight: 700 !important;
    }
}

/* ======================== 无障碍优化 ======================== */

/* 焦点可见性增强 */
.nav a:focus,
.auth-buttons a:focus,
.logo:focus {
    outline: 3px solid #4A2C00 !important;
    outline-offset: 2px;
}

/* ======================== 打印样式 ======================== */

@media print {
    .logo-text,
    .nav a,
    .auth-buttons a {
        color: #000 !important;
        text-shadow: none !important;
    }
}

/* ======================== 额外增强 ======================== */

/* Logo悬停效果 */
.logo:hover .logo-text {
    color: #2C1A00 !important;
    transform: scale(1.02);
}

/* 导航项目间距优化 */
.nav a {
    margin: 0 2px;
    padding: 8px 14px !important;
}

/* 确保白色图标在黄色背景上可见 */
.logo-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ======================== 性能优化 ======================== */

/* 硬件加速 */
.logo-text,
.nav a,
.auth-buttons a {
    will-change: color, background-color;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ======================== 结束 ======================== */

