/* 登录和注册弹窗样式 */
.login-modal,
.register-modal,
.profile-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.modal-content {
    position: relative;
    width: 450px;
    max-width: 90%;
    margin: 50px auto;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    animation: modalFadeIn 0.3s ease;
}

/* 个人中心 */
.profile-modal .modal-content {
    width: 520px;
}

.profile-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
}

.profile-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px dashed #e5e5e5;
    border-radius: 6px;
    padding: 10px 12px;
    background: #f9fbff;
}

.profile-label {
    font-size: 13px;
    color: #666;
}

.profile-value {
    font-size: 15px;
    font-weight: 600;
    color: #1d6cb6;
    word-break: break-all;
}

.user-ops {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-ops .user-name {
    font-weight: 600;
    color: #1d6cb6;
}

.user-ops a {
    margin-left: 8px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.modal-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 30px;
}

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

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

.auth-form input[type="text"],
.auth-form input[type="password"],
.auth-form input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.auth-form input[type="text"]:focus,
.auth-form input[type="password"]:focus,
.auth-form input[type="tel"]:focus {
    outline: none;
    border-color: #1d6cb6;
}

.captcha-group {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.captcha-input {
    flex: 1;
}

.captcha-img {
    width: 120px;
    height: 40px;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    object-fit: cover;
    transition: opacity 0.3s;
}

.captcha-img:hover {
    opacity: 0.8;
}

.auth-form .submit-btn {
    width: 100%;
    padding: 12px;
    background-color: #1d6cb6;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 10px;
}

.auth-form .submit-btn:hover {
    background-color: #155a9e;
}

.auth-form .submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.form-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 14px;
    color: #666;
}

.form-footer a {
    color: #1d6cb6;
    text-decoration: none;
}

.form-footer a:hover {
    text-decoration: underline;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .captcha-group {
        flex-direction: column;
    }
    
    .captcha-img {
        width: 100%;
        height: 50px;
    }
}

