body {
  margin: 0;
  background-color: #F3F3F3;
  overflow-x: hidden;
}

*, *::before, *::after {
  font-family: 'Montserrat', sans-serif;
  box-sizing: border-box;
}

.splash-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 66vh;
}

.splash-title {
  font-family: 'Bangers', cursive;
  font-size: 10rem;
}

.splash-battleship-image {
  position: absolute;
  bottom: 5vh;
  left: 20vw;
  width: 100%;
  transform: rotateY(180deg);
  pointer-events: none;
  opacity: .25;
}

.btn {
  font-size: inherit;
  background-color: hsl(30, 100%, 50%);
  padding: .5em 1em;
  outline: none;
  border: none;
  text-decoration: none;
  cursor: pointer;
  border-radius: .2em;
  color: #333;
}

.btn:hover, .btn:focus {
  background-color: hsl(30, 100%, 40%);
}

.splash-btn {
  font-size: 2rem;
  margin-left: 2rem;
}

.splash-btn:first-child {
  margin-left: 0;
}

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

.battleship-grid {
  margin: 2vmin;
  display: grid;
  background-color: hsl(200, 100%, 50%);
  grid-template-rows: repeat(10, 4.6vmin);
  grid-template-columns: repeat(10, 4.6vmin);
}

.grid-computer > .taken,
.grid-computer > .boom {
  background-color: hsl(200, 100%, 50%) !important;
  border-radius: 0 !important;
}

.taken,
.ship {
  position: relative;
  background-color: hsl(0, 0%, 80%);
}

.taken.start.vertical,
.taken.start.vertical::before {
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
}

.taken.end.vertical,
.taken.end.vertical::before {
  border-bottom-left-radius: 50%;
  border-bottom-right-radius: 50%;
}

.taken.start.horizontal,
.taken.start.horizontal::before {
  border-top-left-radius: 50%;
  border-bottom-left-radius: 50%;
}

.taken.end.horizontal,
.taken.end.horizontal::before {
  border-top-right-radius: 50%;
  border-bottom-right-radius: 50%;
}

.taken.vertical::before,
.taken.horizontal::before {
  content: '';
  position: absolute;
  border: .3vmin solid white;
  top: -1px;
  bottom: -1px;
  left: -1px;
  right: -1px;
}

.taken.horizontal::before {
  animation: ripplesY 3s linear infinite;
  border-left: none;
  border-right: none;
}

.taken.vertical::before {
  animation: ripplesX 3s linear infinite;
  border-top: none;
  border-bottom: none;
}

@keyframes ripplesX {
  0% {
    opacity: 1;
    transform: scaleX(1);
  }

  100% {
    opacity: 0;
    transform: scaleX(1.5);
  }
}

@keyframes ripplesY {
  0% {
    opacity: 1;
    transform: scaleY(1);
  }

  100% {
    opacity: 0;
    transform: scaleY(1.5);
  }
}

.grid-display {
  display: flex;
}

.ship > div {
  width: 4.6vmin;
  height: 4.6vmin;
}

.ship {
  display: flex;
  flex-wrap: wrap;
  margin: 1vmin;
  width: calc(4.6vmin * var(--width, 1));
  height: calc(4.6vmin * var(--height, 1));
  border-radius: 2.3vmin;
}

.battleship-grid div {
  border: 1px solid hsla(0, 0%, 100%, .2);
}

.destroyer-container {
  --width: 2;
}

.destroyer-container-vertical {
  --height: 2;
  --width: 1;
}

.submarine-container,
.cruiser-container {
  --width: 3;
}

.submarine-container-vertical,
.cruiser-container-vertical {
  --height: 3;
  --width: 1;
}

.battleship-container {
  --width: 4;
}

.battleship-container-vertical {
  --height: 4;
  --width: 1;
}

.carrier-container {
  --width: 5;
}

.carrier-container-vertical {
  --height: 5;
  --width: 1;
}

.hidden-info {
  font-size: 1.5rem;
  align-items: center;
  flex-direction: column;
}

.info-text {
  margin: 1rem;
}

.miss,
.boom {
  display: flex;
  justify-content: center;
  align-items: center;
}

.boom::after,
.miss::after {
  content: '';
  position: absolute;
  border-radius: 100%;
  width: 2vmin;
  height: 2vmin;
}

.miss::after {
  background-color: white;
}

.boom::after {
  background-color: red;
}

.miss::before {
  content: '';
  position: absolute;
  animation: hit .2s ease-out forwards;
  border: 1vmin solid white;
  border-radius: 100%;
  width: 2vmin;
  height: 2vmin;
}

.boom {
  animation: boom .2s ease-out forwards;
}

@keyframes hit {
  0% {
    opacity: 1;
    transform: scale(0);
  }

  100% {
    opacity: 0;
    transform: scale(4);
  }
}

@keyframes boom {
  0% {
    background-color: red;
  }

  100% {
    background-color: hsl(0, 0%, 80%);
  }
}

.player {
  margin: 2vmin;
}

.connected, .ready {
  font-weight: normal;
  opacity: .25;
  text-decoration: line-through;
}

.connected.active,
.ready.active {
  opacity: 1;
  text-decoration: none;
}