/* ================================= 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%;
}

.mobile.wrapper .playfields {
  height: 100%;
  width: 100%;
  margin-bottom: 0;
  /*top: -1%;*/
}

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

.playfield {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  aspect-ratio: 70 / 70;
  width: calc(100% / 1.8);
  /* width: calc(100% /3); */
  display: flex;
}

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

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

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

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

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

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

.challenge-2 .tile {
  width: calc(100% / 1.42);
}

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

.tile_1,
.drop-zone_1 {
  top: 82%;
  left: 87%;
}

.tile_2,
.drop-zone_2 {
  top: 38%;
  left: 1%;
}

.tile_3,
.drop-zone_3 {
  top: 38%;
  left: -31%;
}

.tile_4,
.drop-zone_4 {
  top: 17%;
  left: 17%;
}

.tile_5,
.drop-zone_5 {
  top: 61%;
  left: 121%;
}

.tile_6,
.drop-zone_6 {
  top: 43%;
  left: 130%;
}

.tile_7,
.drop-zone_7 {
  top: 57%;
  left: -24%;
}

.tile_8,
.drop-zone_8 {
  top: 81%;
  left: 121%;
}

.tile_9,
.drop-zone_9 {
  top: 54%;
  left: 5%;
}

.tile_10,
.drop-zone_10 {
  top: 60%;
  left: 94%;
}

.tile_11,
.drop-zone_11 {
  top: 22%;
  left: 144%;
}

.tile_12,
.drop-zone_12 {
  top: 15%;
  left: -31%;
}

.tile_13,
.drop-zone_13 {
  top: 15%;
  left: -9%;
}

.tile_14,
.drop-zone_14 {
  top: 33%;
  left: 106%;
}

.tile_15,
.drop-zone_15 {
  top: 18%;
  left: 128%;
}

.tile_16,
.drop-zone_16 {
  top: 83%;
  left: -9%;
}

.tile_17,
.drop-zone_17 {
  top: 6%;
  left: 117%;
}

.tile_18,
.drop-zone_18 {
  top: 77%;
  left: -45%;
}

.tile_19,
.drop-zone_19 {
  top: 54%;
  left: -47%;
}

.tile_20,
.drop-zone_20 {
  top: 72%;
  left: -20%;
}

/* .challenge-2 .tile */

.challenge-2 .tile_1 {
  top: 17%;
  left: 42%;
}

.challenge-2 .tile_2 {
  top: 29%;
  left: 27%;
}

.challenge-2 .tile_3 {
  top: 38%;
  left: -14%;
}

.challenge-2 .tile_4 {
  top: 15%;
  left: 16%;
}

.challenge-2 .tile_5 {
  top: 61%;
  left: 121%;
}

.challenge-2 .tile_6 {
  top: 46%;
  left: 131%;
}

.challenge-2 .tile_7 {
  top: 59%;
  left: -25%;
}

.challenge-2 .tile_8 {
  top: 81%;
  left: 124%;
}

.challenge-2 .tile_9 {
  top: 43%;
  left: 0%;
}

.challenge-2 .tile_10 {
  top: 17%;
  left: 96%;
}

.challenge-2 .tile_11,
.drop-zone_11 {
  top: 25%;
  left: 144%;
}

.challenge-2 .tile_12 {
  top: 15%;
  left: -31%;
}

.challenge-2 .tile_13 {
  top: 15%;
  left: -9%;
}

.challenge-2 .tile_14 {
  top: 40%;
  left: 110%;
}

.challenge-2 .tile_15 {
  top: 21%;
  left: 129%;
}

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

.challenge-2 .tile_17 {
  top: 12%;
  left: 117%;
}

.challenge-2 .tile_18 {
  top: 77%;
  left: -44%;
}

.challenge-2 .tile_19 {
  top: 54%;
  left: -47%;
}

.challenge-2 .tile_20 {
  top: 72%;
  left: -20%;
}

/* .challenge-3 .tile */
.challenge-1 .tile_1 {
  top: 56%;
  left: 96%;
}

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

.challenge-1 .tile_3 {
  top: 45%;
  left: -25%;
}

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

.challenge-1 .tile_5 {
  top: 61%;
  left: 126%;
}

.challenge-1 .tile_6 {
  top: 43%;
  left: 130%;
}

.challenge-1 .tile_7 {
  top: 80%;
  left: 3%;
}

.challenge-1 .tile_8 {
  top: 83%;
  left: 121%;
}

.challenge-1 .tile_9 {
  top: 56%;
  left: -18%;
}

.challenge-1 .tile_10 {
  top: 78%;
  left: 94%;
}

.challenge-1 .tile_11 {
  top: 22%;
  left: 132%;
}

.challenge-1 .tile_12 {
  top: 27%;
  left: -34%;
}

.challenge-1 .tile_13 {
  top: 17%;
  left: -14%;
}

.challenge-1 .tile_14 {
  top: 35%;
  left: 104%;
}

.challenge-1 .tile_15 {
  top: 21%;
  left: 94%;
}

.challenge-1 .tile_16 {
  top: 57%;
  left: 4%;
}

.challenge-1 .tile_17 {
  top: 9%;
  left: 117%;
}

.challenge-1 .tile_18 {
  top: 77%;
  left: -45%;
}

.challenge-1 .tile_19 {
  top: 51%;
  left: -47%;
}

.challenge-1 .tile_20 {
  top: 72%;
  left: -18%;
}

/*==========  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: 5px;
  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: 25px;
}

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

/* For screens ≥ 1000px */
@media screen and (max-height: 504.98px) {
  .order-me-link img {
    width: 60%;
    margin: 0 auto;
  }
}

@media screen and (min-height: 505px) {
  .order-me-link img {
    width: 70%;
    margin: 0 auto;
  }
}

@media screen and (min-height: 650px) {
  .order-me-link img {
    width: 90%;
    margin: 0 auto;
  }
}

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

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

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

.challenge-2
  .pagination-link-wrapper:has(.pagination-btn.active[data-challenge="2"])
  .pagination-text {
  width: 45vw;
}

.header .you-win {
  top: 52px;
}

/*=======================*/
#resize-preloader {
  position: fixed;
  top: 0;
  left: -101%;
  width: 100%;
  height: 100%;
  background: #1a1a1a;
  /*background: transparent;*/
  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: 10px;
}

.puzzle-piece {
  width: 60px;
  height: 60px;
  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);
}

/* 5 */
.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 (max-width: 767px) {
  .mobile.wrapper.challenge-1,
  .mobile.wrapper.challenge-2,
  .mobile.wrapper.challenge-3 {
    height: 80dvh;
    padding: 0;
  }

  .mobile.wrapper .main {
    height: 89dvh;
  }
}

.mobile.challenge-1 .playfield {
  position: absolute;
  top: 27%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mobile.challenge-2 .playfield {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mobile.challenge-3 .playfield {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mobile.challenge-1 .tiles {
  position: absolute;
  top: 70%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mobile.challenge-2 .tiles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.mobile.challenge-3 .tiles {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

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

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

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

.mobile.challenge-1 .tile_1 {
  left: 16.5355%;
  top: 14.2766%;
}

.mobile.challenge-1 .tile_2 {
  left: 57.8899%;
  top: 34.1778%;
}

.mobile.challenge-1 .tile_3 {
  left: 50.0007%;
  top: 43.7782%;
}

.mobile.challenge-1 .tile_4 {
  left: 91.1741%;
  top: 13.561%;
}

.mobile.challenge-1 .tile_5 {
  left: 33.3466%;
  top: 72.6459%;
}

.mobile.challenge-1 .tile_6 {
  left: 66.7227%;
  top: 82.4797%;
}

.mobile.challenge-1 .tile_7 {
  left: 75.2748%;
  top: 68.0813%;
}

.mobile.challenge-1 .tile_8 {
  left: 9.1543%;
  top: 86.7427%;
}

.mobile.challenge-1 .tile_9 {
  left: 66.5196%;
  top: 48.6673%;
}

.mobile.challenge-1 .tile_10 {
  left: 91.8826%;
  top: 39.307%;
}

.mobile.challenge-1 .tile_11 {
  left: 58.2479%;
  top: 58.6392%;
}

.mobile.challenge-1 .tile_12 {
  left: 92.7137%;
  top: 58.6851%;
}

.mobile.challenge-1 .tile_13 {
  left: 8.0499%;
  top: 23.6089%;
}

.mobile.challenge-1 .tile_14 {
  left: 25.3559%;
  top: 48.8031%;
}

.mobile.challenge-1 .tile_15 {
  left: 8.1364%;
  top: 38.5804%;
}

.mobile.challenge-1 .tile_16 {
  left: 7.9196%;
  top: 58.0623%;
}

.mobile.challenge-1 .tile_17 {
  left: 33.4142%;
  top: 92.5166%;
}

.mobile.challenge-1 .tile_18 {
  left: 92.2834%;
  top: 82.4405%;
}

.mobile.challenge-1 .tile_19 {
  left: 74.9847%;
  top: 18.7214%;
}

.mobile.challenge-1 .tile_20 {
  left: 42.1324%;
  top: 28.633%;
}

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

.mobile.challenge-2 .tile_1 {
  left: 67.3254%;
  top: -8.5989%;
}

.mobile.challenge-2 .tile_2 {
  left: 55.2064%;
  top: -0.045%;
}

.mobile.challenge-2 .tile_3 {
  left: 76.7148%;
  top: 0.5661%;
}

.mobile.challenge-2 .tile_4 {
  left: 24.5848%;
  top: 27.0773%;
}

.mobile.challenge-2 .tile_5 {
  left: 45.4595%;
  top: 28.8178%;
}

.mobile.challenge-2 .tile_6 {
  left: 28.0801%;
  top: -8.5681%;
}

.mobile.challenge-2 .tile_7 {
  left: 62.7468%;
  top: 89.8676%;
}

.mobile.challenge-2 .tile_8 {
  left: 77.5596%;
  top: 73.5903%;
}

.mobile.challenge-2 .tile_9 {
  left: 38.531%;
  top: 4.3877%;
}

.mobile.challenge-2 .tile_10 {
  left: 78.5938%;
  top: 52.9918%;
}

.mobile.challenge-2 .tile_11 {
  left: 21.9273%;
  top: 40.7318%;
}

.mobile.challenge-2 .tile_12 {
  left: 65.1918%;
  top: 11.5784%;
}

.mobile.challenge-2 .tile_13 {
  left: 76.7262%;
  top: 81.7539%;
}

.mobile.challenge-2 .tile_14 {
  left: 44.3321%;
  top: 13.2108%;
}

.mobile.challenge-2 .tile_15 {
  left: 19.6324%;
  top: 58.4283%;
}

.mobile.challenge-2 .tile_16 {
  left: 25.5435%;
  top: 47.6198%;
}

.mobile.challenge-2 .tile_17 {
  left: 75.8723%;
  top: 90.2326%;
}

.mobile.challenge-2 .tile_18 {
  left: 39.5918%;
  top: 40.4827%;
}

.mobile.challenge-2 .tile_19 {
  left: 21.1439%;
  top: 5.8459%;
}

.mobile.challenge-2 .tile_20 {
  left: 32.0807%;
  top: 58.6722%;
}

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

.mobile.challenge-3 .tile_1 {
  left: 39.6927%;
  top: 94.9336%;
}

.mobile.challenge-3 .tile_2 {
  left: 16.8303%;
  top: 104.451%;
}

.mobile.challenge-3 .tile_3 {
  left: 18.3638%;
  top: 114.045%;
}

.mobile.challenge-3 .tile_4 {
  left: 83.1503%;
  top: 104.358%;
}

.mobile.challenge-3 .tile_5 {
  left: 82.118%;
  top: 94.4099%;
}

.mobile.challenge-3 .tile_6 {
  left: 82.4405%;
  top: -14.5751%;
}

.mobile.challenge-3 .tile_7 {
  left: 14.8429%;
  top: -9.9422%;
}

.mobile.challenge-3 .tile_8 {
  left: 14.4031%;
  top: 100.784%;
}

.mobile.challenge-3 .tile_9 {
  left: 30.8737%;
  top: -6.6552%;
}

.mobile.challenge-3 .tile_10 {
  left: 53.2317%;
  top: 107.357%;
}

.mobile.challenge-3 .tile_11 {
  left: 67.7521%;
  top: 106.295%;
}

.mobile.challenge-3 .tile_12 {
  left: 34.0478%;
  top: 112.947%;
}

.mobile.challenge-3 .tile_13 {
  left: 40.9311%;
  top: 1.6249%;
}

.mobile.challenge-3 .tile_14 {
  left: 53.7689%;
  top: -2.3218%;
}

.mobile.challenge-3 .tile_15 {
  left: 67.9276%;
  top: -14.3052%;
}

.mobile.challenge-3 .tile_16 {
  left: 72.0128%;
  top: 4.3616%;
}

.mobile.challenge-3 .tile_17 {
  left: 45.7493%;
  top: -14.0067%;
}

.mobile.challenge-3 .tile_18 {
  left: 86.9136%;
  top: 0.5169%;
}

.mobile.challenge-3 .tile_19 {
  left: 81.8377%;
  top: 113.647%;
}

.mobile.challenge-3 .tile_20 {
  left: 18.26%;
  top: -3.2033%;
}
@media (min-width: 768px) {
  .wrapper
    .pagination-link-wrapper:has(.pagination-btn.active[data-challenge="1"])
    .pagination-text {
    width: 30vw;
  }
}
@media (min-width: 1100px) {
  .wrapper
    .pagination-link-wrapper:has(.pagination-btn.active[data-challenge="1"])
    .pagination-text {
    width: 44vw;
  }
}
