/**
 * MINDS - Brand Splash Screen CSS (Luminous Clean Design)
 * Sleek M of MINDS ↔ Cute Draco Mascot Morph Experience
 */

#minds-brand-splash {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999999;
    background: radial-gradient(circle at 50% 40%, rgba(99, 102, 241, 0.09) 0%, rgba(244, 114, 182, 0.05) 45%, #ffffff 100%);
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    user-select: none;
    cursor: pointer;
    opacity: 1;
    transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s;
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
}

#minds-brand-splash.splash-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.minds-splash-stage {
    position: relative;
    width: 220px;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Phase 1: Modern Gradient M of MINDS */
.splash-m-mark {
    position: absolute;
    width: 140px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(1);
    opacity: 1;
    transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
}

.splash-m-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 12px 28px rgba(99, 102, 241, 0.28));
    animation: splash-m-float 2.4s ease-in-out infinite;
}

@keyframes splash-m-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Phase 2: Cute Draco Mascot */
.splash-dragon-mark {
    position: absolute;
    width: 160px;
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.6) rotate(-8deg);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.75s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.splash-draco-svg {
    width: 100%;
    height: 100%;
    animation: splash-draco-bounce 2s ease-in-out infinite alternate;
}

@keyframes splash-draco-bounce {
    0% { transform: translateY(0) scale(1); }
    100% { transform: translateY(-8px) scale(1.03); }
}

/* Morph State: M dissolves softly, Cute Draco pops up */
#minds-brand-splash.morph-to-dragon .splash-m-mark {
    transform: scale(0.3) rotate(10deg);
    opacity: 0;
}

#minds-brand-splash.morph-to-dragon .splash-dragon-mark {
    transform: scale(1) rotate(0deg);
    opacity: 1;
}

/* Typography & Branding */
.splash-brand-text {
    margin-top: 14px;
    text-align: center;
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.splash-brand-title {
    font-size: 1.45rem;
    font-weight: 900;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.35s ease;
}

.splash-brand-subtitle {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 3.5px;
    text-transform: uppercase;
    color: #6366f1;
    margin-top: 4px;
    transition: all 0.35s ease;
}

/* Minimalist Progress Loader */
.splash-loader-bar {
    width: 130px;
    height: 4px;
    background: #e2e8f0;
    border-radius: 999px;
    margin-top: 22px;
    overflow: hidden;
    position: relative;
}

.splash-loader-progress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #6366f1 0%, #0284c7 50%, #facc15 100%);
    border-radius: 999px;
    transition: width 2s cubic-bezier(0.16, 1, 0.3, 1);
}

.splash-skip-hint {
    position: absolute;
    bottom: 24px;
    font-size: 0.72rem;
    letter-spacing: 1px;
    color: #94a3b8;
    text-transform: uppercase;
}

/* Dark Theme Support */
[data-theme="dark"] #minds-brand-splash,
html.dark #minds-brand-splash {
    background: radial-gradient(circle at 50% 40%, rgba(99, 102, 241, 0.15) 0%, rgba(15, 23, 42, 0.95) 60%, #070b14 100%) !important;
    background-color: #070b14 !important;
}
[data-theme="dark"] #minds-brand-splash .splash-brand-title,
html.dark #minds-brand-splash .splash-brand-title {
    color: #f8fafc !important;
}
[data-theme="dark"] #minds-brand-splash .splash-loader-bar,
html.dark #minds-brand-splash .splash-loader-bar {
    background: rgba(255, 255, 255, 0.12) !important;
}
[data-theme="dark"] #minds-brand-splash .splash-skip-hint,
html.dark #minds-brand-splash .splash-skip-hint {
    color: #64748b !important;
}

/* Responsive */
@media (max-width: 576px) {
    .minds-splash-stage {
        width: 190px;
        height: 190px;
    }
    .splash-m-mark {
        width: 115px;
        height: 115px;
    }
    .splash-dragon-mark {
        width: 135px;
        height: 135px;
    }
    .splash-brand-title {
        font-size: 1.25rem;
    }
    .splash-brand-subtitle {
        font-size: 0.7rem;
    }
}
