* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

/* 顶部导航栏 */
.top-header {
    display: flex;
    height: 70px;
    width: 1280px;
    max-width: 1280px;
    margin-top: 0px;
    margin-right: auto;
    margin-left: auto;
}

.top-header .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: rgba(0, 0, 0, 1);
    margin-left: 2px;
    height: 70px;
    width: 170px;
}
.top-header .logo img {
    height: 100%;
    width: 100%;
}
.top-header .search-area {
    display: flex;
    align-items: center;
}
.top-header .search-input {
    height: 32px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    outline: none;
    width: 220px;
}
.top-header .header-search-btn {
    height: 32px;
    width: 80px;
    background-color: rgba(18, 95, 188, 1);
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}
.top-header .login-btn {
    color: rgba(0, 0, 0, 1);
    font-size: 14px;
    font-weight: 400;
    width: 62px;
    text-align: left;
    height: 20px;
    margin-top: 20px;
    margin-left: 65px;
}

/* 辅助类：用于控制显示和隐藏 */
.top-header .hidden {
    display: none !important;
}

.top-header .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    color: white;
    cursor: pointer;
    position: relative;
    margin-top: 15px;
    margin-left: 65px;
}

.top-header .user-info {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.top-header .user-info.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(10px);
}

.top-header .user-info-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.top-header .user-info-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #4CAF50;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 10px;
}

.top-header .user-info-name {
    font-weight: bold;
    color: rgba(0, 0, 0, 1);
}

.top-header .user-info-email {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.top-header .logout-btn {
    width: 100%;
    padding: 8px;
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.top-header .logout-btn:hover {
    background-color: #cc0000;
}

.top-header .card-btn {
    width: 100%;
    padding: 8px;
    background-color: #1677ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 5px;
}

.top-header .card-btn:hover {
    background-color: #1677ff78;
}

.top-header .market-btn {
    width: 100%;
    padding: 8px;
    background-color: #1677ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-bottom: 5px;
}

.top-header .market-btn:hover {
    background-color: #1677ff78;
}


/* 弹窗遮罩层 */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

/* 弹窗主体 */
.login-modal {
    width: 380px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 弹窗头部 */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
}

.modal-title {
    font-size: 16px;
    font-weight: bold;
    color: rgba(0, 0, 0, 1);
}

.close-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.close-btn:hover {
    background-color: #f5f5f5;
}

/* 弹窗内容区 */
.modal-content {
    padding: 24px 20px;
}

.login-form .form-group {
    margin-bottom: 16px;
}

.login-form .form-label {
    display: block;
    font-size: 14px;
    color: rgba(0, 0, 0, 1);
    margin-bottom: 8px;
}

.login-form .login-form-input {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.login-form .login-form-input:focus {
    outline: none;
    border-color: #1677ff;
    box-shadow: 0 0 0 2px rgba(22, 119, 255, 0.1);
}

/* 验证码输入区域 */
.captcha-group {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.captcha-input {
    flex: 1;
}

.captcha-img {
    width: 100px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    background-color: #fafafa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    white-space: nowrap;
}

/* 登录按钮 */
.pop-login-btn {
    width: 100%;
    height: 40px;
    background-color: #1677ff;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pop-login-btn:hover {
    background-color: #40a9ff;
}

.pop-login-btn:active {
    background-color: #096dd9;
}

/* 底部链接 */
.login-links {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    font-size: 14px;
}

.login-links a {
    color: #1677ff;
    text-decoration: none;
}

.login-links a:hover {
    text-decoration: underline;
}

/* 圆形头像样式 */
.top-header .avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background-color: #f0f0f0;
}

/* 用户信息弹窗中的小头像 */
.top-header .user-info-avatar .avatar-img {
    width: 50px;
    height: 50px;
}

.top-header .search-area {
    width: 400px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 15px;
    height: 40px;
    margin-left: auto;
}

.top-header .search-input {
    width: 300px;
}

.top-header .nav-menu li {
    margin-right: 40px;
    position: relative;
}
.top-header .nav-menu li::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #1677ff;
    transition: width 0.3s ease;
}
.top-header .nav-menu li.active::after,
.top-header .nav-menu li:hover::after {
    width: 100%;
}
.top-header .nav-menu li a {
    text-decoration: none;
    color: rgba(0, 0, 0, 1);
    font-size: 16px;
    font-weight: 400;
    display: block;
    padding-bottom: 5px;
}
.top-header .nav-menu {
    display: flex;
    list-style: none;
    margin-top: 23px;
    height: 24px;
    margin-left: 60px;
}
.header-divider {
    width: 100%;
    height: 1px;
    background-color: rgba(204, 204, 204, 1);
    margin-top: 0;
}