* {
  box-sizing: border-box;
}

body {
  height: 100vh;
  margin: 0 auto;
  font-family: 'Orbitron', sans-serif;
  background-image: url(../assets/images/wood.jpeg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: white;
}

header {
  height: 20vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

h1 {
  padding: 30px, 0, 10px, 0;
  margin: 30px, 0;
  font-size: 90px;
  font-weight: 800;
  text-shadow: 0px 0px 15px #000000;
  color: white;
}

.score-section {
  height: 5vh;
  display: flex;
  justify-content: center;
  align-items: center;
  text-shadow: 0px 0px 15px black;
  font-weight: 600;
  font-size: 32px;
}

.grid-wrapper {
  height: 55vh;
  display: flex;
  justify-content: space-around;
  align-items: center;
  /* border: 3px solid white; */
}

/* Player grid CSS */

.grid-player {
  cursor: default;
  align-items: center;
  box-shadow: 0 0 25px 0 rgba(0, 0, 0, 1);
  display: flex;
  flex-wrap: wrap;
  height: 100%;
  justify-content: center;
  height: 500px;
  width: 500px;
  margin: 20px;
  color: rgba(0, 0, 0, 0);
  background: linear-gradient(58deg, rgba(39, 181, 218, 1) 5%, rgba(17, 113, 221, 1) 19%, rgba(125, 184, 255, 1) 30%, rgba(6, 178, 201, 1) 54%, rgba(6, 26, 170, 1) 78%, rgba(64, 135, 215, 1) 89%, rgba(107, 124, 247, 1) 97%); 
  /* background-size: 200% 200%;
  animation: Move 12s ease infinite; */
}

/* @keyframes Move {
  0% {
    background-position: 0% 52%
  }
  50% {
    background-position: 100% 49%
  }
  100% {
    background-position: 0% 52%
  }
} */

.grid-player div.whole-grid-player {
  border: 1px dashed rgba(57, 53, 54, 0.2);
  flex-grow: 1;
  height: 10%;
  width: 10%;
}

.grid-player p {
  margin: 0;
  padding: 0;
  float: left;
}

.grid-player div.ship {
  border: none;
}

/* Computer grid CSS */

.grid-comp {
  cursor: cell;
  align-items: center;
  box-shadow: 0 0 20px 0 rgba(0, 0, 0, 1);
  display: flex;
  flex-wrap: wrap;
  height: 100%;
  justify-content: center;
  height: 500px;
  width: 500px;
  margin: 20px;
  color: rgba(0, 0, 0, 0);
  background: rgb(39, 181, 218);
  background: linear-gradient(263deg, rgba(39, 181, 218, 1) 5%, rgba(17, 113, 221, 1) 19%, rgba(125, 184, 255, 1) 30%, rgba(6, 178, 201, 1) 54%, rgba(6, 26, 170, 1) 78%, rgba(64, 135, 215, 1) 89%, rgba(107, 124, 247, 1) 97%);
  /* background-size: 200% 200%;
  animation: Move 12s ease infinite; */
}

.grid-comp div.whole-grid-comp {
  border: 1px dashed rgba(57, 53, 54, 0.2);
  flex-grow: 1;
  height: 10%;
  width: 10%;
}

.grid-comp div.comp-ship {
  height: 50px;
  width: 50px;
  background-repeat: no-repeat;
  background-size: contain;
}

.grid-comp .ship-hit::before {
  content: '';
  height: 50px;
  width: 50px;
  position: absolute;
  background-image: url(../assets/images/explosion.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.grid-player .ship-hit::before {
  content: '';
  height: 50px;
  width: 50px;
  position: absolute;
  background-image: url(../assets/images/explosion.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.missed-shot {
  background-image: url(../assets/images/miss.png);
  background-repeat: no-repeat;
  background-size: contain;
}

/* Buttons styles */

section.buttons {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 600px;
  /* width: 240px; */
  /* border: 3px solid white; */
}

button {
  border-radius: 20px;
  margin: 20px;
  border: 0;
  border-bottom: 3px solid greenyellow;
  padding: 10px;
  width: 200px;
  color: black;
  background-color: white;
  font-family: inherit;
  font-size: 16px;
  text-align: center;
  align-items: center;
  outline: none;
}

button:hover {
  color: greenyellow;
  background-color: black;
  border-bottom: 3px solid white;
}

button:active {
  color: red;
}

button.muted {
  color: red;
  background-color: black;
  border-bottom: 3px solid white;
}

/* Game Messages styles */

section.game-messages {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  height: 20vh;
  /* border: 3px solid white; */
}

.game-message {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40%;
  height: 80%;
  margin: 30px;
  border: 30px outset rgb(30, 20, 30);
  border-radius: 10px;
  background: rgb(138, 123, 111);
  background: radial-gradient(circle, rgba(138, 123, 111, 1) 0%, rgba(57, 53, 54, 1) 98%);
  font-size: 20px;
  color: greenyellow;
  padding: 30px;
}

.ship-sunk-message {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 40%;
  height: 80%;
  margin: 30px;
  border: 30px outset rgb(30, 20, 30);
  border-radius: 10px;
  background: rgb(138, 123, 111);
  background: radial-gradient(circle, rgba(138, 123, 111, 1) 0%, rgba(57, 53, 54, 1) 98%);
  font-size: 20px;
  color: red;
  padding: 30px;
}

/* Instructions Page */

ul {
  border: 50px outset rgb(30, 20, 30);
  border-radius: 25px;
  box-shadow: 0 0 25px 0 rgba(0, 0, 0, 1);
  background: rgb(138, 123, 111);
  background: radial-gradient(circle, rgba(138, 123, 111, 1) 0%, rgba(57, 53, 54, 1) 98%);
  padding: 60px;
  font-size: 24px;
  color: greenyellow;
}

div.instructions-board {
  display: none;
  height: 70vh;
  width: 1000px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto
}

/* Winner Page */

div.winner-board {
  display: none;
  height: 70vh;
  width: 70vw;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 0 auto
}

.winners-message {
  border: 50px outset rgb(30, 20, 30);
  border-radius: 25px;
  box-shadow: 0 0 25px 0 rgba(0, 0, 0, 1);
  background: rgb(138, 123, 111);
  background: radial-gradient(circle, rgba(138, 123, 111, 1) 0%, rgba(57, 53, 54, 1) 98%);
  padding: 60px;
  font-size: 24px;
  color: greenyellow;
}

/*  SHIP IMAGES --------------------------------------------------- */

/* Destroyer Vertical*/

.destroyer-vert-one {
  background-image: url(../assets/images/destroyer/destroyer-v1.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.destroyer-vert-two {
  background-image: url(../assets/images/destroyer/destroyer-v2.png);
  background-repeat: no-repeat;
  background-size: contain;
}

/* Destroyer Horizontal*/

.destroyer-hori-one {
  background-image: url(../assets/images/destroyer/destroyer-h1.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.destroyer-hori-two {
  background-image: url(../assets/images/destroyer/destroyer-h2.png);
  background-repeat: no-repeat;
  background-size: contain;
}

/* Submarine Vertical*/

.submarine-vert-one {
  background-image: url(../assets/images/submarine/submarine-v1.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.submarine-vert-two {
  background-image: url(../assets/images/submarine/submarine-v2.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.submarine-vert-three {
  background-image: url(../assets/images/submarine/submarine-v3.png);
  background-repeat: no-repeat;
  background-size: contain;
}

/* Submarine Horizontal*/

.submarine-hori-one {
  background-image: url(../assets/images/submarine/submarine-h1.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.submarine-hori-two {
  background-image: url(../assets/images/submarine/submarine-h2.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.submarine-hori-three {
  background-image: url(../assets/images/submarine/submarine-h3.png);
  background-repeat: no-repeat;
  background-size: contain;
}

/* Aircraft Carrier Vertical*/

.carrier-vert-one {
  background-image: url(../assets/images/carrier/carrier-v1.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.carrier-vert-two {
  background-image: url(../assets/images/carrier/carrier-v2.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.carrier-vert-three {
  background-image: url(../assets/images/carrier/carrier-v3.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.carrier-vert-four {
  background-image: url(../assets/images/carrier/carrier-v4.png);
  background-repeat: no-repeat;
  background-size: contain;
}

/* Aircraft Carrier Horizontal*/

.carrier-hori-one {
  background-image: url(../assets/images/carrier/carrier-h1.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.carrier-hori-two {
  background-image: url(../assets/images/carrier/carrier-h2.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.carrier-hori-three {
  background-image: url(../assets/images/carrier/carrier-h3.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.carrier-hori-four {
  background-image: url(../assets/images/carrier/carrier-h4.png);
  background-repeat: no-repeat;
  background-size: contain;
}

/* Battle Cruiser Vertical*/

.battle-vert-one {
  background-image: url(../assets/images/battleship/Battleship-v1.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.battle-vert-two {
  background-image: url(../assets/images/battleship/Battleship-v2.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.battle-vert-three {
  background-image: url(../assets/images/battleship/Battleship-v3.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.battle-vert-four {
  background-image: url(../assets/images/battleship/Battleship-v4.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.battle-vert-five {
  background-image: url(../assets/images/battleship/Battleship-v5.png);
  background-repeat: no-repeat;
  background-size: contain;
}

/* Battle Cruiser Horizontal*/

.battle-hori-one {
  background-image: url(../assets/images/battleship/Battleship-h1.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.battle-hori-two {
  background-image: url(../assets/images/battleship/Battleship-h2.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.battle-hori-three {
  background-image: url(../assets/images/battleship/Battleship-h3.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.battle-hori-four {
  background-image: url(../assets/images/battleship/Battleship-h4.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.battle-hori-five {
  background-image: url(../assets/images/battleship/Battleship-h5.png);
  background-repeat: no-repeat;
  background-size: contain;
}

/* MEGA Cruiser Vertical*/

.mega-vert-one {
  background-image: url(../assets/images/megacruiser/megacruiser-v1.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.mega-vert-two {
  background-image: url(../assets/images/megacruiser/megacruiser-v2.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.mega-vert-three {
  background-image: url(../assets/images/megacruiser/megacruiser-v3.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.mega-vert-four {
  background-image: url(../assets/images/megacruiser/megacruiser-v4.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.mega-vert-five {
  background-image: url(../assets/images/megacruiser/megacruiser-v5.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.mega-vert-six {
  background-image: url(../assets/images/megacruiser/megacruiser-v6.png);
  background-repeat: no-repeat;
  background-size: contain;
}

/* MEGA Cruiser Horizontal*/

.mega-hori-one {
  background-image: url(../assets/images/megacruiser/megacruiser-h1.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.mega-hori-two {
  background-image: url(../assets/images/megacruiser/megacruiser-h2.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.mega-hori-three {
  background-image: url(../assets/images/megacruiser/megacruiser-h3.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.mega-hori-four {
  background-image: url(../assets/images/megacruiser/megacruiser-h4.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.mega-hori-five {
  background-image: url(../assets/images/megacruiser/megacruiser-h5.png);
  background-repeat: no-repeat;
  background-size: contain;
}

.mega-hori-six {
  background-image: url(../assets/images/megacruiser/megacruiser-h6.png);
  background-repeat: no-repeat;
  background-size: contain;
}



/* Media queries */

@media (max-height:900px) { 

  .score-section {
    font-size: 26px;
  }

  .grid-player {
    height: 400px;
    width: 400px;
  }

  .grid-comp {
    height: 400px;
    width: 400px;
  }

  .grid-comp div.comp-ship {
    height: 40px;
  width: 40px;
  }

  .grid-comp .ship-hit::before {
    height: 40px;
    width: 40px;
  }

  .grid-player .ship-hit::before {
    height: 40px;
    width: 40px;
  }

  div.instructions-board {
    width: 800px;
  }

  ul {
    font-size: 16px;
    border: 30px outset rgb(30, 20, 30);
  }

  .game-message {
    font-size: 16px;
    border: 20px outset rgb(30, 20, 30);
  }

  .ship-sunk-message {
    font-size: 16px;
    border: 20px outset rgb(30, 20, 30);
  }

  button {
    width: 150px;
    font-size: 12px;
  }
}


@media (max-width:1280px) { 

  .score-section {
    font-size: 26px;
  }

  .grid-player {
    height: 400px;
    width: 400px;
  }

  .grid-comp {
    height: 400px;
    width: 400px;
  }

  .grid-comp div.comp-ship {
    height: 40px;
  width: 40px;
  }

  .grid-comp .ship-hit::before {
    height: 40px;
    width: 40px;
  }

  .grid-player .ship-hit::before {
    height: 40px;
    width: 40px;
  }

  div.instructions-board {
    width: 800px;
  }

  ul {
    font-size: 16px;
    border: 30px outset rgb(30, 20, 30);
  }

  .game-message {
    font-size: 16px;
    border: 20px outset rgb(30, 20, 30);
  }

  .ship-sunk-message {
    font-size: 16px;
    border: 20px outset rgb(30, 20, 30);
  }

  button {
    width: 150px;
    font-size: 12px;
  }
}

@media (max-width: 1150px) { 

  h1 {
    font-size: 60px;
  }

  .score-section {
    font-size: 24px;
  }

  .grid-player {
    height: 320px;
    width: 320px;
  }

  .grid-comp {
    height: 320px;
    width: 320px;
  }

  .grid-comp div.comp-ship {
    height: 32px;
  width: 32px;
  }

  .grid-comp .ship-hit::before {
    height: 32px;
    width: 32px;
  }

  .grid-player .ship-hit::before {
    height: 32px;
    width: 32px;
  }

  div.instructions-board {
    width: 700px;
  }

  ul {
    font-size: 12px;
    border: 30px outset rgb(30, 20, 30);
  }

  .game-message {
    font-size: 14px;
    border: 15px outset rgb(30, 20, 30);
  }

  .ship-sunk-message {
    font-size: 14px;
    border: 15px outset rgb(30, 20, 30);
  }

  section.buttons {
    height: 480px;
  }

  button {
    margin: 10px;
    width: 120px;
    font-size: 10px;
  }

}