html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Roboto", sans-serif;
  background: linear-gradient(135deg, #7ee8fa 0%, #80ff72 100%);
  color: #333;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header .logo {
  display: flex;
  align-items: center; /* Canh giữa logo và tiêu đề theo chiều dọc */
  gap: 10px; /* Khoảng cách giữa logo và tiêu đề */
}

.header .logo img.logo-image {
  width: 50px; /* Điều chỉnh kích thước logo */
  height: auto; /* Giữ tỷ lệ logo */
  border-radius: 5px; /* Làm tròn góc logo nếu cần */
}

.header .logo h3 {
  margin: 0;
  font-size: clamp(
    12px,
    4vw,
    25px
  ); /* Kích thước phông chữ thay đổi theo kích thước khung nhìn */
  color: green;
}

.social-icons {
  display: flex;
  gap: 10px;
}

.social-icons a {
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transition: box-shadow 0.3s ease;
}

.social-icons a:hover .icon {
  transform: scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.typewriter {
  display: flex;
  justify-content: center;
  padding: 5px;
}

.typewriter h1 {
  color: #171670;
  font-family: monospace;
  overflow: hidden; /* Ensures the content is not revealed until the animation */
  white-space: nowrap; /* Keeps the content on a single line */
  margin: 0 auto; /* Gives that scrolling effect as the typing happens */
  letter-spacing: 0.05em; /* Adjust as needed */
  animation: typing 3.5s steps(30, end); /* Removed blink-caret */
}

/* The typing effect */
@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 55%;
  }
}

.container-banner {
  width: 100%;
  overflow: hidden;
}

.moving-icons {
  display: flex;
  width: 200%;
  animation: moveLeft 40s linear infinite;
}

.icon-set {
  display: flex;
  width: 50%;
}

.icon-moving {
  width: 100px;
  height: 100px;
  margin: 10px;
  flex-shrink: 0;
}

.icon-moving img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Giữ nguyên tỉ lệ hình ảnh, không bị bóp méo */
  border-radius: 5px; /* Làm tròn góc hình ảnh (tuỳ chọn) */
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.3); /* Hiệu ứng đổ bóng nhẹ (tuỳ chọn) */
}

@keyframes moveLeft {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%); /* Di chuyển một khoảng bằng một bộ icon */
  }
}

@media (max-width: 1200px) {
  .icon-set {
    width: 150%; /* Hiển thị ít icon hơn khi màn hình nhỏ hơn */
  }
  .moving-icons {
    animation: moveLeft 20s linear infinite; /* Tăng tốc độ để tránh khoảng trống */
  }
}

@media (max-width: 992px) {
  .icon-set {
    width: 200%;
  }
  .moving-icons {
    animation: moveLeft 15s linear infinite;
  }
}

@media (max-width: 768px) {
  .icon-set {
    width: 300%;
  }
  .moving-icons {
    animation: moveLeft 10s linear infinite;
  }
}

@media (max-width: 576px) {
  .typewriter h1 {
    font-size: 12px;
    white-space: normal; /* Cho phép xuống dòng */
    text-align: center; /* Căn giữa nếu muốn */
    word-wrap: break-word; /* Tự động xuống dòng nếu quá dài */
  }

  .container-banner {
    overflow: visible;
  }

  .icon-set {
    width: 400%;
  }
  .moving-icons {
    animation: moveLeft 8s linear infinite;
  }

  .typewriter h1 {
    overflow: visible; /* Bỏ overflow */
    white-space: normal; /* Cho phép text xuống dòng nếu cần */
    animation: none; /* Tắt hiệu ứng animation */
  }
}

.form-wrapper {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 60px 0;
}

.header-wrapper,
.container-form {
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
  padding: 20px;
  width: 400px;
  text-align: center;
  margin-bottom: 0; /* Đảm bảo không có khoảng cách giữa các container */
}

.header-wrapper {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
  margin-top: -20px;
  padding-top: 0;
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  width: 400px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.header-wrapper .logo {
  background-color: white;
  border-radius: 25px;
  padding: 5px 15px;
  display: flex;
  align-items: center;
  width: fit-content;
  margin: -35px auto 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-wrapper .logo-text {
  color: #333;
  font-size: 18px;
  font-weight: bold;
}

.container-form {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  margin-top: -40px; /* Loại bỏ khoảng cách giữa các container */
  padding-top: 0px;
}

.container h2,
.container-form h1 {
  margin-bottom: 15px;
  font-size: 22px;
  color: #333;
}

.header-wrapper p {
  margin-bottom: 15px;
  font-size: 16px;
  color: #666;
}

input[type="email"],
input[name="customer_code"] {
  width: 85%;
  padding: 12px;
  margin-bottom: 20px;
  border: 1px solid #ced4da;
  border-radius: 5px;
  font-size: 16px;
  transition: border-color 0.3s;
}

input[type="email"]:focus,
input[name="customer_code"]:focus {
  border-color: #17a2b8;
  outline: none;
}

button {
  width: 85%;
  background-color: #17a2b8;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover {
  background-color: #138496;
}

.alert {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #d4edda;
  color: #155724;
  border-radius: 5px;
  border: 1px solid #c3e6cb;
}

.alert a {
  color: #0b7dda;
  text-decoration: none;
  font-weight: bold;
}

.alert a:hover {
  text-decoration: underline;
}

.alert-form {
  margin-bottom: 10px;
  padding: 5px;
  background-color: #d4edda;
  color: #0e531e;
  font-weight: bold;
  border-radius: 5px;
  border: 1px solid #c3e6cb;
}

.footer {
  background-color: #2c3e50;
  color: white;
  padding: 10px 0;
  text-align: center;
}

.footer-bottom {
  color: #d1d1d1;
  font-size: 14px;
}

.otp-code {
  font-size: 1.5em;
  font-weight: bold;
  color: #17a2b8;
  margin-left: 10px;
  vertical-align: middle;
}

/* History view container */
.history-container {
  max-width: 500px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Back button in history view */
.btn-back {
  display: inline-block;
  margin-top: 20px;
  color: #17a2b8;
  text-decoration: none;
}

.container-form label {
  margin: 0; /* Reset margin cũ */
  font-size: 15px;
  font-weight: 900;
  color: #2c3e50;
  margin-bottom: 5px;
}

.container-form input[type="text"],
.container-form input[type="email"] {
  margin: 0; /* Reset margin mặc định */
  padding: 12px; /* Padding trong ô nhập */
  border-radius: 5px;
  border: 1px solid #ced4da;
  margin-bottom: 15px;
  margin-top: 5px;
}

.container-form button {
  margin-top: 12px; /* Khoảng cách phía trên nút */
  width: 100%; /* Nút full-width khung form */
}
