/**
 * 公共登录卡片样式 - 统一二维码登录界面
 * 引用方式：<link rel="stylesheet" href="/components/login-card.css">
 * v1.0.0 - 2025-05-01
 */

/* ---- 登录页面容器 ---- */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px 20px;
    height: calc(100vh - 70px);
    background: #fff;
    box-sizing: border-box;
    overflow: hidden;
}

/* ---- 登录卡片 ---- */
.login-card {
    position: relative;
    width: 100%;
    max-width: 400px;
    max-height: calc(100vh - 110px);
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
    overflow: hidden;
    text-align: center;
    padding: 0 32px 24px;
}

/* ---- 顶部渐变装饰条 ---- */
.login-card-top {
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    margin: 0 -32px 20px;
}

/* ---- 头像/图标 ---- */
.login-avatar {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.35);
}
.login-avatar svg {
    width: 30px;
    height: 30px;
}

/* ---- 标题/副标题 ---- */
.login-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 6px;
    letter-spacing: -0.3px;
    white-space: nowrap;
}
.login-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 18px;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- 二维码容器 ---- */
.login-qrcode-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.login-qrcode-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #9ca3af;
    font-size: 14px;
    padding: 40px 0;
}
.login-qrcode-dot {
    width: 8px;
    height: 8px;
    background: #667eea;
    border-radius: 50%;
    animation: login-pulse 1.2s ease-in-out infinite;
}
@keyframes login-pulse {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}
.login-qrcode-error {
    color: #ef4444;
    font-size: 14px;
    padding: 20px 0;
}
.login-qrcode-hint {
    font-size: 14px;
    color: #374151;
    margin-bottom: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.login-qrcode-iframe {
    border: none;
    border-radius: 12px;
    width: 300px !important;
    height: min(340px, calc(100vh - 320px)) !important;
    min-height: 240px;
    background: #fafbfc;
    overflow: hidden;
}
.login-link {
    display: inline-block;
    margin-top: 18px;
    color: #667eea;
    font-size: 13px;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s;
}
.login-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ---- 移动端适配 ---- */
@media (max-width: 480px) {
    .login-page {
        padding: 16px 12px;
    }
    .login-card {
        padding: 0 20px 20px;
        border-radius: 16px;
    }
    .login-card-top {
        margin: 0 -20px 16px;
    }
    .login-title {
        font-size: 18px;
    }
    .login-qrcode-iframe {
        width: 260px !important;
        height: min(300px, calc(100vh - 300px)) !important;
        min-height: 200px;
    }
}
