:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #f72585;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --success-color: #4cc9f0;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;
}

body {
    background: linear-gradient(135deg,#f5f7fa 0%,#c3cfe2 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--dark-color);
}

/* ===== 导航栏（与首页一致） ===== */
.header {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 15px 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
}

    .logo img {
        height: 40px;
        width: auto;
    }

.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
}

    .back-home-btn:hover {
        background: var(--primary-color);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 8px 18px rgba(67, 97, 238, 0.3);
    }

/* ===== 主内容 ===== */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
    width: 100%;
}

.login-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1100px;
    width: 100%;
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    min-height: 540px;
}

/* ===== 左侧二维码面板 ===== */
.qr-panel {
    flex: 1;
    min-width: 320px;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #f8fafc 0%, #eef2ff 100%);
    position: relative;
}

.qr-title {
    text-align: center;
    margin-bottom: 24px;
}

    .qr-title h2 {
        font-size: 26px;
        font-weight: 700;
        color: var(--secondary-color);
        letter-spacing: -0.5px;
        margin-bottom: 8px;
    }

    .qr-title p {
        color: #64748b;
        font-size: 14px;
    }

/* 二维码外层容器 + 四角装饰 */
.qr-wrapper {
    position: relative;
    padding: 16px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(67, 97, 238, 0.12);
    margin-bottom: 20px;
}

/* 二维码容器：纯定位上下文，子元素全部绝对定位叠放 */
.qr-box {
    position: relative;
    width: 220px;
    height: 220px;
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

    /* 二维码图片：底层 */
    .qr-box img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
        padding: 10px;
        box-sizing: border-box;
        border-radius: 8px;
        z-index: 1;
    }

/* 加载中：中间层，默认隐藏 */
.qr-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    background: #fff;
    color: var(--primary-color);
    font-size: 24px;
}

/* 四角装饰 */
.corner {
    position: absolute;
    width: 18px;
    height: 18px;
    border-color: var(--primary-color);
    border-style: solid;
    border-width: 0;
}

.corner-tl {
    top: 8px;
    left: 8px;
    border-top-width: 3px;
    border-left-width: 3px;
    border-top-left-radius: 8px;
}

.corner-tr {
    top: 8px;
    right: 8px;
    border-top-width: 3px;
    border-right-width: 3px;
    border-top-right-radius: 8px;
}

.corner-bl {
    bottom: 8px;
    left: 8px;
    border-bottom-width: 3px;
    border-left-width: 3px;
    border-bottom-left-radius: 8px;
}

.corner-br {
    bottom: 8px;
    right: 8px;
    border-bottom-width: 3px;
    border-right-width: 3px;
    border-bottom-right-radius: 8px;
}

/* 扫码状态遮罩：最上层 */
.qr-mask {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 3;
    background: rgba(255, 255, 255, 0.96);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    backdrop-filter: blur(2px);
}

    .qr-mask.show {
        display: flex;
    }

    .qr-mask .mask-icon {
        width: 54px;
        height: 54px;
        border-radius: 50%;
        background: #eef2ff;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--primary-color);
        font-size: 24px;
        margin-bottom: 4px;
    }

    .qr-mask p {
        font-size: 14px;
        color: #64748b;
        font-weight: 600;
    }

    .qr-mask .refresh-btn {
        padding: 8px 18px;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        color: white;
        border: none;
        border-radius: 20px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: var(--transition);
        box-shadow: 0 4px 12px rgba(67, 97, 238, 0.25);
    }

        .qr-mask .refresh-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 18px rgba(67, 97, 238, 0.35);
        }

/* 提示语 */
.qr-tip {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-size: 14px;
}

    .qr-tip i {
        color: var(--primary-color);
        font-size: 16px;
    }

/* ===== 右侧信息面板 ===== */
.info-panel {
    flex: 1;
    min-width: 320px;
    padding: 40px 36px;
    background: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-header {
    margin-bottom: 28px;
}

    .info-header h3 {
        font-size: 22px;
        font-weight: 700;
        color: var(--secondary-color);
        margin-bottom: 8px;
        letter-spacing: -0.3px;
    }

    .info-header p {
        color: #64748b;
        font-size: 14px;
    }

/* 功能列表 */
.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

    .feature-list li {
        display: flex;
        align-items: center;
        gap: 14px;
    }

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 18px;
    flex-shrink: 0;
    transition: var(--transition);
}

.feature-list li:hover .feature-icon {
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
    transform: scale(1.05) rotate(3deg);
}

.feature-text h4 {
    font-size: 15px;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 3px;
}

.feature-text p {
    font-size: 13px;
    color: #64748b;
}

/* ===== 页脚（与首页一致） ===== */
.footer {
    padding: 0px 20px 40px 0;
    margin-top: auto;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

    .footer-bottom a {
        color: #333;
        text-decoration: none;
    }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }

    .qr-panel,
    .info-panel {
        width: 100%;
        padding: 30px 22px;
    }

    .qr-box {
        width: 200px;
        height: 200px;
    }

    .qr-title h2 {
        font-size: 22px;
    }

    .info-header h3 {
        font-size: 19px;
    }
}

@media (max-width: 480px) {
    .qr-box {
        width: 180px;
        height: 180px;
    }

    .feature-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}
