/* Styles moved from inline template to an external stylesheet */
* { box-sizing: border-box; font-family: 'Inter', sans-serif; margin: 0; padding: 0; }
html, body {
  width: 100%;
  height: 100%;
}
body {
  display: flex; justify-content: center; align-items: center;
  min-height: 100vh; background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff; flex-direction: column;
  padding: 1rem;
}
.container {
  background-color: rgba(255,255,255,0.05);
  padding: clamp(1rem, 5vw, 2rem);
  border-radius: 1rem;
  backdrop-filter: blur(10px);
  width: 100%;
  max-width: 700px;
  text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  margin: auto;
}

h1 {
  font-weight: 600;
  margin-bottom: 1.5rem;
  font-size: clamp(1.2rem, 6vw, 2rem);
  word-wrap: break-word;
}

textarea {
  width: 100%;
  padding: clamp(0.75rem, 2vw, 1rem);
  border-radius: 0.75rem;
  border: none;
  resize: none;
  font-size: clamp(0.9rem, 3vw, 1rem);
  margin-bottom: 1rem;
  outline: none;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  min-height: 120px;
}

.button-group {
  display: flex;
  gap: clamp(0.5rem, 2vw, 1rem);
  justify-content: center;
  flex-wrap: wrap;
}

button {
  background-color: #ff6b6b;
  border: none;
  padding: clamp(0.6rem, 2vw, 0.75rem) clamp(1.2rem, 4vw, 2rem);
  border-radius: 1rem;
  font-size: clamp(0.9rem, 3vw, 1rem);
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  transition: 0.3s;
  min-width: 100px;
  flex: 1;
  min-width: clamp(80px, 35%, 150px);
}

button:hover {
  background-color: #ff8787;
  transform: scale(1.05);
}

button:active {
  transform: scale(0.98);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: scale(1);
}

button.secondary {
  background-color: #667eea;
}

button.secondary:hover {
  background-color: #7c92f2;
}

#loader {
  margin-top: 1rem;
  height: 4px;
  width: 100%;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  overflow: hidden;
  display: none;
}

#loader div {
  height: 100%;
  width: 0%;
  background: #ff6b6b;
  animation: loading 1s linear infinite;
}

@keyframes loading {
  0% { width: 0; }
  50% { width: 100%; }
  100% { width: 0; }
}

/* Mobile-specific improvements */
@media (max-width: 600px) {
  body {
    padding: 0.5rem;
  }
  .container {
    padding: clamp(1rem, 3vw, 1.5rem);
  }
  h1 {
    font-size: clamp(1.1rem, 5vw, 1.5rem);
    margin-bottom: 1rem;
  }
  textarea {
    min-height: 140px;
    margin-bottom: 0.75rem;
  }
  .button-group {
    gap: 0.5rem;
  }
  button {
    min-width: 45%;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }
}
