/* ОБНУЛЕНИЕ СТИЛЕЙ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  border: 0;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}
li {
  list-style: none;
}
a,a:visited {
  text-decoration: none;
}
a:hover {
  text-decoration: none;
}

h1,h2,h3,h4,h5,h6 {
  font-weight: inherit;
  font-size: inherit;
  margin: 0;
}
img {
  vertical-align: top;
}
html,
body {
  height: 100%;
  scroll-behavior:smooth;
}
html {
  font-style: normal;
  font-weight: 400;
}
body {
  line-height: 1;
  color: 	#B22222;
  background-color:#fff5ee;
  font-size: 30px;
    font-family: Arial, sans-serif;
}
body._scroll {
  overflow: hidden;
}
.dark {
  background-color: #a0a0a0;
  color:	black;
}
.wrapper,
.header {
  margin: 0 auto;

}
.header {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  max-width: 1280px;
}
.menu__wrapper {
  display: flex;
  justify-content: center;
  padding:0 15px;
}
.header__burger {
  z-index: 10;
  display: none;
  position: relative;
  width: 30px;
  height: 22px;
  cursor: pointer;
  align-self:center;
}
.header__burger::before,
.header__burger::after,
.header__burger>span {
  right:0 ;
  position:absolute;
  height: 2px;
  width: 100%;
  transition: all 0.3s ease 0s;
  background-color: #00008d;
}
.header__burger::before,
.header__burger::after {
  content:'';
}
.header__burger:before {
  top: 0;
}
.header__burger:after {
  bottom: 0;
}
.header__burger >span {
  top: 11px;
  transform: scale(1) translate(0px, -50%);
}
.menu__list {
  display: flex;
  gap: 36px;
}

.lingth__btn {
  display: block;
  width: 72px;
  height: 38px;
  border-radius:20px;
  background: #bfbfbf;
  z-index: 0;
  margin: 0;
  padding: 0;
  border: none;
  cursor: pointer;
  position: relative;
  transition-duration: 600ms; 
}
.lingth__btn::after {
  content: "";
  height: 32px;
  width: 32px;
  background: #fff; 
  border-radius:20px;
  top: 3px;
  left: 3px; 
  transition-duration: 500ms; 
  position: absolute;
  z-index: 1;
}
.mute {
  background: url(../icon/mute.svg);
  background-size: contain;
  background-repeat: no-repeat;
  width: 50px;
  height: 100%;
}
.no-mute {
  background: url(../icon/mute_off.svg);
  background-size: contain;
  background-repeat: no-repeat;
  width: 50px;
  height: 100%;
}
.settings__wrapper {
  display: flex;
  gap: 20px;
}
.switch {
  background: #118c4e;
}
.switch:after {
  left: 37px;
}
.overlay,
.overlay-lost,
.overlay-win,
.overlay-res {
  position:fixed;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(41, 41, 41);
  display: none;
}
._active {
  display: block;
  z-index: 50;
}
.res__table{
  gap: 15px;
  text-align: center;
  font-size: 20px;
}
.game-settings__wrapper,
.lost__wrapper,
.win__wrapper,
.res__wrapper {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80vw;
  background-color:#fff5ee;
  border-radius: 9px;
  justify-content: left;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items:center;
}
.title__numb {
  line-height: 120%;
  text-align: center;
}
.title__wrapper{
  display: flex;
  justify-content: space-evenly;
  align-items:center;
  gap: 1vw;
  text-align: center;
  font-size: 20px;
}
.close {
  position: absolute;
  top: -52px;
  right: -26px;
  width: 52px;
  height: 52px;
  border: 2px solid #F1CDB3;
  border-radius: 50%;
  text-align: center;
  display: flex;
  justify-content: center;
  cursor: pointer;
}
.close::after,
.close::before {
  content: '';
  display: block;
  width: 2px;
  margin-top: 4px;
  height: 40px;
  background-color:#fff5ee;
}
.close::after {
  transform: rotate(45deg);
}
.close::before {
  transform: rotate(-45deg);
}
.game-settings__title {
  text-align: center;
}
.game-settings__subtitle {
  display: flex;
  gap: 15px;
  flex-direction: column;
  justify-content: space-around;
  text-align: center;
}
.subtitle__level {
  display: flex;
  flex-direction: column;
  gap: 15px;
  align-items:center;
}
.btn {
  max-width: 500px;
  padding: 10px;
  height: 50px;
  cursor:pointer;
  border:none;
  background: green;
  color:#fff;
  font-family: Arial;
  letter-spacing:3px;
  border-radius:40px;
  outline:none;
  transition:0.2s;
  box-shadow:0 7px 0 darkgreen;
}
.btn:hover {
  color:#d5d5d5;
}
input:valid {
  border-color: #118c4e;
  color:green;
}
input:invalid {
  border-color:red;
  color:red;
}
.active-btn {
  transform:translateY(5px);
  box-shadow:none;
}
.main {
  max-width: 1280px;
  display: flex;
  margin: 0 auto;
  flex-direction: column;
  align-items:center;
}
.game__wrapper {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.game__title {
  display: flex;
  justify-content: space-between;
}
.game__field {
  display: flex;
  flex-wrap: wrap;
}
.square {
  width: 25px;
  height: 25px;
  background-color:yellowgreen;
  border:#00008d 1px solid;
}

.open {
  background-color:#118c4e;
}
.red {
  background-color:red;
}
.flag {
  background: url(../icon/flag.svg);
  background-size: contain;
  background-repeat: no-repeat;
}
.mine {
  background: url(../icon/mine.svg);
  background-size: contain;
  background-repeat: no-repeat;
}
.open1{
  color:black;
}
.open2{
  color:rgb(0,0,139);
}
.open3{
  color:rgb(255,20,147);
}
.open4{
  color:rgb(224,255,255);
}
.open5 {
  color: rgb(255,215,0);
}
.open6{
  color:rgb(153,50,204);
}
.open7 {
  color: rgb(218,112,214);
}
.open8{
color:rgb(255,69,0);
}
.open9{
  color: 	rgb(255,0,0);
}
.table__res {
  margin-top: 25px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  text-align: center;
  font-size: 20px;
}
.size__result,
.mine__result,
.time__result,
.count__result {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
@media(hover:hover) {
  .menu__items {
    cursor: pointer;
  }
}
.num-mine,
.num-click,
.timer {
  text-align: center;
}
.num-click__title,
.timer__title,
.num-mine__title {
  font-size: 15px;
}
@media (width<780px) {
  .header__wpapper {
    position: relative;
  }
.square {
  width: 18px;
  height: 18px;
  text-align: center;
  vertical-align: middle;
}
  .header__menu {
    width: 100%;
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: 100%;
    background: 	#FFE4E1;
    transform: translateX(100%);
    transition: all 2s; 
  }
  .header__menu._active {
    width: 100%;
    transform: translate(0);
    font-size: 26px;
    transition: transform 1.5s; 
    z-index: 5;
  }
  ._fon:before {
    content: '';
    position: fixed; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%;
    z-index: 3;
  }
  .menu__link {
    width: fit-content;
    line-height: 160%;
  }
  .menu__wrapper {
    justify-content: end;
  }
  .menu__list {
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-self:center;
    align-items:center;
  }

  .header__burger {
    display: block;
    transition: all 1s;
  }
  .header__burger._active {
    transform: rotate(-90deg);
    transition: all 1s;
    color: #fff;
  }
  .dark__menu {
    background-color:#708090;
  }
  .game-settings__subtitle,
  .game-settings__title {
    font-size: 5vw;
  }
  .title__wrapper,
  .res__items{
    font-size: 15px;
  }
  .game__field {
    font-size: 15px;
  }
}