body, html {
    height: 100%;
    margin: 0;
    font-family: Arial, sans-serif;
    justify-content: center;
    align-items: center;
    
}
.background-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: 100% auto;
    background-position: center;
    z-index: -1;
  }

.container {
    position: relative;
    width: 360px;
    height: 100vh;
    max-height: 740px;
    transform: scale(1);
}

.navToggle {    
    position: absolute; /* Додати абсолютне позиціонування */
    top: 12px;
    left: 12px;
    width: 50px;
    height: 50px;
}

.uaFlag {
    position: absolute; /* Додати абсолютне позиціонування */
    top: 10px;
    right: 5px;
    width: 60px;
    z-index: 99999;
    
}


.imageContainer {
    position: absolute; /* Додати абсолютне позиціонування */
    top: 90px;    
    left: 12%; 
    /* transform: translateX(-50%);    */
    transform: scale(1.1);    
}

.userLevel {
    position: absolute; /* Додати абсолютне позиціонування */
    top: 40px;
    left: 10px;
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 15px;
}
.userDifficult {
    position: absolute; /* Додати абсолютне позиціонування */
    top: 40px;
    right: 30px;
    width: 50px;
    height: 50px;
    text-align: center;
    font-size: 15px;
}

.stats {
    position: absolute; /* Додати абсолютне позиціонування */
    top: 5px;
    left: 50%;  
    width: 400px; 
    transform: translate(-50%, 0%);   
    text-align: center;
    font-size: 12px;
}

.puzzlesContainer {
    position: absolute; /* Додати абсолютне позиціонування */
    top: 170px;
    left: -0%;  
    
    height: 300px;
    /* transform: translate(-50%, 0%);    */
}

.word-portal {
    display: inline-block;
}

.word {
    position: absolute;
    margin-top: -35px;    
    width: 80px;
    text-align: center;
    font-size: 20px;
}

.portal {
    width: 75px;
    height: 75px;
    
}    

.words-portals-container {
    display: flex;
    justify-content: center;
    align-items: center;
    grid-gap: 0px;
    margin-left: -0px;
    margin-top: 80px;
}  


.question {
    position: absolute;
    margin-top: -200px;    
    width: 300px;
    text-align: center;
    font-size: 28px;
}


@media screen and (orientation: landscape) {
    .container {
        position: relative;
        width: 800px;        
        transform: scale(1);
    }

    .navToggle {
      position: absolute;
      top: 12px;
      left: 12px;
      width: 50px;
      height: 50px;
    }

    .imageContainer {
        position: absolute; /* Додати абсолютне позиціонування */
        top: 15px;    
        left: 35%; 
        /* transform: translateX(-50%);    */
        transform: scale(1);
        
    }
    
    .userLevel {
        position: absolute; /* Додати абсолютне позиціонування */
        top: 10px;
        left: 100px;
        width: 50px;
        height: 50px;
        text-align: center;
        font-size: 15px;
    }
    .userDifficult {
        position: absolute; /* Додати абсолютне позиціонування */
        top: 10px;
        right: 130px;
        width: 50px;
        height: 50px;
        text-align: center;
        font-size: 15px;
    }
    
    .stats {
        position: absolute; /* Додати абсолютне позиціонування */
        top: 75px;
        left: 50%;  
        width: 400px; 
        transform: translate(-50%, 0%);   
        text-align: center;
        font-size: 12px;
    }
    .word {
        position: absolute;
        margin-top: -45px;    
        width: 150px;
        text-align: center;
        font-size: 30px;
    }
    
    .portal {
        width: 130px;
        height: 130px;
        
    }  
    .puzzlesContainer {
        position: absolute; /* Додати абсолютне позиціонування */
        top: 170px;
        left: 10%;  
        
        height: 300px;
        /* transform: translate(-50%, 0%);    */
    }
    .question {
        position: absolute;
        margin-top: -250px;    
        width: 300px;
        text-align: center;
        font-size: 35px;
    }

    :not(.container) > .navToggle {
        position: absolute;
        top: 12px;
        left: 15%;
        width: 50px;
        height: 50px;
    }
    
    /* Apply these styles when .uaFlag is not a child of .container */
    :not(.container) > .uaFlag {
        position: absolute;
        top: 10px;
        right: 15%;
        width: 60px;
        z-index: 99999;
    }
    
    
  }
  
  .card {
    background-color: rgba(255, 255, 255, 0.5); /* білий колір з 50% прозорістю */
  }


  
.puzzle {
    position: absolute;
    transform-origin: center;
    animation-duration: 1s;
    animation-fill-mode: forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOutScale {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(0);
    }
}

#puzzlesContainer {
    width: 505px;
    height: 505px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 101px);
    grid-template-rows: repeat(5, 101px);
    grid-gap: 1px;
    position: relative;
  } 


  .image-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-60%);
}

.image {
    width: 25px;
    height: 25px;
    margin: 5px;
}

@keyframes flyInScale {
  0% {
    transform: translateY(-100%) scale(0);
  }
  100% {
    transform: translateY(0) scale(1);
  }
}


.fly-in-scale {
  animation-name: flyInScale;
  animation-fill-mode: both;
}

img.zoomable {
  cursor: pointer;
}

img.zoomable:hover {
  transform: scale(1.5);
  transition: transform 0.3s;
}

.animated-image {
  position: absolute;
  z-index: 1000;
  transition: all 1s ease-in-out;
}


