/* CryptoExc - Splash Screen Animation */

/* Splash Screen Overlay */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.splash-screen.fade-out {
    animation: fadeOutSplash 0.5s ease-out forwards;
}

/* Logo Animation */
.splash-logo {
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    animation: logoPulse 2s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

.splash-logo .logo-icon {
    display: inline-block;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    padding: 20px;
    border-radius: 16px;
    margin-right: 16px;
    animation: logoRotate 3s linear infinite;
}

/* Trading Coins Animation */
.coins-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.coin {
    position: absolute;
    font-size: 2rem;
    animation: coinMove 8s linear infinite;
    opacity: 0.8;
}

.coin:nth-child(1) { left: 10%; animation-delay: 0s; font-size: 2.5rem; }
.coin:nth-child(2) { left: 20%; animation-delay: 1s; font-size: 2rem; }
.coin:nth-child(3) { left: 30%; animation-delay: 2s; font-size: 2.8rem; }
.coin:nth-child(4) { left: 40%; animation-delay: 0.5s; font-size: 2.2rem; }
.coin:nth-child(5) { left: 50%; animation-delay: 1.5s; font-size: 2.6rem; }
.coin:nth-child(6) { left: 60%; animation-delay: 2.5s; font-size: 2rem; }
.coin:nth-child(7) { left: 70%; animation-delay: 0.8s; font-size: 2.4rem; }
.coin:nth-child(8) { left: 80%; animation-delay: 1.8s; font-size: 2.3rem; }
.coin:nth-child(9) { left: 90%; animation-delay: 0.3s; font-size: 2.7rem; }
.coin:nth-child(10) { left: 15%; animation-delay: 2.2s; font-size: 2.1rem; }

@keyframes coinMove {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateY(calc(100vh + 100px)) rotate(360deg);
        opacity: 0;
    }
}

/* Money Rain Animation */
.money-rain {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.money-bill {
    position: absolute;
    font-size: 1.5rem;
    color: #10b981;
    animation: moneyFall 6s linear infinite;
    opacity: 0.7;
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.money-bill:nth-child(1) { left: 5%; animation-delay: 0s; }
.money-bill:nth-child(2) { left: 12%; animation-delay: 0.5s; }
.money-bill:nth-child(3) { left: 18%; animation-delay: 1s; }
.money-bill:nth-child(4) { left: 25%; animation-delay: 1.5s; }
.money-bill:nth-child(5) { left: 32%; animation-delay: 2s; }
.money-bill:nth-child(6) { left: 38%; animation-delay: 0.3s; }
.money-bill:nth-child(7) { left: 45%; animation-delay: 0.8s; }
.money-bill:nth-child(8) { left: 52%; animation-delay: 1.3s; }
.money-bill:nth-child(9) { left: 58%; animation-delay: 1.8s; }
.money-bill:nth-child(10) { left: 65%; animation-delay: 2.3s; }
.money-bill:nth-child(11) { left: 72%; animation-delay: 0.6s; }
.money-bill:nth-child(12) { left: 78%; animation-delay: 1.1s; }
.money-bill:nth-child(13) { left: 85%; animation-delay: 1.6s; }
.money-bill:nth-child(14) { left: 92%; animation-delay: 2.1s; }
.money-bill:nth-child(15) { left: 8%; animation-delay: 0.4s; }

@keyframes moneyFall {
    0% {
        transform: translateY(-100px) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(calc(100vh + 100px)) rotate(180deg);
        opacity: 0;
    }
}

/* Loading Text */
.splash-loading {
    color: #ffffff;
    font-size: 1.2rem;
    margin-top: 2rem;
    animation: loadingPulse 1.5s ease-in-out infinite;
}

.splash-loading::after {
    content: '...';
    animation: loadingDots 1.5s steps(4, end) infinite;
}

/* Animations */
@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes logoRotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

@keyframes loadingDots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

@keyframes fadeOutSplash {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

/* Sparkle Effect */
.sparkle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ffffff;
    border-radius: 50%;
    animation: sparkle 2s ease-in-out infinite;
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.8);
}

.sparkle:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.sparkle:nth-child(2) { top: 30%; left: 80%; animation-delay: 0.5s; }
.sparkle:nth-child(3) { top: 60%; left: 30%; animation-delay: 1s; }
.sparkle:nth-child(4) { top: 70%; left: 70%; animation-delay: 1.5s; }
.sparkle:nth-child(5) { top: 40%; left: 50%; animation-delay: 0.3s; }

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
}
