/* ✅ Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* 🌄 Background */
body {
  background: linear-gradient(135deg, #6a11cb 0%, #2575fc 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 15px;
}

/* 🧱 Form Container */
.container {
  background: white;
  padding: 30px 35px;
  border-radius: 15px;
  width: 100%;
  max-width: 550px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.8s ease;
}

/* ✨ Heading */
h1 {
  text-align: center;
  margin-bottom: 25px;
  color: #333;
  font-size: 28px;
  position: relative;
}

h1::after {
  content: "";
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #6a11cb, #2575fc);
  display: block;
  margin: 10px auto 0;
  border-radius: 2px;
}

/* 📄 Form */
.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
}

/* ✍ Inputs */
input,
textarea,
select {
  width: 100%;
  padding: 10px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  transition: all 0.3s ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #2575fc;
  box-shadow: 0 0 5px rgba(37, 117, 252, 0.4);
}

/* 🔘 Radio */
.radio-group {
  display: flex;
  gap: 15px;
}

.radio-group label {
  font-weight: 500;
  cursor: pointer;
}

/* ✅ Checkbox */
.checkbox {
  display: flex;
  align-items: center;
}

.checkbox input {
  width: auto;
  margin-right: 10px;
}

/* ✨ Submit Button */
button {
  background: linear-gradient(90deg, #6a11cb, #2575fc);
  color: white;
  padding: 12px 15px;
  border: none;
  border-radius: 8px;
  width: 100%;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

button:hover {
  background: linear-gradient(90deg, #2575fc, #6a11cb);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* 📝 Response message */
#responseMsg {
  text-align: center;
  margin-top: 18px;
  font-weight: bold;
}

/* 🌀 Spinner */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid #ccc;
  border-top: 2px solid #2575fc;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ✨ Fade-in message */
.fade-in {
  animation: fadeInMsg 0.4s ease forwards;
}

@keyframes fadeInMsg {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ❌ Shake for errors */
.shake {
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  50% { transform: translateX(5px); }
  75% { transform: translateX(-5px); }
  100% { transform: translateX(0); }
}

/* 📱 Responsive */
@media (max-width: 600px) {
  .container {
    padding: 20px;
  }

  h1 {
    font-size: 22px;
  }

  input, textarea, select {
    font-size: 13px;
  }
}

/* 🌟 Container Fade-in */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
