* {
  margin: 0;
  padding: 0;
}
#title {
  text-align: center;
  padding: 20px;
}
main {
  display: flex;
  justify-content: center;
  gap: 50px;
}
button {
  padding: 10px;
}
#message-container {
  width: 230px;
  height: 50px;
  border: 5px solid;
  padding: 5px;
  margin: auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
#message {
  font-weight: bolder;
  color: red;
  text-transform: capitalize;
  text-align: center;
  width: 100%;
  height: 100%;
}
h2 {
  text-align: center;
  padding: 10px;
  margin: auto;
}
.board {
  border: 2px solid black;
  height: 40vh;
  width: 40vh;
  margin: auto;
  display: grid;
  /* the 1fr below its just so the square can extend the bit that's left, to fit perfectly */
  grid-template-columns: repeat(auto-fit, minmax(calc(40vh / 10), 1fr));
}
.water-square,
.pc-water-square,
.ship-square,
.missed-square,
.hit-square {
  border: 1px solid black;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 0;
}
.water-square,
.pc-water-square {
  background-color: rgb(36, 98, 117);
}
.hit-square {
  background-color: rgb(149, 0, 0);
}
.missed-square {
  background-color: rgb(15, 40, 48);
}
.ship-square {
  background-color: rgb(75, 75, 75);
}
.water-square:hover,
.pc-water-square:hover,
.ship-square:hover,
.missed-square:hover,
.hit-square:hover,
.board:hover {
  cursor: crosshair;
}
.garage {
  margin: auto;
  margin-top: 20px;
  padding: 5px 20px;
  width: 70vw;
  background-color: rgb(198, 198, 198);
  border: 2px solid black;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
.ships-container {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
#buttons {
  padding: 10px;
  display: flex;
  justify-content: center;
  gap: 10px;
}
.btns {
  padding: 5px;
  width: 80px;
  text-align: center;
  font-weight: bold;
}
.ship-frame {
  width: max-content;
  height: max-content;
  display: flex;
  flex-direction: row;
}
.drag-over {
  border: dashed 1px red;
}
.ship-piece {
  display: inline-block;
  height: calc(40vh / 10);
  width: calc(40vh / 10);
  border: 1px solid black;
  background-color: rgb(75, 75, 75);
}
@media only screen and (max-width: 800px) {
  main {
    flex-direction: column;
    gap: 10px;
  }
  .board {
    height: 70vw;
    width: 70vw;
    grid-template-columns: repeat(auto-fit, minmax(calc(70vw / 10), 1fr));
  }
}
