/* Lodge Complaint Section */
#lodge-complaint {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 60px 20px;
  background-image: url(../img/food-bg.jpg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
  position: relative;
  overflow: hidden;
}

.complaint-container {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  max-width: 700px;
  width: 100%;
  text-align: center;
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 1;
  animation: fadeIn 1s ease;
}

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

/* Pulsing Background Gradient */
.complaint-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    rgba(231, 76, 60, 0.2),
    rgba(108, 92, 231, 0.2)
  );
  z-index: -1;
  animation: pulseGradient 6s infinite ease-in-out;
}

@keyframes pulseGradient {
  0%,
  100% {
    opacity: 0.4;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.05);
  }
}

.complaint-container h2 {
  font-size: 32px;
  font-weight: 700;
  color: #2f3542;
  margin-bottom: 10px;
  position: relative;
}

.complaint-container h2::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #e74c3c, #6c5ce7);
  border-radius: 2px;
}

.complaint-container p {
  font-size: 16px;
  color: #747d8c;
  margin-bottom: 20px;
}

/* Form Styling */
#complaint-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}

.form-group {
  position: relative;
  width: 100%;
  max-width: 500px;
}

#complaint-form input,
#complaint-form textarea,
#complaint-form select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 15px;
  background: #f8f8f8;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

#complaint-form input:focus,
#complaint-form textarea:focus,
#complaint-form select:focus {
  outline: none;
  border: 2px solid transparent;
  background: #fff;
  box-shadow: 0 0 10px rgba(108, 92, 231, 0.4);
  background: linear-gradient(white, white) padding-box,
    linear-gradient(45deg, #e74c3c, #6c5ce7) border-box;
}

.form-group::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #e74c3c, #6c5ce7);
  transition: width 0.3s ease, left 0.3s ease;
  transform: translateX(-50%);
}

.form-group:focus-within::after {
  width: 80%;
}

#complaint-form textarea {
  resize: vertical;
  min-height: 120px;
}

/* Shake Animation for Invalid Submission */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  50% {
    transform: translateX(5px);
  }
  75% {
    transform: translateX(-5px);
  }
}

.shake {
  animation: shake 0.3s ease;
}

/* Unique Submit Button */
.btn-complaint {
  position: relative;
  padding: 12px 30px;
  background: linear-gradient(45deg, #e74c3c, #6c5ce7);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-complaint i {
  font-size: 18px;
  animation: pulseIcon 2s infinite;
}

.btn-complaint:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(108, 92, 231, 0.4);
}

.btn-complaint::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.4),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-complaint:hover::before {
  left: 100%;
}

.btn-complaint .ripple {
  position: absolute;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

@keyframes pulseIcon {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

/* Floating Food Item */
.complaint-image {
  width: 120px;
  height: 120px;
  margin: 0 auto 20px;
  position: relative;
  animation: floatRotate 4s infinite ease-in-out;
}

.complaint-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@keyframes floatRotate {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(10deg);
  }
}

/* Success/Error Message */
#complaint-message {
  display: none;
  font-size: 16px;
  font-weight: 600;
  margin-top: 15px;
  padding: 10px;
  border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .complaint-container {
    padding: 25px;
  }

  .complaint-container h2 {
    font-size: 28px;
  }

  .complaint-container p {
    font-size: 14px;
  }

  .form-group {
    max-width: 100%;
  }

  .complaint-image {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  #lodge-complaint {
    padding: 40px 10px;
  }

  .complaint-container {
    padding: 15px;
  }

  .btn-complaint {
    padding: 10px 20px;
    font-size: 14px;
  }

  .btn-complaint i {
    font-size: 16px;
  }

  .complaint-image {
    width: 80px;
    height: 80px;
  }
}
