:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --secondary: #10b981;
  
  --gray: #94a3b8;
}

.light-theme {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  background-color: var(--light);
  color: var(--dark);
  transition: all 0.3s ease;
  width: 95%;
  padding: 1rem;
  margin: 0 auto;
}



.calculator-card {
 /* display: grid;
  grid-template-columns: 1fr 2fr;*/
  gap: 2rem;
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
 
}



.input-group {
  margin-bottom: 1.5rem;
}

input, select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray);
  border-radius: 8px;
  font-size: 1rem;
}

.tooltip {
  position: relative;
  display: inline-block;
  cursor: help;
}

.tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: var(--dark);
  color: white;
  text-align: center;
  border-radius: 6px;
  padding: 0.5rem;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
  color: #fff;
  background-color: #2563eb;
}

.summary-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.summary-card {
  padding: 1.5rem;
  border-radius: 12px;
  background: #f1f5f9;
}



.summary-card.accent {
  background: #d1fae5;
  border-left: 4px solid var(--secondary);
}

.summary-card.highlight {
  background: #dbeafe;
  border-left: 4px solid var(--primary);
}

.btn-primary {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.toast-notification {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: fadeInOut 3s;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0; }
  10%, 90% { opacity: 1; }
}

@media (max-width: 768px) {
    
  .calculator-card {
    grid-template-columns: 1fr;
    
  }
  

  .summary-cards {
    grid-template-columns: 1fr;
    
  }
  
  #growth-chart {
    max-height: 250px;
    
  }
}

/* Contenedor principal */
.timeline {
  margin: 2rem 0;
  width: 100%;
  max-width: 800px; /* Limitar ancho en pantallas grandes */
}

/* Slider personalizado */
.timeline-slider {
  -webkit-appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(90deg, #e0e0e0 var(--fill-percent, 0%), #f0f0f0 var(--fill-percent, 0%));
  outline: none;
  margin: 1rem 0;
  transition: background 0.3s ease;
}

/* Thumb (el círculo que se mueve) */
.timeline-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2563eb;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s, box-shadow 0.2s;
}

.timeline-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: #2563eb;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Etiquetas de años */
.timeline-labels {
  display: flex;
  justify-content: space-between;
  padding: 0 12px; /* Ajuste para alinear con el slider */
}

.timeline-labels span {
  font-size: 0.85rem;
  color: #64748b;
  position: relative;
  text-align: center;
  flex: 1;
}

/* Punto indicador en etiquetas */
.timeline-labels span::before {
  content: '';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5e1;
}

/* Label del año seleccionado */
.timeline-labels span.active {
  color: #2563eb;
  font-weight: 600;
}

.timeline-labels span.active::before {
  background: #2563eb;
  width: 8px;
  height: 8px;
}

/* Efectos interactivos */
.timeline-slider:hover {
  opacity: 0.9;
}

.timeline-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.3);
}

/* Modo oscuro */
.dark-theme .timeline-slider {
  background: linear-gradient(90deg, #4b5563 var(--fill-percent, 0%), #1f2937 var(--fill-percent, 0%));
}

.dark-theme .timeline-labels span {
  color: #94a3b8;
}

/* Responsive: Mobile */
@media (max-width: 640px) {
  .timeline-slider::-webkit-slider-thumb {
    width: 20px;
    height: 20px;
  }

  .timeline-labels span {
    font-size: 0.75rem;
  }

  .timeline-labels span::before {
    top: -16px;
  }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
  .timeline {
    margin: 2.5rem 0;
  }
}

/* Controles mensuales */
.monthly-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 1rem 0;
  padding: 0.5rem;
  background: #f8fafc;
  border-radius: 8px;
}

.month-nav {
  background: #2563eb;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
}

/* Tabla */
.monthly-table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
}

.monthly-table th {
  background: #a2bcdf;
  padding: 0.75rem;
  text-align: left;
}

.monthly-table td {
  padding: 0.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.active-month {
  background-color: #dbeafe;
  font-weight: bold;
}

h1 {
        color: #2c3e50;
        font-size: 2.4em;
        border-bottom: 2px solid #3498db;
        padding-bottom: 10px;
    }
    h2 {
        color: #2980b9;
        margin-top: 30px;
        border-bottom: 2px solid #3498db;
    }
    .infobox {
        background-color: #f8f9fa;
        border-left: 4px solid #3498db;
        padding: 15px;
        margin: 20px 0;
        border-bottom: 2px solid #3498db;
    }
    .formula {
        font-family: 'Courier New', Courier, monospace;
        background: #f0f0f0;
        padding: 10px;
        border-radius: 5px;
        overflow-x: auto;
    }
    table {
        width: 100%;
        border-collapse: collapse;
        margin: 20px 0;
    }
    th, td {
        border: 1px solid #ddd;
        padding: 12px;
        text-align: left;
    }
    th {
        background-color: #3498db;
        color: white;
    }
    tr:nth-child(even) {
        background-color: #f2f2f2;
    }
    .comparison-chart {
        background: #fff;
        padding: 20px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        margin: 30px 0;
    }

    .chart-container{
        width: 100%;
    }

    #growth-chart{
        width: 100%;
    }