:root {
  --primary-color: #ff4400;
  --background-color: #121212;
  --text-color: #ffffff;
  --event-bg: rgba(255, 255, 255, 0.05);
  --line-color: rgba(255, 255, 255, 0.2);
  --event-dot-size: 16px;
}

body {
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'Arial', sans-serif;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 40px);
}

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.btn-add, .btn-back, .btn-submit {
  background-color: var(--primary-color);
  color: white;
  padding: 10px 20px;
  border-radius: 4px;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

/* TIMELINE HORIZONTAL */
.timeline-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
  margin-top: 20px;
  margin-bottom: 20px;
}

.timeline-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--line-color);
  top: 50%;
  transform: translateY(-50%);
  z-index: 1;
}

.timeline-events-container {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  height: 100%;
  position: relative;
  padding: 0 20px;
  scroll-behavior: smooth;
}

.timeline-event {
  position: relative;
  min-width: 300px;
  max-width: 300px;
  margin: 0 30px;
  padding: 15px;
  border-radius: 8px;
  background-color: var(--event-bg);
  border-bottom: 3px solid var(--primary-color);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 2;
  transition: all 0.3s ease;
  opacity: 1;
  transform: translateY(0);
  flex-shrink: 0;
  cursor: pointer;
}

.timeline-event:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.timeline-event.above {
  align-self: flex-start;
  margin-top: 10%;
}

.timeline-event.below {
  align-self: flex-end;
  margin-bottom: 10%;
}

.timeline-event::before {
  content: '';
  position: absolute;
  width: var(--event-dot-size);
  height: var(--event-dot-size);
  background-color: var(--primary-color);
  border-radius: 50%;
  z-index: 3;
  left: 50%;
  transform: translateX(-50%);
}

.timeline-event.above::before {
  bottom: -30px;
}

.timeline-event.below::before {
  top: -30px;
}

.timeline-event.above::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 30px;
  background-color: var(--primary-color);
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
}

.timeline-event.below::after {
  content: '';
  position: absolute;
  width: 2px;
  height: 30px;
  background-color: var(--primary-color);
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
}

.event-date {
  font-size: 0.9rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.event-title {
  margin: 0 0 10px 0;
  font-size: 1.2rem;
}

.event-description {
  font-size: 0.9rem;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.8);
}

.event-media {
  margin: 15px 0;
}

.event-media img, .event-media video {
  max-width: 100%;
  border-radius: 4px;
}

.media-caption {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 5px;
}

.event-category {
  display: inline-block;
  padding: 3px 8px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  font-size: 0.8rem;
  margin-top: 10px;
}

.event-actions {
  margin-top: 10px;
  display: flex;
  justify-content: center;
}

.view-post-btn {
  background-color: #ff6600;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  transition: background-color 0.2s;
}

.view-post-btn:hover {
  background-color: #ff8533;
}

/* Navegación de timeline estilo Tiki-Toki (exacto) */
.timeline-navigation {
  position: relative;
  width: 100%;
  height: 100px;
  background-color: #000;
  border-top: 1px solid #333;
  overflow: hidden;
}

/* Barra de meses */
.timeline-months {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 30px;
  background-color: #111;
  display: flex;
  border-bottom: 1px solid #333;
}

.timeline-month {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 12px;
  border-right: 1px solid #333;
  cursor: pointer;
}

.timeline-month:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.timeline-month.active {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

/* Barra de años */
.timeline-years {
  position: absolute;
  top: 30px;
  left: 0;
  right: 0;
  height: 30px;
  background-color: #000;
  display: flex;
}

.timeline-year {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999;
  font-size: 14px;
  border-right: 1px solid #333;
  cursor: pointer;
  position: relative;
}

.timeline-year:hover {
  background-color: rgba(255, 255, 255, 0.05);
}

.timeline-year.active {
  background-color: #ffaa00;
  color: #fff;
}

/* Línea de tiempo con puntos de colores */
.timeline-dots {
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  height: 40px;
  background-color: #000;
  border-top: 1px solid #222;
}

.timeline-line {
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 1px;
  background-color: #333;
}

.timeline-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  top: 20px;
  transform: translateY(-50%);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  z-index: 10;
}

.timeline-dot:hover {
  transform: translateY(-50%) scale(1.5);
  box-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
}

.timeline-dot.importante {
  background-color: #ff0000;
}

.timeline-dot.general {
  background-color: #00ff00;
}

.timeline-dot.legal {
  background-color: #ff00ff;
}

/* Marcas de tiempo */
.timeline-tick {
  position: absolute;
  top: 15px;
  width: 1px;
  height: 10px;
  background-color: #444;
}

/* Publicidad en la parte inferior */
.timeline-ads {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40px;
  display: flex;
  justify-content: space-between;
  padding: 0 20px;
}

.timeline-ad {
  height: 30px;
  background-color: #0066aa;
  border-radius: 5px;
  color: white;
  padding: 5px 10px;
  font-size: 12px;
  display: flex;
  align-items: center;
  margin-top: 5px;
}

.filter-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-btn {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-color);
  border: none;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
}

.filter-btn.active {
  background-color: var(--primary-color);
}

/* Efecto de pulso para resaltar eventos */
.timeline-event.highlighted {
  box-shadow: 0 0 15px rgba(255, 68, 0, 0.7);
  z-index: 100;
}

.timeline-event.pulse {
  animation: pulse 1s;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 68, 0, 0.7);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(255, 68, 0, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 68, 0, 0);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .timeline-event {
    min-width: 250px;
    max-width: 250px;
  }
}

/* Estilos para eventos expandidos */
.timeline-event {
  cursor: pointer;
  transition: all 0.3s ease;
}

.timeline-event:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.timeline-event.expanded {
  width: 500px;
  max-width: 90vw;
  z-index: 1000;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
}

/* Contenido detallado */
.event-details-content {
  display: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background-color: rgba(30, 30, 30, 0.95);
  border-top: 1px solid #444;
  padding: 0 15px;
  margin-top: 15px;
}

.timeline-event.expanded .event-details-content {
  padding: 15px;
}

/* Estilos para el contenido completo */
.event-full-content {
  color: #fff;
}

.event-full-content h3 {
  margin-top: 0;
  color: #ff6600;
}

.event-full-date {
  color: #aaa;
  font-size: 0.9em;
  margin-bottom: 15px;
}

.event-full-description {
  line-height: 1.6;
  margin-bottom: 15px;
}

.event-full-media {
  margin: 15px 0;
}

.event-full-media img,
.event-full-media video {
  max-width: 100%;
  border-radius: 5px;
}

.media-full-caption {
  font-style: italic;
  color: #aaa;
  margin-top: 5px;
  font-size: 0.9em;
}

.event-full-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #444;
  font-size: 0.85em;
  color: #aaa;
}

/* Botón de cerrar */
.close-details {
  background-color: #333;
  color: #fff;
  border: none;
  padding: 8px 15px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.2s;
}

.close-details:hover {
  background-color: #555;
}

/* Indicador de carga */
.loading-spinner {
  width: 40px;
  height: 40px;
  margin: 20px auto;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  border-top: 4px solid #ff6600;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Mensaje de error */
.error-message {
  color: #ff6666;
  text-align: center;
  padding: 15px;
}

/* Modal */
.timeline-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  overflow: auto;
}

.timeline-modal.active {
  display: block;
}

.modal-content {
  position: relative;
  background-color: #222;
  margin: 5% auto;
  padding: 0;
  width: 80%;
  max-width: 800px;
  border-radius: 5px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  animation: modalFadeIn 0.3s;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  color: #aaa;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
}

.modal-close:hover {
  color: #fff;
}

.modal-body {
  padding: 20px;
  color: #fff;
}

.loading-spinner {
  display: block;
  width: 50px;
  height: 50px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--primary-color);
  animation: spin 1s ease-in-out infinite;
  margin: 30px auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}