/* 确保与Bootstrap 3.3.7兼容的登录弹窗样式 */
#mcl-custom-login-bd, #login-pop-container {
    display: table;
    width: 100%;
    height: 100vh;
    position: fixed;
    top:0;
    left:0;
    right:0;
    bottom:0;
    z-index: 9999999;
}

#mcl-custom-login-bd:before, #login-pop-container:before {
    content: '';
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}

.login-modal {
    position: relative;
    padding: 15px;
    display: inline-block;
}

/* 兼容Bootstrap的modal-content样式 */
.login-modal .modal-content {
    width: 100%;
    max-width: 350px;
    margin: 0 auto;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 3px 9px rgba(0,0,0,.5);
    position: relative;
}

/* Bootstrap风格的关闭按钮 */
.login-modal .login-form-pop-close {
    position: absolute;
    top:10px;
    right:10px;
    z-index: 10;
}

.login-logo img {
    display: block;
    height: 30px;
    width: auto;
    margin: 0 auto;
}

.login-modal .modal-content h3 {
    text-align: center;
    margin: 15px 0;
    color: #333;
    font-size: 18px;
}

/* 减少表单项目样式，使用Bootstrap的form-group */
.login-form-item {
    position: relative;
    margin-bottom: 15px;
}

/* 保持输入框图标的定位 */
.login-form-item label {
    position: absolute;
    height:40px;
    line-height: 40px;
    width: 40px;
    text-align: center;
    top:0;
    left:0;
    z-index: 2;
}

.login-form-item label i {
    color: #000;
}

/* 移除不必要的样式，使用Bootstrap默认样式 */
.modal-content .login-form-item input:not([type="checkbox"]) {
    padding: 0 15px 0 40px; /* 保持图标的内边距 */
}

/* 使用表格布局替代flex，确保与Bootstrap 3.3.7兼容 */
.login-form-flex-item {
    display: table;
    width: 100%;
}

.login-form-flex-item > * {
    display: table-cell;
    vertical-align: middle;
}

.login-form-flex-item.login-form-flex-end {
    text-align: right;
}
/* 验证码样式优化 */
.modal-content .login-form-item input#captcha {
    padding-right: 95px;
}

img.mcl-img-captcha {
    display: block;
    margin: 0;
    position: absolute;
    top:1px;
    right:1px;
    border-radius: 0 4px 4px 0;
    border-left:1px solid #e5e5e5;
    cursor: pointer;
    height: 38px; /* 适配Bootstrap输入框高度 */
}
/* 使用Bootstrap按钮样式 */
.modal-content .login-form-item button.login-form-button {
    /* 继承Bootstrap的btn样式 */
    display: block;
    width: 100%;
}

/* 保持与Bootstrap链接颜色一致 */
.modal-content a {
    color: #337ab7;
}
/* 底部链接样式 */
.login-form-bt-link {
    text-align: center;
    color: #999;
    font-size: 14px;
    margin-top: 15px;
}

/* 记住密码样式 */
.login-form-remember {
    display: table;
    color: #666;
    margin-bottom: 15px;
}

.login-form-remember input,
.login-form-remember label {
    display: table-cell;
    vertical-align: middle;
}

.login-form-remember input {
    display: block;
    margin-right: 8px;
    cursor: pointer;
}
/* 验证码输入区域样式 */
.login-form-captcha-item {
    display: table;
    width: 100%;
}

.login-form-captcha-item .captcha-input {
    display: table-cell;
    width: 100%;
}

.login-form-captcha-item button.get-phone-captcha {
    height: 40px;
    padding: 0 10px;
    background: #f5f5f5;
    color: #333;
    cursor: pointer;
    border-radius: 0 4px 4px 0;
    border:1px solid #ddd;
    border-left:none;
    width: max-content;
}

.login-form-captcha-item input {
    border-radius: 4px 0 0 4px !important;
}
/* 消息提示样式，使用Bootstrap风格 */
.mcl-login-message {
    padding: 10px 15px;
    border-radius: 4px;
    border:1px solid #337ab7;
    margin-bottom: 15px;
    color: #337ab7;
    font-size: 14px;
    text-align: center;
    background-color: rgba(51, 122, 183, 0.1);
}

/* 错误消息样式 */
.mcl-login-message.mcl-error {
    color: #d63638;
    border-color: #d63638;
    background-color: rgba(214, 54, 56, 0.1);
}

/* 成功消息样式 */
.mcl-login-message.mcl-success {
    color: #3c763d;
    border-color: #3c763d;
    background-color: rgba(60, 118, 61, 0.1);
}
/* 邮箱验证样式 */
.login-form-item.email-verification-item input {
    padding-right: 115px;
}

.login-form-item.email-verification-item button {
    height: 40px;
    width: 100px;
    text-align: center;
    font-size: 13px;
    padding: 0 5px;
    color: #fff;
    background: #337ab7;
    border:none;
    outline: none;
    position: absolute;
    top:0;
    right:0;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.login-form-item.email-verification-item button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}
/* 加载动画样式 */
#loading-spinner {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 999999999;
    top:0;
    left:0;
    background: rgba(0,0,0,0.4);
    display: table;
}

#loading-spinner:before {
    content: '';
    display: table-cell;
    vertical-align: middle;
    text-align: center;
}

#loading-spinner i {
    color: #fff;
    animation: spin 2s linear infinite;
    display: block;
    font-size: 30px;
}

/* 旋转动画关键帧 */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .login-modal .modal-content {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    
    .login-modal {
        padding: 10px;
    }
}