/* 用户认证模态框样式 */
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    overflow-y: auto;
    padding: 20px;
}

.auth-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease-out;
}

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

.auth-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
    transition: color 0.2s;
}

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

.auth-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-modal-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0 0 10px 0;
}

.auth-modal-header p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

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

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

.auth-form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.auth-form-input:focus {
    outline: none;
    border-color: #007bff;
}

.auth-form-input.error {
    border-color: #dc3545;
}

.auth-captcha-group {
    display: flex;
    gap: 10px;
}

.auth-captcha-group .auth-form-input {
    flex: 1;
}

.auth-captcha-img {
    width: 120px;
    height: 44px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.auth-code-group {
    display: flex;
    gap: 10px;
}

.auth-code-group .auth-form-input {
    flex: 1;
}

.auth-send-code-btn {
    padding: 12px 20px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.auth-send-code-btn:hover:not(:disabled) {
    background: #0056b3;
}

.auth-send-code-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.auth-submit-btn {
    width: 100%;
    padding: 14px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.auth-submit-btn:hover:not(:disabled) {
    background: #0056b3;
}

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

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    font-size: 14px;
}

.auth-link {
    color: #007bff;
    text-decoration: none;
    cursor: pointer;
}

.auth-link:hover {
    text-decoration: underline;
}

.auth-error-msg {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.auth-error-msg.show {
    display: block;
}

/* 个人中心样式 */
.profile-modal-content {
    max-width: 600px;
}

.profile-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #999;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.profile-name {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.profile-email {
    font-size: 14px;
    color: #666;
}

.profile-vip-badge {
    display: inline-block;
    padding: 4px 12px;
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #333;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
}

.profile-info-group {
    margin-bottom: 25px;
}

.profile-info-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.profile-info-value {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

.profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

.profile-btn {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
    color: #333;
}

.profile-btn:hover {
    background: #f8f9fa;
    border-color: #007bff;
    color: #007bff;
}

.profile-btn.logout {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.profile-btn.logout:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* 响应式 */
@media (max-width: 576px) {
    .auth-modal-content {
        padding: 30px 20px;
    }

    .auth-modal-header h3 {
        font-size: 20px;
    }

    .auth-captcha-group,
    .auth-code-group {
        flex-direction: column;
    }

    .auth-captcha-img {
        width: 100%;
    }

    .profile-actions {
        flex-direction: column;
    }
}
