* {
  box-sizing: border-box;
  font-family: 'Preahvihear', sans-serif;
}

h1 {
  text-align: center;
  font-size: 50px;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: -6px 5px 3px rgb(13, 48, 101);
  letter-spacing: 0.02em;
}

body {
  margin: 0;
  background-image: url('../assets/sea\ 1.png');
  background-size: cover;
  background-position: center;
  height: 100vh;
  backdrop-filter: blur(2px);
  overflow: auto;
}

#grid-wrapper {
  text-align: center;
}

#grid {
  box-shadow: 0 0 30px 0 rgba(32, 42, 68, 0.8);
  height: 400px;
  width: 400px;
  display: flex;
  flex-wrap: wrap;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
}


#instructions {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 0;
  width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(0, 0, 51)
}

#instructions .controls {
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  padding: 1rem;
  border-radius: 10px;
  min-width: 326px;
  max-width: 326px;
  align-items: center;
  flex-wrap: wrap;
  flex-direction: row;
  justify-content: center;
}


#instructions .loses,
#instructions .wins {
  display: flex;
  background: rgba(255, 255, 255, 0.9);
  padding: 1rem;
  border-radius: 10px;
  min-width: 30vw;
  width: fit-content;
  align-items: center;
  flex-wrap: wrap;
  flex-direction: column;
}

.controls img {
  height: 60px;
  width: max-content;
  align-self: center;
  margin: 10px;
}

.controls>p,
.controls>img {
  padding: 0.5rem 2rem 0.2rem;
  letter-spacing: 0.02em;
}

.end-game .loses,
.end-game .wins p:first-child {
  text-transform: uppercase;
  font-size: 20px;
  font-weight: bold;
}

#button .start,
#button #restart {
  margin: 10px;
  background-color: rgb(184 210 250 / 38%);
  border: 2px solid rgba(184, 210, 250, 0.9);
  border-radius: 50% 70%;
  color: rgb(9, 57, 130);
  padding: 15px;
  font-weight: bold;
  animation: color-change 2s infinite;
}

@keyframes color-change {
  0% {
    color: rgb(11, 34, 69);
  }

  50% {
    color: rgb(30, 87, 174);
  }

  100% {
    color: rgb(112, 165, 245);
  }
}

#controls-wrapper {
  display: flex;
  justify-content: space-evenly;
  color: white;
  flex-direction: row;
  margin: 0 auto;
  flex-wrap: nowrap;
  margin-top: 10px;
  align-items: center;
}

#lives {
  display: flex;
  gap: 0.5rem;
}

#lives img {
  width: 30px;
  height: auto;
}

#score{
  width: 40px;
}

.turtle {
  background-image: url('../assets/turtle.png');
  background-color: transparent;
  background-size: 65%;
  background-position: center;
  background-repeat: no-repeat;
}

.crab {
  background-image: url('../assets/crab.png');
  background-size: 75%;
  background-position: cover;
  background-repeat: no-repeat;
}

.seagull {
  background-image: url('../assets/seagull.png');
  background-size: contain;
  background-position: bottom;
  background-repeat: no-repeat;
}

.octopus {
  background-image: url('../assets/octopus\ .png');
  background-size: 60%;
  background-position: center;
  background-repeat: no-repeat;
}

.shark {
  background-image: url('../assets/shark.png');
  background-size: 65%;
  background-position: center;
  background-repeat: no-repeat;
}


.cell {
  display: inline-block;
}

.cell.firstrow {
  background-color: rgba(9, 57, 130, 0.9);
}

.cell.secondrow {
  background-color: rgba(12, 74, 167, 0.8);
}

.cell.thirdrow {
  background-color: rgba(112, 165, 245, 0.8);
}

.cell.fourthrow {
  background-color: rgba(184, 210, 250, 0.85);

}

.cell.fifthrow {
  background-color: rgb(239, 225, 194);
}

.cell.sixthrow {
  background-color: rgb(234, 215, 174);
}

.cell.seventhrow {
  background-color: rgb(228, 205, 154);
}

.cell.eighthrow {
  background-color: rgb(223, 195, 134);
}

.cell.ninthrow {
  background-color: rgb(218, 185, 114);
  ;
}

.cell.tenthrow {
  background-color: rgb(212, 175, 94);
}

.cell.eleventhrow {
  background-color: rgba(83, 163, 63, 0.9);
}

@media (min-width: 800px) {
  #grid {
    height: 600px;
    width: 600px
  }
}