:root {
  --primary-color: #2563eb;
  --primary-hover: #1d4ed8;
  --background-color: #f8fafc;
  --surface-color: #ffffff;
  --text-color: #1e293b;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --radius: 0.5rem;
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.container {
  width: 100%;
  max-width: 600px;
  background-color: var(--surface-color);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  text-align: center;
}

h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

p {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
}

textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 1rem;
}

button:hover {
  background-color: var(--primary-hover);
}

button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#resultado {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius);
  background-color: #f1f5f9;
  position: relative;
  overflow: hidden;
}

#resultado img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: calc(var(--radius) - 2px);
}

.placeholder-text {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border-left-color: var(--primary-color);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

footer {
  margin-top: 2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.help-text {
  margin-top: 0.5rem;
  text-align: left;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.help-text summary {
  cursor: pointer;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.help-text summary:hover {
  text-decoration: underline;
}

.help-content {
  background-color: #f1f5f9;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  margin-top: 0.5rem;
}

.help-content p {
  margin-bottom: 0.5rem;
}

.help-content code {
  display: block;
  background-color: #e2e8f0;
  padding: 0.5rem;
  border-radius: 4px;
  font-family: monospace;
  word-break: break-all;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.help-content ul {
  list-style-type: none;
  padding-left: 0;
}

.help-content li {
  margin-bottom: 0.25rem;
}

.help-content strong {
  font-weight: 600;
}