/* =========================================
   FREE.CSS - Estilos Específicos del Modo Libre
   ========================================= */

/* 1. AJUSTE DE ESTRUCTURA */
/* Al no sobreescribir .app-main, heredamos el borde y el fondo de route.css */

.event-panel {
    display: flex !important; /* Forzamos que se vea (en route a veces se oculta) */
    transform: none !important; /* Quitamos animaciones de entrada */
    width: 360px; /* Ancho fijo igual que en Route */
    
    /* RESTAURAMOS EL COLOR DORADO/AZUL DE ROUTE */
    /* En la versión anterior estaba en 0.05 (muy oscuro), lo subimos a 0.15 como en route.css */
    background: radial-gradient(circle at top left, rgba(212,175,55,0.15), transparent 60%),
                rgba(5,8,20,0.96) !important;
    border-left: 1px solid rgba(244,236,222,0.18) !important;
}

/* El globo ocupa el espacio restante. 
   IMPORTANTE: No le ponemos background transparente forzado para mantener la coherencia */
#globe-container {
    position: relative; /* Para posicionar el timeline adentro */
    height: 100%;
    /* Aseguramos que herede el comportamiento de route.css */
}

/* 2. TIMELINE (Ajustado para estar DENTRO del globo) */
.timeline-container {
  position: absolute;
  bottom: 30px; /* Pegado abajo del globo */
  left: 50%;
  transform: translateX(-50%); /* Centrado horizontalmente en el globo */
  
  width: 90%; 
  max-width: 450px; 
  padding: 8px 20px; 
  
  background: rgba(5, 9, 22, 0.85); /* Fondo semitransparente */
  backdrop-filter: blur(8px);
  border: 1px solid rgba(212, 175, 55, 0.25);
  border-radius: 99px;
  
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  z-index: 10;
}

/* --- ESTILOS DEL INPUT Y SLIDER (Igual que antes) --- */
.year-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  width: 100%;
  margin-top: 2px;
}

#year-input {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-gold);
  background: transparent;
  border: none;
  text-align: right;
  width: 70px; 
  padding: 0;
  margin: 0;
  outline: none;
}
#year-input::-webkit-outer-spin-button,
#year-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

#era-label {
  font-family: 'Cinzel', serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--accent-gold);
  opacity: 0.7;
}

.slider-wrapper {
  width: 100%;
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.slider-limit {
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  color: var(--text-muted);
  opacity: 0.6;
  white-space: nowrap;
  flex-shrink: 0;
  width: 35px;
  text-align: center;
}

input[type=range] {
  -webkit-appearance: none;
  flex-grow: 1;
  background: transparent;
  height: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
}
input[type=range]:focus { outline: none; }

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(255,255,255,0.1), var(--accent-gold), rgba(255,255,255,0.1));
}

input[type=range]::-webkit-slider-thumb {
  height: 14px;
  width: 14px;
  border-radius: 50%;
  background: var(--bg-main);
  border: 2px solid var(--accent-gold);
  cursor: pointer;
  -webkit-appearance: none;
  margin-top: -6px;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
  transition: transform 0.1s;
}
input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.3); background: var(--accent-gold); }

/* --- HEADER Y CONTROLES SUPERIORES --- */
.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-mode-switch {
  text-decoration: none;
  font-size: 11px;
  color: var(--accent-gold);
  border: 1px solid rgba(212, 175, 55, 0.3);
  padding: 6px 12px;
  border-radius: 99px;
  text-transform: uppercase;
  transition: 0.2s;
  background: rgba(0,0,0,0.3);
  font-weight: 600;
}
.btn-mode-switch:hover { background: var(--accent-gold); color: #000; }

/* Ocultar panel en móviles */
@media (max-width: 768px) {
  .event-panel { display: none !important; }
}