/* 限定样式作用域，避免影响其他页面元素 */
body {
    margin: 0;
}

body.no-scroll {
    overflow: hidden;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 10%;
    background-color: #fff;
    font-family: Arial, sans-serif;
    border-bottom: 2px solid #ccc;
}

.navbar .logo {
    height: 100%;
}

.navbar .logo img {
    height: 100%;
}

.navbar .nav-menu {
    display: flex;
    list-style: none;
    flex-wrap: wrap;
}

.navbar .nav-menu li {
    margin: 0 15px;
    white-space: nowrap;
}

.navbar .nav-menu a {
    text-decoration: none;
    color: #000;
    /* 默认黑色 */
    font-size: 20px;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s;
}

/* 鼠标悬停和当前页面样式 */
.navbar .nav-menu a:hover,
.navbar .nav-menu a.active {
    color: #ff0000;
    /* 红色字体 */
}

.navbar .nav-menu a:hover:after,
.navbar .nav-menu a.active:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ff0000;
    /* 红色下划线 */
}

.auth-button {
    text-decoration: none;
    padding: 8px 20px;
    border-radius: 20px;
    /* 胶囊型边框 */
    border: 1px solid #ff0000;
    color: #ff0000;
    font-size: 14px;
    transition: background-color 0.3s, color 0.3s;
    white-space: nowrap;
    cursor: pointer;
}

.auth-button:hover {
    background: linear-gradient(to bottom, #f00, rgb(195, 40, 45));
    border: rgb(182, 48, 54) solid 1px;
    color: white;
}

/* 手机导航按钮 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

/* 手机导航菜单遮罩层 */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

/* 手机导航菜单容器 */
.mobile-nav-container {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background-color: #fff;
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
}

.mobile-nav-overlay.active .mobile-nav-container {
    right: 0;
}

/* 手机导航头部 */
.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.mobile-nav-header .logo img {
    height: 40px;
}

.mobile-nav-close {
    font-size: 28px;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.mobile-nav-close:hover {
    background: #f5f5f5;
    color: #333;
}

/* 手机导航菜单项 */
.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-menu li {
    border-bottom: 1px solid #eee;
}

.mobile-nav-menu a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-size: 16px;
    transition: background-color 0.3s;
}

.mobile-nav-menu a:hover,
.mobile-nav-menu a.active {
    background-color: #f5f5f5;
    color: #d32f2f;
}

.mobile-nav-menu .dropdown-custom a {
    position: relative;
}

.mobile-nav-menu .dropdown-custom a .caret {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

/* 手机版登录按钮 */
.mobile-auth {
    padding: 20px;
}

.mobile-auth .auth-button {
    display: block;
    text-align: center;
}
.desktop-nav{
    padding-left: 0;
}

@media (max-width: 950px) {
    .navbar {
        flex-direction: row;
        padding: 15px;
    }

    .navbar .nav-menu {
        margin: 15px 0;
        flex-wrap: wrap;
        justify-content: center;
    }

    .navbar .nav-menu li {
        margin: 5px 10px;
    }
}
/* 响应式设计 */
@media (max-width: 768px) {
    .desktop-nav,
    .desktop-auth {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .navbar {
        padding: 15px 30px;
    }
}

@media (min-width: 768px) {
    .mobile-nav-overlay {
        display: none !important;
    }
}

/* 登录/注册模态框样式 */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* 半透明黑色背景 */
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1001;
    background: #fff;
    border-radius: 12px;
    width: 440px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-content {
    position: relative;
    padding: 40px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

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

.tab-container {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.tab {
    flex: 1;
    padding: 15px 0;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
    color: #999;
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab.active {
    color: #d32f2f;
}

.tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: #d32f2f;
}

.form-container {
    color: #333;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.input-container input {
    width: 100%;
    padding: 12px 15px 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #f9f9f9;
}

.input-container input:focus {
    outline: none;
    border-color: #d32f2f;
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
    background: #fff;
}

.icon {
    position: absolute;
    left: 15px;
    width: 18px;
    height: 18px;
    z-index: 2;
    opacity: 0.6;
}

.user-icon::before {
    content: '👤';
    font-size: 16px;
}

.password-icon::before {
    content: '🔒';
    font-size: 16px;
}

.phone-icon::before {
    content: '📱';
    font-size: 16px;
}

.verification-icon::before {
    content: '📝';
    font-size: 16px;
}

.verification-container {
    display: flex;
    gap: 10px;
}

.verification-input {
    flex: 1;
}

.get-code-btn {
    padding: 12px 20px;
    background: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.get-code-btn:hover {
    background: #b71c1c;
    transform: translateY(-1px);
}

.get-code-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #666;
}

.checkbox-container input {
    margin-right: 8px;
}

.forgot-password {
    color: #d32f2f;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.forgot-password:hover {
    color: #b71c1c;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: #d32f2f;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 25px;
}

.login-btn:hover {
    background: #b71c1c;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.3);
}

.register-prompt {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.prompt-title {
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
    font-weight: 500;
}

.prompt-subtitle {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.register-link {
    color: #d32f2f;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.register-link:hover {
    color: #b71c1c;
}

.hidden {
    display: none !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal {
        width: 90%;
        max-width: 400px;
    }

    .modal-content {
        padding: 30px 20px;
    }
}