* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-size: 10px;
  font-family: 'Courier New', Courier, monospace;
  font-weight: 800;
}

body {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

body.dark {
  background-color: black;
}

.wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  width: fit-content;
  height: fit-content;
}

.title {
  font-size: 10rem;
  text-align: center;
}

.title.dark {
  color: white;
}

.game-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* -----------------GAME MENU */

.game-menu {
  padding: 5px 20px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  width: 100%;
}

.btn_score {
  user-select: none;
  font-size: 2.8rem;
  border: 2px solid black;
  border-radius: 5px;
  padding: 10px 15px;
  transition: 0.3s;
}

.btn_score.dark {
  color: white;
  border: 2px solid white;
}

.btn_score:hover {
  cursor: pointer;
  color: white;
  background-color: black;
  transition: 0.3s;
}

.btn_score:hover.dark {
  color: black;
  background-color: white;
  border: 2px solid black;
}

/* -----------------GAME STAT */

.game-stat {
  padding: 5px 20px;
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 600px;
}

.time_wrapper, .clicks_wrapper, .mines_wrapper, .flags_wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.time-icon, .clicks-icon, .mines-icon, .flags-icon {
  width: 40px;
  height: 40px;
  background-size: cover;
}

.time-icon {
  background-image: url('./assets/icons/clock.png');
}

.time-icon.dark {
  filter: invert(1);
}

.clicks-icon {
  background-image: url('./assets/icons/click.png');
}

.clicks-icon.dark {
  filter: invert(1);
}

.mines-icon {
  background-image: url('./assets/icons/mine.png');
}

.mines-icon.dark {
  filter: invert(1);
}

.flags-icon {
  background-image: url('./assets/icons/flag.png');
}

.flags-icon.dark {
  filter: invert(1);
}

.game-stat-text {
  display: flex;
  text-align: center;
  justify-content: center;
  align-items: center;
  font-size: 2.5rem;
  width: 55px;
}

.game-stat-text.dark {
  color: white;
}

.title_stat {
  font-size: 1.5rem;
}

.game-field {
  position: relative;
  border: 2px solid black;
  width: fit-content;
  height: fit-content;
  background-color: white;
  transition: all 0.3s;
}

.game-field.dark {
  border: 2px solid white;
  background-color: rgb(68, 68, 68);
  transition: all 0.3s;
}

.field10 {
  display: grid;
  grid-template-columns: repeat(10, 45px);
}

.field10>button {
  border: 1px solid black;
  background-color: white;
  cursor: pointer;
  height: 45px;
  font-size: 3.5rem;
  font-weight: 800;
  user-select: none;
}

.field10>button:disabled {
  background-color: rgba(7, 86, 0, 0.184);
}

.field15 {
  display: grid;
  grid-template-columns: repeat(15, 30px);
}

.field15>button {
  border: 1px solid black;
  background-color: white;
  cursor: pointer;
  height: 30px;
  font-size: 2.7em;
  font-weight: 800;
  user-select: none;
}

.field15>button:disabled {
  background-color: rgba(7, 86, 0, 0.184);
}

.field25 {
  display: grid;
  grid-template-columns: repeat(25, 18px);
}

.field25>button {
  border: 1px solid black;
  background-color: white;
  cursor: pointer;
  height: 18px;
  font-size: 1.7rem;
  user-select: none;
}

.field25>button:disabled {
  background-color: rgba(7, 86, 0, 0.184);
}

.cell-mine {
  background-size: cover;
  background-image: url(./assets/icons/mine.png);
}

.cell-mark {
  background-size: cover;
  background-image: url(./assets/icons/flag.png);
}

.cell1 {
  color: blue;
}

.cell2 {
  color: green;
}

.cell3 {
  color: red;
}

.cell4 {
  color: darkblue;
}

.cell5 {
  color: brown;
}

.cell6 {
  color: aqua;
}

.cell7 {
  color: black;
}

.cell8 {
  color: white;
}

/* -----------------POP UP SETTINGS */

.popupSettings_wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s;
}

.popupSettings_wrapper-active {
  background-color: rgba(0, 0, 0, 0.5);
  visibility: visible;
  opacity: 1;
  transition: all 0.3s;
}

.popupSettings {
  padding: 50px 90px;
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  width: fit-content;
  height: fit-content;
  background: #FAFAFA;
  border-radius: 5px;
  color: black;
}

.popupSettings.dark {
  background-color: black;
  color: white;
  border: 1px solid white;
}

.settings-title {
  color: inherit;
  text-align: center;
  font-size: 5rem;
}

.size_wrapper {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.minesSet_wrapper {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}

.size-title {
  color: inherit;
  font-size: 2rem;
}

.size-label, .mines-label, .mines-input {
  margin-left: 5px;
  font-size: 1.8rem;
  width: 50px;
}

.second-settings_wrapper {
  display: flex;
  width: 100%;
  padding: 0 30px;
  padding-top: 10px;
  justify-content: space-between;
}

.sound-img, .theme-img {
  background-size: cover;
  height: 30px;
  width: 30px;
}

.sound-img {
  background-image: url('./assets/icons/sound-on.png');
  transition: all 0.3s;
}

.sound-img:hover {
  cursor: pointer;
}

.sound-img-active {
  background-image: url('./assets/icons/sound-off.png');
  transition: all 0.3s;
}

.sound-img.dark {
  filter: brightness(0) invert(1);
}

.theme-img {
  background-image: url('./assets/icons/sun.png');
  transition: all 0.3s;
}

.theme-img:hover {
  cursor: pointer;
}

.theme-img.dark {
  background-image: url('./assets/icons/moon.png');
  filter: brightness(0) invert(1);
  transition: all 0.3s;
}

.btn-save {
  margin-top: 10px;
  font-size: 2.5rem;
  padding: 10px 15px;
  border: 1.5px solid black;
  border-radius: 5px;
  transition: all 0.3s;
}

.btn-save:hover {
  cursor: pointer;
  color: white;
  background-color: black;
  transition: all 0.3s;
}

.btn-save.dark {
  border: 1.5px solid white;
}

.btn-save:hover.dark {
  color: black;
  background-color: white;
}

/* -----------------POP UP SCORE */

.popupScore_wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s;
}

.popupScore_wrapper-active {
  background-color: rgba(0, 0, 0, 0.5);
  visibility: visible;
  opacity: 1;
  transition: all 0.3s;
}

.popupScore {
  padding: 50px 90px;
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  width: fit-content;
  height: fit-content;
  background: #FAFAFA;
  border-radius: 5px;
  color: black;
}

.popupScore.dark {
  background-color: black;
  color: white;
  border: 1px solid white;
}

.score_wrapper {
  display: flex;
  flex-direction: column;
}

.scoreRow {
  display: flex;
  gap: 5px;
  width: 100%;
  justify-content: space-between;
}

.scoreCount {
  font-size: 1.8rem;
}

/* -----------------POP UP LOSE */

.popupLose_wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  visibility: visible;
  opacity: 1;
  transition: all 0.3s;
}

.popupLose {
  padding: 50px 90px;
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  width: fit-content;
  height: fit-content;
  background: #FAFAFA;
  border-radius: 5px;
  color: black;
}

.popupLose.dark {
  background-color: black;
  color: white;
  border: 1px solid white;
}

.btn-try-again {
  margin-top: 10px;
  font-size: 2.5rem;
  padding: 10px 15px;
  border: 1.5px solid black;
  border-radius: 5px;
  transition: all 0.3s;
}

.btn-try-again:hover {
  cursor: pointer;
  color: white;
  background-color: black;
  transition: all 0.3s;
}

.btn-try-again.dark {
  border: 1.5px solid white;
}

.btn-try-again:hover.dark {
  color: black;
  background-color: white;
}

/* -----------------POP UP LOSE */

.popupWin_wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  visibility: visible;
  opacity: 1;
  transition: all 0.3s;
}

.popupWin {
  padding: 50px 90px;
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  width: fit-content;
  height: fit-content;
  background: #FAFAFA;
  border-radius: 5px;
  color: black;
}

.popupWin.dark {
  background-color: black;
  color: white;
  border: 1px solid white;
}

.your-score {
  text-align: center;
  font-size: 2rem;
  max-width: 200px;
}

.score-name-label, .score-name-input{
  font-size: 2rem;
  max-width: 150px;
}

.safe-screen{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

@media (max-width: 900px ) {
  .title {
    font-size: 7rem;
  }

  .btn_score {
    user-select: none;
    font-size: 2rem;
    border: 2px solid black;
    border-radius: 5px;
    padding: 5px;
    transition: 0.3s;
  }

  .popupSettings,
  .popupScore,
  .popupLose,
  .popupWin{
    padding: 10px 50px;
  }

  .btn-try-again,
  .btn-save{
    font-size: 1.5rem;
    padding: 5px;
  }

  .settings-title {
    font-size: 3rem;
  }

  .time-icon, .clicks-icon, .mines-icon, .flags-icon {
    width: 20px;
    height: 20px;
  }
  .game-stat-text {
    font-size: 1.5rem;
    width: 15px;
  }
}