/* 🌙 Tổng thể */
body {
  font-family: "Segoe UI", sans-serif;
  background-color: #dfe9f3;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

/* 🌃 Ảnh nền có độ tối hơn */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.55)),
    url("../images/backgroud1.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.8) blur(1.5px);
  z-index: -1;
}

/* 🌟 Header */
#header {
  text-align: center;
  margin-top: 70px;
  animation: fadeInDown 1s ease;
}
#header h1 {
  color: #ffffff;
  font-size: 40px;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* 👁️ Ô mật khẩu và icon hiển thị */
.password-container {
  position: relative;
  width: 95%;
  margin: 10px auto;
}

/* Tăng độ ưu tiên để padding-right có tác dụng */
#loginForm .password-container input {
  display: block;
  width: 100%;
  box-sizing: border-box; /* đảm bảo padding không làm co width */
  padding: 14px 46px 14px 16px; /* chừa khoảng trống cho icon */
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.85);
  color: #222;
  font-size: 16px;
  transition: all 0.3s ease;
  margin: 0;
}

/* ✨ SỬA LỖI 2: Ẩn icon mặc định của trình duyệt (Edge, Chrome...) */
#loginForm .password-container input::-ms-reveal,
#loginForm .password-container input::-ms-clear {
  display: none;
}
#loginForm .password-container input::-webkit-password-reveal-button {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

/* 👁️ Icon mắt (Emoji của bạn) */
.toggle-password {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  font-size: 20px;
  color: rgba(0, 0, 0, 0.45);
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
  pointer-events: all;
}

.toggle-password:hover {
  color: #2196f3;
}

/* 🪄 Form đăng nhập – nền trắng */
#loginForm {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  max-width: 440px;
  margin: 70px auto;
  padding: 45px 40px;
  border-radius: 20px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  text-align: center;
  animation: fadeInUp 1.2s ease;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
#loginForm:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.25);
}

/* ✨ Tiêu đề form */
#loginForm h3 {
  color: #1a1a1a;
  margin-bottom: 25px;
  font-size: 26px;
  font-weight: 600;
  text-shadow: none;
}

/* ✍️ Input */
#loginForm input {
  width: 95%;
  margin: 10px auto; /* Căn giữa */
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: rgba(255, 255, 255, 0.85);
  color: #222;
  font-size: 16px;
  transition: all 0.3s ease;
  box-sizing: border-box; /* ✨ SỬA LỖI 1: Đồng bộ cách tính độ rộng */
}
#loginForm input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}
#loginForm input:focus {
  outline: none;
  background: #fff;
  box-shadow: 0 0 10px rgba(33, 150, 243, 0.3);
}

/* 🟦 Nút đăng nhập */
#loginForm button {
  background: linear-gradient(135deg, #2196f3, #0d47a1);
  color: #fff;
  border: none;
  padding: 14px 20px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  width: 95%;
  margin-top: 25px;
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(33, 150, 243, 0.4);
}
#loginForm button:hover {
  background: linear-gradient(135deg, #42a5f5, #1565c0);
  transform: scale(1.04);
  box-shadow: 0 10px 25px rgba(33, 150, 243, 0.5);
}

/* 🔗 Liên kết phụ */
#loginForm .links {
  display: flex;
  justify-content: space-between;
  width: 95%;
  margin: 20px auto;
}
#loginForm a {
  color: #1565c0;
  text-decoration: none;
  font-size: 15px;
  transition: color 0.2s ease;
}
#loginForm a:hover {
  color: #0d47a1;
  text-decoration: underline;
}

/* ⚠️ Thông báo */
#message {
  margin-top: 20px;
  font-size: 15px;
  color: #d32f2f;
}

/* ✨ Hiệu ứng xuất hiện */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
