/* Configuración global y variables CSS */
:root {
  --primary-color: #10B981;
  --secondary-color: #047857;
  --accent-color: #06B6D4;
  --success-color: #059669;
  --warning-color: #D97706;
  --error-color: #DC2626;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-light: #94A3B8;
  --background-primary: #F8FAFC;
  --background-secondary: #FFFFFF;
  --border-color: #E2E8F0;
  --shadow-light: rgba(0, 0, 0, 0.05);
  --shadow-medium: rgba(0, 0, 0, 0.1);
  --shadow-heavy: rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y configuración global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Inter', 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
  color: var(--text-primary);
  line-height: 1.6;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Header simplificado */
.header {
  background: var(--background-secondary);
  box-shadow: 0 2px 20px var(--shadow-light);
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 10px;
}

.header-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  text-align: center;
  letter-spacing: -0.5px;
}

/* Contenedor principal */
.container {
  max-width: 800px;
  margin: 1rem auto;
  padding: 0 2rem;
  flex: 1;
  overflow-y: auto;
}

.main-card {
  background: var(--background-secondary);
  border-radius: var(--border-radius);
  box-shadow: 0 10px 40px var(--shadow-medium);
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.card-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 1.5rem;
  text-align: center;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.card-subtitle {
  font-size: 0.9rem;
  opacity: 0.95;
  font-weight: 400;
}

.card-body {
  padding: 1.5rem;
}

/* Formulario profesional */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.form-description {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
  line-height: 1.5;
}

.file-input-wrapper {
  position: relative;
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  background: var(--background-primary);
  transition: var(--transition);
  cursor: pointer;
}

.file-input-wrapper:hover {
  border-color: var(--primary-color);
  background: rgba(16, 185, 129, 0.05);
}

.file-input-wrapper.dragover {
  border-color: var(--primary-color);
  background: rgba(16, 185, 129, 0.1);
}

.file-input {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-input-content {
  pointer-events: none;
}

.file-input-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.file-input-text {
  font-size: 1rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.file-input-hint {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Botones */
.button-group {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--accent-color), #0891B2);
  color: white;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(6, 182, 212, 0.4);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Área de salida */
.output {
  background: var(--background-primary);
  border-radius: var(--border-radius);
  padding: 1rem;
  border-left: 4px solid var(--accent-color);
  margin-top: 0.75rem;
  position: relative;
}

.output::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(6, 182, 212, 0.05));
  border-radius: var(--border-radius);
  pointer-events: none;
}

.output.success {
  border-left-color: var(--success-color);
  background: rgba(5, 150, 105, 0.05);
}

.output.success::before {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.05), rgba(16, 185, 129, 0.05));
}

.output.error {
  border-left-color: var(--error-color);
  background: rgba(220, 38, 38, 0.05);
}

.output.error::before {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), rgba(239, 68, 68, 0.05));
}

.output h3 {
  color: var(--text-primary);
  margin-bottom: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.output p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  line-height: 1.5;
  font-size: 0.9rem;
}

.output ol {
  margin-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.output li {
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}

.output strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Footer simplificado */
.footer {
  background: var(--background-secondary);
  border-top: 1px solid var(--border-color);
  padding: 0.75rem 0;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
}

.footer-text {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* Animaciones */
.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 1024px) {
  .container {
    max-width: 90%;
    margin: 0.75rem auto;
  }
  
  .card-header {
    padding: 1.25rem;
  }
  
  .card-body {
    padding: 1.25rem;
  }
}

@media (max-width: 768px) {
  body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
  }
  
  .container {
    margin: 0.5rem auto;
    padding: 0 1rem;
    overflow-y: visible;
  }
  
  .header {
    padding: 0.25rem 0;
  }
  
  .header-content {
    padding: 0 1rem;
  }
  
  .main-card {
    margin: 0;
    border-radius: 0;
  }
  
  .card-header {
    padding: 1rem;
    border-radius: 0;
  }
  
  .card-title {
    font-size: 1.25rem;
  }
  
  .card-subtitle {
    font-size: 0.85rem;
  }
  
  .card-body {
    padding: 1rem;
  }
  
  .form-group {
    margin-bottom: 1rem;
  }
  
  .form-label {
    font-size: 0.9rem;
  }
  
  .form-description {
    font-size: 0.8rem;
  }
  
  .file-input-wrapper {
    padding: 1rem;
  }
  
  .file-input-icon {
    font-size: 2rem;
  }
  
  .file-input-text {
    font-size: 0.9rem;
  }
  
  .file-input-hint {
    font-size: 0.8rem;
  }
  
  .button-group {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem 1rem;
    font-size: 0.9rem;
  }
  
  .output {
    padding: 0.75rem;
    margin-top: 0.5rem;
  }
  
  .output h3 {
    font-size: 0.9rem;
  }
  
  .output p {
    font-size: 0.8rem;
  }
  
  .output li {
    font-size: 0.8rem;
  }
  
  .footer {
    padding: 0.5rem 0;
  }
  
  .footer-content {
    padding: 0 1rem;
  }
  
  .footer-text {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 0.5rem;
  }
  
  .header-content {
    padding: 0 0.5rem;
  }
  
  .card-header {
    padding: 0.75rem;
  }
  
  .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
  }
  
  .card-subtitle {
    font-size: 0.8rem;
  }
  
  .card-body {
    padding: 0.75rem;
  }
  
  .form-label {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }
  
  .form-description {
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
  }
  
  .file-input-wrapper {
    padding: 0.75rem;
  }
  
  .file-input-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }
  
  .file-input-text {
    font-size: 0.85rem;
  }
  
  .file-input-hint {
    font-size: 0.75rem;
  }
  
  .btn {
    padding: 0.75rem 0.5rem;
    font-size: 0.85rem;
  }
  
  .output {
    padding: 0.5rem;
  }
  
  .output h3 {
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
  }
  
  .output p {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
  }
  
  .output ol {
    margin-left: 1rem;
  }
  
  .output li {
    font-size: 0.75rem;
    margin-bottom: 0.125rem;
  }
  
  .footer-content {
    padding: 0 0.5rem;
  }
  
  .footer-text {
    font-size: 0.7rem;
  }
}

@media (max-width: 360px) {
  .container {
    padding: 0 0.25rem;
  }
  
  .header-content {
    padding: 0 0.25rem;
  }
  
  .card-header {
    padding: 0.5rem;
  }
  
  .card-title {
    font-size: 1rem;
  }
  
  .card-subtitle {
    font-size: 0.75rem;
  }
  
  .card-body {
    padding: 0.5rem;
  }
  
  .file-input-wrapper {
    padding: 0.5rem;
  }
  
  .file-input-icon {
    font-size: 1.5rem;
  }
  
  .file-input-text {
    font-size: 0.8rem;
  }
  
  .file-input-hint {
    font-size: 0.7rem;
  }
  
  .btn {
    padding: 0.625rem 0.25rem;
    font-size: 0.8rem;
  }
  
  .output {
    padding: 0.375rem;
  }
  
  .output h3 {
    font-size: 0.8rem;
  }
  
  .output p {
    font-size: 0.7rem;
  }
  
  .output li {
    font-size: 0.7rem;
  }
  
  .footer-content {
    padding: 0 0.25rem;
  }
  
  .footer-text {
    font-size: 0.65rem;
  }
}

/* Orientación landscape en móviles */
@media (max-width: 768px) and (orientation: landscape) {
  body {
    height: auto;
    min-height: 100vh;
  }
  
  .container {
    margin: 0.25rem auto;
  }
  
  .card-header {
    padding: 0.75rem;
  }
  
  .card-body {
    padding: 0.75rem;
  }
  
  .file-input-wrapper {
    padding: 0.75rem;
  }
  
  .button-group {
    flex-direction: row;
    gap: 0.5rem;
  }
  
  .btn {
    width: auto;
    flex: 1;
  }
}

/* Pantallas muy grandes */
@media (min-width: 1400px) {
  .container {
    max-width: 1000px;
  }
  
  .card-header {
    padding: 2rem;
  }
  
  .card-body {
    padding: 2rem;
  }
  
  .card-title {
    font-size: 1.75rem;
  }
  
  .card-subtitle {
    font-size: 1.1rem;
  }
  
  .file-input-wrapper {
    padding: 2rem;
  }
  
  .file-input-icon {
    font-size: 3rem;
  }
  
  .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
} 