@import url('https://fonts.googleapis.com/css2?family=Anta&family=Inter:wght@100..900&display=swap');

body {
    font-family: "Anta", sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 16px;
    /* width: 100vw; */
    height: 100vh;
    background-image: url("images/house-outside.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    margin: 0;
    padding: 0;
    display: grid;
    align-items: center;
    justify-content: center;
  }

.wrapper {
  text-align: center;
}
header {
    width: 30rem;
    margin: 0 auto;
    border: 1px solid #5752e4;
    padding: 3.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    text-align: center;
    border-radius: 30px;
}
h1 {
    color: white;
}
header p {
    text-align: center;
    color: white;
}

a.button {
    display: inline-block;
    margin: 0 auto;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    color: #fff;
    background-color: #5752e4;
    position: relative;
  }
  
 
  a.button:hover {
    background-color: #7ff8b6;
    color: #5752e4;
  }

  #imageContainer {
    position: fixed;
    bottom: 0;
    right: 0;
    padding: 0.8rem;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.7));
}

#selectedImage {
    width: 9rem;
    height: 18rem;
}

.ns-list-of-avatars {
  display: flex;
  list-style-type: none;
}
.ns-list-of-avatars img {
  width: 30%;
}

#diamondContainer {
  position: fixed;
  top: 0;
  right: 0;
  padding: 10px;
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 2rem;
  margin: 1.2rem;
}

#diamondImage {
  width: 2rem;
  height: 2rem;
  margin-right: 5px;
}

#diamondCount {
  font-size: 1.1rem;
}

#message-container {
  margin-top: 0.8rem;
  border-radius: 1.2rem;
  background-color: #f0f0f0;
  border: 1px solid #ddd;
  padding: 15px;
  width: 18rem; /* или друг размер, който предпочитате */
  position: absolute;
  bottom: 100%; /* За да се появи над аватара */
  right: 0;
  text-align: center;
  transition: 1s all ease-in-out;
}

.module-front {
  width: 17rem;
  padding: 1rem;
  display: flex;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  aspect-ratio: 5/3;
  border: 1px solid white;
  border-radius: 2rem;
  background-color: transparent;
  background-size: 110%; /* Започва малко увеличен */
  background-repeat: no-repeat;
  background-position: center;
  animation: zoomAndSlide 20s infinite alternate ease-in-out;

}
.module-front:hover .content-modules {
  opacity: 1;
  visibility: visible;
}
.content-modules {
  opacity: 1;
  visibility: visible;
  padding: 5px;
  border-radius: 5px;
  background-color: rgba(255, 255, 255, 0.753);
  transition: 1s all ease-in-out;
}

.module-front:nth-child(-1n + 3) {
  grid-column: span 4;
}
.module-front:nth-last-child(2) {
  grid-row-start: 2;
  grid-column: 3 / span 4;
}
.module-front:nth-last-child(1) {
  grid-row-start: 2;
  grid-column: 7 / span 4;
}

.content {
  margin-top: 2rem;
  display: grid;
  justify-content: center;
  align-items: center;
  grid-template-columns: repeat(12, 1fr);
  grid-gap: 3rem;
}

#module-one{
  background-image: url(images/module-one-background.jpg);
}
#module-two{
  background-image: url(images/lowering-footprint.jpg);
}
#module-three{
  background-image: url(images/clothing.jpg);
}
#module-four{
  background-image: url(images/food.jpg);
}
#module-five{
  background-image: url(images/renewable-energy.jpg);
}

@keyframes zoomAndSlide {
  0%, 100% {
    background-size: 110%;
    background-position: center;
  }
  25% {
    background-size: 120%; /* Приближава (zoom in) */
    background-position: 25% center; /* Мести се леко наляво */
  }
  75% {
    background-size: 120%; /* Поддържа приближението */
    background-position: 75% center; /* Мести се леко надясно */
  }
}

/* Модул 1 стилове */

.starwars-intro {
  perspective: 32rem;
  height: 80vh;
  overflow: hidden;
}

.crawl {
  position: relative;
  top: 9999px;
  transform-origin: 50% 100%;
  animation: crawl 300s linear;
}

.title {
  text-align: center;
  margin-bottom: 6.5rem;
}

@keyframes crawl {
  0% {
      top: 32rem;
      transform: rotateX(20deg)  translateZ(0);
  }
  100% {
      top: -6000px;
      transform: rotateX(25deg) translateZ(-2500px);
  }
}

.inside-modules {
  width: 75rem;
  display: grid;
  grid-template-columns: 30% 70%;
  justify-content: center;
  align-items: center;
}
.m1-content {
  border-radius: 2rem;
  font-size: 1.4rem;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0.801);
  color: #feda4a;
  display: flex;
  justify-content: center;
  align-items: center;
}
.eco-quiz {
  background-color: #a7aa03 !important; 
}

.lesson-btn {
  background-color: rgb(149, 3, 207) !important;
}

.enter-game, .eco-quiz {
  display: inline-block;
  padding: 10px 20px;
  background-color: #4CAF50; /* Зелен цвят */
  color: white; /* Бял текст */
  text-decoration: none; /* Премахва подчертаването на линка */
  border-radius: 5px; /* Заоблени ръбове */
  box-shadow: 0 4px #999; /* Сянка под бутона */
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease; /* Плавен преход за цвета на фона, трансформацията и сянката */
}

.eco-quiz:hover, .eco-quiz:focus, .enter-game:hover, .enter-game:focus {
  background-color: #45a049; /* По-тъмен зелен цвят при ховър */
  transform: translateY(-2px); /* Леко повдигане на бутона */
  box-shadow: 0 6px #666; /* По-голяма сянка */
}

.enter-game:active, .eco-quiz:active {
  background-color: #3e8e41; /* Още по-тъмен зелен цвят при натискане */
  box-shadow: 0 2px #666; /* Намаляване на сянката */
  transform: translateY(1px); /* Бутона "се натиска" надолу */
}
#game-list a {
  display: block;
  margin: 20px 0;
  width: 70%;
}
.back-to-begin {
  display: inline-block;
  padding: 10px 20px;
  background-color: #007bff; /* Син цвят */
  color: white; /* Бял текст */
  text-decoration: none; /* Премахва подчертаването на текста */
  border-radius: 5px; /* Заоблени ъгли */
  transition: background-color 0.3s ease, box-shadow 0.2s ease; /* Плавен преход за цвета и сянката */
  box-shadow: 0 4px #999; /* Сянка под бутона */
  font-weight: bold; /* По-удебелен текст */
}

.back-to-begin:hover, .back-to-begin:focus {
  background-color: #0056b3; /* По-тъмен син цвят при ховър/фокус */
  text-decoration: none; /* Подчертаването остава премахнато */
  box-shadow: 0 6px #666; /* По-голяма сянка */
  color: #ffffff; /* Поддържа белия цвят на текста за консистентност */
  transform: translateY(-2px); /* Леко повдигане на бутона */
}

.back-to-begin:active {
  background-color: #004099; /* Още по-тъмен син цвят при активиране */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2); /* Намалена сянка за "натиснат" ефект */
  transform: translateY(1px); /* Бутона "се натиска" надолу */
}
#tooltip {
  background-color: #f9f9f9;
  border: 1px solid #d3d3d3;
  padding: 5px;
  border-radius: 5px;
  pointer-events: none; /* Това предотвратява tooltip-а да влияе на други елементи */
}

.audio-btn {
  width: 64px;
  height: 64px;
  background-image: url('images/play-btn.png');
  background-size: contain;
  position: absolute;
  top: 0;
  left: 0;
  cursor: pointer;
}

#info-icon {
  position: fixed;
  font-size: 23px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 20px;
  left: 20px;
  background-color: #f4f4f4;
  border: 1px solid #ccc;
  padding: 10px;
  border-radius: 50%;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

#description-text {
  position: fixed;
  top: 60px;
  left: 20px;
  background-color: #fff;
  border: 1px solid #ccc;
  width: 300px;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  z-index: 999;
}

@keyframes bounce {
  0%, 100% {
      transform: translateY(0) rotate(0deg) ;
  }
  25%{
    transform: translateY(-20px) rotate(20deg);
  } 
  75% {
      transform: translateY(-20px) rotate(-20deg);
  }
}


.pet-bounce {
  animation: bounce .3s 3 ease-in-out;
}
#pet-container {
  display: none;
}

#marketplace-entry {
  background-color: #4CAF50; /* Зелен цвят */
  color: white;
  border: none;
  border-radius: 5px;
  padding: 10px 20px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

#marketplace-entry:hover {
  background-color: #367c39; /* По-тъмен зелен при hover */
}

.green-button-back{
  cursor: pointer;
  background-color: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 20px auto;
  border-radius: 5px;
  display: block;
}

#instructions-entry {
  background-color: rgb(149, 3, 207) ;
  color: white;
  border: none;
  border-radius: 5px;
  margin: 20px;
  transition: all .3s ease-in-out;
}

#instructions-entry:hover {
  background-color: rgb(121 8 166);;
}

@media only screen and (max-width: 600px) {
  body{
    background-repeat: repeat-y;
    background-size: inherit;
  }
  .content{
    width: 100%;
    grid-template-columns: 1fr;
    justify-content: center;
    align-items: center;
    text-align: center;
  }
  .module-front:nth-child(-1n + 3) {
    grid-column: auto;
  }
  .module-front:nth-last-child(2) {
    grid-row-start: auto;
    grid-column: auto;
  }
  .module-front:nth-last-child(1) {
    grid-row-start: auto;
    grid-column: auto;
  }
  .module-front {
    margin: 0 auto;
  }
  header {
    width: 20rem;
    padding: 2rem;
    margin-top: 3rem;
  }
  .inside-modules {
    width: 100%; 
    grid-template-columns: 90%;
  }
  .starwars-intro {
    perspective: 90%;
  }
  #game-list{
    margin-top: 10rem;
    margin-left: auto;
    margin-right: auto;
  }
  #game-list a {
    width: 99%;
  }
  #imageContainer {
    background-color: rgba(255, 255, 255, 0.603);
    border-radius: 20px;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 1));
  }
  #selectedImage {
    width: 5rem;
    height: auto;
    aspect-ratio: 1/2.5;
  }
  #message-container {
    width: 13rem;
    padding: 0.5rem ;
    font-size: 1rem;
  }
  #pet-image {
    width: 5rem !important;
    aspect-ratio: 1/1.5;
  }
  #pet-container {
    background-color: rgba(255, 255, 255, 0.603);
    border-radius: 20px;
    padding: 5px;
  }
  .ns-list-of-avatars{
    flex-direction: column;
  }
  .ns-list-of-avatars li{
    display: inline-block;
    width: 70px ;
  }
  .ns-list-of-avatars img{
    width: 85%;
  }
  .wrapper {
    padding-bottom: 250px;
  }
  .btn {
    width: 80% !important;
    display: block;
    margin: 10px auto !important;
  }
  .starwars-intro {
    perspective: 122rem;
  }
  .wrapper > #quiz-container {
    width: 80%;
    margin: 30px auto;
  }
  .content-container {
    width: 88%;
  }
  .content-container .single-habbit > div {
    grid-template-columns: 1fr;
  }
}



