/**
 * 登录页面样式
 * 左右分栏布局: 左侧蓝色渐变+Logo+功能介绍, 右侧白色+登录表单
 */

/* ========== 全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
                 'Noto Sans', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
    overflow: hidden;
}

/* ========== 主容器 ========== */
.login-container {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* ========== 左侧蓝色区域 ========== */
.login-left {
    flex: 0 0 45%;
    background: linear-gradient(135deg, #4A90E2 0%, #6B5CE7 100%);
    padding: 60px 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 装饰性背景图案 */
.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

/* Logo和品牌信息 */
.brand-section {
    position: relative;
    z-index: 1;
    margin-bottom: 60px;
}

/* Logo和标题横向排列 */
.brand-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.brand-logo {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    object-fit: cover;
}

.brand-name {
    font-size: 42px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: 2px;
}

.website {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 15px;
    margin-top: 0;
    margin-left: 45px;
    font-weight: 500;
}

.slogan {
    font-size: 24px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 300;
    margin-top: 10px;
    margin-left: 45px;
}

/* 功能列表 */
.features-section {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 16px;
    font-weight: 400;
}

.check-icon {
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
    color: #FFD700;
}

.feature-text {
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.95);
}

/* ========== 右侧白色区域 ========== */
.login-right {
    flex: 0 0 55%;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px;
}

/* 关闭按钮 */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 32px;
    color: #999;
    cursor: pointer;
    transition: all 0.3s;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-btn:hover {
    background: #f5f5f5;
    color: #333;
    transform: rotate(90deg);
}

/* ========== 登录面板 ========== */
.login-panel {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-panel.hidden {
    display: none;
}

/* 登录头部 */
.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.login-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 15px;
}

.login-title {
    font-size: 28px;
    font-weight: 600;
    color: #333;
}

/* 提示文字 */
.login-tip {
    font-size: 14px;
    color: #FF6B6B;
    margin-bottom: 30px;
    text-align: center;
}

/* 微信登录头部 */
.wechat-login-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 42px;
    margin-bottom: 5px;
}

.wechat-logo {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.wechat-login-title {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

/* 新用户提示 (在二维码上方) */
.new-user-tip {
    font-size: 14px;
    color: #FF4444;
    text-align: center;
    margin-top: 0;
    margin-bottom: 3px;
    font-weight: 500;
}

/* 手机登录页面提示 (在微信Logo下方) */
.phone-page-tip {
    font-size: 14px;
    color: #FF4444;
    text-align: center;
    margin-top: 15px;
    margin-bottom: 0;
    font-weight: 500;
}

/* ========== 二维码容器 ========== */
.qrcode-container {
    width: 300px;
    height: 360px;
    background: #f8f9fa;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
}

.qrcode-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.qrcode-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top-color: #6B5CE7;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.qrcode-loading p {
    font-size: 14px;
    color: #999;
}

#qrcodeContainer img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* WxLogin 内嵌二维码容器
   覆盖 .qrcode-container iframe 的 width:100%/height:100% 限制，
   让微信二维码用官方默认尺寸 300x460 完整显示（含标题+二维码+提示文字） */
#wxLoginContainer {
    width: 300px;
    height: 380px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#wxLoginContainer iframe {
    width: 300px !important;
    height: 380px !important;
    border: none;
    border-radius: 8px;
    overflow: hidden;
}

/* loading 覆盖层：在 WxLogin iframe 加载期间显示，避免二维码尺寸闪烁 */
.wx-login-wrapper {
    position: relative;
    width: 300px;
    height: 380px;
    margin: 0 auto;
}

.wx-login-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    z-index: 10;
    transition: opacity 0.3s;
}

.wx-login-loading p {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* ========== 手机登录表单 ========== */
.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.form-group {
    width: 100%;
    position: relative;
}

.form-input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
    transition: all 0.3s;
}

.form-input:focus {
    border-color: #6B5CE7;
    box-shadow: 0 0 0 3px rgba(107, 92, 231, 0.1);
}

.form-input::placeholder {
    color: #aaa;
}

/* 验证码输入组 */
.captcha-group {
    display: flex;
    gap: 10px;
}

.captcha-input {
    flex: 1;
}

.captcha-image {
    width: 140px;
    height: 50px;
    border-radius: 8px;
    cursor: pointer;
    object-fit: cover;
    border: 1px solid #ddd;
}

.send-code-btn {
    width: 140px;
    height: 50px;
    background: linear-gradient(135deg, #4A90E2, #6B5CE7);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.send-code-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 92, 231, 0.3);
}

.send-code-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 提交按钮 */
.submit-btn {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, #4A90E2, #6B5CE7);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 92, 231, 0.4);
}

/* ========== 其他登录方式 ========== */
.other-login-methods {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.other-login-text {
    font-size: 14px;
    color: #999;
    position: relative;
    padding: 0 20px;
}

.other-login-text::before,
.other-login-text::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 80px;
    height: 1px;
    background: #e0e0e0;
}

.other-login-text::before {
    right: 100%;
    margin-right: 10px;
}

.other-login-text::after {
    left: 100%;
    margin-left: 10px;
}

.login-methods-icons {
    display: flex;
    gap: 20px;
}

.login-method-btn {
    width: 50px;
    height: 50px;
    border: 1px solid #ddd;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.login-method-btn:hover {
    border-color: #6B5CE7;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(107, 92, 231, 0.2);
}

.login-method-btn img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ========== 响应式设计 ========== */
@media (max-width: 1024px) {
    .login-left {
        flex: 0 0 40%;
        padding: 40px 50px;
    }

    .login-right {
        flex: 0 0 60%;
    }

    .brand-name {
        font-size: 36px;
    }

    .slogan {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .login-left {
        flex: 0 0 auto;
        min-height: 40vh;
        padding: 30px 30px;
    }

    .login-right {
        flex: 1;
        padding: 30px 20px;
    }

    .brand-section {
        margin-bottom: 30px;
    }

    .brand-name {
        font-size: 32px;
    }

    .slogan {
        font-size: 18px;
    }

    .features-section {
        gap: 15px;
    }

    .feature-item {
        font-size: 14px;
    }

    .qrcode-container {
        width: 240px;
        height: 240px;
    }
}
