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

body {
  font-family: Arial, Helvetica, sans-serif;
  width: 100vw;
  height: 100vh;
  background: #333;
  overflow: hidden;
  position: relative;
}

.modal {
  width: 100vw;
  height: 100vh;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 500;
  display: grid;
  place-content: center;
}

.info {
  width: 30vw;
  height: 30vh;
  background-color: white;
  color: #333;
  padding: 1rem;
  border-radius: 0.5rem;
  opacity: 0.9;
  text-align: center;
  display: grid;
  place-content: center;
}

.text {
  font-size: 1.8rem;
  font-weight: bold;
}

.hidden {
  display: none;
}

.active {
  outline-offset: 5px;
}

.top {
  height: 150px;
}

h1 {
  color: #fff;
  text-align: center;
  margin-top: 1rem;
}

.scores {
  text-align: center;
  margin-top: 2rem;
  font-size: 2rem;
  color: white;
}

.btn {
  display: block;
  margin: 1rem auto;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.board {
  width: 700px;
  height: 700px;
  margin: 1rem auto;
  display: grid;
  gap: 5px;
  grid-template-columns: repeat(10, 1fr);
  grid-template-rows: auto;
}

.field {
  width: 70px;
  height: 70px;
  border: 1px solid #fff;
  border-radius: 3px;
  display: grid;
  place-content: center;
  color: white;
  position: relative;
  background-color: rgb(54, 53, 54);
}

.field::before {
  content: attr(data-fieldId);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1rem;
  width: 50px;
  height: 50px;
  display: none;
}

/* Checkered pattern */
.board > .field:nth-child(-2n + 10),
.board > .field:nth-child(10) ~ div:nth-child(-2n + 19),
.board > .field:nth-child(20) ~ div:nth-child(-2n + 30),
.board > .field:nth-child(30) ~ div:nth-child(-2n + 39),
.board > .field:nth-child(40) ~ div:nth-child(-2n + 50),
.board > .field:nth-child(50) ~ div:nth-child(-2n + 59),
.board > .field:nth-child(60) ~ div:nth-child(-2n + 70),
.board > .field:nth-child(70) ~ div:nth-child(-2n + 79),
.board > .field:nth-child(80) ~ div:nth-child(-2n + 90),
.board > .field:nth-child(90) ~ div:nth-child(-2n + 99) {
  background-color: #667;
}

.color-ball {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  position: relative;
  z-index: 100;
  box-shadow: 3px 3px 10px 10px rgba(0, 0, 0, 0.3);
}

@media screen and (min-width: 601px) and (max-width: 1800px) {
  body {
    overflow-y: auto;
  }
  .board {
    width: 500px;
    height: 500px;
    gap: 3px;
  }

  .field {
    width: 50px;
    height: 50px;
  }

  .field::before {
    width: 30px;
    height: 30px;
  }
  .active {
    outline-offset: 4px;
  }
  .color-ball {
    width: 30px;
    height: 30px;
  }
}

@media screen and (max-width: 600px) {
  body {
    overflow-y: auto;
  }
  .board {
    width: 300px;
    height: 300px;
    gap: 2px;
  }

  .field {
    width: 30px;
    height: 30px;
  }

  .field::before {
    width: 20px;
    height: 20px;
  }

  .color-ball {
    width: 20px;
    height: 20px;
  }

  .active {
    outline-offset: 3px;
  }
}
