/* 登录弹窗遮罩层 */
.login-modal-mask {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 9998 !important;
    display: none !important;
}

.login-modal-mask.show {
    display: block !important;
}

/* 登录弹窗容器 */
.login-modal {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 100% !important;
    max-width: 420px !important;
    background: #ffffff !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2) !important;
    overflow: hidden !important;
    z-index: 9999 !important;
    margin: 0 !important;
}

/* 大弹窗容器（用于用户协议等） */
.login-modal-large {
    max-width: 1200px !important;
    width: 95% !important;
    max-height: 85vh !important;
}

/* 弹窗标题栏 */
.login-modal-header {
    background: linear-gradient(135deg, #5c6bc0, #7e57c2);
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.login-modal-title {
    font-size: 18px;
    font-weight: bold;
    color: #ffffff;
    margin: 0;
}

.login-modal-close {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.login-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 弹窗内容区域 */
.login-modal-content {
    padding: 30px 25px;
}

/* 表单组 */
.login-modal-group {
    margin-bottom: 20px;
}

.login-modal-group label {
    display: block;
    font-size: 14px;
    color: #666666;
    margin-bottom: 8px;
    font-weight: 500;
}

.login-modal-group input {
    width: 100%;
    height: 44px;
    padding: 0 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.3s ease;
    outline: none;
}

.login-modal-group input:focus {
    border-color: #5c6bc0;
    box-shadow: 0 0 8px rgba(92, 107, 192, 0.3);
}

.login-modal-group input::placeholder {
    color: #999999;
}

/* 登录按钮 */
.login-modal-btn {
    width: 100%;
    height: 46px;
    background: linear-gradient(135deg, #5c6bc0, #7e57c2);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px 0;
}

.login-modal-btn:hover {
    background: linear-gradient(135deg, #4e5ab8, #714bb0);
    box-shadow: 0 4px 15px rgba(92, 107, 192, 0.4);
    transform: translateY(-2px);
}

.login-modal-btn:active {
    transform: translateY(0);
}

/* 底部链接 */
.login-modal-footer {
    text-align: center;
    font-size: 14px;
    color: #999999;
}

.login-modal-footer a {
    color: #5c6bc0;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-modal-footer a:hover {
    color: #4e5ab8;
    text-decoration: underline;
}

/* 切换标签 */
.login-modal-tabs {
    display: flex;
    margin-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.login-modal-tab {
    flex: 1;
    text-align: center;
    padding: 10px 0;
    color: #666666;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.login-modal-tab.active {
    color: #5c6bc0;
}

/* 错误消息 */
.login-error-message {
    background: #fff1f0;
    border: 1px solid #ffccc7;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #ff4d4f;
    font-size: 14px;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.login-error-message ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.login-error-message li {
    margin: 0;
    padding: 0;
}

/* 滑块验证码 */
.slider-captcha-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 20000;
}

.slider-captcha-modal {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    max-width: 360px;
    width: 90%;
}

.slider-captcha-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
}

.slider-captcha-close {
    cursor: pointer;
    font-size: 20px;
    color: #999;
    line-height: 1;
}

.slider-captcha-close:hover {
    color: #666;
}

.slider-captcha-image-container {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 15px;
}

.slider-captcha-background {
    width: 100%;
    height: 100%;
    display: block;
}

.slider-captcha-puzzle {
    position: absolute;
    top: 55px;
    left: 0;
    width: 50px;
    height: 50px;
    border: 2px solid #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.slider-captcha-refresh {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 30px;
    height: 30px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.slider-captcha-track {
    position: relative;
    height: 40px;
    background: #e8e8e8;
    border-radius: 20px;
    overflow: hidden;
}

.slider-captcha-track::before {
    content: '向右拖动滑块填充拼图';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 14px;
    color: #999;
}

.slider-captcha-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #5c6bc0, #7e57c2);
    width: 0;
    transition: width 0.1s ease;
}

.slider-captcha-handle {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 50px;
    height: 36px;
    background: white;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: left 0.1s ease;
    touch-action: none;
    -webkit-touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.slider-captcha-handle::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    border-right: 2px solid #5c6bc0;
    border-bottom: 2px solid #5c6bc0;
    transform: rotate(-45deg);
}

/* 验证码按钮禁用状态 */
.captcha-btn-disabled {
    background: #f5f5f5 !important;
    cursor: not-allowed !important;
    color: #999 !important;
}

/* 验证码按钮启用状态 */
.captcha-btn-enabled {
    background: linear-gradient(135deg, #5c6bc0, #7e57c2) !important;
    cursor: pointer !important;
    color: #fff !important;
}

/* 登录弹窗内复选框样式 */
.login-modal-content .login-modal-group input[type="checkbox"] {
    position: static !important;
    width: auto !important;
    height: auto !important;
    margin: 0 5px 0 0 !important;
    padding: 0 !important;
    z-index: auto !important;
    left: auto !important;
    opacity: 1 !important;
    display: inline-block !important;
    float: none !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 3px !important;
}

.login-modal-content .login-modal-group label[for="modalAgreement"] {
    display: inline !important;
    margin-bottom: 0 !important;
    font-weight: normal !important;
}

/* 响应式设计 */
@media screen and (max-width: 480px) {
    .login-modal {
        margin: 0 !important;
        max-width: calc(100% - 30px) !important;
    }
    
    .login-modal-content {
        padding: 20px 15px;
    }
}

/* Toast 通知样式 */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-size: 14px;
    z-index: 10001;
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
}

.toast.success {
    background: linear-gradient(135deg, #20c997, #17a2b8);
}

.toast.error {
    background: linear-gradient(135deg, #dc3545, #fd7e14);
}
