/**
 * 弹窗登录样式
 */

/* 弹窗遮罩层 */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
}

.login-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

/* 弹窗内容 */
.login-modal-content {
    position: relative;
    max-width: 900px;
    max-height: 90vh;
    margin: 5vh auto;
    background: #fff;
    border-radius: 12px;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

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

/* 关闭按钮 */
.login-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.1);
    color: #666;
    font-size: 28px;
    line-height: 1;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.login-modal-close:hover {
    background: rgba(0, 0, 0, 0.2);
    color: #333;
    transform: rotate(90deg);
}

/* 登录框样式 */
.login-modal .sign-box {
    display: flex;
    min-height: 500px;
    padding: 30px;
}

.login-modal .sign-box.has-image {
    padding-left: 0;
}

.login-modal .sign-left {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
    border-radius: 8px 0 0 8px;
    padding: 40px;
}

.login-modal .sign-left img {
    max-width: 100%;
    border-radius: 8px;
}

.login-modal .sign-right {
    flex: 1;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* 提示信息 */
.sign-tips {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 100000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sign-tips.tips-success {
    background: #67c23a;
    color: #fff;
}

.sign-tips.tips-error {
    background: #f56c6c;
    color: #fff;
}

/* Logo */
.sign-logo {
    text-align: center;
    margin-bottom: 30px;
}

.sign-logo img {
    max-height: 50px;
}

/* 登录方式选择 */
.select-login {
    text-align: center;
    margin-bottom: 30px;
}

.login-types {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
}

.login-types a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f5f7fa;
    color: #409eff;
    font-size: 28px;
    transition: all 0.3s ease;
}

.login-types a:hover {
    background: #409eff;
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.sign-text {
    font-size: 16px;
    color: #666;
    font-weight: normal;
    margin: 0;
}

/* 表单样式 */
.login-wrapper {
    margin-bottom: 20px;
}

.form-item {
    position: relative;
    margin-bottom: 20px;
}

.form-item i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 18px;
}

.form-item input[type="text"],
.form-item input[type="password"] {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #dcdfe6;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-item input:focus {
    border-color: #409eff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

.form-item img {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    height: 32px;
    cursor: pointer;
    border-radius: 4px;
}

/* 提交按钮 */
.sign-submit {
    margin-top: 25px;
}

.sign-mail-submit-btn {
    width: 100%;
    padding: 12px;
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sign-mail-submit-btn:hover:not(:disabled) {
    background: #66b1ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.sign-mail-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sign-mail-submit-btn i {
    display: none;
}

/* 底部链接 */
.mail-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    font-size: 14px;
}

.mail-footer a {
    color: #409eff;
    text-decoration: none;
    transition: all 0.3s ease;
}

.mail-footer a:hover {
    color: #66b1ff;
    text-decoration: underline;
}

/* 协议 */
.form-policy {
    margin-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #999;
}

.form-policy a {
    color: #409eff;
    text-decoration: none;
}

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

/* 二维码 */
.qrcode-loading {
    text-align: center;
    padding: 60px;
    font-size: 48px;
    color: #409eff;
}

#qrcode_container_modal {
    text-align: center;
    padding: 20px;
}

#qrcode_container_modal iframe {
    border: none;
    border-radius: 8px;
}

/* 用户状态显示 */
.user-status-logged-in {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999;
}

.user-info-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.user-name {
    font-size: 14px;
    color: #333;
}

.logout-btn {
    padding: 4px 12px;
    background: #f56c6c;
    color: #fff;
    border-radius: 12px;
    font-size: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: #f78989;
}

/* 响应式 */
@media (max-width: 768px) {
    .login-modal-content {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    .login-modal .sign-box {
        flex-direction: column;
        padding: 20px;
    }

    .login-modal .sign-box.has-image {
        padding-left: 20px;
    }

    .login-modal .sign-left {
        display: none;
    }

    .login-modal .sign-right {
        padding: 20px;
    }

    .login-modal-close {
        top: 10px;
        right: 10px;
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .user-status-logged-in {
        top: 10px;
        right: 10px;
    }
}
