/* CSS específico para el contador en principal.html - Estilo Futurista */

/* Estilos futuristas para el contador */
.contador-tiempo {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  
  /* Fondo cristal futurista */
  background: linear-gradient(145deg, 
    rgba(26, 35, 50, 0.9), 
    rgba(42, 74, 92, 0.85));
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(74, 222, 128, 0.4);
  padding: 1rem 2rem;
  border-radius: 20px;
  
  /* Sombras futuristas */
  box-shadow: 
    0 8px 25px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(74, 222, 128, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  
  font-size: clamp(0.9rem, 2.5vw, 1.2rem);
  font-weight: 600;
  color: #e2e8f0;
  font-family: 'Arial', sans-serif;
  text-align: center;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
  
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: neonFloat 4s ease-in-out infinite;
  
  /* Asegurar que no interfiera con el layout */
  max-width: 90vw;
  box-sizing: border-box;
}

/* Efecto de brillo en los bordes */
.contador-tiempo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    rgba(74, 222, 128, 0.1) 0%, 
    transparent 20%, 
    transparent 80%, 
    rgba(96, 165, 250, 0.1) 100%);
  border-radius: 20px;
  pointer-events: none;
}

/* Animación de flotación con brillo */
@keyframes neonFloat {
  0%, 100% { 
    transform: translateX(-50%) translateY(0px);
    box-shadow: 
      0 8px 25px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(74, 222, 128, 0.2),
      inset 0 1px 0 rgba(255, 255, 255, 0.1);
  }
  50% { 
    transform: translateX(-50%) translateY(-8px);
    box-shadow: 
      0 12px 35px rgba(0, 0, 0, 0.4),
      0 0 40px rgba(74, 222, 128, 0.3),
      inset 0 1px 0 rgba(255, 255, 255, 0.15);
  }
}

/* Efecto hover futurista */
.contador-tiempo:hover {
  transform: translateX(-50%) translateY(-5px) scale(1.02);
  background: linear-gradient(145deg, 
    rgba(42, 74, 92, 0.95), 
    rgba(26, 35, 50, 0.9));
  border-color: rgba(74, 222, 128, 0.6);
  box-shadow: 
    0 15px 40px rgba(0, 0, 0, 0.4),
    0 0 50px rgba(74, 222, 128, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #4ade80;
}

/* Efecto de actualización con pulso de energía */
.contador-tiempo.updating {
  animation: energyPulse 0.6s ease-out;
}

@keyframes energyPulse {
  0% { 
    transform: translateX(-50%) scale(1);
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow: 
      0 8px 25px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(74, 222, 128, 0.2);
  }
  50% { 
    transform: translateX(-50%) scale(1.05);
    border-color: rgba(96, 165, 250, 0.8);
    box-shadow: 
      0 15px 40px rgba(0, 0, 0, 0.4),
      0 0 60px rgba(96, 165, 250, 0.5),
      0 0 80px rgba(74, 222, 128, 0.3);
    color: #60a5fa;
  }
  100% { 
    transform: translateX(-50%) scale(1);
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow: 
      0 8px 25px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(74, 222, 128, 0.2);
  }
}

/* Variante con corazón para momentos especiales */
.contador-tiempo .heart {
  color: #ff6b6b;
  text-shadow: 
    0 0 5px rgba(255, 107, 107, 0.5),
    0 0 10px rgba(255, 107, 107, 0.3);
  animation: heartBeat 2s ease-in-out infinite;
}

@keyframes heartBeat {
  0%, 50%, 100% { transform: scale(1); }
  25%, 75% { transform: scale(1.1); }
}

/* Responsive para móviles */
@media screen and (max-width: 768px) {
  .contador-tiempo {
    top: 15px;
    padding: 0.8rem 1.5rem;
    font-size: clamp(0.8rem, 3vw, 1rem);
    border-radius: 16px;
    max-width: 95vw;
  }
  
  .contador-tiempo::before {
    border-radius: 16px;
  }
}

@media screen and (max-width: 480px) {
  .contador-tiempo {
    top: 10px;
    padding: 0.7rem 1.2rem;
    font-size: clamp(0.7rem, 3.5vw, 0.9rem);
    border-radius: 14px;
    line-height: 1.3;
  }
  
  .contador-tiempo::before {
    border-radius: 14px;
  }
  
  @keyframes neonFloat {
    0%, 100% { 
      transform: translateX(-50%) translateY(0px);
    }
    50% { 
      transform: translateX(-50%) translateY(-5px);
    }
  }
}

/* Para pantallas muy pequeñas */
@media screen and (max-width: 320px) {
  .contador-tiempo {
    position: static;
    transform: none;
    margin: 1rem auto;
    display: block;
    width: fit-content;
    padding: 0.6rem 1rem;
    border-radius: 12px;
  }
  
  .contador-tiempo::before {
    border-radius: 12px;
  }
  
  .contador-tiempo:hover {
    transform: scale(1.02);
  }
  
  @keyframes neonFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
  }
}

/* Accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .contador-tiempo {
    animation: none !important;
  }
  
  .contador-tiempo:hover {
    transform: translateX(-50%);
  }
  
  .contador-tiempo .heart {
    animation: none !important;
  }
}

/* Estados de focus futuristas */
.contador-tiempo:focus-visible {
  outline: 2px solid #4ade80;
  outline-offset: 3px;
  box-shadow: 
    0 0 0 4px rgba(74, 222, 128, 0.3),
    0 8px 25px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(74, 222, 128, 0.2);
}

/* Efecto especial para ocasiones importantes */
.contador-tiempo.special-moment {
  animation: specialGlow 3s ease-in-out infinite;
}

@keyframes specialGlow {
  0%, 100% {
    border-color: rgba(74, 222, 128, 0.4);
    box-shadow: 
      0 8px 25px rgba(0, 0, 0, 0.3),
      0 0 30px rgba(74, 222, 128, 0.2);
  }
  33% {
    border-color: rgba(255, 107, 107, 0.6);
    box-shadow: 
      0 8px 25px rgba(0, 0, 0, 0.3),
      0 0 40px rgba(255, 107, 107, 0.3);
  }
  66% {
    border-color: rgba(96, 165, 250, 0.6);
    box-shadow: 
      0 8px 25px rgba(0, 0, 0, 0.3),
      0 0 40px rgba(96, 165, 250, 0.3);
  }
}