/* ===== Loader ===== */
.loader-container {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: linear-gradient(135deg, #4c65f6 0%, #d154d1 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
  animation: hideLoader 0.5s ease 0.5s forwards; /* ẩn sau 1 giây */
}

@keyframes hideLoader {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

.loader {
  height: 20px;
  width: 250px;
  position: relative;
}

.loader--dot {
  animation-name: loader;
  animation-timing-function: ease-in-out;
  animation-duration: 2s; /* tổng thời gian 1 giây */
  animation-iteration-count: infinite;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  position: absolute;
}

/* màu + delay */
.loader--dot:nth-child(1) {
  background-color: #8cc759;
  animation-delay: 0s;
}
.loader--dot:nth-child(2) {
  background-color: #8c6daf;
  animation-delay: 0.1s;
}
.loader--dot:nth-child(3) {
  background-color: #ef5d74;
  animation-delay: 0.2s;
}
.loader--dot:nth-child(4) {
  background-color: #f9a74b;
  animation-delay: 0.3s;
}
.loader--dot:nth-child(5) {
  background-color: #60beeb;
  animation-delay: 0.4s;
}
.loader--dot:nth-child(6) {
  background-color: #fbef5a;
  animation-delay: 0.5s;
}

.loader--text {
  position: absolute;
  top: 200%;
  left: 0;
  right: 0;
  width: 6rem;
  margin: auto;
  text-align: center;
  font-size: 1.1rem;
  color: #ffffff;
}

@keyframes loader {
  0% {
    transform: translateX(0);
  }
  50% {
    transform: translateX(230px);
  }
  100% {
    transform: translateX(0);
  }
}

/* ===== Hiện nội dung sau loader ===== */
.main-content {
  opacity: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  animation: showContent 0.5s ease 0.5s forwards; /* hiện sau 1s */
}

@keyframes showContent {
  to {
    opacity: 1;
  }
}




/* Căn giữa logo */
.search-box {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px 0;
}
/* Logo có hiệu ứng phồng to - thu nhỏ */
.logo-pulse {
  width: 211px;
  height: 100px;
  animation: pulse 2.5s ease-in-out infinite;
  transform-origin: center;
}
/* Hiệu ứng nhịp tim */
@keyframes pulse {
  0% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
  }
  50% {
    transform: scale(1.08);
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
  }
  100% {
    transform: scale(1);
    filter: drop-shadow(0 0 0px rgba(255, 255, 255, 0));
  }
}