/* ================================= main start ================================= */
.main {
  display: flex;
  align-items: center;
  justify-content: center;
}

/*==========  playfields start  ==========*/
.playfields {
  display: flex;
  justify-content: center;
  flex: 1;
  position: relative;
  height: -webkit-fill-available;
  align-items: center;
  max-width: 70rem;
  width: 100%;
}

.playfield {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 70 / 70;
  width: calc(100% / 2.6);
  display: flex;
  justify-content: center;
}

.challenge-1 .playfield {
  width: calc(100% / 2.4);
}

.challenge-2 .playfield {
  width: calc(100% / 2.1);
}

.challenge-3 .playfield {
  width: calc(100% / 2.7);
}

/*==========  playfields end  ==========*/

/*==========  tiles start  ==========*/
.tiles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 70 / 70;
  width: calc(100% / 2.6);
  display: flex;
}

.challenge-1 .tiles {
  width: calc(100% / 2.4);
}

.challenge-2 .tiles {
  width: calc(100% / 2.1);
}

.challenge-3 .tiles {
  width: calc(100% / 2.7);
}

.tile {
  position: absolute;
  width: 25%;
  height: 25%;
  /* width: 21.4%; */
  /* height: auto; */
  transform: translate(-50%, -50%) scale(1);
  pointer-events: none;
  cursor: default;
  z-index: 5;
}

.mobile.challenge-1 .tile {
  width: 28%;
  height: 28%;
}

.challenge-2 .tile {
  width: 21.5%;
  height: 21.5%;
}

.challenge-3 .tile {
  width: 29.5%;
  height: 29.5%;
}

.tile_1 {
  top: 13%;
  left: -68%;
}

.tile_2 {
  top: 13%;
  left: -41%;
}

.tile_3 {
  top: 13%;
  left: -14%;
}

.tile_4 {
  top: 40%;
  left: -68%;
}

.tile_5 {
  top: 40%;
  left: -41%;
}

.tile_6 {
  top: 40%;
  left: -14%;
}

.tile_7 {
  top: 67%;
  left: -68%;
}

.tile_8 {
  top: 67%;
  left: -41%;
}

.tile_9 {
  top: 67%;
  left: -14%;
}

.tile_10 {
  top: 94%;
  left: -68%;
}

.tile_11 {
  top: 94%;
  left: -41%;
}

.tile_12 {
  top: 94%;
  left: -14%;
}

.tile_13 {
  top: 13%;
  left: 114%;
}

.tile_14 {
  top: 13%;
  left: 141%;
}

.tile_15 {
  top: 13%;
  left: 168%;
}

.tile_16 {
  top: 40%;
  left: 114%;
}

.tile_17 {
  top: 40%;
  left: 141%;
}

.tile_18 {
  top: 40%;
  left: 168%;
}

.tile_19 {
  top: 67%;
  left: 114%;
}

.tile_20 {
  top: 67%;
  left: 141%;
}

.tile_21 {
  top: 67%;
  left: 168%;
}

.tile_22 {
  top: 94%;
  left: 114%;
}

.tile_23 {
  top: 94%;
  left: 141%;
}

.tile_24 {
  top: 94%;
  left: 168%;
}

/* .challenge-1 .tile */
.challenge-1 .tile_1 {
  top: 19%;
  left: -60%;
}

.challenge-1 .tile_2 {
  top: 19%;
  left: -37%;
}

.challenge-1 .tile_3 {
  top: 19%;
  left: -14%;
}

.challenge-1 .tile_4 {
  top: 42%;
  left: -60%;
}

.challenge-1 .tile_5 {
  top: 42%;
  left: -37%;
}

.challenge-1 .tile_6 {
  top: 42%;
  left: -14%;
}

.challenge-1 .tile_7 {
  top: 65%;
  left: -60%;
}

.challenge-1 .tile_8 {
  top: 65%;
  left: -37%;
}

.challenge-1 .tile_9 {
  top: 65%;
  left: -14%;
}

.challenge-1 .tile_10 {
  top: 88%;
  left: -60%;
}

.challenge-1 .tile_11 {
  top: 88%;
  left: -37%;
}

.challenge-1 .tile_12 {
  top: 88%;
  left: -14%;
}

.challenge-1 .tile_13 {
  top: 19%;
  left: 114%;
}

.challenge-1 .tile_14 {
  top: 19%;
  left: 137%;
}

.challenge-1 .tile_15 {
  top: 19%;
  left: 160%;
}

.challenge-1 .tile_16 {
  top: 42%;
  left: 114%;
}

.challenge-1 .tile_17 {
  top: 42%;
  left: 137%;
}

.challenge-1 .tile_18 {
  top: 42%;
  left: 160%;
}

.challenge-1 .tile_19 {
  top: 65%;
  left: 114%;
}

.challenge-1 .tile_20 {
  top: 65%;
  left: 137%;
}

.challenge-1 .tile_21 {
  top: 65%;
  left: 160%;
}

.challenge-1 .tile_22 {
  top: 88%;
  left: 114%;
}

.challenge-1 .tile_23 {
  top: 88%;
  left: 137%;
}

.challenge-1 .tile_24 {
  top: 88%;
  left: 160%;
}

/*==================*/
.mobile.wrapper .tile_1 {
  top: 14%;
  left: 12%;
}

.mobile.wrapper .tile_2 {
  top: 14%;
  left: 31%;
}

.mobile.wrapper .tile_3 {
  top: 14%;
  left: 50%;
}

.mobile.wrapper .tile_4 {
  top: 30%;
  left: 12%;
}

.mobile.wrapper .tile_5 {
  top: 30%;
  left: 31%;
}

.mobile.wrapper .tile_6 {
  top: 30%;
  left: 50%;
}

.mobile.wrapper .tile_7 {
  top: 46%;
  left: 12%;
}

.mobile.wrapper .tile_8 {
  top: 46%;
  left: 31%;
}

.mobile.wrapper .tile_9 {
  top: 78%;
  left: 12%;
  z-index: 6;
}

.mobile.wrapper .tile_10 {
  top: 62%;
  left: 12%;
}

.mobile.wrapper .tile_11 {
  top: 62%;
  left: 31%;
}

.mobile.wrapper .tile_12 {
  top: 62%;
  left: 50%;
}

.mobile.wrapper .tile_13 {
  top: 14%;
  left: 69%;
}

.mobile.wrapper .tile_14 {
  top: 14%;
  left: 88%;
}

.mobile.wrapper .tile_15 {
  top: 78%;
  left: 31%;
  z-index: 7;
}

.mobile.wrapper .tile_16 {
  top: 30%;
  left: 69%;
}

.mobile.wrapper .tile_17 {
  top: 30%;
  left: 88%;
}

.mobile.wrapper .tile_18 {
  top: 78%;
  left: 50%;
  z-index: 8;
}

.mobile.wrapper .tile_19 {
  top: 46%;
  left: 69%;
}

.mobile.wrapper .tile_20 {
  top: 46%;
  left: 88%;
}

.mobile.wrapper .tile_21 {
  top: 78%;
  left: 88%;
  z-index: 11;
}

.mobile.wrapper .tile_22 {
  top: 62%;
  left: 88%;
  z-index: 6;
}

.mobile.wrapper .tile_23 {
  top: 62%;
  left: 69%;
}

.mobile.wrapper .tile_24 {
  top: 78%;
  left: 69%;
  z-index: 10;
}

/*=====================*/
.mobile.challenge-3 .tile_1 {
  top: 14%;
  left: 12%;
}

.mobile.challenge-3 .tile_2 {
  top: 14%;
  left: 31%;
}

.mobile.challenge-3 .tile_3 {
  top: 14%;
  left: 50%;
}

.mobile.challenge-3 .tile_4 {
  top: 28%;
  left: 12%;
}

.mobile.challenge-3 .tile_5 {
  top: 28%;
  left: 31%;
}

.mobile.challenge-3 .tile_6 {
  top: 28%;
  left: 50%;
}

.mobile.challenge-3 .tile_7 {
  top: 42%;
  left: 12%;
}

.mobile.challenge-3 .tile_8 {
  top: 42%;
  left: 31%;
}

.mobile.challenge-3 .tile_9 {
  top: 70%;
  left: 12%;
  z-index: 6;
}

.mobile.challenge-3 .tile_10 {
  top: 56%;
  left: 12%;
}

.mobile.challenge-3 .tile_11 {
  top: 56%;
  left: 31%;
}

.mobile.challenge-3 .tile_12 {
  top: 56%;
  left: 50%;
}

.mobile.challenge-3 .tile_13 {
  top: 14%;
  left: 69%;
}

.mobile.challenge-3 .tile_14 {
  top: 14%;
  left: 88%;
}

.mobile.challenge-3 .tile_15 {
  top: 70%;
  left: 31%;
  z-index: 7;
}

.mobile.challenge-3 .tile_16 {
  top: 28%;
  left: 69%;
}

.mobile.challenge-3 .tile_17 {
  top: 28%;
  left: 88%;
}

.mobile.challenge-3 .tile_18 {
  top: 70%;
  left: 50%;
  z-index: 8;
}

.mobile.challenge-3 .tile_19 {
  top: 42%;
  left: 69%;
}

.mobile.challenge-3 .tile_20 {
  top: 42%;
  left: 88%;
}

.mobile.challenge-3 .tile_21 {
  top: 70%;
  left: 88%;
  z-index: 11;
}

.mobile.challenge-3 .tile_22 {
  top: 56%;
  left: 88%;
  z-index: 6;
}

.mobile.challenge-3 .tile_23 {
  top: 56%;
  left: 69%;
}

.mobile.challenge-3 .tile_24 {
  top: 70%;
  left: 69%;
  z-index: 10;
}

/*===============*/

/*==================*/
/* .challenge-2 .tile */
.challenge-2 .tile_1 {
  top: 16%;
  left: -53%;
}

.challenge-2 .tile_2 {
  top: 16%;
  left: -32%;
}

.challenge-2 .tile_3 {
  top: 16%;
  left: -11%;
}

.challenge-2 .tile_4 {
  top: 39%;
  left: -53%;
}

.challenge-2 .tile_5 {
  top: 39%;
  left: -32%;
}

.challenge-2 .tile_6 {
  top: 39%;
  left: -11%;
}

.challenge-2 .tile_7 {
  top: 62%;
  left: -53%;
}

.challenge-2 .tile_8 {
  top: 62%;
  left: -32%;
}

.challenge-2 .tile_9 {
  top: 62%;
  left: -11%;
}

.challenge-2 .tile_10 {
  top: 85%;
  left: -53%;
}

.challenge-2 .tile_11 {
  top: 85%;
  left: -32%;
}

.challenge-2 .tile_12 {
  top: 85%;
  left: -11%;
}

.challenge-2 .tile_13 {
  top: 16%;
  left: 104%;
}

.challenge-2 .tile_14 {
  top: 16%;
  left: 125%;
}

.challenge-2 .tile_15 {
  top: 16%;
  left: 146%;
}

.challenge-2 .tile_16 {
  top: 39%;
  left: 104%;
}

.challenge-2 .tile_17 {
  top: 39%;
  left: 125%;
}

.challenge-2 .tile_18 {
  top: 39%;
  left: 146%;
}

.challenge-2 .tile_19 {
  top: 62%;
  left: 104%;
}

.challenge-2 .tile_20 {
  top: 62%;
  left: 125%;
}

.challenge-2 .tile_21 {
  top: 62%;
  left: 146%;
}

.challenge-2 .tile_22 {
  top: 85%;
  left: 104%;
}

.challenge-2 .tile_23 {
  top: 85%;
  left: 125%;
}

.challenge-2 .tile_24 {
  top: 85%;
  left: 146%;
}

/* .challenge-3 .tile */

/*==========  tiles end  ==========*/

/*==========  tiles start  ==========*/
.drop-zones {
  flex: 1;
  position: absolute;
  height: -webkit-fill-available;
  align-items: center;
  width: 100%;
  pointer-events: none;
}

.drop-zone {
  position: absolute;
  width: 6.5%;
  aspect-ratio: 70 / 70;
  cursor: pointer;
  transform: translate(-50%, -50%);
}

/*==========  tiles end  ==========*/

path,
polygon {
  pointer-events: all;
  cursor: pointer;
}

path[fill="transparent"][stroke="transparent"] {
  pointer-events: none;
}

path[fill="transparent"],
path[stroke="#ff000000"],
path[stroke="transparent"] {
  pointer-events: none;
}

.tile-tooltip {
  position: fixed;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  background-color: #cccccc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tile-tooltip-img {
  width: 35px;
}

.tile-tooltip.show {
  opacity: 1;
}

.tile {
  touch-action: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

@media (max-width: 767px) {
  /* .mobile.wrapper .main {
    height: 90dvh;
  } */

  .mobile.challenge-1 .main {
    height: 88dvh;
  }

  .mobile.challenge-2 .main {
    height: 89dvh;
  }

  .mobile.challenge-3 .main {
    height: 84dvh;
  }
}
.mobile.challenge-1 .header {
  margin-bottom: 50px;
}

.mobile.challenge-2 .header {
  margin-bottom: 50px;
}

.mobile.challenge-3 .header {
  margin-bottom: 70px;
}

.mobile .challenge-content.active {
  position: absolute;
  top: 0%;
  transform: translate(-50%, 0%);
  width: 100%;
  display: block;
  height: 50%;
  left: 50%;
}

.mobile.wrapper .playfield {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
}

.mobile .tiles {
  transform: translate(-50%, 0%);
  top: 52%;
}

.mobile.challenge-2 .tiles {
  top: 43%;
}

.mobile.challenge-3 .tiles {
  top: 52%;
}

/*================================*/
#resize-preloader {
  position: fixed;
  top: 0;
  left: -101%;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  /* Dark background in QuintaPaths style */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
}

#resize-preloader.show {
  left: 0%;
  opacity: 1;
}

.puzzle-container {
  display: flex;
  gap: 20px;
}

.puzzle-piece {
  width: 40px;
  height: 40px;
  background: transparent;
  animation: assemble 1.5s infinite ease-in-out;
}

.piece-b,
.piece-d {
  animation: assembleRotate 1.5s infinite ease-in-out;
  transform: translate(0%, -25%) rotate(180deg);
}

/* Delay for each of the 5 elements */
.puzzle-piece:nth-child(1) {
  animation-delay: 0.1s;
}

.puzzle-piece:nth-child(2) {
  animation-delay: 0.2s;
}

.puzzle-piece:nth-child(3) {
  animation-delay: 0.3s;
}

.puzzle-piece:nth-child(4) {
  animation-delay: 0.4s;
}

.puzzle-piece:nth-child(5) {
  animation-delay: 0.5s;
}

@keyframes assemble {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(90deg);
    opacity: 1;
  }
}

@keyframes assembleRotate {
  0%,
  100% {
    transform: translateY(0) rotate(180deg);
  }

  50% {
    transform: translateY(-20px) rotate(270deg);
    opacity: 1;
  }
}
@media (min-width: 768px) {
  .wrapper .footer {
    height: 80px;
  }
  .wrapper
    .pagination-link-wrapper:has(.pagination-btn.active[data-challenge="2"])
    .pagination-text {
    width: 47vw;
  }
  .wrapper
    .pagination-link-wrapper:has(.pagination-btn.active[data-challenge="3"])
    .pagination-text {
    width: 47vw;
  }
}
@media (min-width: 840px) {
  .wrapper .footer {
    height: 85px;
  }
}
@media (min-width: 965px) {
  .wrapper .footer {
    height: 92px;
  }
}
@media (min-width: 1100px) {
  .wrapper .footer {
    height: 85px;
  }
}
