/* Estilos base */
:root {
  --bg-color: #f9fafb;
  --text-color: #1f2937;
  --card-bg: #ffffff;
  --card-border: #e5e7eb;
  --input-bg: #ffffff;
  --input-border: #d1d5db;
}

.dark {
  --bg-color: #111827;
  --text-color: #f9fafb;
  --card-bg: #1f2937;
  --card-border: #374151;
  --input-bg: #374151;
  --input-border: #4b5563;
}

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Asegurar que los elementos principales hereden los colores */
.container,
.card,
.input,
.textarea,
.select,
button {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Aplicar colores a los elementos de la interfaz */
.bg-white {
  background-color: var(--card-bg);
  border-color: var(--card-border);
}

.text-gray-800 {
  color: var(--text-color);
}

.border-gray-200 {
  border-color: var(--card-border);
}

/* Estilos para inputs y textareas */
input,
textarea,
select {
  background-color: var(--input-bg);
  border-color: var(--input-border);
  color: var(--text-color);
}

/* Asegurar que los placeholders sean visibles en modo oscuro */
::placeholder {
  color: var(--text-color);
  opacity: 0.7;
}

/* Estilos para el botón de tema */
#themeToggle {
  transition: all 0.3s ease;
}

#themeToggle:hover {
  transform: rotate(15deg);
}

/* Contenedor principal */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Efecto de escritura */
@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink-caret {
  from, to { border-color: transparent; }
  50% { border-color: #3b82f6; }
}

.typing-effect {
  overflow: hidden;
  border-right: 2px solid #3b82f6;
  white-space: nowrap;
  margin: 0 auto;
  letter-spacing: 0.15em;
  animation: 
    typing 3.5s steps(40, end),
    blink-caret 0.75s step-end infinite;
}

/* Tarjetas de tono */
.tone-card {
  transition: all 0.3s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.tone-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.tone-card.active {
  border-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.05);
}

/* Botones */
.btn-primary {
  background-color: #3b82f6;
  color: white;
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background-color: #2563eb;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Animación de carga */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.animate-pulse {
  animation: pulse 1.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Transiciones suaves */
.transition-all {
  transition-property: all;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}
