@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap');

/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

body {
  display: flex;
  justify-content: center;
  align-items: flex-start; /* align to top instead of center */
  min-height: 100vh;
  background: #ffffff;
  overflow-y: auto; /* enable vertical scroll */
  overflow-x: hidden; /* prevent horizontal scroll */
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 40px 20px; /* increase top/bottom padding */
}

/* WRAPPER */
.wrapper {
  width: 420px; /* reduce width slightly */
  max-width: 90vw; /* responsive width */
  background: #ffffff;
  padding: 35px 30px; /* reduce padding to make form more compact */
  border-radius: 25px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: wrapperFadeIn 1s ease-in-out;
  margin: 0 auto; /* remove top/bottom margin */
}

.form-box {
  border: 2px solid #ff00d4;
  border-radius: 25px;
  padding: 20px;
}

.wrapper::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 0, 251, 0.25), transparent);
  animation: rotate 20s linear infinite;
  z-index: -1;
}

@keyframes wrapperFadeIn {
  0% { opacity: 0; transform: scale(0.9); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.form-logo {
  display: block;
  margin: 0 auto 15px; /* reduce bottom margin */
  width: 65px; /* match other pages logo size */
  height: 24px;
  object-fit: contain;
  animation: logoPulse 2s ease-in-out infinite;
  box-shadow: 0 2px 6px rgba(255,255,255,0.8); /* white shadow */
  filter: drop-shadow(0 2px 4px rgba(255,255,255,0.6)); /* white drop shadow */
}

@keyframes logoPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

h2 {
  text-align: center;
  color: #000000;
  margin-bottom: 25px; /* reduce margin */
  font-weight: 800;
  font-size: 24px; /* slightly smaller heading */
  text-shadow: none;
  animation: fadeInText 1s ease-in-out;
}

@keyframes fadeInText {
  0% { opacity: 0; transform: translateY(-20px); }
  100% { opacity: 1; transform: translateY(0); }
}

.error, .success {
  text-align: center;
  margin-bottom: 20px;
  font-size: 14px;
  padding: 12px;
  border-radius: 10px;
  animation: slideIn 0.5s ease-in-out;
}

.error {
  color: #ff4d6d;
  background: rgba(255, 0, 251, 0.2);
}

.success {
  color: #28a745;
  background: rgba(40, 167, 69, 0.2);
}

.user-info {
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(223, 243, 252, 0.8);
  border-radius: 10px;
  color: #000000;
  font-size: 16px;
}

.user-info p {
  margin: 10px 0;
}

/* INPUTS */
.input-box {
  position: relative;
  margin-bottom: 20px; /* reduce spacing between inputs */
  animation: slideIn 0.5s ease-in-out;
}

@keyframes slideIn {
  0% { opacity: 0; transform: translateX(-30px); }
  100% { opacity: 1; transform: translateX(0); }
}

.input-box input {
  width: 100%;
  padding: 16px 50px 16px 20px;
  border-radius: 15px;
  border: 1px solid #ff00d4;
  background: rgba(223, 243, 252, 0.8);
  color: #000000;
  font-size: 16px;
  transition: all 0.4s ease;
}

.input-box input:focus {
  background: rgba(230, 230, 230, 1);
  border-color: #ff4d6d;
  box-shadow: 0 0 15px rgba(61, 50, 61, 0.5);
  outline: none;
}

.input-box input::placeholder {
  color: rgba(0, 0, 0, 0.5);
  font-weight: 300;
}

.input-box label {
  position: absolute;
  top: -25%;
  font-weight: 600;
  left: 20px;
  transform: translateY(-50%);
  color: #000000;
  font-size: 15px;
  pointer-events: none;
  transition: all 0.4s ease;
}

.input-box input:focus ~ label,
.input-box input:not(:placeholder-shown) ~ label {
  top: -12px;
  left: 15px;
  font-size: 12px;
  color: #ff00d4;
  background: #ffffff;
  padding: 0 8px;
  border-radius: 5px;
}

.input-box i {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: #ff00d4;
  font-size: 22px;
  transition: 0.3s;
}

.input-box input:focus ~ i {
  color: #ff4d6d;
}

/* CHECKBOX */
.checkbox-box {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  animation: slideIn 0.5s ease-in-out;
}

.checkbox-box input[type="checkbox"] {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #ff00d4;
  border-radius: 5px;
  background: rgba(223, 243, 252, 0.8);
  cursor: pointer;
  margin-right: 10px;
  transition: all 0.3s ease;
}

.checkbox-box input[type="checkbox"]:checked {
  background: #ff00d4;
  border-color: #ff4d6d;
  position: relative;
}

.checkbox-box input[type="checkbox"]:checked::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #ffffff;
  font-size: 14px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.checkbox-box label {
  color: #000000;
  font-size: 14px;
}

.checkbox-box label a {
  color: #ff00d4;
  text-decoration: none;
  font-weight: 600;
}

.checkbox-box label a:hover {
  color: #ff4d6d;
  text-decoration: underline;
}

/* BUTTON */
.btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 15px;
  background: linear-gradient(135deg, #ff00d4, #ff4d6d);
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 0 5px 20px rgba(255, 0, 251, 0.4);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(255, 0, 251, 0.6);
  background: linear-gradient(135deg, #ff4d6d, #ff00d4);
}

/* SECONDARY BUTTON (e.g., Back to Home) */
.btn-secondary {
  width: 100%;
  padding: 14px 16px;
  border-radius: 15px;
  border: 2px solid #ff00d4;
  background: #ffffff;
  color: #ff00d4;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s ease;
  text-align: center;
  display: block;
  text-decoration: none;
  margin-top: 12px;
}

.btn-secondary:link,
.btn-secondary:visited {
  color: #ff00d4;
  text-decoration: none;
}

.btn-secondary i {
  margin-right: 8px;
}

.btn-secondary:hover {
  background: #ff00d4;
  color: #ffffff;
  box-shadow: 0 8px 25px rgba(255, 0, 251, 0.2);
  transform: translateY(-2px);
}

.back-home {
  margin-top: 10px;
  text-align: center;
}

/* LINKS */
.register-link {
  text-align: center;
  margin-top: 25px;
  font-size: 14px;
  color: #000000;
}

.register-link a {
  color: #ff00d4;
  font-weight: 600;
  text-decoration: none;
  transition: 0.3s;
}

.register-link a:hover {
  color: #ff4d6d;
  text-decoration: underline;
}

/* RESPONSIVE */
@media (max-width: 480px) {
  .wrapper {
    width: 100%;
    padding: 40px 25px;
  }
  .form-logo { 
    width: 88px; 
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }
  h2 { font-size: 22px; }
  .input-box input { font-size: 14px; }
  .btn { font-size: 15px; }
  .checkbox-box label { font-size: 13px; }
}