body {
    text-align: center;
    width: 100%;
    height: 100vh;
    margin: 0;
    padding: 0;

    background-image: url(images/forest_background_img.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

h1 {
    font-family: "Darumadrop One", sans-serif;
    font-size:  84px;
}


h2 {
    font-family: "Darumadrop One", sans-serif;
    font-size: 64px;
}

 p {
    font-family: "Darumadrop One", sans-serif;
    font-size: 36px;

    padding: 0;
}

/*possum + raccoon text styling*/

.possum-highlight {
    color: rgb(32, 71, 122);
    font-size: 40px;
}

.raccoon-highlight {
    color: rgb(173, 50, 50);
    font-size: 40px;
}

/*button styling*/

.btn {
    position: relative;
    z-index: 5;

    display: block;
    margin: 0 auto;

    font-family: "Darumadrop One", sans-serif;
    text-align: center;
    font-size: 36px;
    color: aliceblue;

    padding: 10px 20px;
    background-color: rgb(42, 97, 47);
    
    border-radius: 8px;
    border-style: none;
}

.btn:hover{
    background-color: rgb(13, 61, 18);
}

#start-btn {
    position: relative;
    z-index: 99999;
}

/*starting image styling*/
#startscreen, #gamescreen {
    position: absolute;
    top: 0;
    left: 0;

    width: 100vw;
    height: 100vh;

    overflow: hidden;
}

#startscreen{
    justify-content: center;
    align-items: center;

    z-index: 1;
}

#startscreen-content {
    position: relative;
    z-index: 10;
    text-align: center;
}

/* absolute animal positoning*/
.raccoon-position {
    position: absolute;
    bottom: 8vh;
    left: 15vw;
    height: 35vh;
}

.possum-position {
    position: absolute;
    bottom: 8vh;
    right: 15vw;
    height: 35vh;
}


/*styling for the game screen*/
#gamescreen {
    display: none; 
    position: relative;
    z-index: 2;    
}

.text-box {
    display: flex;
    flex-direction: column;
    align-items: center;

    gap: 20px;
    margin: 30px;
}

#messages {
    width: 800px;
    text-align: center;

    border: 8px solid rgb(150, 170, 190);
    background-color: rgb(216, 228, 238);
    border-radius: 10px;

    padding: 10px 20px 10px 20px;
}

/*health bar styling*/

#raccoon-health,
#possum-health {
    position: absolute;
    bottom: 40vh;  
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
}

.health-bar{
    position: absolute;
    top: -12%;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;              
    max-width: 300px;       
    height: 30px;
    background-color: rgb(200, 223, 233);
    border: 3px solid rgb(144, 170, 182);
    border-radius: 8px;
    overflow: hidden;
    z-index: 10;

}

#raccoon-health-bar, #possum-health-bar {
    height: 100%;
    width: 100%;
    position: relative;
}

.fill{
    position: absolute;
    height: 100%;
    width: 100%;
    z-index: 20;

    background-color: rgb(117, 199, 63);
    transition: width 0.3s ease, background-color 0.3s ease;
}

#raccoon-health-bar .fill,
#possum-health-bar .fill {
    position: absolute;
    left: 0;
    top: 0;
}

#raccoon-health-bar .fill.health-green,
#possum-health-bar .fill.health-green {
    background-color: rgb(99, 190, 99);
}

#raccoon-health-bar .fill.health-yellow,
#possum-health-bar .fill.health-yellow {
    background-color: rgb(236, 218, 115);
}

#raccoon-health-bar .fill.health-red,
#possum-health-bar .fill.health-red {
    background-color: rgb(240, 98, 98);
}


/*raccoon + possum boxer*/
#raccoon-in-the-ring {
    position: absolute;
    bottom: 5vh;
    left: 15vw;
}

#possum-in-the-ring {
    position: absolute;
    bottom: 5vh;
    right: 15vw;
}

#raccoon-in-the-ring img,
#possum-in-the-ring img {
    display: block;         
    height: 35vh;
    width: auto;
}



/*gameover overlay styling*/
#gameover-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(4px);  

    display: none;
    opacity: 0;
    pointer-events: auto;

    justify-content: center;
    align-items: center;
    
    z-index: 9998;  
    transition: opacity 0.3s ease;      
}


#gameover-box{
    background: rgba(20, 20, 20, 0.9);
    padding: 25px 35px;
    border-radius: 12px;
    text-align: center;

    
    border: 8px solid rgb(150, 170, 190);
    background-color: rgb(216, 228, 238);

    z-index: 999;
}

#gameover-banner{
    color: rgb(184, 49, 49);
}

#btn-content{
    display: flex;
    justify-content: center;
    gap: 20px;      /* space between buttons */
    margin-top: 20px;
}




/*footer styling*/
footer {
    position: absolute;      
    bottom: 35px;            
    width: 100%;
    text-align: center;
    z-index: 9999; 

    color: rgb(221, 240, 248);           
    
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);

    padding: 0;
    margin: 0;
}


footer p {
    margin: 0;  
    padding: 5px;    
    font-size: 1.5rem;        
    
}

footer span:hover {
    cursor: pointer;
    text-decoration: underline;
    
}

/*resource overlay styling*/
#resources-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#resources-box {
    background-color: rgb(216, 228, 238);
    border: 8px solid rgb(150, 170, 190);
    padding: 25px 35px;
    border-radius: 12px;
    max-width: 500px;
    text-align: left;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}


#resources-box h2 {
    font-family: "Darumadrop One", sans-serif;
    font-size: 2rem;
    margin-top: 0;
}

#resources-box ul {
    font-family: "Darumadrop One", sans-serif;
    padding-left: 0;
    list-style: none;
}

#resources-box li {
    font-family: "Darumadrop One", sans-serif;
    margin-bottom: 15px;
    font-size: 1rem;
}

#resources-box a {
    font-family: "Darumadrop One", sans-serif;
    color: rgb(32, 71, 122);
    text-decoration: underline;
}


/*animations styling*/

/*animation for raccoon + possum*/
@keyframes float-up-down {
    0% {
    transform: translateY(0); 
  }
    50% {
    transform: translateY(-15px); 
  }
    100% {
    transform: translateY(0);
  }
}

.floating {
    animation: float-up-down 2s ease-in-out infinite;
}

/*attack animations*/
/* Small jab hit */
@keyframes jab-hit {
    0% { transform: translateX(0); }
    30% { transform: translateX(-6px); }
    60% { transform: translateX(6px); }
    100% { transform: translateX(0); }
}

.small-hit {
    animation: jab-hit 0.2s ease;
}


@keyframes big-flash {
    0% { filter: brightness(1); transform: translateX(0); }
    50% { filter: brightness(3); transform: translateX(-20px); }
    100% { filter: brightness(1); transform: translateX(0); }
}

.big-hit {
    animation: big-flash 0.35s ease;
}

/*dodge animation*/

@keyframes dodge-move {
    0%   { transform: translateX(0); }
    30%  { transform: translateX(-40px); } 
    60%  { transform: translateX(40px); }  
    100% { transform: translateX(0); }
}

.dodge {
    animation: dodge-move 0.5s ease-out;
}
