@import url("https://fonts.googleapis.com/css?family=Comfortaa");
html, body {
  margin: 0;
  overflow: hidden;
  height: 100%;
  width: 100%;
  position: absolute;
  top: 0;
  font-family: "Comfortaa", cursive;
}

#popup {
  transition: opacity 0.3s ease;
  opacity: 0;
}
#popup[style*="display: flex;"] {
  opacity: 1;
}

/* Căn giữa toàn bộ màn hình */
.game-ready {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh; /* Chiều cao toàn màn hình */
  background: linear-gradient(45deg, #1e3c72, #2a5298); /* Màu nền gradient (tuỳ chọn) */
}

/* Nút "Start" với hiệu ứng nảy */
.start-button {
  margin-top: 20px;
  background: linear-gradient(45deg, #ff416c, #ff4b2b);
  color: white;
  font-size: 24px;
  font-weight: bold;
  padding: 15px 30px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  outline: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 5px 15px rgba(255, 75, 43, 0.6);
  animation: bounce 1.5s infinite;
}

.start-button:hover {
  background: linear-gradient(45deg, #ff4b2b, #ff416c);
  box-shadow: 0 8px 20px rgba(255, 75, 43, 0.8);
  transform: scale(1.1);
}

.start-button:active {
  transform: scale(0.95);
  box-shadow: 0 3px 10px rgba(255, 75, 43, 0.5);
}



.turn-game {
  margin-top: 20px;
  background: linear-gradient(45deg, #ff8c00, #ffa500); /* Màu cam */
  color: white;
  font-size: 24px;
  font-weight: bold;
  padding: 15px 30px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  outline: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 5px 15px rgba(255, 165, 0, 0.6);
  animation: bounce 1.5s infinite;
}

.turn-game:hover {
  background: linear-gradient(45deg, #ffa500, #ff8c00); /* Đảo gradient */
  box-shadow: 0 8px 20px rgba(255, 165, 0, 0.8);
  transform: scale(1.1);
}

.turn-game:active {
  transform: scale(0.95);
  box-shadow: 0 3px 10px rgba(255, 165, 0, 0.5);
}

.gift-game {
  margin-top: 20px;
  background: linear-gradient(45deg, #1e90ff, #00bfff); /* Màu xanh dương */
  color: white;
  font-size: 24px;
  font-weight: bold;
  padding: 15px 30px;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  outline: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 5px 15px rgba(0, 191, 255, 0.6);
  animation: bounce 1.5s infinite;
}

.gift-game:hover {
  background: linear-gradient(45deg, #00bfff, #1e90ff); /* Đảo gradient */
  box-shadow: 0 8px 20px rgba(0, 191, 255, 0.8);
  transform: scale(1.1);
}

.gift-game:active {
  transform: scale(0.95);
  box-shadow: 0 3px 10px rgba(0, 191, 255, 0.5);
}


/* Hiệu ứng nảy */
@keyframes bounce {
  0%, 100% {
      transform: translateY(0);
  }
  50% {
      transform: translateY(-10px);
  }
}



#container {
  width: 100%;
  height: 100%;
}
#container #score {
  /* position: absolute;
  top: 20px; */
  font-size: 12vh;
  transition: transform 0.5s ease;
  color: #333344;
  transform: translatey(-200px) scale(1);
  text-align: center;
}
  
#container #game {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
}
#container .game-over {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#container .game-over * {
  transition: opacity 0.5s ease, transform 0.5s ease;
  opacity: 0;
  transform: translatey(-50px);
  color: #333344;
}
#container .game-over h2 {
  margin: 0;
  padding: 0;
  font-size: 40px;
}
#container .game-ready {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}
#container .game-ready #start-button {
  transition: opacity 0.5s ease, transform 0.5s ease;
  opacity: 0;
  transform: translatey(-50px);
  border: 3px solid #333344;
  padding: 10px 20px;
  background-color: transparent;
  color: #333344;
  font-size: 30px;
}
#container #instructions {
  position: absolute;
  width: 100%;
  top: 16vh;
  left: 0;
  text-align: center;
  transition: opacity 0.5s ease, transform 0.5s ease;
  opacity: 0;
}
#container #instructions.hide {
  opacity: 0 !important;
}
#container.playing #score, #container.resetting #score {
  transform: translatey(0px) scale(1);
}
#container.playing #instructions {
  opacity: 1;
}
#container.ready .game-ready #start-button {
  opacity: 1;
  transform: translatey(0);
}
#container.ended #score {
  transform: translatey(6vh) scale(1.5);
}
#container.ended .game-over * {
  opacity: 1;
  transform: translatey(0);
}
#container.ended .game-over p {
  transition-delay: 0.3s;
}                                         
            