@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Pacifico&display=swap');

html {
  overflow: hidden;
}

body {
  animation: fadein 2s;
  background:#fff url(../img/light-wool.png);
  font-family: 'Open Sans', sans-serif;
  user-select: none;
  overflow: hidden;
}

#gameboard {
  background: #f1f1f1;
  border: 1px solid #e9e9e9;
  box-shadow: inset 5px 5px 5px 0px #e9e9e9;
  cursor: none;
  display: flex;
  flex-wrap: wrap;
  height: 500px;
  margin: 0 auto;
  margin-top: 20px;
  width: 500px;
  position: relative;
}

#game-title {
  color: #333;
  font-family: 'Pacifico', cursive;
  font-size: 48px;
  font-weight: 400;
  text-align: center;
}

#level {
  color: #333;
  font-size: 48px;
  font-weight: 700;
  margin-top: 40px;
  text-align: center;
}

#timer {
  color: #333;
  font-size: 32px;
  font-weight: 700;
  margin-top: 10px;
  text-align: center;
}

.tile {
  box-sizing: border-box;
  /*border: 1px solid rgba(175, 175, 175, 0.1);*/
}

.tile.hero { animation: hero-pop 160ms ease-out; }
@keyframes hero-pop {
  0% { transform: scale(0.9) }
  60% { transform: scale(1.05) }
  100% { transform: scale(1) }
}

.hole,
.troll {
  background-color: rgba(47, 47, 46, 0.1);
  box-shadow: inset 0 0 0 20px rgba(47, 47, 46, 0.1);
}

.fish {
  background-color: transparent;
  border: 5px solid rgba(47, 47, 46, 0.2);
  overflow: hidden;
}

.wave {
  position:relative;
  width:100%;
  height:100%;
  background:#4ED3F1;
  border-radius:0;
  box-shadow:inset 0 0 50px rgba(0,0,0,.5);
  background-image: url(../img/fish.gif);
  background-repeat: no-repeat;
  background-position: 50% 70%;
  background-size: 50%;
}
.wave:before,
.wave:after {
  content:'';
  position:absolute;
  width:160%;
  height:160%;
  top:0;
  left:50%;
  transform:translate(-50%,-75%);
  background:#000;
}
.wave:before {
  border-radius:45%;
  background:rgba(241, 241, 241, 1);
  animation: waves 5s linear infinite;
}
.wave:after {
  border-radius: 40%;
  background: rgba(241, 241, 241,.5);
  animation: waves 10s linear infinite;
}

@keyframes waves {
  0%{
     transform:translate(-50%,-75%) rotate(0deg);
  }
  100%{
     transform:translate(-50%,-75%) rotate(360deg);
  }
}

/* shake animation */
.shake {animation: shake 0.3s; animation-iteration-count: 1;}

/* version info */
#version-info {
  bottom: 0px;
  color: #666;
  font-size: 8px;
  position: absolute;
}

/* levels */
#levels {
  margin: 0 auto;
  margin-top: 40px;
  text-align: center;
  width: 980px;
}

#levels .one-fourth {
  background: rgba(255, 255, 255, 0.5);
  border: 2px dotted rgba(0, 0, 0, 0.6);
  border-top-right-radius: 15px;
  border-bottom-left-radius: 15px;
  box-shadow: 3px 3px 0 3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  display: block;
  font-weight: 600;
  margin-bottom: 20px;
  padding: 20px 0 0 0;
  width: 21%;
  transition-duration: 0.5s;
}

#levels .one-fourth[data-url="g1.html"]:hover {background: rgba(243, 209, 221, 0.4);}
#levels .one-fourth[data-url="g2.html"]:hover {background: rgba(71, 183, 220, 0.2);}
#levels .one-fourth[data-url="g3.html"]:hover {background: rgba(142, 211, 153, 0.3);}
#levels .one-fourth[data-url="g4.html"]:hover {background: rgba(247, 222, 58, 0.2);}
#levels .one-fourth[data-url="g5.html"]:hover {background: rgba(189, 134, 210, 0.2);}
#levels .one-fourth[data-url="g6.html"]:hover {background: rgba(254, 169, 72, 0.2);}
#levels .one-fourth[data-url="g7.html"]:hover {background: rgba(75, 86, 210, 0.2);}
#levels .one-fourth[data-url="g8.html"]:hover {background: rgba(207, 10, 10, 0.2);}
#levels .one-fourth[data-url="g9.html"]:hover {background: rgba(0, 0, 0, 0.2);}
#levels .one-fourth[data-url="g10.html"]:hover {background: rgba(0, 178, 202, 0.2);}
#levels .one-fourth[data-url="g11.html"]:hover {background: rgba(195, 112, 47, 0.2);}
#levels .one-fourth[data-url="g12.html"]:hover {background: rgba(255, 119, 188, 0.2);}
#levels .one-fourth[data-url="g13.html"]:hover {background: rgba(91, 42, 134, 0.2);}
#levels .one-fourth[data-url="g14.html"]:hover {background: rgba(216, 219, 222, 0.4);}
#levels .one-fourth[data-url="g15.html"]:hover {background: rgba(222, 187, 0, 0.2);}
#levels .one-fourth[data-url="g16.html"]:hover {background: rgba(205, 127, 50, 0.2);}
#levels .one-fourth[data-url="g17.html"]:hover {background: rgba(220, 20, 60, 0.2);}
#levels .one-fourth[data-url="g18.html"]:hover {background: rgba(173, 235, 178, 0.2);}
#levels .one-fourth[data-url="g19.html"]:hover {background: rgba(246, 196, 146, 0.2);}
#levels .one-fourth[data-url="g20.html"]:hover {background: rgba(199, 234, 70, 0.2);}
#levels .one-fourth[data-url="g21.html"]:hover {background: rgba(243, 229, 171, 0.2);}
#levels .one-fourth[data-url="g22.html"]:hover {background: rgba(140, 228, 255, 0.2);}

.completed {border: 2px solid rgba(0, 0, 0, 0.6) !important; pointer-events: none;}
.locked {opacity: 0.4; pointer-events: none;}

#levels .one-fourth a {
  color: #444;
  font-size: 20px;
  text-decoration: none;
}

#levels .one-fourth:active {
  box-shadow: none;
  position: relative;
  left: 3px;
  top: 3px;
  transition-duration: 0s;
}

#levels .one-fourth p {
  color: #555;
  font-size: 16px;
  font-weight: 400;
  margin-top: 0px;
}

/* menu */
#menu {
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

#menu li {
  list-style-type: none;
}

#menu li button {
  color: #aaa;
  font-weight: 300;
  border: 0;
  background: none;
  font-size: 16px;
  font-family: 'Open Sans', sans-serif;
  cursor: pointer;
}

#menu li button:active {
  position: relative;
  top: 2px;
}

#back-btn {
  position: absolute;
  top: 50px;
  left: 50px;
}

#back-btn a {
  color: #333;
  font-size: 32px;
  font-weight: 700;
  text-decoration: none;
}

#back-btn a:active {
  position: relative;
  top: 3px;
}

/* TIMER SWITCH */
#switch-container {
  display: block;
  margin: 0 auto;
  margin-top: 30px;
  width: 110px;
}

.switch-label {
  color: #777;
  margin-right: 5px;
  position: relative;
  top: -7px;
}

.switch {
  display: inline-block;
  height: 24px;
  position: relative;
  width: 50px;
}

.switch input {
  display: none;
}

.slider {
  background-color: #ccc;
  bottom: 0;
  cursor: pointer;
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  transition: 0.4s;
}

.slider::before {
  background-color: #fff;
  bottom: 4px;
  content: "";
  height: 16px;
  left: 4px;
  position: absolute;
  transition: 0.4s;
  width: 15px;
}

input:checked + .slider {
  background-color: #66bb6a;
}

input:checked + .slider::before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round::before {
  border-radius: 50%;
}

/* MODAL BOX */
.swal-modal {
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid rgba(0, 0, 0, 0.6);
  border-radius: 0px;
  border-top-right-radius: 15px;
  border-bottom-left-radius: 15px;
  box-shadow: 3px 3px 0 3px rgba(0, 0, 0, 0.1);
}

.swal-title {
  color:#444;
  font-weight:600;
  margin-top:-5px !important;
}

.swal-text {
  color:#444;
  font-size:18px;
}

.swal-button {
	background:rgba(0, 0, 0, 0.8);
  border:2px solid #fff;
  border-radius: 0px;
  border-top-right-radius: 10px;
  border-bottom-left-radius: 10px;
  color:#fff;
  font-weight:normal;
  font-size:18px;
  padding:5px 20px;
}
.swal-button:focus {box-shadow:none;}
.swal-button:hover {background:#000 !important;}
.swal-button:active {background:#000; box-shadow:none; position:relative; top:2px;}

/* SPACER */
div.spacer {clear:both; display:block; height:10px;}

/* COLUMNS */
.one-half {width:48%;}
.one-third {width:30.66%;}
.two-third {width:65.33%;}
.one-fourth {width:22%;}
.three-fourth {width:74%;}
.one-fifth {width:16.8%;}
.two-fifth {width:37.6%;}
.three-fifth {width:58.4%;}
.four-fifth {width:67.2%;}
.one-sixth {width:13.33%;}
.five-sixth {width:82.67%;}
.one-half, .one-third, .two-third, .three-fourth, .one-fourth, .one-fifth, .two-fifth, .three-fifth, .four-fifth, .one-sixth, .five-sixth {position:relative; margin-right:4%; float:left;}
.last {margin-right:0 !important; clear:right;}

/* animations */
@keyframes shake {
  0% { transform: translate(1px, 1px) rotate(0deg); }
  10% { transform: translate(-1px, -2px) rotate(-1deg); }
  20% { transform: translate(-3px, 0px) rotate(1deg); }
  30% { transform: translate(3px, 2px) rotate(0deg); }
  40% { transform: translate(1px, -1px) rotate(1deg); }
  50% { transform: translate(-1px, 2px) rotate(-1deg); }
  60% { transform: translate(-3px, 1px) rotate(0deg); }
  70% { transform: translate(3px, 1px) rotate(-1deg); }
  80% { transform: translate(-1px, -1px) rotate(1deg); }
  90% { transform: translate(1px, 2px) rotate(0deg); }
  100% { transform: translate(1px, -2px) rotate(-1deg); }
}

@keyframes fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (max-width: 768px) {
  #gameboard {
    margin-top: 120px;
    width: 300px;
    height: 300px;
  }

  #levels {
    width: 300px;
  }

  #levels .one-fourth {
    width: 95%;
  }

  #level {
    font-size: 24px;
    text-align: right;
    margin-right: 25px;

  }

  #back-btn {
    top: 48px;
    left: 25px;
  }

  #back-btn a {
    font-size: 24px;
  }

  #timer {
    font-size: 24px;
  }

  #menu {
    margin-bottom: 20px;
  }

  #version-info {
    display: none;
  }
}
