html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    font-family: "VT323", monospace;
    font-weight: 400;
    font-style: normal;
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

.body-container {
    width: 500px;
    position: relative;
    left: -80px;
    right: 0px;
    margin: 0 auto;
    padding: 20px 0 0;
}

.game-container {
    width: 500px;
    height: 730px;
    position: absolute;
    left: 80px;
    overflow: hidden;
}

.border-left {
    width: 80px;
    height: 730px;
    position:  absolute;
    background-color: white;
    z-index: +2;
}

.border-right {
    width: 80px;
    height: 730px;
    position: absolute;
    background-color: white;
    z-index: +2;
    left: 580px;
}

.border-top {
    width: 660px;
    height: 50px;
    position:  absolute;
    background-color: white;
    z-index: +2;
    top: -50px;
    left: -80px;
}

.sky {
    background-image: url('fb-game-background.png');
    width: 500px;
    height: 580px;
    position: absolute;
}

.ground {
    background-image: url('bottom-background.png');
    width: 500px;
    height: 150px;
    position: absolute;
    top: 580px;
    z-index: +1;
}

.score {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 32px;
    color: white;
    z-index: +3;
    background-color: rgba(0,0,0,0.5);
    min-width: 50px;
    text-align: center;
    line-height: 1;
    padding: 5px;
}

.game-paused .score {
    display: none;
}

.bird {
    background-image: url('flappy-bird.png');
    position: absolute;
    width: 60px;
    height: 45px;
    left: 220px;
    bottom: 100px;
    z-index: +20;
}

.bird > img {
    width: 61px;
    position: absolute;
    right: 22px;
    left: auto;
    bottom: 8px;
    transition: transform 0.2s ease-out;
    transform-origin: 66% 60%;
    user-select: none;
}

.obstacle {
    background-image: url('flappybird-pipe.png');
    width: 60px;
    height: 300px;
    position: absolute;
}

.topObstacle {
    background-image: url('flappybird-pipe.png');
    transform: rotate(180deg);
    width: 60px;
    height: 300px;
    position: absolute;
}

@keyframes slideright {
    from {
        background-position: 10000%;
    }
    to {
        background-position: 0%;
    }
  }
  
  @-webkit-keyframes slideright {
    from {
        background-position: 10000%;
    }
    to {
        background-position: 0%;
    }
  }

  .ground-container {
      height: 150px;
      width: 580px;
      left: 80px;
      position:  absolute;
  }
  
  .ground-moving {
    position: absolute;
    top: 580px;
    height: 150px;
    background-image: url('bottom-background.png');
    background-repeat: repeat-x;
    animation: slideright 100s infinite linear;
    -webkit-animation: slideright 100s infinite linear;
    width: 100%;
    z-index: +1;
  }

.game-popup-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: +1000;
    background-color:rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    opacity: 0;
    pointer-events: none;
    transition: 200ms opacity ease-in-out;
}

body.game--start .game-popup--start {
    opacity: 1;
    pointer-events: auto;
}
body.game--end .game-popup--end {
    opacity: 1;
    pointer-events: auto;
}


body.game--start .score,
body.game--end .score {
    display: none;
}

.game-over-text {
    text-transform: uppercase;
    font-size: 32px;
}

a, a:visited {
    color: black;
    text-decoration: underline;
}

a:hover {
    color: black;
    text-decoration: none;
}

.game-popup {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 500px;
    box-sizing: border-box;
    height: 350px;
    background: #ddd894;
    z-index: +1000;
    margin: auto;
    font-size: 24px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-image: url('border-top.png'), url('border-bottom.png');
    background-repeat: no-repeat, no-repeat;
    background-position: top, bottom;
}

.text-center {
    text-align: center;
}

.wing-flap {
    transform: rotate(-33deg);
}

.restart-btn {
    appearance: none;
    background: transparent;
    font-family: 'VT323', monospace;
    font-size: 24px;
    border: 2px solid black;
    padding: 2px 12px;
    cursor: pointer;
}