@-webkit-keyframes animLand {
   0% {
      background-position: 0px 0px;
   }

   100% {
      background-position: -335px 0px;
   }
}

@-moz-keyframes animLand {
   0% {
      background-position: 0px 0px;
   }

   100% {
      background-position: -335px 0px;
   }
}

@-o-keyframes animLand {
   0% {
      background-position: 0px 0px;
   }

   100% {
      background-position: -335px 0px;
   }
}

@keyframes animLand {
   0% {
      background-position: 0px 0px;
   }

   100% {
      background-position: -335px 0px;
   }
}

@-webkit-keyframes animSky {
   0% {
      background-position: 0px 100%;
   }

   100% {
      background-position: -275px 100%;
   }
}

@-moz-keyframes animSky {
   0% {
      background-position: 0px 100%;
   }

   100% {
      background-position: -275px 100%;
   }
}

@-o-keyframes animSky {
   0% {
      background-position: 0px 100%;
   }

   100% {
      background-position: -275px 100%;
   }
}

@keyframes animSky {
   0% {
      background-position: 0px 100%;
   }

   100% {
      background-position: -275px 100%;
   }
}

@-webkit-keyframes animBird {
   from {
      background-position: 0px 0px;
   }

   to {
      background-position: 0px -96px;
   }
}

@-moz-keyframes animBird {
   from {
      background-position: 0px 0px;
   }

   to {
      background-position: 0px -96px;
   }
}

@-o-keyframes animBird {
   from {
      background-position: 0px 0px;
   }

   to {
      background-position: 0px -96px;
   }
}

@keyframes animBird {
   from {
      background-position: 0px 0px;
   }

   to {
      background-position: 0px -96px;
   }
}

@-webkit-keyframes animPipe {
   0% {
      left: 900px;
   }

   100% {
      left: -100px;
   }
}

@-moz-keyframes animPipe {
   0% {
      left: 900px;
   }

   100% {
      left: -100px;
   }
}

@-o-keyframes animPipe {
   0% {
      left: 900px;
   }

   100% {
      left: -100px;
   }
}

@keyframes animPipe {
   0% {
      left: 900px;
   }

   100% {
      left: -100px;
   }
}

@-webkit-keyframes animCeiling {
   0% {
      background-position: 0px 0px;
   }

   100% {
      background-position: -63px 0px;
   }
}

@-moz-keyframes animCeiling {
   0% {
      background-position: 0px 0px;
   }

   100% {
      background-position: -63px 0px;
   }
}

@-o-keyframes animCeiling {
   0% {
      background-position: 0px 0px;
   }

   100% {
      background-position: -63px 0px;
   }
}

@keyframes animCeiling {
   0% {
      background-position: 0px 0px;
   }

   100% {
      background-position: -63px 0px;
   }
}


*,
*:before,
*:after {
   /* border box */
   -moz-box-sizing: border-box;
   -webkit-box-sizing: border-box;
   box-sizing: border-box;
   /* gpu acceleration */
   -webkit-transition: translate3d(0, 0, 0);
   transition: translate3d(0, 0, 0);
   /* select disable */
   -webkit-touch-callout: none;
   -webkit-user-select: none;
   -khtml-user-select: none;
   -moz-user-select: none;
   -ms-user-select: none;
   user-select: none;
}

html,
body {
   height: 100%;
   overflow: hidden;
   font-family: monospace;
   font-size: 12px;
   color: #fff;
   zoom: 1.1;
}

#gamecontainer {
   position: relative;
   width: 100%;
   height: 100%;
   min-height: 525px;
}

/*
Screen - Game
*/
#gamescreen {
   position: absolute;
   width: 100%;
   height: 100%;
}

#sky {
   position: absolute;
   top: 0;
   width: 100%;
   height: 80%;
   background-image: url('../assets/sky.png'), url('../assets/just-sky.png');
   background-repeat: repeat-x, repeat;
   background-position: 0px 100%;


   -webkit-animation: animSky 7s linear infinite;
   animation: animSky 7s linear infinite;
}

#flyarea {
   position: absolute;
   bottom: 0;
   height: 420px;
   width: 100%;
}

#ceiling {
   position: absolute;
   top: -16px;
   height: 16px;
   width: 100%;
   background-image: url('../assets/ceiling.png');
   background-repeat: repeat-x;

   -webkit-animation: animCeiling 481ms linear infinite;
   animation: animCeiling 481ms linear infinite;
}

#land {
   position: absolute;
   bottom: 0;
   width: 100%;
   height: 20%;
   background-image: url('../assets/land.png');
   background-repeat: repeat-x;
   background-position: 0px 0px;
   background-color: #ded895;

   -webkit-animation: animLand 2516ms linear infinite;
   animation: animLand 2516ms linear infinite;
}

#bigscore {
   position: absolute;
   top: 20px;
   left: 150px;
   z-index: 100;
}

#bigscore img {
   display: inline-block;
   padding: 1px;
}

#splash {
   position: absolute;
   opacity: 0;
   top: 45px;
   left: 65px;
   width: 300px;
   height: 250px;
   background-image: url('../assets/splash.png');
   background-repeat: no-repeat;
   background-position: center bottom;
   text-align: center;
}

#leaderboard {
   position: absolute;
   display: none;
   top: 56px;
   right: 160px;
   width: 430px;
   height: 270px;
   background-image: url('../assets/leaderboard.png');
   background-repeat: no-repeat;
   z-index: 1010;
}

#top-five-players,
#bottom-five-players {
   position: absolute;
   width: 230px;
   /* Each column will take up 50% of the leaderboard's width */
}

#top-five-players {
   left: 0;
   top: 100px;
}

#bottom-five-players {
   right: 0;
   top: 100px;
}

.player-entry {
   box-sizing: border-box;
   /* Includes padding and border in the element's total width and height */
   position: relative;
   width: 100%;
   /* Each player entry will take up 100% of the column's width */
   height: 20%;
   /* Each player entry will take up 20% of the leaderboard's height */
   padding: 5px;
   /* Adjust as needed for spacing */
   padding-top: 10px;
   padding-bottom: 17px;
   top: -4px;
}

.player-name,
.player-score {
   position: absolute;
   display: inline-block;
}

.player-name {
   width: 70%;
   /* Adjust if you need a different ratio for name and score */
   left: 25%;
   /* Adjust this value to align with the left side of the column */
   top: 50%;
   transform: translateY(-50%);
   /* Center vertically */
   text-align: left;
}

.player-score {
   width: 30%;
   /* Adjust if you need a different ratio for name and score */
   right: 15%;
   /* Adjust this value to align with the right side of the column */
   top: 50%;
   transform: translateY(-50%);
   /* Center vertically */
   text-align: right;
}


#scoreboard {
   position: absolute;
   display: none;
   opacity: 0;
   top: 64px;
   left: 43px;
   width: 236px;
   height: 280px;
   background-image: url('../assets/scoreboard.png');
   background-repeat: no-repeat;

   z-index: 1000;
}

#medal {
   position: absolute;
   opacity: 0;
   top: 114px;
   left: 32px;
   width: 44px;
   height: 44px;
}

#currentscore {
   position: absolute;
   top: 105px;
   left: 107px;
   width: 104px;
   height: 14px;
   text-align: right;
}

#currentscore img {
   padding-left: 2px;
}

#highscore {
   position: absolute;
   top: 147px;
   left: 107px;
   width: 104px;
   height: 14px;
   text-align: right;
}

#highscore img {
   padding-left: 2px;
}

#replay {
   position: absolute;
   opacity: 0;
   top: 205px;
   left: 61px;
   height: 115px;
   width: 70px;
   cursor: pointer;
}

.boundingbox {
   position: absolute;
   display: none;
   top: 0;
   left: 0;
   width: 0;
   height: 0;
   border: 1px solid red;
}

#player {
   left: 60px;
   top: 200px;
}

.bird {
   position: absolute;
   width: 34px;
   height: 24px;
   background-image: url('../assets/bird.png');

   -webkit-animation: animBird 300ms steps(4) infinite;
   animation: animBird 300ms steps(4) infinite;
}

.pipe {
   position: absolute;
   left: -100px;
   width: 52px;
   height: 100%;
   z-index: 10;

   -webkit-animation: animPipe 7500ms linear;
   animation: animPipe 7500ms linear;
}

.pipe_upper {
   position: absolute;
   top: 0;
   width: 52px;
   background-image: url('../assets/pipe.png');
   background-repeat: repeat-y;
   background-position: center;
}

.pipe_upper:after {
   content: "";
   position: absolute;
   bottom: 0;
   width: 52px;
   height: 26px;
   background-image: url('../assets/pipe-down.png');
}

.pipe_lower {
   position: absolute;
   bottom: 0;
   width: 52px;
   background-image: url('../assets/pipe.png');
   background-repeat: repeat-y;
   background-position: center;
}

.pipe_lower:after {
   content: "";
   position: absolute;
   top: 0;
   width: 52px;
   height: 26px;
   background-image: url('../assets/pipe-up.png');
}

.bird-glow {
   animation: glow 700ms infinite alternate;
   filter: drop-shadow(0 0 4px #149AFB) drop-shadow(0 0 6px #7800ED);
}

@keyframes glow {
   from {
      filter: drop-shadow(0 0 2px #149AFB) drop-shadow(0 0 3px #7800ED);
   }

   to {
      filter: drop-shadow(0 0 4px #149AFB) drop-shadow(0 0 6px #7800ED);
   }
}

/* Modal styles */
.modal {
   display: none; /* Initially hidden */
   position: fixed; /* Stay in place */
   z-index: 1020; /* Sit on top of other elements */
   left: 0;
   top: 0;
   width: 100%;
   height: 100%;
   overflow: auto; /* Enable scroll if needed */
   background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
 }
 
 .modal-content {
   background-color: #333; /* Dark gray background */
   margin: 15% auto; /* Center vertically and horizontally */
   padding: 20px;
   border: 1px solid #888;
   width: 30%; /* Reduce width to 30% */
   margin-top: 20%; /* Move down on the screen */
   text-align: center;
 }
 
 .modal-title {
   color: #fff;
   margin-bottom: 10px;
 }
 
 #player-name {
   width: 80%;
   padding: 10px;
   margin-bottom: 10px;
   border: 1px solid #ccc;
   border-radius: 4px;
   font-size: 16px;
 }
 
 #submit-name {
   background-color: #7800ED; /* Purple button */
   color: #fff;
   padding: 10px 20px;
   border: none;
   border-radius: 4px;
   cursor: pointer;
 }
 
 #submit-name:hover {
   background-color: #9933ff; /* Slightly lighter purple on hover */
 }

#footer {
   position: absolute;
   bottom: 3px;
   left: 3px;
}

#footer a,
#footer a:link,
#footer a:visited,
#footer a:hover,
#footer a:active {
   display: block;
   padding: 2px;
   text-decoration: none;
   color: #fff;
}