:root {
    --bg-void: #06070a;
    --accent-orange: #ff5a00;
    --accent-red: #ff2a00;
    --ease-console: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
}

.splash-container {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background: var(--bg-void);
    opacity: 1;
    visibility: visible;
}

.splash-container.splash--exit {
    pointer-events: none;
    animation: splashExit 0.8s var(--ease-console) forwards;
}

.splash-container.splash--exit .splash-core {
    animation: splashCoreExit 0.65s var(--ease-console) forwards;
}

.splash-container.splash--exit .splash-footer {
    animation: splashFooterExit 0.45s ease forwards;
}

.splash-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.splash-void {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 50% 50%, #0c0f17 0%, var(--bg-void) 80%);
}

.splash-aurora {
    position: absolute;
    inset: -30%;
    opacity: 0;
    background:
        radial-gradient(ellipse 45% 35% at 30% 60%, rgba(255, 90, 0, 0.12), transparent 70%),
        radial-gradient(ellipse 40% 30% at 70% 40%, rgba(255, 42, 0, 0.12), transparent 70%),
        radial-gradient(ellipse 55% 40% at 50% 100%, rgba(255, 120, 0, 0.08), transparent 65%);
    filter: blur(12px);
    transition: opacity 0.8s ease;
}

.splash-container[data-phase="ignite"] .splash-aurora,
.splash-container[data-phase="logo"] .splash-aurora,
.splash-container[data-phase="energy"] .splash-aurora,
.splash-container[data-phase="settle"] .splash-aurora,
.splash-container[data-phase="ready"] .splash-aurora {
    opacity: 1;
    animation: splashAuroraBreath 5s ease-in-out infinite alternate;
}

.splash-grain {
    position: absolute;
    inset: 0;
    opacity: 0.05;
    background-image:
        radial-gradient(1px 1px at 15% 25%, #fff, transparent),
        radial-gradient(1px 1px at 35% 75%, #fff, transparent),
        radial-gradient(1px 1px at 55% 35%, #fff, transparent),
        radial-gradient(1px 1px at 75% 85%, #fff, transparent),
        radial-gradient(1px 1px at 85% 15%, #fff, transparent);
    pointer-events: none;
}

.splash-vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 50%, transparent 0%, rgba(0, 0, 0, 0.85) 100%);
    pointer-events: none;
}

.splash-flash {
    position: absolute;
    inset: 0;
    z-index: 5;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.5), rgba(255, 90, 0, 0.2) 40%, transparent 70%);
    opacity: 0;
    pointer-events: none;
}

.splash-container[data-phase="ignite"] .splash-flash {
    animation: splashPowerFlash 0.9s var(--ease-console) forwards;
}

.splash-bloom {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border-radius: 50%;
    background: radial-gradient(circle, #fff 0%, var(--accent-orange) 50%, transparent 70%);
    opacity: 0;
    pointer-events: none;
    z-index: 1;
}

.splash-container[data-phase="ignite"] .splash-bloom,
.splash-container[data-phase="logo"] .splash-bloom {
    animation: splashBloomExpand 1.5s var(--ease-out-expo) forwards;
}

.splash-core {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: min(350px, 85vw);
    gap: 25px;
}

.splash-logo-wrap {
    position: relative;
    z-index: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: scale(0.5);
    filter: blur(15px);
}

.splash-container[data-phase="logo"] .splash-logo-wrap,
.splash-container[data-phase="energy"] .splash-logo-wrap,
.splash-container[data-phase="settle"] .splash-logo-wrap,
.splash-container[data-phase="ready"] .splash-logo-wrap {
    animation: gamingLogoReveal 1s var(--ease-out-expo) forwards;
}

.splash-logo-glow {
    position: absolute;
    width: 180%;
    height: 180%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 90, 0, 0.4) 0%, rgba(255, 42, 0, 0.1) 50%, transparent 70%);
    opacity: 0;
}

.splash-container[data-phase="energy"] .splash-logo-glow,
.splash-container[data-phase="settle"] .splash-logo-glow,
.splash-container[data-phase="ready"] .splash-logo-glow {
    animation: splashGlowPulse 3s ease-in-out infinite;
}

.splash-logo-img {
    position: relative;
    z-index: 2;
    max-width: 180px;
    width: 50vw;
    filter: drop-shadow(0 0 15px rgba(255, 90, 0, 0.5));
    transition: filter 0.3s ease;
}

.splash-container[data-phase="settle"] .splash-logo-img,
.splash-container[data-phase="ready"] .splash-logo-img {
    animation: splashLogoHeartbeat 2.5s ease-in-out infinite;
}

.splash-logo-shine {
    position: absolute;
    inset: -20% -50%;
    z-index: 4;
    background: linear-gradient(110deg, transparent 40%, rgba(255, 255, 255, 0.9) 50%, transparent 60%);
    transform: translateX(-150%) skewX(-20deg);
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: overlay;
}

.splash-container[data-phase="settle"] .splash-logo-shine,
.splash-container[data-phase="ready"] .splash-logo-shine {
    animation: splashLogoShine 3s ease-in-out 0.2s infinite;
}

.splash-brand {
    position: relative;
    z-index: 3;
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 0.3em;
    color: transparent;
    background: linear-gradient(90deg, #ff7a00, #ff2a00);
    -webkit-background-clip: text;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(15px);
}

.splash-container[data-phase="settle"] .splash-brand,
.splash-container[data-phase="ready"] .splash-brand {
    animation: splashBrandIn 0.8s var(--ease-console) forwards;
}

.splash-footer {
    position: absolute;
    bottom: 50px;
    width: 85%;
    max-width: 450px;
    z-index: 3;
    opacity: 0;
    transform: translateY(10px);
}

.splash-container[data-phase="ignite"] .splash-footer,
.splash-container[data-phase="logo"] .splash-footer,
.splash-container[data-phase="energy"] .splash-footer,
.splash-container[data-phase="settle"] .splash-footer,
.splash-container[data-phase="ready"] .splash-footer {
    animation: splashFooterIn 0.6s var(--ease-console) forwards;
}

.splash-progress {
    position: relative;
    margin-bottom: 18px;
    width: 100%;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.splash-progress__track {
    position: relative;
    height: 3px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    overflow: visible;
}

.splash-progress__fill {
    width: 0%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #ff5a00, #ff2a00);
    box-shadow: 0 0 15px rgba(255, 90, 0, 0.6);
    transition: width 0.5s ease-out;
}

.splash-progress__head {
    position: absolute;
    top: 50%;
    left: 0;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    margin-left: -4px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    box-shadow: 0 0 10px #fff, 0 0 20px #ff5a00;
    transition: left 0.5s ease-out, opacity 0.3s ease;
    pointer-events: none;
}

.splash-progress.is-active .splash-progress__head {
    opacity: 1;
}

.splash-status {
    text-align: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.75);
    min-height: 1.5em;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}

.splash-status.is-ready {
    color: #fff;
    text-shadow: 0 0 15px #ff5a00, 0 0 30px #ff2a00;
    animation: statusPulse 1.5s infinite;
}

@keyframes splashPowerFlash {
    0%   { opacity: 0; }
    15%  { opacity: 1; }
    40%  { opacity: 0.2; }
    100% { opacity: 0; }
}

@keyframes splashBloomExpand {
    0% { opacity: 1; transform: scale(1); filter: blur(0); }
    100% { opacity: 0; transform: scale(80); filter: blur(8px); }
}

@keyframes splashAuroraBreath {
    from { transform: translate3d(-2%, 0, 0) scale(1); }
    to   { transform: translate3d(2%, -2%, 0) scale(1.05); }
}

@keyframes gamingLogoReveal {
    0% { 
        opacity: 0; 
        transform: scale(0.2); 
        filter: blur(20px) brightness(300%) drop-shadow(0 0 50px #ff5a00);
    }
    50% { 
        opacity: 1; 
        transform: scale(1.15); 
        filter: blur(0px) brightness(150%) drop-shadow(0 0 30px #ff5a00);
    }
    100% { 
        opacity: 1; 
        transform: scale(1); 
        filter: blur(0px) brightness(100%) drop-shadow(0 0 15px rgba(255, 90, 0, 0.5));
    }
}

@keyframes splashGlowPulse {
    0%, 100% { transform: scale(0.9); opacity: 0.4; }
    50%      { transform: scale(1.1); opacity: 0.8; }
}

@keyframes splashLogoHeartbeat {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(255, 90, 0, 0.5)); }
    15%      { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(255, 90, 0, 0.9)); }
    30%      { transform: scale(1); filter: drop-shadow(0 0 15px rgba(255, 90, 0, 0.5)); }
    45%      { transform: scale(1.05); filter: drop-shadow(0 0 25px rgba(255, 90, 0, 0.9)); }
    60%      { transform: scale(1); filter: drop-shadow(0 0 15px rgba(255, 90, 0, 0.5)); }
}

@keyframes splashLogoShine {
    0%   { transform: translateX(-150%) skewX(-20deg); opacity: 0; }
    15%  { opacity: 1; }
    30%  { transform: translateX(150%) skewX(-20deg); opacity: 0; }
    100% { transform: translateX(150%) skewX(-20deg); opacity: 0; }
}

@keyframes splashBrandIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes splashFooterIn {
    to { opacity: 1; transform: translateY(0); }
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes splashExit {
    to { opacity: 0; visibility: hidden; }
}

@keyframes splashCoreExit {
    to { transform: scale(1.2) translateY(-20px); opacity: 0; filter: blur(15px); }
}

@keyframes splashFooterExit {
    to { opacity: 0; transform: translateY(30px); }
}
