/* Use the imported Poppins font for a stylish look */
* {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Wave background */
.wave-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  z-index: -1;
  overflow: hidden;
}

.wave {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23a044ff" fill-opacity="0.3" d="M0,192L48,197.3C96,203,192,213,288,229.3C384,245,480,267,576,250.7C672,235,768,181,864,181.3C960,181,1056,235,1152,234.7C1248,235,1344,181,1392,154.7L1440,128L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
  background-size: cover;
  animation: wave 10s linear infinite;
}

.wave2 {
  bottom: 10px;
  opacity: 0.5;
  animation: wave 15s linear infinite reverse;
}

.wave3 {
  bottom: 20px;
  opacity: 0.3;
  animation: wave 20s linear infinite;
}

@keyframes wave {
  0% { background-position-x: 0; }
  100% { background-position-x: 1440px; }
}

/* Main container styling */
#mainContainer {
  max-width: 900px;
  margin: 40px auto;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  padding: 30px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(10px);
}

/* Title */
#mainContainer h1 {
  text-align: center;
  margin-bottom: 10px;
  color: #4f3676;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 2.2rem;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 30px;
  font-size: 1.1rem;
}

/* Textarea container spacing */
.textarea-container {
  margin: 25px 0;
}

/* Label styling */
.textarea-container label {
  font-weight: 600;
  display: block;
  margin-bottom: 10px;
  color: #333;
  font-size: 1.1rem;
}

.textarea-container label i {
  margin-right: 8px;
  color: #6a3093;
}

/* Textareas for input/output (stylish look) */
.textarea-container textarea {
  width: 100%;
  height: 200px;
  padding: 15px;
  resize: vertical;
  border-radius: 8px;
  border: 2px solid #e0e0e0;
  outline: none;
  font-family: "Poppins", sans-serif;
  font-size: 15px;
  transition: border-color 0.3s, box-shadow 0.3s;
  background-color: #f9f9f9;
}

.textarea-container textarea:focus {
  border-color: #6a3093;
  box-shadow: 0 0 0 3px rgba(106, 48, 147, 0.1);
}

/* Button container */
.button-bar {
  text-align: center;
  margin: 25px 0;
}

/* Buttons (modern gradient style) */
.button-bar button {
  margin: 5px 10px;
  padding: 14px 28px;
  background: linear-gradient(135deg, #6a3093, #a044ff);
  color: #fff;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(106, 48, 147, 0.3);
}

.button-bar button:hover {
  background: linear-gradient(135deg, #5f2c82, #9a3dfc);
  transform: translateY(-3px);
  box-shadow: 0 7px 20px rgba(106, 48, 147, 0.4);
}

.button-bar button:active {
  transform: translateY(0);
}

.button-bar button i {
  margin-right: 8px;
}

/* Error/Success messages */
#errorMessage, #successMessage {
  padding: 12px 20px;
  border-radius: 8px;
  margin-top: 15px;
  text-align: center;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

#errorMessage {
  color: #e74c3c;
  background-color: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
}

#successMessage {
  color: #27ae60;
  background-color: rgba(39, 174, 96, 0.1);
  border: 1px solid rgba(39, 174, 96, 0.3);
}

#errorMessage i, #successMessage i {
  margin-right: 10px;
  font-size: 1.2rem;
}

/* Progress indicator */
.progress-container {
  margin: 20px 0;
  text-align: center;
}

.progress-bar {
  width: 100%;
  height: 10px;
  background-color: #e0e0e0;
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 15px;
}

.progress {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #6a3093, #a044ff);
  border-radius: 5px;
  animation: progress 2s infinite;
}

@keyframes progress {
  0% { width: 0%; }
  50% { width: 70%; }
  100% { width: 100%; }
}

.progress-text {
  color: #666;
  font-style: italic;
}

