/* Universal reset for box sizing */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Background setup */
body {
  font-family: 'Poppins', sans-serif;
  background: #f9f9f9;
  min-height: 100vh;
  width: 100%;
  margin: 0;
  padding: 20px;
}

/* Form wrapper (only center the form, not the whole site) */
.form-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  width: 100%;
  padding: 20px;
}

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

.form-container h2 {
  text-align: center;
  margin-bottom: 20px;
  color: #d60000;
  font-size: 24px;
  font-weight: bold;
  line-height: 1.4;
}

/* Input group */
.input-group {
  position: relative;
  margin-bottom: 20px;
}

.input-group i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #0d47a1;
  font-size: 16px;
  pointer-events: none;
}

.input-group input,
.input-group textarea,
.input-group select {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px 12px 40px;
  border: 2px solid #ddd;
  border-radius: 10px;
  outline: none;
  background: #fff;
  font-size: 15px;
  transition: all 0.3s ease-in-out;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.05);
  line-height: 1.4;
  display: block;
}

.input-group textarea {
  min-height: 100px;
  resize: vertical;
  padding-top: 14px;
}

.input-group input:focus,
.input-group textarea:focus,
.input-group select:focus {
  border-color: #d60000;
  box-shadow: 0 0 8px rgba(214,0,0,0.3);
}

/* Floating label */
.input-group label {
  position: absolute;
  top: 50%;
  left: 40px;
  transform: translateY(-50%);
  color: #777;
  font-size: 14px;
  pointer-events: none;
  transition: all 0.3s ease-in-out;
  background: #fff;
  padding: 0 5px;
}

.input-group input:focus ~ label,
.input-group input:valid ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:valid ~ label {
  top: -8px;
  left: 35px;
  color: #d60000;
  font-size: 12px;
}

.input-group select:focus ~ label,
.input-group select:valid ~ label {
  top: -8px;
  left: 35px;
  color: #d60000;
  font-size: 12px;
  background: #fff;
  padding: 0 5px;
  display: block;
}

/* Submit button */
.animated-btn {
  width: 100%;
  padding: 14px;
  background: #d60000;
  border: none;
  border-radius: 30px;
  color: #fff;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  text-transform: uppercase;
  animation: pulse 2s infinite;
}

.animated-btn:hover {
  background: #b30000;
  transform: scale(1.05);
  box-shadow: 0 0 15px rgba(214,0,0,0.5);
}

.animated-btn:active {
  transform: scale(0.95);
}

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

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(214,0,0,0.6); }
  70% { box-shadow: 0 0 0 12px rgba(214,0,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(214,0,0,0); }
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  .form-container {
    padding: 20px 15px;
    max-width: 100%;
    border-radius: 10px;
  }
  .form-container h2 {
    font-size: 20px;
  }
  .animated-btn {
    font-size: 15px;
    padding: 12px;
  }
}

