/* 智教平台 · 门户首页（AI 教育风） */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;700;900&display=swap');

.portal-landing-page {
    font-family: 'Plus Jakarta Sans', 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    min-height: 100vh;
    justify-content: center;
    padding: clamp(32px, 6vh, 56px) 20px clamp(28px, 5vh, 48px);
    background:
        radial-gradient(ellipse 120% 80% at 50% -10%, rgba(186, 245, 255, 0.55) 0%, transparent 55%),
        radial-gradient(ellipse 90% 60% at 100% 50%, rgba(167, 243, 232, 0.35) 0%, transparent 50%),
        radial-gradient(ellipse 80% 50% at 0% 80%, rgba(191, 219, 254, 0.4) 0%, transparent 45%),
        linear-gradient(165deg, #ffffff 0%, #ecfdf9 28%, #e0f2fe 58%, #f0f9ff 100%);
    background-attachment: fixed;
}

.portal-particle-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.portal-landing-glow {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 20% 30%, rgba(56, 189, 248, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(52, 211, 153, 0.1) 0%, transparent 38%),
        radial-gradient(circle at 50% 100%, rgba(129, 140, 248, 0.08) 0%, transparent 35%);
}

.portal-landing-wrap {
    max-width: 880px;
    width: 100%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    flex: 0 1 auto;
}

.portal-landing-brand {
    margin-bottom: clamp(24px, 4vh, 36px);
    color: #0f172a;
}

.portal-landing-brand .auth-brand-icon {
    width: 80px;
    height: 80px;
    border-radius: 24px;
    background: linear-gradient(145deg, #34d399, #0ea5e9 55%, #6366f1);
    font-size: 36px;
    box-shadow:
        0 12px 32px rgba(14, 165, 233, 0.28),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transform: rotate(-3deg);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.portal-landing-brand:hover .auth-brand-icon {
    transform: rotate(0deg) scale(1.04);
    box-shadow:
        0 16px 40px rgba(99, 102, 241, 0.25),
        0 0 24px rgba(52, 211, 153, 0.2);
}

.portal-landing-brand h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 900;
    letter-spacing: 0.06em;
    margin-top: 20px;
    background: linear-gradient(120deg, #0f172a 0%, #0e7490 45%, #4338ca 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.portal-landing-brand .auth-sub {
    font-size: 15px;
    color: #64748b;
    opacity: 1;
    margin-top: 10px;
    font-weight: 500;
}

.portal-landing-slogan {
    margin: 14px auto 0;
    max-width: 520px;
    font-size: 13px;
    line-height: 1.65;
    color: #94a3b8;
    font-weight: 400;
    letter-spacing: 0.04em;
}

.portal-landing-brand .auth-hint {
    margin-top: 12px;
    font-size: 11px;
    color: #cbd5e1;
}

.portal-landing-page .portal-session-bar {
    width: 100%;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: #334155;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.portal-landing-page .portal-session-link {
    color: #0284c7;
}

.portal-landing-page .portal-chooser-grid {
    width: 100%;
    gap: clamp(16px, 3vw, 28px);
    margin-bottom: 0;
}

.portal-landing-page .portal-chooser-card {
    position: relative;
    overflow: hidden;
    padding: 32px 24px 28px;
    background: rgba(255, 255, 255, 0.42);
    backdrop-filter: blur(18px) saturate(1.35);
    -webkit-backdrop-filter: blur(18px) saturate(1.35);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    box-shadow:
        0 4px 24px rgba(15, 23, 42, 0.06),
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 0 0 1px rgba(148, 163, 184, 0.08);
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.portal-landing-page .portal-chooser-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.35), rgba(52, 211, 153, 0.2), rgba(129, 140, 248, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.65;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.portal-landing-page .portal-chooser-card::after {
    display: none !important;
}

.portal-landing-page .portal-chooser-card.teacher:hover {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow:
        0 20px 48px rgba(14, 165, 233, 0.18),
        0 0 32px rgba(56, 189, 248, 0.12),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
    transform: translateY(-10px) scale(1.02);
}

.portal-landing-page .portal-chooser-card.student:hover {
    border-color: rgba(52, 211, 153, 0.45);
    box-shadow:
        0 20px 48px rgba(16, 185, 129, 0.16),
        0 0 32px rgba(52, 211, 153, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.9) inset;
    transform: translateY(-10px) scale(1.02);
}

.portal-landing-page .portal-chooser-card:hover::before {
    opacity: 1;
}

.portal-landing-page .portal-chooser-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    font-size: 30px;
    margin-bottom: 18px;
    transform: rotate(-4deg);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.12),
        0 0 0 4px rgba(255, 255, 255, 0.5);
}

.portal-landing-page .portal-chooser-card.teacher .portal-chooser-icon {
    background: linear-gradient(145deg, #38bdf8, #0284c7 50%, #6366f1);
    box-shadow:
        0 10px 28px rgba(2, 132, 199, 0.35),
        0 0 20px rgba(99, 102, 241, 0.15),
        0 0 0 4px rgba(255, 255, 255, 0.55);
}

.portal-landing-page .portal-chooser-card.student .portal-chooser-icon {
    background: linear-gradient(145deg, #34d399, #10b981 50%, #06b6d4);
    box-shadow:
        0 10px 28px rgba(16, 185, 129, 0.32),
        0 0 20px rgba(6, 182, 212, 0.12),
        0 0 0 4px rgba(255, 255, 255, 0.55);
}

.portal-landing-page .portal-chooser-card:hover .portal-chooser-icon {
    transform: rotate(0deg) scale(1.08);
}

.portal-landing-page .portal-chooser-card h2 {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}

.portal-landing-page .portal-chooser-card p {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 22px;
}

.portal-landing-page .portal-chooser-btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 168px;
    padding: 11px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.02em;
    isolation: isolate;
    transition:
        transform 0.28s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.28s ease,
        filter 0.28s ease;
}

.portal-landing-page .portal-chooser-card.teacher .portal-chooser-btn {
    background: linear-gradient(120deg, #0ea5e9 0%, #06b6d4 42%, #6366f1 100%);
    background-size: 200% 100%;
    box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
}

.portal-landing-page .portal-chooser-card.student .portal-chooser-btn {
    background: linear-gradient(120deg, #10b981 0%, #14b8a6 42%, #8b5cf6 100%);
    background-size: 200% 100%;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.32);
}

.portal-landing-page .portal-chooser-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 80%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    transform: skewX(-18deg);
    transition: left 0.55s ease;
    z-index: 1;
}

.portal-landing-page .portal-chooser-card:hover .portal-chooser-btn {
    transform: scale(1.06);
    background-position: 100% 0;
    box-shadow:
        0 12px 32px rgba(99, 102, 241, 0.28),
        0 0 24px rgba(56, 189, 248, 0.2);
}

.portal-landing-page .portal-chooser-card:hover .portal-chooser-btn::before {
    left: 140%;
}

.portal-landing-page .portal-chooser-btn .btn-ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255, 255, 255, 0.55);
    animation: portal-ripple 0.65s ease-out forwards;
    pointer-events: none;
    z-index: 2;
}

@keyframes portal-ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.portal-landing-page .auth-footer {
    margin-top: clamp(20px, 3.5vh, 32px);
    padding-top: 18px;
    font-size: 12px;
    color: #94a3b8;
    letter-spacing: 0.12em;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    width: min(100%, 520px);
}

@media (max-width: 640px) {
    .portal-landing-page {
        padding: 28px 16px 24px;
    }

    .portal-landing-page .portal-chooser-grid {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .portal-landing-page .portal-chooser-card,
    .portal-landing-page .portal-chooser-btn,
    .portal-landing-page .portal-chooser-icon,
    .portal-landing-brand .auth-brand-icon {
        transition: none;
    }

    .portal-landing-page .portal-chooser-btn::before {
        display: none;
    }
}
