/* Error Handler Styles - VersiĆ³n Mejorada */
.error-container, .production-container { 
  --bg-primary: #212529; 
  --bs-bg: #16191d; 
  --bg-secondary: #212529; 
  --bg-hover: #252525; 
  --bg-meta: #2a2a2a; 
  --text-primary: #e0e0e0; 
  --text-secondary: #a4b0be; 
  --text-muted: #747d8c; 
  --border-color: #2f3542; 
  --error-color: #ff4757; 
  --success-color: #7bed9f; 
  --warning-color: #eccc68; 
  --arg-string: #f12e4f; 
  --arg-type: #70a1ff; 
  --arg-keyword: #ff4757; 
  --arg-number: #2ed573; 
}

.error-container {
  max-width: 1400px;
  margin: 0 auto;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border-left: 5px solid var(--error-color);
  overflow: hidden;
}

.error-header {
  border-bottom: 1px solid var(--border-color);
  padding: 30px;
}

.error-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.error-title {
  color: var(--text-primary);
  font-size: 28px;
  font-weight: bold;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.error-message {
  font-size: 18px;
  color: #ffffff;
  margin: 0 0 20px 0;
  word-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
  line-height: 1.5;
}

.error-meta {
  background-color: var(--bg-meta);
  padding: 15px;
  border-radius: 6px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 14px;
}

.meta-label {
  color: var(--text-secondary);
  font-weight: 600;
}

.meta-error {
  color: var(--error-color);
  font-weight: 800;
  font-size: 1.25rem;
}

.meta-value {
  color: var(--success-color);
  word-break: break-all;
  word-wrap: break-word;
  white-space: pre-wrap;
}

.trace-section {
  padding: 0 30px 30px 30px;
}

.trace-section h4 {
  color: var(--text-secondary);
  font-size: 16px;
  margin: 0 0 20px 0;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

/* Estilos del Stack Trace - Envoltura de texto mejorada */
.trace-item {
  display: flex;
  padding: 15px;
  border-bottom: 1px solid var(--border-color);
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 13px;
  line-height: 1.6;
  gap: 15px;
}

.trace-item:hover {
  background-color: var(--bg-hover);
}

.trace-index {
  color: var(--text-muted);
  min-width: 40px;
  font-weight: bold;
  flex-shrink: 0;
}

.trace-content {
  flex: 1;
  min-width: 0;
  overflow: visible;
}

.trace-call {
  color: #dfe4ea;
  margin-bottom: 8px;
  word-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.trace-file {
  color: var(--text-muted);
  word-wrap: break-word;
  word-break: break-all;
  white-space: pre-wrap;
  font-size: 12px;
}

.trace-line {
  color: var(--warning-color);
  font-weight: bold;
}

/* Estilos para argumentos */
.arg-string {
  color: var(--arg-string);
  word-wrap: break-word;
  word-break: break-word;
  white-space: pre-wrap;
}

.arg-type {
  color: var(--arg-type);
}

.arg-keyword {
  color: var(--arg-keyword);
  font-weight: bold;
}

.arg-number {
  color: var(--arg-number);
}

/* ProducciĆ³n styles */
.production-container {
  text-align: center;
  padding: 60px 20px;
  max-width: 600px;
  margin: 0 auto;
  background-color: var(--bg-secondary);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.production-container h2 {
  color: var(--error-color);
  margin-bottom: 20px;
  font-size: 28px;
}

.production-container p {
  color: var(--text-primary);
  margin-bottom: 30px;
  font-size: 16px;
  line-height: 1.6;
}

.production-container a {
  display: inline-block;
  padding: 12px 30px;
  background-color: var(--error-color);
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  font-weight: 600;
}

.production-container a:hover {
  background-color: #e84118;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Scrollbar personalizada (opcional) */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Responsive */
@media (max-width: 768px) {
  .error-container {
    margin: 10px;
    border-radius: 5px;
  }

  .error-header {
    padding: 20px;
    flex-direction: column;
    align-items: flex-start;
  }

  .trace-section {
    padding: 0 20px 20px 20px;
  }

  .trace-item {
    flex-direction: column;
    gap: 5px;
  }

  .trace-index {
    min-width: auto;
  }

  .error-title {
    font-size: 22px;
  }

  .error-message {
    font-size: 16px;
  }

  .btn-back {
    white-space: normal;
    text-align: center;
    width: 100%;
  }
}