@font-face {
    font-family: MarioFont;
    src: url(SuperMario256.ttf);
}

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body{
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.game-board{
    width: 850px;
    height: 500px;
    border: 1px solid #333;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.bg_floor{
    position: absolute; 
    width: 200%;
    bottom: 0;
    z-index: -1;
    
}

.floor, .floor_1{    
    animation: slide 3s linear infinite;
    position: absolute;
    width: 50%;
    background-size: cover;
    height: 40px;
}

.floor{
    bottom: 0;
    left: 0;
}

.floor_1{
    bottom: 0;
    right: 0;
}

.bg_sky{
    position: absolute; 
    width: 200%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
}

.clouds, .clouds_1{    
    animation: slide 3s linear infinite;
    position: absolute;
    background-size: cover;
    width: 50%;
    height: 100%;
}

.clouds{
    top: 0;
    left: 0;
}

.clouds_1{
    top: 0;
    right: 1px;
}
.pipe{
    position: absolute;
    bottom: 40px;
    width: 80px;
    animation: pipe-animation 2.5s infinite linear;
}

.mario{
    width: 130px;
    position: absolute;
    bottom: 40px;
}

.jump{
    animation: jump 750ms ease-out;
}

@keyframes pipe-animation {
    from{
        right: -63px;
    }
    to{
        right: 110%;
    }
}

@keyframes jump {

    0%{
        bottom: 40px;
    }

    40%{
        bottom: 180px;
    }

    50%{
        bottom: 180px;
    }

    60%{
        bottom: 180px;
    }

    100%{
        bottom: 40px;
    }
    
}

@keyframes slide {
    0% {
      transform: translate(0);
    }
    100% {
      transform: translate(-100%); 
    }
}

@keyframes fadeInDownBig {
    from {
      opacity: 0;
      -webkit-transform: translate3d(0, -200px, 0);
      transform: translate3d(0, -200px, 0);
    }
  
    to {
      opacity: 1;
      -webkit-transform: translate3d(0, 0, 0);
      transform: translate3d(0, 0, 0);
    }
}
.start_game{
    animation: fadeInDownBig 2.5s;
}
.start_screen{
    align-items: center;
    justify-content: center;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.start_text{
    font-family: MarioFont;
    position: relative;
    font-size: 80px;
    color: #000;
    text-shadow: 6px 6px 6px #000;
    margin-bottom: 20px;
   
}

.score_text{
    font-family: MarioFont;
    font-size: 25px;
    color: #000;
    margin: 10px 0 0 10px;
}


.red{
    color:#FF0000
}
.blue{
    color:#001aff
}
.yellow{
    color:#ffee00
}
.green{
    color:#00ff00
}

.black{
    color:#000000
}
.white{
    color:#ffffff
}

.btn_start{
    font-family: MarioFont;
}

/* CSS */
.btn_start {
  background-color: #1899D6;
  border: solid transparent;
  border-radius: 16px;
  border-width: 0 0 4px;
  color: #FFFFFF;
  cursor: pointer;
  font-size: 20px;
  letter-spacing: 1px;
  padding: 17px 16px 13px;
  text-align: center;
  transform: translateZ(0);
  transition: filter .2s;
  width: 200px;
  
}

.btn_start:after {
  background-clip: padding-box;
  background-color: #1CB0F6;
  border: solid transparent;
  border-radius: 16px;
  border-width: 0 0 4px;
  bottom: -4px;
  content: "";
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: -1;
}

.btn_start:main,
.btn_start:focus {
  user-select: auto;
}

.btn_start:hover:not(:disabled) {
  filter: brightness(1.1);
  -webkit-filter: brightness(1.1);
}

.btn_start:disabled {
  cursor: auto;
}

.restart_screen{
    align-items: center;
    justify-content: center;
    display: none;
    flex-direction: column;
    gap: 12px;
    position: absolute;
    background-color: rgba(0,0,0,0.95);
    width: 850px;
    height: 500px;
}

.btn_restart {
    font-family: MarioFont;
    background-color: #FF0000;
    border: solid transparent;
    border-radius: 16px;
    border-width: 0 0 4px;
    color: #FFFFFF;
    cursor: pointer;
    font-size: 20px;
    letter-spacing: 1px;
    padding: 17px 16px 13px;
    text-align: center;
    transform: translateZ(0);
    transition: filter .2s;
    width: 200px;
    
  }
  
.btn_restart:after {
    background-clip: padding-box;
    background-color: #fc2727;
    border: solid transparent;
    border-radius: 16px;
    border-width: 0 0 4px;
    bottom: -4px;
    content: "";
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: -1;
  }
  
.btn_restart:main,
.btn_restart:focus {
    user-select: auto;
}
  
.btn_restart:hover:not(:disabled) {
    filter: brightness(1.1);
    -webkit-filter: brightness(1.1);
}
  
.btn_restart:disabled {
    cursor: auto;
}