html {
  box-sizing: border-box;
  width: 100%;
}

/* The Universal Selector */
*, /* All elements*/
*::before, /* All ::before pseudo-elements */
*::after { /* All ::after pseudo-elements */
  /* height & width will now include border & padding by default
  but can be over-ridden as needed */
  box-sizing: inherit;
}

body {
  background-color: rgb(253,185,39);
  font-family: 'Graduate', cursive;
  overflow-x: hidden;
  width: 100%;
}

.main-container {
  display: flex;
  align-items: center;
  text-align: center;
  flex-direction: column;
  margin: 0 0 0 0;
  width: 100%;
  }

.game-container {
  display: flex;
  justify-content: center;
  flex-wrap: nowrap;
  width: 100%;
}

.board {
  display: grid;
  grid-template-columns: auto-repeate(16, 11vmin);
  grid-template-rows: auto-repeate(16, 11vmin);
  width: 400px;
  height: 400px;
  text-align: center;
  justify-content: center;
  border: 1px solid rgb(255, 255, 255);
  background-color: rgb(85,37,130);
  box-shadow: black 10px 10px 70px;
  z-index: 1;
}

.wall {
  display: grid;
  border: none;
}

.sqr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  font-size: 8vmin;
  text-align: center;
  outline-width: 2ch;
}

#kobe {
  height: 40px;
  width: 40px;
  z-index: 2;
  transform: scaleX(1);
  -webkit-user-select: none; /* Safari */        
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE10+/Edge */
  user-select: none; /* Standard */
}

#trophy {
  height: 25px;
  width: 25px;
  z-index: 1;
}

.food-Ball {
  height: 25px;
  width: 25px;
  z-index: 1;
  animation: 0.3s ease-in ballBounce 1;
  background: url('../assets/ball.png');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
}


@keyframes ballBounce {
  0% {
    transform: translateY(-100px);
  }
  
  10% {
    transform: translateY(-80px);
  }
  20% {
    transform: translateY(-60px);
  }
  30% {
    transform: translateY(-40px);
  }
  40% {
    transform: translateY(-20px);
  }
  50% {
    transform: translateY(0px);
  }
  60% {
    transform: translateY(-10px);
  }
  70% {
    transform: translateY(-20px);
  }
  80% {
    transform: translateY(-10px);
  }
  90% {
    transform: translateY(-5px);
  }
  100% {
    transform: translateY(0px);
  }
}

.dropIn {
  animation: ballBounce 1s ease-in 0 1 normal both;
}

.controller {
  display: flex;
  justify-content: center;
  margin-top: 5px;
  z-index: 100;
}

.game-operators {
  display: flex;
  position: absolute;
  left: -120px;
  bottom: 40px;
  flex-direction: column;
}

.rest-btn {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  font-family: 'Graduate', cursive;
  border: none;
  background: none;
  font-size: 18px;
  left: -10px;

  background-color: rgb(85,37,130);
  padding: 1.2em 1.6em;
  height: 40px;
  color: rgba(255,255,255,1);
  font-size: 0.7em;
  transition: background-color 0.3s, box-shadow 0.3s, color 0.3s;
  margin: 1em;
  box-shadow: inset 0 0 1em rgba(145, 49, 213, 0.5), 0 0 1em rgba(152, 64, 211, 0.5);
  border: rgb(47, 18, 75) solid 2px;
}


.rest-btn:hover, .start-btn:hover {
  cursor: pointer;
  background-color: rgb(85,37,130);
  box-shadow: inset 0 0 0 rgba(106, 84, 127, 0.5), 0 0 1.5em rgba(127, 79, 146, 0.7);
}

#question-mark-btn {
  display: flex;
  position: relative;
  font-family: 'Graduate', cursive;
  cursor: pointer;
  font-size: 28px;
  width: 15px;
  border-radius: 50%;
  top: 530px;
  left: -270px;
  justify-content: center;
  align-items: center;

  background-color: rgb(85,37,130);
  width: 40px;
  height: 40px;
  color: rgba(255,255,255,1);
  font-size: 0.7em;
  transition: background-color 0.3s, box-shadow 0.3s, color 0.3s;
  margin: 1em;
  box-shadow: inset 0 0 1em rgba(145, 49, 213, 0.5), 0 0 1em rgba(152, 64, 211, 0.5);
  border: rgb(47, 18, 75) solid 2px;
}

#question-mark-btn:hover {
  background-color: rgb(85,37,130);
  box-shadow: inset 0 0 0 rgba(106, 84, 127, 0.5), 0 0 1.5em rgba(127, 79, 146, 0.7);
}

.background-numbers{
  font-family: 'Graduate', cursive;
  font-size: 150px;
  -webkit-text-stroke-color: whitesmoke;
  -webkit-text-stroke-width: 1px;
  color: rgba(0, 0, 0, 0.268);
  z-index: -1;
  -webkit-user-select: none; /* Safari */        
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE10+/Edge */
  user-select: none; /* Standard */
}

#eight {
  position: absolute;
  left: -130px;
  top: -260px;
  z-index: -1;
  font-size: 300px;
}

#twentyfour {
  position: absolute;
  right: -250px;
  top: -150px;
  font-size: 300px;
  letter-spacing: -25px;
}

.main-container > h1 {
  position: absolute;
  font-size: 120px;
  -webkit-text-stroke-color: whitesmoke;
  -webkit-text-stroke-width: .2px;
  top: -80px;
  z-index: -1;
}

.board-num-div{
  width: 400px;
  height: 400px;
  position: relative;
  top: 100px;
}

.score-div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: absolute;
  top: 10px;
  right: -170px;
  z-index: -1;
}

.score-board, .high-score {
  margin: 0;
}

.score-sign {
  display: flex;
  margin-top: 10px;
  margin-bottom: 5px;
}


#right-btn, #left-btn, #up-btn, #down-btn {
  cursor: pointer;
  border: 1px solid rgb(85,37,130);
  color:white;
  font-family:Helvetica, sans-serif;
  font-weight:bold;
  font-size:36px;
  text-align: center;
  text-decoration:none;
  background-color:#FFA12B;
  display:block;
  position:relative;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
  text-shadow: 0px 1px 0px #000;
  filter: dropshadow(color=#000, offx=0px, offy=1px);
  -webkit-box-shadow:inset 0 1px 0 #FFE5C4, 0 10px 0 #915100;
  -moz-box-shadow:inset 0 1px 0 #FFE5C4, 0 10px 0 #915100;
  box-shadow:inset 0 1px 0 #FFE5C4, 0 10px 0 #915100;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  border-radius: 5px;
}

#right-btn:active, #left-btn:active, #up-btn:active, #down-btn:active,
#right-btn:focus-visible, #left-btn:focus-visible, #up-btn:focus-visible, #down-btn:focus-visible {
  top:10px;
  background-color:#F78900;
  -webkit-box-shadow:inset 0 1px 0 #FFE5C4, inset 0 -3px 0 #915100;
  -moz-box-shadow:inset 0 1px 0 #FFE5C4, inset 0 -3px 0 #915100;
  box-shadow:inset 0 1px 0 #FFE5C4, inset 0 -3px 0 #915100;
}

#right-btn, #left-btn, #up-btn, #down-btn{
  -webkit-user-select: none; /* Safari */        
  -moz-user-select: none; /* Firefox */
  -ms-user-select: none; /* IE10+/Edge */
  user-select: none; /* Standard */}

#right-btn {
  width: 150px;
  order: 4;
  height: 106px;
}

#left-btn {
  width: 150px;
  height: 106px;
  order: -1;
}

#up-btn {
  width: 250px;
  height: 45px;
  padding-bottom: 50px;
}

#down-btn {
  height: 45px;
  width: 250px;
  padding-bottom: 50px;
}

.ref {
  display: flex;
  position: relative;
  justify-content: center;
  right: 190px;
  top: -92px;
  z-index: 3;
}

.ref-img {
  scale: 75%;
  position: absolute;
  z-index: 3;
}

.ref h1 {
  color: rgb(85,37,130);
  font-size: 65px;
  -webkit-text-stroke-color: whitesmoke;
  -webkit-text-stroke-width: .2px;
  position: absolute;
  display: flex;
  top: 280px;
  left: -195px;
  text-shadow: 7px 7px 10px rgb(0, 0, 0);
  z-index: 3;
}

.win img{
  display: flex;
  position: relative;
  height: 450px;
  width: auto;
  justify-content: center;
  align-items: center;
  right: -300px;
  top: -350px;
  z-index: 4;
}

.win h1 {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 50px;
  color: rgb(85,37,130);
  -webkit-text-stroke-color: whitesmoke;
  -webkit-text-stroke-width: .2px;
  bottom: 345px;
  right: 245px;
  text-shadow: 7px 7px 10px rgb(0, 0, 0);
  z-index: 5;
}

.win h1:last-child {
  right: 550px;
  bottom: 250px;
}

.how-to-play {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 650px;
  height: 650px;
  border: 1px solid rgb(255, 255, 255);
  background-color: rgb(114, 87, 139);
  box-shadow: black 10px 10px 70px;
  z-index: 10;

}

p {
  font-size: 28px;
  padding: 10px;
  padding-top: 60px;
  color: rgb(0, 0, 0);
}


.how-to-play > .ext-how-to-play {
  display: flex;
  position: relative;
  left: 617px;
  justify-content: center;
  align-items: center;
  height: 40px;
  width: 80px;
  color: blue;
}

p > a {
  color: rgb(58, 58, 58);
  font-size: 29px;
}

a:hover {
  cursor: pointer;
}


/* !!!!!!! Mobile phone design !!!!!!! */

@media (max-width: 480px) {
  body {
    overflow-x: hidden;
    max-width: 85%;
    
  }

  .board {
    display: grid;
    grid-template-columns: auto-repeate(16, 11vmin);
    grid-template-rows: auto-repeate(16, 11vmin);
    max-width: 300px;
    max-height: 300px;
    border: 1px solid rgb(255, 255, 255);
    background-color: rgb(85,37,130);
    box-shadow: black 10px 10px 70px;
    z-index: 1;
    left: 50px;
  }

  .sqr {
    width: 18.75px;
    height: 18.75px;
    font-size: 8vmin;
    text-align: center;
    outline-width: 2ch;
  }

  .board-num-div{
    width: 300px;
    height: 300px;
    position: relative;
    top: 100px;
    left: 20px;
  }

  .game-container {
    display: flex;
    position: relative;
    top: -80px;
  }

  #eight {
    display: none;
  }

  #twentyfour {
    display: none;
  }

  .score-div {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 307px;
    left: 150px;
    width: 10%;
    height: 80%;
  }
  
  .score-board, .high-score {
    margin: 10px;
    margin-right: 30px;
    font-size: 24px;
    margin-top: 20px;
  }
  
  .score-sign {
    display: flex;
    margin-top: 20px;
    margin-bottom: 5px;
    font-size: 20px;
  }

  .rest-btn {
    font-family: 'Graduate', cursive;
    left: 140px;
    top: 265px;
  }

  .updown {
    max-height: 90px;
  }
  
  #right-btn {
    width: 80px;
    height: 90px;
    order: 4;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #left-btn {
    width: 80px;
    height: 90px;
    order: -1;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #up-btn {
    width: 150px;
    height: 44px;
    padding-bottom: 42px;
    font-size: 28px;
  }

  #down-btn {
    height: 44px;
    font-size: 28px;
    width: 150px;
    padding-bottom: 42px;
  }

  .main-container > h1 {
    position: absolute;
    font-size: 90px;
    -webkit-text-stroke-color: whitesmoke;
    -webkit-text-stroke-width: .2px;
    top: -30px;
    left: 9px;
    z-index: -1;
  }

  .ref {
    display: flex;
    position: relative;
    justify-content: center;
    right: 120px;
    top: -129px;
    z-index: 3;
  }
  
  .ref-img {
    scale: 55%;
    position: absolute;
    z-index: 3;
  }
  
  .ref h1 {
    color: rgb(85,37,130);
    font-size: 55px;
    -webkit-text-stroke-color: whitesmoke;
    -webkit-text-stroke-width: .2px;
    position: absolute;
    display: flex;
    top: 280px;
    left: -175px;
    text-shadow: 7px 7px 10px rgb(0, 0, 0);
    z-index: 3;
  }

  .win img{
    display: flex;
    position: absolute;
    height: 350px;
    width: auto;
    justify-content: center;
    align-items: center;
    right: -50px;
    top: 60px;
  }
  
  .win h1 {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 35px;
    color: rgb(85,37,130);
    -webkit-text-stroke-color: whitesmoke;
    -webkit-text-stroke-width: .2px;
    bottom: 255px;
    left: 1px;
    text-shadow: 7px 7px 10px rgb(0, 0, 0);
  }

  .win h1:last-child {
    display: flex;
    position: absolute;
    font-size: 50px;
    color: rgb(85,37,130);
    -webkit-text-stroke-color: whitesmoke;
    -webkit-text-stroke-width: .2px;
    bottom: 300px;
    left: 190px;
    text-shadow: 7px 7px 10px rgb(0, 0, 0);
  }


  #question-mark-btn {
    font-size: 28px;
    top: 560px;
    left: 85px;
    bottom: 340px;
    left: 85px;
    justify-content: center;
    align-items: center;

    background-color: rgb(85,37,130);
    color: antiquewhite;
    width: 40px;
    height: 40px;
  }

  .how-to-play {
    display: none;
    position: absolute;
    top: 310px;
    left: 180px;
    width: 350px;
    height: 600px;
    text-align: center;
    justify-content: center;
    border: 1px solid rgb(255, 255, 255);
    background-color: rgb(114, 87, 139);
    box-shadow: black 10px 10px 70px;
    
  }

  p {
    font-size: 19px;
    padding: 10px;
    padding-top: 45px;
    color: rgb(0, 0, 0);
  }

  p > a {
    color: rgb(58, 58, 58);
    font-size: 22px;
  }

  a:hover {
    cursor: pointer;
  }
  
  .how-to-play > .ext-how-to-play {
    display: flex;
    position: relative;
    left: 320px;
    justify-content: center;
    align-items: center;
    height: 40px;
    width: 90px;
    color: blue;
  
  }


}

body { 
  touch-action: manipulation; 
}