@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap");

/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body,
input,
textarea,
button {
  font-family: "Inter", sans-serif;
}

body {
  margin: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-image: url("/assets/apj-logo.png");
}

body::before {
  content: "";
  position: absolute;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(212, 175, 55, 0.35),
    transparent 70%
  );
  animation: glow 8s infinite alternate;
  border-radius: 50%;
  filter: blur(60px);
  z-index: -1;
}

@keyframes glow {
  from {
    transform: translate(-150px, -150px) scale(1);
    opacity: 0.6;
  }

  to {
    transform: translate(150px, 150px) scale(1.2);
    opacity: 0.3;
  }
}

/* Form container */
.form-container {
  width: 100%;
  max-width: 420px;
  padding: 30px;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.8s ease-in-out;
}

.form-container h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #333;
  font-size: 1.6rem;
}

form label {
  display: block;
  margin: 12px 0 6px;
  font-weight: 600;
  color: #444;
  font-size: 0.95rem;
}

/* Input */
form input,
form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

form input:focus,
form textarea:focus {
  border-color: #d4af37;
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
  outline: none;
}

textarea {
  resize: none;
}

button,
.form-container .btn {
  width: 100%;
  padding: 14px;
  text-align: center;
  display: block;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #d4af37, #f9e79f);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
  transition: all 0.4s ease;
  margin: 10px 0;
  position: relative;
  overflow: hidden;
}

.loader {
  width: 28px;
  height: 28px;
  border: 5px solid #fff;
  border-bottom-color: transparent;
  border-radius: 50%;
  display: none;
  box-sizing: border-box;
  animation: rotation 1s linear infinite;
}

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

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

.btn.loading {
  opacity: 0.8;
  cursor: not-allowed;
}

.btn.loading .btn-text {
  display: none;
}

.btn.loading .loader {
  display: inline-block;
}

/* Error input + message */
input.error,
textarea.error {
  border-color: #e63946;
  background-color: #fff5f5;
}

.error-message {
  color: #e63946;
  font-size: 13px;
  margin-top: 4px;
  display: block;
}

/* Error page */
body.error-page .form-container h2 {
  color: #d9534f;
}

body.error-page .form-container .btn {
  background: linear-gradient(135deg, #d9534f, #ff7b7b);
}

body.error-page .form-container .btn:hover {
  background: linear-gradient(135deg, #a94442, #e06565);
}

/* Responsive */
@media (max-width: 480px) {
  .form-container {
    padding: 20px;
    border-radius: 10px;
  }

  .form-container h2 {
    font-size: 1.3rem;
  }

  form label {
    font-size: 0.9rem;
  }

  form input,
  form textarea {
    font-size: 0.9rem;
    padding: 10px;
  }

  button {
    font-size: 0.95rem;
    padding: 12px;
  }
}

/* Hiệu ứng fade-in */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* reCAPTCHA wrapper */
.recaptcha-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

@media (max-width: 400px) {
  .g-recaptcha {
    transform: scale(0.85);
    transform-origin: 0 0;
  }
}

.logo {
  text-align: center;
  margin-bottom: 15px;
}

.logo img {
  max-width: 120px;
  height: auto;
  border-radius: 8px;
}
