/**
 * 页面样式 - 登录页、错误页、实用工具类
 */

/* ========== 登录页面 ========== */
.login-page,
.login-choice-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%,
            rgba(3, 218, 198, 0.06), transparent 60%),
        radial-gradient(ellipse 60% 50% at 100% 100%,
            rgba(207, 102, 121, 0.05), transparent 60%),
        linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    padding: var(--space-5);
    position: relative;
    overflow: hidden;
}
.login-page::before,
.login-choice-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        repeating-linear-gradient(0deg,
            transparent, transparent 2px,
            rgba(255, 255, 255, 0.012) 2px,
            rgba(255, 255, 255, 0.012) 3px);
    pointer-events: none;
    mix-blend-mode: screen;
}

.login-box {
    background: var(--bg-paper);
    border: 1px solid var(--border-light);
    padding: var(--space-12) var(--space-10);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    animation: modalIn 0.5s var(--ease-spring);
}
.login-box::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg,
        rgba(3, 218, 198, 0.08),
        transparent 50%,
        rgba(207, 102, 121, 0.05));
    pointer-events: none;
}
.login-box > * { position: relative; }
.login-box h2 {
    text-align: center;
    margin-bottom: var(--space-8);
    font-size: var(--fs-2xl);
    font-weight: 700;
    background: linear-gradient(135deg,
        var(--text-primary),
        var(--accent-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.login-choice-content {
    text-align: center;
    max-width: 600px;
    position: relative;
    z-index: 1;
}
.login-choice-content h1 {
    font-size: var(--fs-3xl);
    margin-bottom: var(--space-10);
    font-weight: 700;
}
.login-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: var(--space-5);
    margin-bottom: var(--space-8);
}
.login-option {
    background: var(--bg-paper);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-8) var(--space-6);
    cursor: pointer;
    transition:
        transform var(--duration-base) var(--ease-spring),
        border-color var(--duration-fast) var(--ease-out),
        box-shadow var(--duration-base) var(--ease-out),
        background var(--duration-fast) var(--ease-out);
    text-align: center;
    min-height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.login-option:hover {
    border-color: var(--accent-secondary);
    background: var(--bg-elevated);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--accent-secondary-soft);
}
.login-option:active {
    transform: translateY(-2px) scale(0.98);
}
.option-icon {
    font-size: 40px;
    margin-bottom: var(--space-4);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--accent-secondary-soft);
    transition: transform var(--duration-base) var(--ease-spring);
}
.login-option:hover .option-icon {
    transform: scale(1.08) rotate(-4deg);
}
.login-option h3 {
    font-size: var(--fs-md);
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    font-weight: 600;
}
.login-option p {
    font-size: var(--fs-xs);
    color: var(--text-muted);
    line-height: 1.5;
}

/* ========== 错误页 ========== */
.error-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    font-size: var(--fs-lg);
    color: var(--text-muted);
    padding: var(--space-5);
    text-align: center;
}

/* ========== 实用工具类 ========== */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent-secondary); }
.text-warm { color: var(--accent-warm); }
.text-error { color: var(--accent-primary); }
.text-success { color: var(--accent-success); }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }

.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.no-select { user-select: none; }

.divider {
    height: 1px;
    background: var(--border-light);
    margin: var(--space-4) 0;
    border: 0;
}

.hidden { display: none !important; }
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========== Lightbox 弹出动画 ========== */
@keyframes utilsLightboxFade {
    from { opacity: 0; transform: scale(0.96); }
    to   { opacity: 1; transform: scale(1); }
}
.utils-image-lightbox img {
    animation: utilsLightboxZoom 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes utilsLightboxZoom {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}
