@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

*{font-family: 'Press Start 2P', cursive;color: #ffffff;}
html{background-color: #1a1a1a;}

.splash{

    height: 0px !important;
    animation-name: splash;
    animation-duration: 5s;
    animation-iteration-count: initial;
}

.logo{
    padding-top: 300px;
    opacity: 0;
    animation-name: splashLogo;
    animation-duration: 5s;
    animation-iteration-count: initial;
}



.title{font-size: 35px !important;color: white !important;}

.game{padding-top: 30px !important;}

.background::-webkit-scrollbar{height: 8px;}

.background::-webkit-scrollbar-thumb{background-color: rgba(192, 112, 38, 0);height: 8px;border-radius: 10px ;}

html::-webkit-scrollbar{height: 8px;}
html::-webkit-scrollbar-thumb{background-color: #1a1a1a;; height: 8px;border-radius: 10px ;}

.background{
    width: 900px;
    height: 240px;
    background-image: url("./assests/ground1.jpg");
    border-radius: 10px;
    box-shadow: 5px 10px #000000;
    overflow-x: hidden;
    overflow-y: hidden; 
    }
.background2{
    animation-name: floor;
    animation-duration: 0.1s;
    animation-iteration-count: infinite;}


.sonic{
    height: 70px;
    width: 50px;
    background-image: url("./sonic/01.png");
    background-size: cover;}

.moving{
    animation-name: running;
    animation-iteration-count: infinite;
    animation-duration: 0.2s;}

.sonic2{
    height: 70px;
    width: 50px;
    background-image: url("./sonic/01.png"); 
    background-size: cover;
    transform: scaleX(-1);}

.moving2{
    animation-name: running2;
    animation-iteration-count: infinite;
    animation-duration: 0.2s;}

.jumping{
    animation-name: jump;
    animation-duration: 0.5s;
    animation-iteration-count: initial;}

.jumping2{
    animation-name: jump2;
    animation-duration: 0.3s;}

.died{
    height: 83px !important;
    width: 70px !important;
    background-image: url("./sonic/died.png") !important;
    background-size: cover !important;
}   



/*enemies*/
.ring, .ring2, .ring3, .ring4, .ring5, .ring6, .ring7, .ring8, .ring9, .ring10,
.ring11, .ring12, .ring13, .ring14, .ring15, .ring16, .ring17, .ring18, .ring19,
.ring20, .ring21, .ring22, .ring23, .ring22, .ring23, .ring24, .ring25, .ring26, .ring27,
.ring28, .ring29, .ring30, .ring31, .ring32, .ring33, .ring34, .ring35, .ring36,
.ring37, .ring38, .ring39, .ring40, .ring41, .ring42, .ring43, .ring44, .ring45,
.ring46, .ring47, .ring48, .ring49, .ring50{
    height: 40px;
    width: 40px;
    background-image: url("./assests/ring2.gif") !important;
    background-size: cover;}

    .spikes,.spikes2,.spikes3,.spikes4,.spikes5{
        height: 90px;
        width: 75px;
        background-image: url("./assests/spikes.png");
        background-size: cover;
    }


.eggman,.eggman2{
    width: 120px;
    height: 140px;
    background-image: url("./assests/eggman2.gif");
    background-size: cover;
}

.eggman2{
    width: 120px;
    height: 140px;
    background-image: url("./assests/eggman.gif");
    background-size: cover;
}

.eggRun{
    width: 125px;
    height: 135px;
    background-image: url("./assests/eggman.gif");
    background-size: cover;
}

.blink{
    background-image: url("./assests/source.gif") !important;
    opacity: 0 !important;
    animation-name: blink !important;
    animation-duration: 1s !important;
    animation-iteration-count: initial !important;
}    

.keep{
    width: 20px;
    height: 20px;
    opacity: 0;
}

.keep2{
    animation-name: run;
    animation-duration: 0.5s;
    animation-iteration-count: infinite;
}

.win{width: 220px; opacity: 0;}
.die{width: 220px; opacity: 0;}

.mostrar{opacity: 1;}

.eggLoses{
    background-image: url("./assests/eggloses.gif");
    width: 165px;
    background-size: cover;
}

@keyframes run{
    0%{opacity: 1;}
    100%{opacity: 0;}
}

@keyframes running{
    25%{background-image: url("./sonic/03.png");
        background-size: cover;
        width: 55px;}
    50%{background-image: url("./sonic/04.png");
        background-size: cover;
        width: 55px;}
    75%{background-image: url("./sonic/05.png");
        background-size: cover;
        width: 55px;}
    100%{background-image: url("./sonic/06.png");
        background-size: cover;
        width: 55px;}
        }

@keyframes running2{
    25%{background-image: url("./sonic/03.png");
        background-size: cover;
        width: 55px;
        transform: scaleX(-1);}
    50%{background-image: url("./sonic/04.png");
        background-size: cover;
        width: 55px;
        transform: scaleX(-1);}
    75%{background-image: url("./sonic/05.png");
        background-size: cover;
        width: 55px;
        transform: scaleX(-1);}
    100%{background-image: url("./sonic/06.png");
        background-size: cover;
        width: 55px;
        transform: scaleX(-1);}
}

@keyframes jump{
    25%{background-image: url("./sonic/007.png");
        background-size: cover;
        width: 60px;
        height: 60px;
        transform: translateY(-115px);}
    50%{background-image: url("./sonic/08.png");
        background-size: cover;
        width: 60px;
        height: 60px;
        transform: translateY(-105px);}
    75%{background-image: url("./sonic/09.png");
        background-size: cover;
        width: 60px;
        height: 60px;
        transform: translateY(-95px);}
    100%{background-image: url("./sonic/10.png");
        background-size: cover;
        width: 60px;
        height: 60px;}
}

@keyframes jump2{
    25%{background-image: url("./sonic/007.png");
        background-size: cover;
        width: 60px;
        height: 60px;
        transform: translateY(-75px);
        transform: scaleX(-1);}
    50%{background-image: url("./sonic/08.png");
        background-size: cover;
        width: 60px;
        height: 60px;
        transform: scaleX(-1);}
    75%{background-image: url("./sonic/09.png");
        background-size: cover;
        width: 60px;
        height: 60px;
        transform: scaleX(-1);}
    100%{background-image: url("./sonic/10.png");
        background-size: cover;
        width: 60px;
        height: 60px;
        transform: scaleX(-1);}
}


@keyframes floor{
    0%{background-image: url("./assests/ground1.jpg");}
    100%{background-image: url("./assests/ground2.jpg");}
}

@keyframes blink{
    0%{background-image: url("./assests/source.gif"); opacity: 0;}
    50%{background-image: url("./assests/source.gif"); opacity: 1;}
    100%{background-image: url("./assests/source.gif"); opacity: 0;}
}

@keyframes splash{
    0%{opacity: 1; height: 850px;}
    100%{
        height: 0px;
        opacity: 0;
    }
}

@keyframes splashLogo{
    0%{opacity: 1;}
    100%{
        opacity: 0;
    }
}

.credits{
    color: #00e1ff !important;
}

/* Mobile responsiveness */
@media (max-width: 600px) {
    html {
        font-size: 12px;
    }
    .background {
        width: 100vw;
        min-width: 0;
        max-width: 100vw;
        height: 160px;
        background-size: cover;
        box-shadow: none;
        border-radius: 0;
    }
    .column[align="center"] img {
        width: 90vw !important;
        max-width: 300px !important;
        height: auto !important;
    }
    .column[align="center"] span {
        font-size: 1.1em !important;
    }
    .game {
        padding-top: 10px !important;
        flex-direction: column !important;
        align-items: center !important;
    }
    .sonic, .sonic2 {
        height: 40px;
        width: 30px;
        background-size: cover;
    }
    .ring, .ring2, .ring3, .ring4, .ring5, .ring6, .ring7, .ring8, .ring9, .ring10,
    .ring11, .ring12, .ring13, .ring14, .ring15, .ring16, .ring17, .ring18, .ring19,
    .ring20, .ring21, .ring22, .ring23, .ring24, .ring25, .ring26, .ring27,
    .ring28, .ring29, .ring30, .ring31, .ring32, .ring33, .ring34, .ring35, .ring36,
    .ring37, .ring38, .ring39, .ring40, .ring41, .ring42, .ring43, .ring44, .ring45,
    .ring46, .ring47, .ring48, .ring49, .ring50 {
        height: 24px;
        width: 24px;
    }
    .spikes, .spikes2, .spikes3, .spikes4, .spikes5 {
        height: 50px;
        width: 40px;
    }
    .eggman, .eggman2, .eggRun {
        width: 60px;
        height: 70px;
    }
    .score, .keep, .win, .die {
        font-size: 1em !important;
        width: 100vw !important;
        text-align: center !important;
    }
    .title {
        font-size: 1.2em !important;
    }
}

