/* 1. 基础遮罩层样式 */
.custom-auth-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 9999;
    display: none;
    transition: opacity 0.3s ease;
}
.custom-auth-overlay.show {
    opacity: 1;
}

/* 2. 弹窗容器样式 */
.custom-auth-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    max-width: 420px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    display: none;
    overflow: hidden;
    transition: all 0.3s ease;
}
.custom-auth-popup.show {
    display: block;
    animation: popupFadeIn 0.3s ease;
}

/* 弹窗淡入动画 */
@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* 3. 弹窗头部样式 */
.custom-auth-popup-header {
    padding: 18px 24px;
    border-bottom: 1px solid #f2f2f2;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.custom-auth-popup-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}
.custom-auth-close {
    font-size: 22px;
    color: #999;
    cursor: pointer;
    transition: color 0.2s ease;
    line-height: 1;
}
.custom-auth-close:hover {
    color: #333;
}

/* 4. 弹窗内容区域样式 */
.custom-auth-popup-body {
    padding: 24px;
}

/* 5. 表单组样式 */
.custom-auth-form-group {
    margin-bottom: 20px;
}
.custom-auth-form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
    font-weight: 500;
}
.custom-auth-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}
.custom-auth-form-group input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.custom-auth-form-group input::placeholder {
    color: #bbb;
}

/* 6. 验证码区域特殊样式 */
.custom-auth-email-with-code {
    display: flex;
    gap: 10px;
}
.custom-auth-email-with-code input {
    flex: 1;
}
.custom-auth-send-code-btn,
.custom-auth-send-forgot-code-btn {
    min-width: 120px;
    padding: 0 16px;
    background-color: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.custom-auth-send-code-btn.disabled,
.custom-auth-send-forgot-code-btn.disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}

/* 7. 表单链接样式 */
.custom-auth-form-links {
    display: flex;
    justify-content: space-between;
    margin: 12px 0 24px;
    font-size: 13px;
}
.custom-auth-form-links a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}
.custom-auth-form-links a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* 8. 提交按钮样式 */
.custom-auth-submit-btn {
    width: 100%;
    padding: 14px;
    background-color: #2563eb;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.custom-auth-submit-btn:disabled {
    background-color: #94a3b8;
    cursor: not-allowed;
}
.custom-auth-submit-btn:hover:not(:disabled) {
    background-color: #1d4ed8;
}

/* 9. 表单消息提示样式 */
.custom-auth-form-message {
    margin-top: 16px;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
    display: none;
}
.custom-auth-form-message.success {
    background-color: #ecfdf5;
    color: #059669;
    border: 1px solid #bbf7d0;
}
.custom-auth-form-message.error {
    background-color: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecdd3;
}

/* 10. 响应式适配 */
@media (max-width: 480px) {
    .custom-auth-popup {
        margin: 0 16px;
        max-width: none;
    }
    .custom-auth-popup-header {
        padding: 16px 20px;
    }
    .custom-auth-popup-body {
        padding: 20px;
    }
    .custom-auth-email-with-code {
        flex-direction: column;
        gap: 8px;
    }
    .custom-auth-send-code-btn,
    .custom-auth-send-forgot-code-btn {
        min-width: auto;
        padding: 12px;
    }
}