:root {
    --startup-cyan: #0ff;
    --startup-purple: #9b51e0;
    --startup-bg: #000000;
}

html.tfit-starting,
html.tfit-starting body {
    overflow: hidden;
    overscroll-behavior: none;
}

.new-splash {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--startup-bg);
    color: #fff;
    opacity: 1;
    transition: opacity 0.5s ease-in-out;
}

.new-splash.is-leaving {
    opacity: 0;
    pointer-events: none;
}

.startup-shell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.startup-logo-frame {
    position: relative;
    width: 300px;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeInLogo 1.5s ease-out 0.2s forwards;
}

.splash-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0;
    z-index: -1;
}

.cyan-glow {
    width: 150px;
    height: 150px;
    background: var(--startup-cyan);
    top: -20px;
    left: -20px;
    animation: glowCyan 1.5s ease-in-out 0.4s forwards, pulseGlow 3s ease-in-out infinite alternate;
}

.purple-glow {
    width: 120px;
    height: 120px;
    background: var(--startup-purple);
    bottom: -20px;
    right: -20px;
    animation: glowPurple 1.5s ease-in-out 0.6s forwards, pulseGlow 3s ease-in-out infinite alternate-reverse;
}

.splash-ring {
    position: absolute;
    width: 215px;
    height: 215px;
    border-radius: 50%;
    border: 3px solid transparent;
    background: conic-gradient(from 0deg, transparent 70%, var(--startup-cyan) 90%, var(--startup-purple) 100%) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: destination-out;
    mask-composite: exclude;
    animation: spinRing 1.5s cubic-bezier(0.4, 0, 0.2, 1) infinite, fadeInLogo 1s ease-out forwards;
    z-index: 5;
    opacity: 0;
}

@keyframes spinRing {
    100% { transform: rotate(360deg); }
}

.startup-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    z-index: 10;
    mix-blend-mode: screen;
    transform: scale(0.96);
    opacity: 0;
    animation: zoomFadeLogo 1.5s ease-out forwards;
}

@keyframes zoomFadeLogo {
    0% { transform: scale(0.96); opacity: 0; filter: brightness(0.5); }
    100% { transform: scale(1.0); opacity: 1; filter: brightness(1.1); }
}

@keyframes fadeInLogo {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes glowCyan {
    0% { opacity: 0; }
    100% { opacity: 0.5; }
}

@keyframes fadeInLogo {
    to { opacity: 1; }
}

@keyframes glowPurple {
    0% { opacity: 0; }
    100% { opacity: 0.4; }
}

@keyframes pulseGlow {
    0% { transform: scale(1); opacity: 0.3; }
    100% { transform: scale(1.1); opacity: 0.6; }
}

@keyframes pulseLine {
    0% { opacity: 1; background-position: 0% 50%; }
    50% { opacity: 0.5; background-position: 100% 50%; }
    100% { opacity: 1; background-position: 0% 50%; }
}

.startup-progress {
    display: none;
}
