/* Reset some default browser styling */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Global Styles */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  overflow-x: hidden;
}

/* Header */
header {
  background: linear-gradient(90deg, #000000, #ff4d4d);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

header img {
  height: 50px;
  border-radius: 8px;
}

header h1 {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 24px;
  color: white;
  margin: 0;
}

/* Main Container */
.main-container {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  margin-top: 20px;
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
  gap: 20px;
}

/* Image Containers */
.image-container {
  width: 33.33%;
  overflow: hidden;
  border-radius: 8px;
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.3s ease;
}

.image-container img:hover {
  opacity: 0.9;
}

/* Form Container */
.form-container {
  width: 33.33%;
  background: linear-gradient(90deg, #ffa94d, #3399ff);
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.form-container h2 {
  text-align: center;
  color: #333333;
  font-size: 20px;
}

form {
  display: flex;
  flex-direction: column;
  width: 100%;
}

label {
  margin-top: 10px;
  margin-bottom: 5px;
  color: #333;
  font-weight: bold;
  font-size: 14px;
}

input, select, textarea {
  padding: 6px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
}

textarea {
  resize: vertical;
}

button {
  margin-top: 10px;
  padding: 8px;
  background-color: #007bff;
  color: white;
  font-size: 14px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s ease;
}

button:hover {
  background-color: #0056b3;
}

/* Footer */
footer {
  text-align: center;
  background: linear-gradient(90deg, #000000, #ff4d4d);
  color: white;
  padding: 15px;
  font-size: 12px;
  margin-top: 20px;
}

footer a {
  color: white;
  text-decoration: none;
  margin: 0 10px;
}

footer a:hover {
  text-decoration: underline;
}

footer p {
  display: inline-block;
  text-align: center;
  white-space: nowrap;
}

/* SUCCESS MESSAGE */
.success-message {
  display: none;
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #4CAF50;
  color: white;
  padding: 15px 25px;
  border-radius: 8px;
  font-weight: bold;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  animation: slide-in 0.3s ease, fade-out 0.3s ease 3s forwards;
}

.success-message::before {
  content: "✔ ";
  margin-right: 10px;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translate(-50%, -20px);
  }
  to {
    opacity: 1;
    transform: translate(-50%, 0);
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* ERROR MESSAGE */
.error {
  color: red;
  display: none;
}

/* PROGRESS BAR */
.progress-bar {
  height: 4px;
  width: 100%;
  background-color: #66bb6a;
  animation: progress 3s linear forwards;
  margin-top: 8px;
  border-radius: 2px;
}

@keyframes progress {
  from { width: 0%; }
  to { width: 100%; }
}

/* RESPONSIVE DESIGN */
@media (max-width: 1024px) {
  .main-container {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: stretch;
    padding: 10px;
    gap: 10px;
  }

  .image-container,
  .form-container {
    width: 33.33%;
  }

  header h1 {
    font-size: 20px;
  }
}

@media (max-width: 600px) {
  .main-container {
    flex-direction: column;
    padding: 5px;
    gap: 5px;
  }

  .image-container,
  .form-container {
    width: 100%;
  }

  .form-container h2 {
    font-size: 16px;
  }

  input, select, textarea {
    font-size: 12px;
  }

  button {
    font-size: 12px;
  }

  header h1 {
    font-size: 16px;
  }

  .success-message {
    font-size: 13px;
    padding: 8px 16px;
  }

  footer {
    font-size: 10px;
  }
}
