html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden; /* biar gak bisa scroll */
}

body {
  font-family: Arial, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  background: url('https://images.unsplash.com/photo-1504384308090-c894fdcc538d?auto=format&fit=crop&w=1600&q=80')
              no-repeat center center/cover;
  position: relative;
}

/* Background blur overlay */
body::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  z-index: 0;
}

/* ===== Wrapper ===== */
.register-wrapper {
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

/* ===== Box Register ===== */
.register-box {
  background: rgba(255, 255, 255, 0.96);
  padding: 25px 30px; /* 🔥 jarak nyaman, tidak gepeng */
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
  width: 360px; /* dikembalikan sedikit lebar biar proporsional */
  max-width: 90%;
  text-align: center;
  box-sizing: border-box;
  animation: fadeIn 0.6s ease-in-out;
}

.register-box p {
    color: #777; /* abu-abu lembut */
    font-size: 14px;
    margin-bottom: 20px;
}

/* Judul */
.register-box h2 {
  font-size: 20px;
  font-weight: bold;
  color: #333;
  margin-top: 5px;
  margin-bottom: 15px; /* jarak pas antara judul dan form */
}

/* Pesan error */
.message ul {
  list-style: none;
  padding: 0;
  margin: 10px 0;
  color: red;
  font-size: 13px;
  text-align: left;
}

/* Form */
.register-box form {
  display: flex;
  flex-direction: column;
  gap: 12px; /* jarak antar input pas */
}

.register-box input,
.register-box select {
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
  transition: 0.3s;
}

.register-box input:focus,
.register-box select:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.4);
}

/* Password toggle */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 40px;
}

.password-wrapper .toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #555;
  font-size: 16px;
}

/* Tombol daftar */
.btn-primary {
  background: #007bff;
  color: #fff;
  padding: 11px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.3s, transform 0.1s ease-in-out;
}

.btn-primary:hover {
  background: #0056b3;
}

.btn-primary:active {
  transform: scale(0.97);
}

/* Link bawah */
.back-link, .login-link {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  text-decoration: none;
}

.login-link {
  color: #28a745;
  font-weight: bold;
}

.back-link {
  color: #007bff;
}

.login-link:hover, .back-link:hover {
  text-decoration: underline;
}

/* Animasi */
@keyframes fadeIn {
  from {opacity: 0; transform: translateY(-15px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Responsif */
@media (max-width: 480px) {
  .register-box {
    width: 92%;
    padding: 20px 22px;
  }

  .register-box h2 {
    font-size: 18px;
  }

  .btn-primary {
    font-size: 14px;
    padding: 9px;
  }
}
