   @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700;800&display=swap');

    * {
        font-family: 'Poppins', sans-serif;
    }

    /* Enhanced Preloader */
    .preloader {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 9999;
        transition: opacity 0.5s ease-out;
    }

    .loader {
        width: 80px;
        height: 80px;
        position: relative;
        transform: rotate(45deg);
    }

    .loader-box {
        width: 35px;
        height: 35px;
        position: absolute;
        background: linear-gradient(45deg, #ef4444, #f59e0b);
        border-radius: 8px;
        animation: move 2s ease-in-out infinite;
    }

    .loader-box:nth-child(1) {
        top: 0;
        left: 0;
        animation-delay: 0s;
    }

    .loader-box:nth-child(2) {
        top: 0;
        right: 0;
        animation-delay: 0.5s;
    }

    .loader-box:nth-child(3) {
        bottom: 0;
        right: 0;
        animation-delay: 1s;
    }

    .loader-box:nth-child(4) {
        bottom: 0;
        left: 0;
        animation-delay: 1.5s;
    }

    @keyframes move {

        0%,
        100% {
            transform: scale(1) rotate(0deg);
            opacity: 1;
        }

        50% {
            transform: scale(0.5) rotate(90deg);
            opacity: 0.5;
            box-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
        }
    }

    /* Particle effects */
    .particles {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 1;
    }

    .particle {
        position: absolute;
        background: linear-gradient(45deg, #ef4444, #f59e0b);
        border-radius: 50%;
        opacity: 0;
        animation: floatParticle 15s infinite linear;
    }

    @keyframes floatParticle {
        0% {
            transform: translateY(0) translateX(0) rotate(0deg);
            opacity: 0;
        }

        10% {
            opacity: 0.7;
        }

        90% {
            opacity: 0.3;
        }

        100% {
            transform: translateY(-100vh) translateX(100px) rotate(360deg);
            opacity: 0;
        }
    }

    /* Enhanced Custom Animations */
    @keyframes float {
        0% {
            transform: translateY(0px) rotate(0deg);
        }

        33% {
            transform: translateY(-10px) rotate(3deg);
        }

        66% {
            transform: translateY(5px) rotate(-3deg);
        }

        100% {
            transform: translateY(0px) rotate(0deg);
        }
    }

    @keyframes glow {
        0% {
            box-shadow: 0 0 5px #ef4444, 0 0 10px rgba(239, 68, 68, 0.3);
            transform: scale(1);
        }

        50% {
            box-shadow: 0 0 20px #ef4444, 0 0 30px rgba(239, 68, 68, 0.6);
            transform: scale(1.05);
        }

        100% {
            box-shadow: 0 0 5px #ef4444, 0 0 10px rgba(239, 68, 68, 0.3);
            transform: scale(1);
        }
    }

    @keyframes bounceGame {

        0%,
        100% {
            transform: scale(1) rotate(0deg);
        }

        25% {
            transform: scale(1.1) rotate(2deg);
        }

        50% {
            transform: scale(1.15) rotate(0deg);
        }

        75% {
            transform: scale(1.1) rotate(-2deg);
        }
    }

    @keyframes pulseText {

        0%,
        100% {
            transform: scale(1);
            text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
        }

        50% {
            transform: scale(1.05);
            text-shadow: 0 0 15px rgba(255, 255, 255, 0.8),
                0 0 25px rgba(239, 68, 68, 0.6);
        }
    }

    .play {
        animation: bounceGame 1.5s infinite, float 3s ease-in-out infinite;
        background: linear-gradient(145deg, #ef4444, #f59e0b);
        box-shadow: 0 10px 20px rgba(239, 68, 68, 0.4);
        transition: all 0.3s ease;
    }

    .play:hover {
        transform: scale(1.1) rotate(5deg);
        box-shadow: 0 15px 30px rgba(239, 68, 68, 0.6);
    }

    .restart {
        animation: bounceGame 1.5s infinite;
       
    }

    .score-pulse {
        animation: glow 2s infinite;
        background: linear-gradient(145deg, #1e293b, #0f172a);
        border: 2px solid #ef4444;
        box-shadow: 0 0 15px rgba(239, 68, 68, 0.5);
    }

    /* Enhanced hero selection animation */
    .hero-option {
        transition: all 0.3s ease;
        transform-style: preserve-3d;
        border: 2px solid transparent;
    }

    .hero-option:hover {
        transform: scale(1.1) rotateY(15deg);
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.8);
        border: 2px solid #ef4444;
    }

    /* Enhanced Game elements styling */
    .platform {
        box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5);
        background: linear-gradient(to top, #644406, #334155);
        border-top: 3px solid #ef4444;
    }

    .stick {
        transition: height 0.1s linear, transform 0.3s ease;
        background: linear-gradient(to right, #ef4444, #f59e0b);
        box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
    }

    /* Enhanced Menu background effect */
    .menu-bg {
        background: rgba(15, 23, 42, 0.85);
        backdrop-filter: blur(12px) brightness(1.2);
        -webkit-backdrop-filter: blur(12px) brightness(1.2);
        border: 1px solid rgba(239, 68, 68, 0.2);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    }

    /* Enhanced Title gradient */
    .gradient-text {
        background: linear-gradient(45deg, #ef4444, #f59e0b, #ef4444);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-size: 300% 300%;
        animation: gradient 3s ease infinite, pulseText 2s ease-in-out infinite;
    }

    @keyframes gradient {
        0% {
            background-position: 0% 50%;
        }

        50% {
            background-position: 100% 50%;
        }

        100% {
            background-position: 0% 50%;
        }
    }

    /* Menu item animations */
    .menu-item {
        transition: all 0.3s ease;
        transform: translateY(0);
    }

    .menu-item:hover {
        transform: translateY(-5px) scale(1.05);
        box-shadow: 0 10px 20px rgba(239, 68, 68, 0.3);
    }

    /* Hero character animation */
    @keyframes heroIdle {

        0%,
        100% {
            transform: translateY(0);
        }

        50% {
            transform: translateY(-5px);
        }
    }

    .ball {
        animation: heroIdle 2s ease-in-out infinite;
    }

    /* Success animation */
    @keyframes success {
        0% {
            transform: scale(1);
            box-shadow: 0 0 0 rgba(239, 68, 68, 0.5);
        }

        50% {
            transform: scale(1.2);
            box-shadow: 0 0 30px rgba(239, 68, 68, 0.8);
        }

        100% {
            transform: scale(1);
            box-shadow: 0 0 0 rgba(239, 68, 68, 0.5);
        }
    }

    .success-animation {
        animation: success 0.5s ease-in-out;
    }

    /* Falling animation */
    @keyframes fall {
        0% {
            transform: rotate(0deg);
            opacity: 1;
        }

        100% {
            transform: rotate(90deg) translateY(50vh);
            opacity: 0;
        }
    }

    /* Responsive adjustments */
    @media (max-width: 768px) {
        .gradient-text {
            font-size: 40px;
        }

        .play,
        .restart {
            width: 120px;
            height: 120px;
            line-height: 120px;
        }
    }
