* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

a {
  text-decoration: none;
  color: #000;
}

body {
  font-family: "Roboto", sans-serif;
  background-color: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
}

.app--root {
  background: url(./images/bg-root.webp) no-repeat center center;
  background-size: 100% 100%;
  background-position: center bottom;
  height: 100vh;
  max-width: 450px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding-top: 2%;
}

.content--root {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 70%;
  height: 100%;
  margin-bottom: 30%;
  gap: 10px;
}

.input--root {
  background: url(./images/bg-input.webp) no-repeat center center;
  background-size: 100% 100%;
  background-position: center center;
  width: 90%;
  padding: 20px;
}

input {
  background: transparent;
  width: 100%;
  font-size: 2rem;
  text-align: center;
  color: white;
  border: none;
  outline: none;
}

input::placeholder {
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff3d9;
}

.btn--root {
  width: 90%;
  margin-top: 15%;
  animation: scaleAnimation 1.5s ease-in-out infinite;
  cursor: pointer;
}

.app {
  background: url(images/bg.webp);
  background-size: 100% 100%;
  background-position: center bottom;
  height: 100vh;
  width: 100%;
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.content {
  background: url(images/bg-content.webp);
  background-size: 100% 100%;
  background-position: center center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 2%;
  width: 30%;
}

.app__content__main {
  background: url(images/bg-tick.webp);
  background-size: 100% 100%;
  background-position: center center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 5% 3%;
  gap: 20px;
}

.title {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 3%;
}

.text {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 3%;
}

.btn-redirect {
  pointer-events: none;
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-redirect.active {
  pointer-events: auto;
  opacity: 1;
  cursor: pointer;
}

.text-tick {
  cursor: pointer;
  position: relative;
}

@keyframes scaleAnimation {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

.btn {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.btn {
  animation: scaleAnimation 1.5s ease-in-out infinite;
}

.tick {
  display: none;
  width: 6.5%;
  position: absolute;
  top: 0;
  left: 0;
}

.app--mb {
  display: none;
}

.app--loading {
  background: url(images/bg.webp);
  background-size: 100% 100%;
  background-position: center bottom;
  height: 100vh;
  width: 100%;
  display: none;
  justify-content: center;
  align-items: center;
}

.content--loading {
  width: 80%;
  text-align: center;
}

/* ===== Loading bar ===== */
.loading-bar {
  position: relative;
  height: 6px;
  width: 100%;
  background: #1c2436;
  border-radius: 10px;
  overflow: hidden;
  margin: 10% 0 5%;
}

/* Thanh chạy */
.loading-bar::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: #5379e6;
  border-radius: 10px;
  animation: loadingProgress 2s linear forwards;
}

@keyframes loadingProgress {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

/* ===== Done loading ===== */
.done--loading {
  width: 60%;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 2s; /* đợi loading xong */
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content--loading {
  background: url(images/bg-content.webp);
  background-size: 100% 100%;
  background-position: center center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  padding: 2%;
  width: 30%;
}

@media screen and (max-width: 768px) {
  .app--root {
    padding-top: 10%;
  }

  .app {
    display: none;
  }

  .app--mb {
    background: url(images/bg.webp);
    background-size: 100% 100%;
    background-position: center bottom;
    height: 100vh;
    width: 100%;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  .app--mb .content {
    background: url(images/bg-content.webp);
    background-size: 100% 100%;
    background-position: center center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 5%;
    width: 100%;
  }

  .app--mb .app__content__main {
    background: url(images/bg-tick.webp);
    background-size: 100% 100%;
    background-position: center center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 5% 3%;
    gap: 20px;
  }

  .app--mb .text {
    width: 80%;
    margin: 5% 0;
  }

  .app--mb .btn-redirect {
    pointer-events: none;
    opacity: 0.4;
    cursor: not-allowed;
  }

  .app--mb .btn-redirect.active {
    pointer-events: auto;
    opacity: 1;
    cursor: pointer;
  }

  .tick {
    display: none;
    width: 7%;
    position: absolute;
    top: 0;
    left: 0;
  }

  .app--loading {
    background: url(images/bg.webp);
    background-size: 100% 100%;
    background-position: center bottom;
    height: 100vh;
    width: 100%;
    display: none;
    justify-content: center;
    align-items: center;
  }

  /* ===== Loading bar ===== */
  .loading-bar {
    position: relative;
    height: 6px;
    width: 100%;
    background: #1c2436;
    border-radius: 10px;
    overflow: hidden;
    margin: 10% 0 5%;
  }

  /* Thanh chạy */
  .loading-bar::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0;
    background: #5379e6;
    border-radius: 10px;
    animation: loadingProgress 2s linear forwards;
  }

  @keyframes loadingProgress {
    from {
      width: 0;
    }
    to {
      width: 100%;
    }
  }

  /* ===== Done loading ===== */
  .done--loading {
    width: 60%;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
    animation-delay: 2s; /* đợi loading xong */
  }

  @keyframes fadeUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .content--loading {
    background: url(images/bg-content.webp);
    background-size: 100% 100%;
    background-position: center center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 5%;
    width: 90%;
  }

  .app--root {
    padding-top: 5%;
  }

  .content--root {
    margin-top: 10%;
  }

  .btn--root {
    gap: 20px;
  }

  .input--root {
    padding: 10px;
  }

  input {
    font-size: 1.6rem;
  }

  input::placeholder {
    font-size: 1rem;
    font-weight: bold;
    color: #fff3d9;
  }
}
