body, html {
    height: 100%;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: black;
    overflow: hidden;
}

main {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}



#stromy{

    z-index: 2;
}
.svg-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

svg {
    width: 100vw;
    height: 100vh;
    object-fit: cover;
}





#healthbar {
    transform-origin: 305px;
    transition: transform 0.3s ease;
}

#navod {
    position: absolute;
    width: 40%;
    top: 86%;
    left: 48%;
    right: 50%;
    transform: translate(-50%, 50%);
    animation: fadeOut 1s;
    animation-delay: 5s;
    animation-fill-mode: forwards;
}

@keyframes  fadeOut{
    0% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}


.game-over {
    display: none;
    position: fixed;
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Offset by 50% to truly center */
    width: 50%; /* Adjust the width as needed */
    height: 50%; /* Adjust the height as needed */
    background-image: url('assets/gameover.png'); /* Use the gameover.png image */
    background-size: contain; /* Ensure the image scales to fit within the container */
    background-repeat: no-repeat; /* Prevent the image from repeating */
    background-position: center; /* Center the image within the container */
    z-index: 1000; /* Ensure it appears above other elements */
}

.you-won {
    display: none;
    position: fixed;
    top: 50%; /* Center vertically */
    left: 50%; /* Center horizontally */
    transform: translate(-50%, -50%); /* Offset by 50% to truly center */
    width: 50%; /* Adjust the width as needed */
    height: 50%; /* Adjust the height as needed */
    background-image: url('assets/youwon.png'); /* Use the youwon.png image */
    background-size: contain; /* Ensure the image scales to fit within the container */
    background-repeat: no-repeat; /* Prevent the image from repeating */
    background-position: center; /* Center the image within the container */
    z-index: 1000; /* Ensure it appears above other elements */
}






#info {
    z-index: 2;
    display: block;
    margin: 285px auto 0; /* Center the button and add margin-top */
    width: 450px; /* Adjust the width as needed */
    height: 130px; /* Adjust the height as needed */
    background-image: url('assets/info.png'); /* Use the restart.png image */
    background-size: contain; /* Ensure the image scales to fit within the button */
    background-repeat: no-repeat; /* Prevent the image from repeating */
    background-position: center; /* Center the image within the button */
    background-color: transparent; /* Ensure the background is transparent */
    border: none; /* Remove the default border */
    cursor: pointer; /* Change the cursor to a pointer */
}

#info:hover {
    filter: drop-shadow(0 0 20px rgba(255, 242, 0, 0.901)); /* Add a bright light effect around the button */
}

#restart {
    z-index: 2;
    display: block;
    margin: 285px auto 0; /* Center the button and add margin-top */
    width: 300px; /* Adjust the width as needed */
    height: 130px; /* Adjust the height as needed */
    background-image: url('assets/restart.png'); /* Use the restart.png image */
    background-size: contain; /* Ensure the image scales to fit within the button */
    background-repeat: no-repeat; /* Prevent the image from repeating */
    background-position: center; /* Center the image within the button */
    background-color: transparent; /* Ensure the background is transparent */
    border: none; /* Remove the default border */
    cursor: pointer; /* Change the cursor to a pointer */
}

#restart:hover {
    filter: drop-shadow(0 0 20px rgba(255, 242, 0, 0.901)); /* Add a bright light effect around the button */
}


/* Typ nepřítele*/
.enemy_type1 {
    animation: movement_1 8s;
    animation-fill-mode: forwards;
    animation-timing-function: linear; /* animace bez zrychlování */
    transform-origin: center;
    animation-delay: 4;
}

.enemy_type2 {
    animation: movement_2 8s;
    animation-fill-mode:forwards;
    animation-timing-function: linear ;
    animation-delay: 2s;
}

.enemy_type3 {
    animation: movement_3 8s;
    animation-fill-mode: forwards;
    animation-timing-function: linear ;
    animation-delay: 4s;
}

#animal1, #animal2, #animal3 {
    position: relative;
    z-index: 2; /* Set a higher z-index to ensure animals are on top */
    pointer-events: auto; /* Ensure the animals can receive click events */

}

.enemy1rotace {
    animation: rotation_1 1s;
    transform-origin: 87% 10% ;
    animation-delay: 4s;
    animation-fill-mode: forwards;

}

.enemy2rotace{
    animation: rotation_2 1s;
    transform-origin: 87% 10% ;
    animation-delay: 6s;
    animation-fill-mode: forwards;

}

.enemy3rotace{
    animation: rotation_3 1s;
    transform-origin: 87% 10% ;
    animation-delay: 8s;
    animation-fill-mode: forwards;

}


@keyframes rotation_1{
    0% {
        /* Move horizontally */
        transform: rotate(0deg); 
    }
    100% {
        /* Move downward while rotated */
        transform: rotate(-90deg); /* Final position */
    }
}

@keyframes rotation_2{
    0% {
        /* Move horizontally */
        transform: rotate(0deg); 
    }
    100% {
        /* Move downward while rotated */
        transform: rotate(-120deg); /* Final position */
    }
}

@keyframes rotation_3{
    0% {
        /* Move horizontally */
        transform: rotate(0deg); 
    }
    100% {
        /* Move downward while rotated */
        transform: rotate(-60deg); /* Final position */
    }
}

/* Pohyb nepřítele typu 1*/
@keyframes movement_1 {
    0% {
        /* Initial position */
        transform: translate(0, 0); /* Starting position */
    }
    50% {
        /* Move horizontally */
        transform: translate(-780px, 0); /* Midway position */
    }
    100% {
        /* Move downward while rotated */
        transform: translate(-780px, 330px) ; /* Final position */
    }
}


@keyframes movement_2 {
    0% {
        transform: translate(0, 0); 
    }
    50% {
        transform: translate(-780px, 0); 
    }
    100% {
        transform: translate(-550px, 330px); 
    }
}

    @keyframes movement_3 {
        0% {
            transform: translate(0, 0); 
        }
        50% {
            transform: translate(-780px, 0); 
        }
        100% {
            transform: translate(-1070px, 330px); 
        }
   
}

#animal1, #animal2, #animal3{
    opacity:0;
}






.iniaidle{
    width: 1500px;
    height: 1500px;
    transform: translate(-1000px, -150px) scale(-1, -1); /* Mirror the GIF horizontally */
    transform-origin: center; /* Ensure the transformation is centered */
    z-index: 1;
    position: absolute;
    pointer-events: none; /* Ensure the GIFs do not block click events */
}

.jaguaridle{
    width: 1100px;
    height: 1100px;
    z-index: 1;    
    transform: translate(350px, 100px); /* Mirror the GIF horizontally */
    position: absolute;
    pointer-events: none; /* Ensure the GIFs do not block click events */
}

.bullantidle{
    width: 520px;
    height: 700px;
    z-index: 1;    
    transform: translate(484px, 621px) rotate(-55deg); /* Mirror the GIF horizontally */
    position: absolute;
    pointer-events: none; /* Ensure the GIFs do not block click events */
}


.pyroutok{
    transform: translate(-330px, 750px) rotate(-60deg); /* Mirror the GIF horizontally */
    pointer-events: none; /* Ensure the GIFs do not block click events */
    z-index: 1;
    opacity: 0;
}

.pyrodamage{
    transform: translate(-330px, 750px) rotate(-60deg); /* Mirror the GIF horizontally */
    pointer-events: none; /* Ensure the GIFs do not block click events */
    z-index: 1;
    display: none;
}

.pytlosutok{
    width:1000px;
    height:900px;
    transform: translate(425px, 900px) rotate(-90deg); /* Mirror the GIF horizontally */
    pointer-events: none; /* Ensure the GIFs do not block click events */
    z-index: 1;
    opacity: 0;
}

.pytlosdamage{
    width:1000px;
    height:900px;
    transform: translate(352px, 84px); /* Mirror the GIF horizontally */
    pointer-events: none; /* Ensure the GIFs do not block click events */
    z-index: 1;
    display: none;
}



.drevoutok{
    width:1800px;
    height:1050px;
    transform: translate(1000px, 1200px) rotate(-120deg); /* Mirror the GIF horizontally */
    pointer-events: none; /* Ensure the GIFs do not block click events */
    z-index: 1;
    opacity: 0;

}
.drevodamage{
    width:1050px;
    height:1050px;
    transform: translate(200px, 540px) rotate(-45deg); /* Mirror the GIF horizontally */
    pointer-events: none; /* Ensure the GIFs do not block click events */
    z-index: 1;
    display: none;
}

.jaguarutok{
    width: 1100px;
    height: 1198px;
    transform: translate(322px, 90px); /* Mirror the GIF horizontally */
    z-index: 1;
    pointer-events: none; /* Ensure the GIFs do not block click events */
    display: none;
}

.iniautok{
    width: 1600px;
    height: 1600px;
    transform: translate(-850px, -45px) scale(-1, -1); /* Mirror the GIF horizontally */
    transform-origin: center; /* Ensure the transformation is centered */
    z-index: 1;
    pointer-events: none; /* Ensure the GIFs do not block click events */
    display: none;
}

.bullantutok{
    width: 800px;
    height: 1150px;
    z-index: 1;    
    transform: translate(330px ,350px) rotate(-55deg); /* Mirror the GIF horizontally */
    position: absolute;
    display: none;
    pointer-events: none; /* Ensure the GIFs do not block click events */
}

#attack1, #attack2, #attack3 {
    opacity:0;
}


