/**
 * AI教学辅助系统 - 开屏缓冲动画样式
 * 页面加载时全屏显示，DOM就绪后淡出消失
 */

/* =============================================
   开屏遮罩层
   ============================================= */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #3388ff 50%, #764ba2 100%);
    background-size: 400% 400%;
    animation: splashGradientMove 6s ease infinite;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* 淡出隐藏状态 */
.splash-screen.splash-fade-out {
    opacity: 0;
    visibility: hidden;
}

/* =============================================
   渐变背景动画
   ============================================= */
@keyframes splashGradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* =============================================
   Logo 区域
   ============================================= */
.splash-logo-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 28px;
}

/* Logo 外围光晕脉冲 */
.splash-logo-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120px;
    height: 120px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, rgba(255,255,255,0) 70%);
    animation: splashPulse 2s ease-in-out infinite;
}

/* Logo 图片 */
.splash-logo-img {
    position: relative;
    z-index: 2;
    width: 100px;
    height: 100px;
    border-radius: 20px;
    object-fit: contain;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

/* Logo 占位图标（图片加载失败时显示） */
.splash-logo-icon {
    position: relative;
    z-index: 2;
    width: 100px;
    height: 100px;
    border-radius: 20px;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
}

.splash-logo-icon svg {
    width: 52px;
    height: 52px;
    fill: #ffffff;
}

/* =============================================
   品牌名称
   ============================================= */
.splash-brand {
    font-size: 24px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 2px;
    margin-bottom: 36px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
    animation: splashFadeInUp 0.8s ease 0.3s both;
}

/* =============================================
   加载动画 - 三个跳动圆点
   ============================================= */
.splash-loader {
    display: flex;
    align-items: center;
    gap: 8px;
    animation: splashFadeInUp 0.8s ease 0.6s both;
}

.splash-loader-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.85);
    animation: splashDotBounce 1.4s ease-in-out infinite;
}

.splash-loader-dot:nth-child(1) {
    animation-delay: 0s;
}

.splash-loader-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.splash-loader-dot:nth-child(3) {
    animation-delay: 0.4s;
}

/* =============================================
   底部装饰 - 浮动粒子
   ============================================= */
.splash-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.splash-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    animation: splashFloatUp linear infinite;
}

.splash-particle:nth-child(1) {
    width: 80px; height: 80px; left: 10%; bottom: -80px;
    animation-duration: 12s; animation-delay: 0s;
}
.splash-particle:nth-child(2) {
    width: 50px; height: 50px; left: 30%; bottom: -50px;
    animation-duration: 10s; animation-delay: 2s;
}
.splash-particle:nth-child(3) {
    width: 120px; height: 120px; left: 55%; bottom: -120px;
    animation-duration: 15s; animation-delay: 1s;
}
.splash-particle:nth-child(4) {
    width: 40px; height: 40px; left: 75%; bottom: -40px;
    animation-duration: 9s; animation-delay: 3s;
}
.splash-particle:nth-child(5) {
    width: 90px; height: 90px; left: 90%; bottom: -90px;
    animation-duration: 13s; animation-delay: 4s;
}
.splash-particle:nth-child(6) {
    width: 60px; height: 60px; left: 45%; bottom: -60px;
    animation-duration: 11s; animation-delay: 5s;
}

/* =============================================
   关键帧动画
   ============================================= */

/* 脉冲光晕 */
@keyframes splashPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.2; }
}

/* 圆点跳动 */
@keyframes splashDotBounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    40% {
        transform: translateY(-14px);
        opacity: 1;
    }
}

/* 从下方淡入 */
@keyframes splashFadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 粒子上浮 */
@keyframes splashFloatUp {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-110vh) rotate(720deg);
        opacity: 0;
    }
}

/* =============================================
   响应式适配
   ============================================= */
@media (max-width: 480px) {
    .splash-logo-wrapper {
        width: 80px;
        height: 80px;
        margin-bottom: 20px;
    }

    .splash-logo-glow {
        width: 100px;
        height: 100px;
    }

    .splash-logo-img,
    .splash-logo-icon {
        width: 80px;
        height: 80px;
        border-radius: 16px;
    }

    .splash-logo-icon svg {
        width: 42px;
        height: 42px;
    }

    .splash-brand {
        font-size: 20px;
        margin-bottom: 28px;
    }
}
