* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
    Cantarell, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 40px 20px;
  text-align: center;
}

header h1 {
  font-size: 2.5em;
  margin-bottom: 10px;
}

header p {
  font-size: 1.1em;
  opacity: 0.9;
}

main {
  padding: 40px;
}

.form-group {
  margin-bottom: 30px;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 10px;
  color: #333;
}

textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 1em;
  resize: vertical;
  transition: border-color 0.3s;
}

textarea:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  padding: 14px 32px;
  border-radius: 8px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.loading p {
  margin-top: 20px;
  color: #667eea;
  font-weight: 600;
}

.resultados {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 40px;
}

.resultado-card {
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-radius: 12px;
  padding: 20px;
  transition: box-shadow 0.3s;
}

.resultado-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.resultado-card h3 {
  color: #667eea;
  margin-bottom: 15px;
  font-size: 1.2em;
}

.content-area {
  background: white;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 15px;
  min-height: 150px;
  max-height: 300px;
  overflow-y: auto;
  color: #333;
  line-height: 1.6;
  border: 1px solid #e0e0e0;
}

.btn-copy {
  width: 100%;
  background: #667eea;
  color: white;
  border: none;
  padding: 10px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}

.btn-copy:hover {
  background: #764ba2;
}

footer {
  background: #f8f9fa;
  text-align: center;
  padding: 20px;
  color: #666;
  border-top: 1px solid #e0e0e0;
}

@media (max-width: 768px) {
  header h1 {
    font-size: 1.8em;
  }

  main {
    padding: 20px;
  }

  .resultados {
    grid-template-columns: 1fr;
  }

  .content-area {
    min-height: 120px;
  }
}

/* Scroll customizado */
.content-area::-webkit-scrollbar {
  width: 6px;
}

.content-area::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.content-area::-webkit-scrollbar-thumb {
  background: #667eea;
  border-radius: 3px;
}

.content-area::-webkit-scrollbar-thumb:hover {
  background: #764ba2;
}
