* {
  box-sizing: border-box;

}

body {
  background: #16222A;  /* fallback for old browsers */
  background: -webkit-linear-gradient(to right, #3A6073, #16222A);
  background: linear-gradient(to right, #3A6073, #16222A);

  color: #fff;  
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 62.5%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

nav {
  margin: 0;
  padding: 1em 1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 10vh;
  width: 100%;
}

.logo {
  height: 80%;
  margin-left: 10px;
}

ul{
  list-style: none;
  margin-right: 10px;
}

a {
  text-decoration: none;
  color: #fff;
  font-size: 1rem;
}

a:hover {
  color: #3A6073;
}

.title {
  display: flex;
  justify-content: center;
  height: 10vh;
  width: 80%;
  font-size: 0.5rem;
}

h1 {
  margin: 0;
}

.game-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  row-gap: 5px;
  height: 80vh;
  width: 80%;
}

canvas {
  border: 4px solid #000;
  border-radius: 8px;
  background-color: #C3C5D6;
}

.text-container {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  align-items: center;
}

.start-btns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto;
  margin-top: 5px;
  width: 100%;
}

.start-btns button{
  background-color: transparent;
  border-radius: 50%;
  border-color: #C3C5D6;
  color: #fff;
  margin: 5px 20px;
  padding: 0 10px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s;
}

.messages {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

h3 {
  margin: 0;
}

.btns {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0 auto;
  margin-top: 5px;
  width: 100%;
}

button {
  background-color: #050C47;
  border-radius: 8px;
  border-color: #C3C5D6;
  color: #fff;
  margin: 5px 5px;
  padding: 0 20px;
  width: 100px;
  height: 20px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

button:hover {
  background-color: #333333;
}

#up, #down { margin-left: 100%; margin-right: 100%; }

p {
  display: block;
  margin: 0;
  width: 100%;
}

.modal {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60vw;
  height: 50vh;
  background: #16222A;  /* fallback for old browsers */
  background: -webkit-linear-gradient(to right, #3A6073, #16222A);
  background: linear-gradient(to left, #3A6073, #16222A);
  border-radius: 10px;
}

.modal_close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 20px;
  height: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #16222A;
  border-radius: 50%;
  background: #fff;
  color: #16222A;
  font-size: 0.8rem;
  cursor: pointer;
}

.modal_title {
  background: #F1F2B5;
  color: #16222A;
  width: 100%;
  height: 15%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  border-top-left-radius: 10px;
}

.modal_message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  text-align: center;
  height: 40%;
  font-size: 1rem;
}

.modal_message span {
  font-size: 3.5rem;
}

.modal_btns {
  display: flex;
  flex-wrap: wrap;
  height: 45%;
  justify-content: center;
  align-items: center;
}

.modal_btns button {
  background: #333333;
  width: 80%;
  max-width: 320px;
  height: 60px;
  font-size: 1.2rem;
}

@media (min-width: 440px) {

  .game-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    width: 100%;
  }
}
@media (min-width: 620px) {
  
  nav {
    width: 80%;
  }
  .logo {
    height: 50px;
    margin-left: 10px;
  }
  a { 
    font-size: 1.5rem;
  }
  .title {
    font-size: 1rem;
  }
  .messages {
    font-size: 1rem;
  }
  .text-container {
    height: 100%;
  }
  .start-btns button{
    width: 80px;
    height: 80px;
  }
}