/* 导航栏组件样式 */

/* 防止滚动条影响布局 */
html {
    overflow-y: scroll;
}

/* 导航栏容器 */
.navbar {
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: 1500px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

/* Logo样式 */
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-image {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.logo h1 {
    font-size: 24px;
    font-weight: 600;
    color: #1890ff;
    margin: 0;
}

/* 导航链接样式 */
.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-links .nav-link {
    transition: all 0.3s ease;
}

.nav-link {
    color: #666;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-size: 16px;
    outline: none;
}

.nav-link:hover {
    color: #1890ff;
    background-color: #f0f7ff;
}

.nav-link.active {
    color: #1890ff;
    font-weight: 500;
    background-color: #e6f7ff;
}

.nav-link:active {
    transform: none;
    box-shadow: none;
}

/* 登录按钮样式 */
.login-btn {
    background-color: #1890ff;
    color: white !important;
    transition: background-color 0.3s ease;
    outline: none;
}

.login-btn:hover {
    background-color: #badaf5;
    color: white !important;
}

.login-btn:active {
    transform: none;
    box-shadow: none;
}

/* 用户名样式 */
.user-name {
    font-weight: 500;
}

/* 语言切换按钮样式 */
.lang-switch-btn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #e0e0e0;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
}

.lang-switch-btn:hover {
    background: #e6e6e6;
    color: #333;
    border-color: #d0d0d0;
    transform: translateY(-1px);
}

.lang-switch-btn:active {
    transform: translateY(0);
}

/* 登录模态框样式 - 只针对导航栏组件内的模态框 */
.navbar-wrapper .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.navbar-wrapper .modal-overlay:not([style*="display: none"]) {
    display: flex !important;
}

.navbar-wrapper .auth-modal {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 420px;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2001;
    overflow: hidden;
}

.navbar-wrapper .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e8e8e8;
}

.navbar-wrapper .modal-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.navbar-wrapper .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.navbar-wrapper .close-btn:hover {
    background-color: #f5f5f5;
    color: #333;
}

.navbar-wrapper .modal-body {
    padding: 24px;
}

.navbar-wrapper .auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.navbar-wrapper .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.navbar-wrapper .form-group label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.navbar-wrapper .form-group input {
    padding: 10px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s ease;
    outline: none;
}

.navbar-wrapper .form-group input:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.1);
}

.navbar-wrapper .password-input-wrapper {
    position: relative;
    width: 100%;
}

.navbar-wrapper .password-input-wrapper input {
    width: 100%;
    padding-right: 40px;
}

.navbar-wrapper .password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.3s ease;
}



.navbar-wrapper .password-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.navbar-wrapper .submit-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 12px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 8px;
}

.navbar-wrapper .submit-btn:hover {
    background-color: #40a9ff;
}

.navbar-wrapper .submit-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

.navbar-wrapper .modal-footer {
    padding: 0 24px 24px;
    text-align: center;
}

.navbar-wrapper .modal-footer p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.navbar-wrapper .toggle-mode {
    color: #1890ff;
    cursor: pointer;
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-wrapper .toggle-mode:hover {
    color: #40a9ff;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar-container {
        padding: 0 15px;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .nav-links {
        gap: 12px;
    }
    
    .nav-link {
        font-size: 14px;
        padding: 6px 12px;
    }
    
    .lang-switch-btn {
        padding: 4px 10px;
        font-size: 12px;
    }
    
    .auth-modal {
        width: 90%;
        max-width: 360px;
    }
}

@media (max-width: 480px) {
    .navbar-container {
        padding: 0 10px;
        justify-content: center;
    }
    
    .logo {
        display: none;
    }
    
    .nav-links {
        gap: 8px;
        margin-left: 0;
        flex: 1;
        justify-content: space-around;
    }
    
    .nav-link {
        font-size: 12px;
        padding: 4px 8px;
    }
}