/* ============================================
   TRANSITION SPLASH SCREEN - v3.5
   Logo Animation & Loading Effect
   ============================================ */

/* Splash Overlay Container */
.transition-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 39, 0.98);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.transition-splash.active {
    display: flex;
    animation: fadeInSplash 0.3s ease forwards;
}

.transition-splash.fade-out {
    animation: fadeOutSplash 0.5s ease forwards;
}

@keyframes fadeInSplash {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOutSplash {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.1);
    }
}

/* Splash Content Wrapper */
.splash-content {
    text-align: center;
    position: relative;
    animation: splashContentIn 0.6s ease 0.2s both;
}

@keyframes splashContentIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Logo Container with Ring */
.splash-logo-container {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Splash Logo */
.splash-logo {
    width: 140px;
    height: auto;
    filter: drop-shadow(0 0 30px rgba(0, 217, 255, 0.8));
    animation: logoGlow 2s ease-in-out infinite;
    position: relative;
    z-index: 2;
}

@keyframes logoGlow {
    0%, 100% {
        filter: drop-shadow(0 0 30px rgba(0, 217, 255, 0.8));
        transform: scale(1);
    }
    50% {
        filter: drop-shadow(0 0 50px rgba(255, 215, 0, 0.9));
        transform: scale(1.05);
    }
}

/* Cosmic Ring Spinner */
.cosmic-ring {
    position: absolute;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: #00d9ff;
    border-right-color: #ffd700;
    border-bottom-color: #00ffea;
    animation: spinRing 2s linear infinite;
    box-shadow: 
        0 0 20px rgba(0, 217, 255, 0.5),
        inset 0 0 20px rgba(255, 215, 0, 0.3);
}

.cosmic-ring::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-left-color: #ffd700;
    border-bottom-color: #00d9ff;
    animation: spinRing 3s linear infinite reverse;
}

@keyframes spinRing {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Splash Title */
.splash-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 2.5rem;
    font-weight: 900;
    background: linear-gradient(135deg, #00d9ff, #ffd700, #00ffea);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 4px;
    margin-bottom: 1rem;
    animation: titlePulse 2s ease-in-out infinite;
}

@keyframes titlePulse {
    0%, 100% {
        opacity: 1;
        transform: translateY(0);
    }
    50% {
        opacity: 0.8;
        transform: translateY(-5px);
    }
}

/* Splash Text */
.splash-text {
    color: var(--text-accent);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: textBreathe 2s ease-in-out infinite;
    text-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

@keyframes textBreathe {
    0%, 100% {
        opacity: 0.7;
    }
    50% {
        opacity: 1;
    }
}

/* Splash Particles Container */
.splash-particles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    pointer-events: none;
}

/* Individual Splash Particles */
.splash-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 217, 255, 1) 0%, transparent 70%);
    animation: particleBurst 2s ease-out infinite;
}

.splash-particle:nth-child(1) {
    top: 50%;
    left: 50%;
    background: radial-gradient(circle, rgba(0, 217, 255, 1) 0%, transparent 70%);
    animation-delay: 0s;
}

.splash-particle:nth-child(2) {
    top: 50%;
    left: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 1) 0%, transparent 70%);
    animation-delay: 0.4s;
}

.splash-particle:nth-child(3) {
    top: 50%;
    left: 50%;
    background: radial-gradient(circle, rgba(0, 255, 234, 1) 0%, transparent 70%);
    animation-delay: 0.8s;
}

.splash-particle:nth-child(4) {
    top: 50%;
    left: 50%;
    background: radial-gradient(circle, rgba(0, 217, 255, 1) 0%, transparent 70%);
    animation-delay: 1.2s;
}

.splash-particle:nth-child(5) {
    top: 50%;
    left: 50%;
    background: radial-gradient(circle, rgba(255, 215, 0, 1) 0%, transparent 70%);
    animation-delay: 1.6s;
}

@keyframes particleBurst {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

/* Particle Directions (randomized) */
.splash-particle:nth-child(1) {
    --tx: -80px;
    --ty: -80px;
}

.splash-particle:nth-child(2) {
    --tx: 80px;
    --ty: -80px;
}

.splash-particle:nth-child(3) {
    --tx: -80px;
    --ty: 80px;
}

.splash-particle:nth-child(4) {
    --tx: 80px;
    --ty: 80px;
}

.splash-particle:nth-child(5) {
    --tx: 0px;
    --ty: -100px;
}

/* ============================================
   RESPONSIVE SPLASH SCREEN
   ============================================ */

@media (max-width: 768px) {
    .splash-logo-container {
        width: 150px;
        height: 150px;
    }

    .splash-logo {
        width: 100px;
    }

    .cosmic-ring {
        width: 130px;
        height: 130px;
    }

    .splash-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .splash-text {
        font-size: 0.9rem;
    }

    .splash-particles {
        width: 200px;
        height: 200px;
    }

    /* Reduce particles on mobile */
    .splash-particle:nth-child(n+4) {
        display: none;
    }
}

@media (max-width: 480px) {
    .splash-logo-container {
        width: 120px;
        height: 120px;
        margin-bottom: 1.5rem;
    }

    .splash-logo {
        width: 80px;
    }

    .cosmic-ring {
        width: 100px;
        height: 100px;
    }

    .splash-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
    }

    .splash-text {
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
}

/* Accessibility: Reduce motion */
@media (prefers-reduced-motion: reduce) {
    .cosmic-ring,
    .splash-logo,
    .splash-title,
    .splash-text,
    .splash-particle {
        animation: none;
    }

    .splash-logo {
        filter: drop-shadow(0 0 20px rgba(0, 217, 255, 0.6));
    }
}