/* ====== Toàn trang ====== */
html, body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.3), rgba(59, 191, 241, 0.2), rgba(255, 0, 0, 0.05));
  background-size: cover;
}

/* Hiệu ứng ánh sáng nền di chuyển */
html::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(0, 140, 255, 0.2), transparent 70%);
  animation: redMove 120s infinite linear;
  filter: blur(50px);
  z-index: -1;
}

@keyframes redMove {
  0% { transform: translate(0, 0); }
  50% { transform: translate(-50%, -50%); }
  100% { transform: translate(50%, 50%); }
}

/* ====== Thanh tiêu đề ====== */
.title-bar {
  height: 50px;
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.5);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
  transition: 0.3s ease;
  z-index: 1000;
}

.title-bar:hover {
  box-shadow: 0px 4px 10px rgba(0, 174, 209, 0.5);
}

/* ====== Nút trên thanh tiêu đề ====== */
.control-button-container {
  display: flex;
  height: 50px;
}

.button-control-1 {
  height: 100%;
  width: 100px;
  margin-left: 10px;
  border: none;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: 0.3s ease;
  font-weight: bold;
}

.button-control-1:hover {
  background-color: rgba(202, 202, 202, 0.5);
}

/* ====== Container căn giữa nội dung ====== */
.container {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* ====== Box chào mừng và form ====== */
.box,
.box-a {
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  width: 300px;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

.box-a {
  margin-top: 20px;
  animation-delay: 0.5s;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ====== Input và button ====== */
input {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
  transition: 0.3s ease;
}

input:focus {
  border: 1px solid #0400ff;
  outline: none;
}

.button-1 {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 16px;
  background-color: #7f55f5;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.3s ease;
}

.button-1:hover {
  background-color: #6334f0;
}

/* ====== Overlay báo lỗi (popup) ====== */
#overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(0px);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: backdrop-filter 0.6s ease, opacity 0.6s ease;
  z-index: 2000;
}

#overlay.active {
  backdrop-filter: blur(5px);
  opacity: 1;
  pointer-events: all;
}

#box-err {
  background: white;
  width: 40%;
  height: 45%;
  border-radius: 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  transform: translate(-50%, -50%) scale(0.9);
  transition: all 0.4s ease;
  opacity: 0;
  position: fixed;
  top: 50%;
  left: 50%;
}

#overlay.active #box-err {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* ====== Nút đóng lỗi ====== */
.button-buy {
  margin-bottom: 30px;
  width: 120px;
  height: 40px;
  font-size: 18px;
  border: 0.1rem solid rgb(199, 199, 199);
  background-color: rgb(17, 182, 12);
  color: white;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s ease;
  font-family: 'Roboto', sans-serif;
}

.button-buy:hover {
  background-color: rgb(12, 146, 9);
}
