@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Press Start 2P', cursive;
}

.game-board {
    width: 100%;
    height: 500px;
    border-bottom: 15px solid rgb(47, 180, 47);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    background: linear-gradient(#87CEEB, #E0F6FF);
    max-width: 670px;
    
}

.clouds {
    position: absolute;
    width: 550px;
    animation: clouds-animation 20s infinite linear;

}

.pipe {
    position: absolute;
    bottom: 0;
    width: 80px;
    animation: pipe-animation 1.5s infinite linear;
}

.mario {
    width: 150px;
    bottom: 0;
    position: absolute;

}

.jump {
    animation: mario-jump 500ms ease-out;
}

.gameover {
    position: absolute;
    top: 50%;
    width: 100%;
    text-align: center;
    font-size: 3em;
}

@keyframes pipe-animation {
    from {
        right: -80px;
    }

    to {
        right: 100%;
    }
}

@keyframes mario-jump {
    0% {
        bottom: 0;
    }

    35% {
        bottom: 180px;
    }

    50% {
        bottom: 180px;
    }

    65% {
        bottom: 180px;
    }

    0% {
        bottom: 0;
    }
}

@keyframes clouds-animation {
    from {
        right: -550px;
    }

    to {
        right: 100%;
    }
}

.score {
    padding: 5px;
    position: absolute;
}

body {
    background-color: #000000;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
  }

  @keyframes flicker {
    0% {
      opacity: 0.27861;
    }
    5% {
      opacity: 0.34769;
    }
    10% {
      opacity: 0.23604;
    }
    15% {
      opacity: 0.90626;
    }
    20% {
      opacity: 0.18128;
    }
    25% {
      opacity: 0.83891;
    }
    30% {
      opacity: 0.65583;
    }
    35% {
      opacity: 0.67807;
    }
    40% {
      opacity: 0.84693;
    }
    45% {
      opacity: 0.96019;
    }
    50% {
      opacity: 0.08594;
    }
    55% {
      opacity: 0.20313;
    }
    60% {
      opacity: 0.71988;
    }
    65% {
      opacity: 0.53455;
    }
    70% {
      opacity: 0.37288;
    }
    75% {
      opacity: 0.71428;
    }
    80% {
      opacity: 0.70419;
    }
    85% {
      opacity: 0.7003;
    }
    90% {
      opacity: 0.36108;
    }
    95% {
      opacity: 0.24387;
    }
    100% {
      opacity: 0.27861;
    }
  }
  
  #crt::after {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(18, 16, 16, 0.1);
    opacity: 0;
    z-index: 5;
    pointer-events: none;
    animation: flicker 0.15s infinite;
  }
  #crt::before {
    content: " ";
    display: block;
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%),
      linear-gradient(
        90deg,
        rgba(255, 0, 0, 0.06),
        rgba(0, 255, 0, 0.02),
        rgba(0, 0, 255, 0.06)
      );
    z-index: 5;
    pointer-events: none;
    background-size: 100% 3px, 4px 100%;
  }
  