@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');
:root {
    --pixel-size: 6;
   }
   body {
    display: flex;
    align-items: center;
    flex-direction: column;
    background-image: url(bg2.jpeg);
    background-position: 100%;
    font-family: 'Press Start 2P', cursive;
    color: rgb(233, 207, 6);
   }

   main {
    display: flex;
    flex-direction: column;
    align-items: center;
   }
   
   #title-text {
       font-size: 2em;
   }
   
   .grid {
       margin: 4px;
       display: grid;
       grid-template-columns: 50.3px 50.3px 50.3px 50.3px 50.3px 50.3px 50.3px 50.3px 50.3px 50.3px;
       column-gap: 5px;
       row-gap: 2px;
   }
   
   #game-container {
    border: solid 5px rgb(233, 207, 6);
    border-radius: 3px;
    height: 32rem;
    width: 560px;
    position: relative;
    backdrop-filter: blur(100px);
   }
   
   #player {
       background-image: url(grass-tile.png);
       image-rendering: pixelated;
       background-repeat: no-repeat;
       background-size: cover;
       will-change: transform;
   }
   
   .ballbox {
       width: calc(6px * var(--pixel-size));
       height: calc(6px * var(--pixel-size));
       /* background-color: rgba(0, 255, 132, 0.7); */
       overflow: hidden;
       position: absolute !important;
       bottom: 64px;
       will-change: transform;
       transition-timing-function: linear;
       /* transition-duration: 0.03s; */
       
   }
   
   #sprite {
       width: calc(121px * var(--pixel-size));
       /* width: calc(77px * var(--pixel-size)); */
       object-fit: cover;
       image-rendering: pixelated;
       /* transform: translate(-24.5px, -6%); */
       transform: translate(-24.5px, -6%);
   }

   .chilling {
    animation: 
    tailwag 1.85s steps(4) infinite;
   }

   #water {
       background-image: url(water.png);
       background-size: cover;
       image-rendering: pixelated;
   }
   
   #button-container {
        display: flex;
        width: 128%;
        justify-content: space-evenly;
        padding-top: 1em;
        margin-bottom: 4em;
   }
   
   @keyframes tailwag {
       from {
           transform: translate(-3.5%,-6%);
       }
       to {
           transform: translate(-53.5%,-6%);
       }
   }

   @keyframes cat-up {
        from {
            transform: translate(-15.8%,-85%);
        }
        to {
            transform: translate(-15.8%,-85%);
        }
   }
   @keyframes cat-down {
        from {
            transform: translate(-40.8%,-84%);
        }
        to {
            transform: translate(-40.8%,-84%);
        }
   }

.flip {
    width: calc(100px * var(--pixel-size)) !important;
    transform: translate(-52.8%,-84%) !important;
}

#lives {
    align-items: flex-start;
}

.lives-and-score {
    width: 100%;
    display: flex;
    justify-content: space-evenly;
    padding-bottom: 1em;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
    padding-bottom: 1em;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

#timer-div {
    text-align: center;
    padding: 2em;
    font-size: 20px;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}


#gameStart {
    background: transparent;
    border: transparent;
    font-family: 'Press Start 2P', cursive;
    color: #7fc320;
    font-size: 21px;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

#gamePause {
    background: transparent;
    border: transparent;
    font-family: 'Press Start 2P', cursive;
    color: #e84242;
    font-size: 19px;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

#pause-menu {
    padding: 10px 0px 0px 25px;
    top: 270px;
    position: absolute;
    width: 350px;
    height: 18rem;
    border: solid black 1px;
    background-color:rgb(17, 0, 198);
    display: none;
}

#kitty-pause {
    width: calc(12px * var(--pixel-size));
    height: calc(12px * var(--pixel-size));
    padding-left: 5px;;
    /* background-color: #7fc320; */
    overflow: hidden;

}
#pause-sprite {
    width: calc(196px * var(--pixel-size));
    object-fit: cover;
    image-rendering: pixelated;
    transform: translate(0px, -64%);
    animation: sleep 2s steps(4) infinite;
}
.blur {
    opacity: 50%;
}

.center {
    width: 36px !important;
}
@keyframes sleep {
    from {
        transform: translate(-3.1%,-65%);

    }
    to {
        transform: translate(-53.1%,-65%);
    }
}
.eightbit-btn {
    
    background: #92CD41;
    display: none;
    position: relative;
    text-align: center;
    font-size: 30px;
    padding: 20px;
    font-family: "Press Start 2P", cursive;
    text-decoration: none;
    color: white;
    box-shadow: inset -4px -4px 0px 0px #4AA52E;
    width: 100%;
    margin: 10px;
}

.eightbit-btn:hover, .eightbit-btn:focus {
    background: #76c442;
    box-shadow: inset -6px -6px 0px 0px #4AA52E;
  }
  .eightbit-btn:active {
    box-shadow: inset 4px 4px 0px 0px #4AA52E;
  }
  .eightbit-btn:before, .eightbit-btn:after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    box-sizing: content-box;
  }
  .eightbit-btn:before {
    top: -6px;
    left: 0;
    border-top: 6px black solid;
    border-bottom: 6px black solid;
  }
  .eightbit-btn:after {
    left: -6px;
    top: 0;
    border-left: 6px black solid;
    border-right: 6px black solid;
  }

@media only screen and (max-width: 820px) {

    .eightbit-btn {
        display: inline-block;
    }
    #game-title {
        display: none;
    }

    #timer-div {
        padding: 1em;
    }

    .instructions {
        display: none;
    }
    #game-container {
        height: 32rem;
        width: 350px;
       }
       
    .grid {
        margin: 4px;
        display: grid;
        grid-template-columns: 29.5px 29.5px 29.5px 29.5px 29.5px 29.5px 29.5px 29.5px 29.5px 29.5px;
        column-gap: 5px;
        row-gap: 2px;
    }
    #button-container {
        padding-top: 0;
        margin-bottom: 0;
        width: 101%;
    }
    #player {
        width: 100px !important;
    }
  }