/*
  black: rgb(0, 23, 50); #001732;
  orange: rgb(241, 117, 78); #f1754e;
  bg-color: rgb(216, 238, 232);  #d8eee8;
  bg-dark-color: rgb(203, 224, 221); #cbe0dd;
  clicked-cell: rgb(157, 197, 199); #9dc5c7;
  transparent red: rgba(241, 117, 78, 0.7);

	font-family: 'Darker Grotesque', sans-serif;
	font-family: 'Press Start 2P', cursive;
*/

/* # Generic */
@import url('https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap'); 

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

body {
  padding: 16px;
  font-family: 'Darker Grotesque', sans-serif;
  line-height: 1;
  color: rgb(0, 23, 50);
  background-color: #637074;
}

.game-container {
  width: calc(480px + 4px);
  position: relative;
  left: 30%;
}

/* # Game Panel */

h1 {
  font-size: 40px;
 text-align: center;
 text-decoration: underline;
}
.total-bomb{
  color: #89043D;
}
.winning {
  color: #18F2B2;
}
.score {
  display: flex;
  justify-content: space-between;
  font-size: 32px;
  /* font-weight: 700; */
}

/* # Game Grid */

.game-board {
  border: 2px solid rgb(0, 23, 50);
  position: relative;
}

.grid {
  height: calc((48px * 10) + 4px);
  display: flex;
  flex-wrap: wrap;
}
.life {
  position: absolute;
  left: 26rem;
   top: 4.5rem;
   margin-left: 0.1px;
  border-radius: 1px solid black;
  animation-duration: 3s;
 
}

@keyframes blink-vibrate {
  0% {
    opacity: 0;
    transform: translate(0, 0);
  }
  50% {
    opacity: 1;
    transform: translate(0, 2px); 
  }
  100% {
    opacity: 0;
    transform: translate(0, 0);
  }
}

.blink-vibrate {
  animation: blink-vibrate 1s linear infinite;
}

.cell {
  width: 48px;
  height: 48px;
  cursor: pointer;
  outline: 1px dashed black;
}

.cell-clicked {
  background-color: rgb(157, 197, 199);
  cursor: not-allowed;
}

.cell-bomb {
  background-color: rgb(241, 117, 78);
  background-image: url('./images/bomb.png');
  background-size: contain;
  cursor: not-allowed;
  /* background-position: center; */
  /* background-repeat: no-repeat; */
}

/* # Game over */

.end-game-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(241, 117, 78, 0.7);

  align-items: center;
  justify-content: center;
  display: flex;
  flex-direction: column;
  text-align: center;
  gap: 16px;
}

.win {
  background-color: rgba(78, 241, 187, 0.7);
}

.end-game-text {
  font-size: 48px;
  font-family: 'Press Start 2P', cursive;
  text-transform: uppercase;
  
}

.btn {
  font-size: 24px;
  font-family: 'Darker Grotesque', sans-serif;
  padding: 4px 20px 8px 20px;
  /* width: 50%; */
  cursor: pointer;
  text-transform: uppercase;
  border: 2px solid rgb(0, 23, 50);
}

.btn:hover {
  background-color: rgb(203, 224, 221);
}

/* # Utilities */

.hidden {
  display: none;
}

.info {
  position: fixed;
  background-color: transparent;
  top: 95%;
  left: 94%;
 
}
#Instructions {
  position: fixed;
  background: linear-gradient(to bottom, #e1ffb6, #ade17d);
  left: 41%;
  top: 40%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  width: 400px;
  height: 400px;
  border: 2px solid #1d2e0d;
  border-radius: 20px;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  color: #89f589;
  overflow: scroll;
  transition: all 0.3s ease-out;
  background-color: #f8f8f8;
  color: #333;
  font-family: 'VT323', monospace;
  transform: scale(0);
}

#Instructions::-webkit-scrollbar {
  width: 8px;
}

#Instructions::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}

#Instructions::-webkit-scrollbar-track {
  background-color: #f8f8f8;
}

#Instructions p {
  margin: 16px;
}
#Instructions h2 {

  border-radius: 8px 8px 0 0;
  background: #0086f3ae;
  box-shadow: 2px 2px #0789b2;
  font-size: 28px;
  margin: 0;  
  padding: 12px;
  text-align: center; 
}
#Instructions li {
  line-height: 1.6;
  list-style-type: '\1F4A3';
  padding: 8px 16px;
}
#Instructions::-webkit-scrollbar {
  width: 8px;
}

#Instructions::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}

#Instructions::-webkit-scrollbar-track {
  background-color: #f8f8f8;
}

#Instructions p {
  margin: 16px;
}

#Instructions li b {
  color: #ff4d4d;
}

#Instructions a {
  color: #89f589;
  text-decoration: none;
}

#Instructions a:hover {
  text-decoration: underline;
}


  
@media only screen and (max-width: 767px) {
  .game-container {
    margin: 0;
    padding: 0;
    position: absolute;
    left: 0;
    transform: translateX(-10%); 
  }
  .game-panel {
    position: relative;
    padding: 1rem 1rem 1rem 1rem;
    margin: 1rem 1rem 1rem 1rem;
    left: 3rem;
  }
  .score-counter{
    position: relative;
    right: 3rem;
  }
  .info{
    position: relative;
    left: 95%;
   
  }
  #Instructions {
   
    left: 1rem;
  }
  .life {
    display: flex;
    left: 1rem;
    margin-left: 19rem;
    margin-top: 1rem;
  }
}
