/* =====================================================
   styles.css – Hoja de estilos del Reloj PWA
   ===================================================== */

/* --- Importación de fuente tipográfica --- */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@300;400&display=swap');

/* --- Variables de diseño (colores y sombras) --- */
:root {
  --color-fondo:        #1a1a2e;     /* Azul oscuro de fondo */
  --color-fondo-card:   #16213e;     /* Fondo de la tarjeta */
  --color-acento:       #4a9eff;     /* Azul acento principal */
  --color-acento-suave: #0f4c81;     /* Azul acento oscuro */
  --color-texto:        #e8eaf6;     /* Blanco suave para texto */
  --color-fecha:        #90a4c8;     /* Gris azulado para la fecha */
  --sombra-glow:        0 0 40px rgba(74, 158, 255, 0.35);
  --sombra-card:        0 20px 60px rgba(0, 0, 0, 0.5);
  --radio-borde:        24px;
  --transicion:         0.3s ease;
}

/* --- Reset y estilos base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* --- Cuerpo de la página --- */
body {
  background-color: var(--color-fondo);
  color: var(--color-texto);
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

/* --- Fondo animado con partículas de gradiente --- */
body::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    ellipse at center,
    rgba(74, 158, 255, 0.08) 0%,
    transparent 60%
  );
  animation: rotarFondo 20s linear infinite;
  pointer-events: none;
}

@keyframes rotarFondo {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* --- Contenedor principal --- */
.contenedor {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 500px;
}

/* --- Encabezado con logo/icono --- */
.encabezado {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.encabezado img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  box-shadow: var(--sombra-glow);
  transition: transform var(--transicion);
}

.encabezado img:hover {
  transform: scale(1.05);
}

.titulo-app {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  font-size: 0.9rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--color-acento);
  opacity: 0.85;
}

/* --- Tarjeta del reloj --- */
.tarjeta-reloj {
  background: var(--color-fondo-card);
  border: 1px solid rgba(74, 158, 255, 0.2);
  border-radius: var(--radio-borde);
  padding: 48px 56px;
  text-align: center;
  box-shadow: var(--sombra-card), var(--sombra-glow);
  width: 100%;
  position: relative;
  overflow: hidden;
  transition: transform var(--transicion), box-shadow var(--transicion);
}

.tarjeta-reloj:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra-card), 0 0 60px rgba(74, 158, 255, 0.5);
}

/* Línea decorativa superior de la tarjeta */
.tarjeta-reloj::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  width: 80%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-acento),
    transparent
  );
}

/* --- Visualización de la hora --- */
#hora {
  font-family: 'Orbitron', monospace;
  font-size: clamp(3rem, 12vw, 5.5rem);
  font-weight: 700;
  color: var(--color-texto);
  letter-spacing: 0.05em;
  line-height: 1;
  text-shadow:
    0 0 20px rgba(74, 158, 255, 0.6),
    0 0 40px rgba(74, 158, 255, 0.3);
  transition: opacity 0.1s ease;
}

/* --- Separador decorativo --- */
.separador {
  width: 60px;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent,
    var(--color-acento),
    transparent
  );
  margin: 20px auto;
  border-radius: 2px;
}

/* --- Visualización de la fecha --- */
#fecha {
  font-family: 'Inter', sans-serif;
  font-size: clamp(0.85rem, 3vw, 1rem);
  font-weight: 300;
  color: var(--color-fecha);
  letter-spacing: 0.08em;
  text-transform: capitalize;
}

/* --- Indicador de "EN VIVO" --- */
.indicador-vivo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-acento);
  opacity: 0.8;
}

.punto-vivo {
  width: 8px;
  height: 8px;
  background-color: var(--color-acento);
  border-radius: 50%;
  animation: parpadeo 1.4s ease-in-out infinite;
}

@keyframes parpadeo {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.3; transform: scale(0.7); }
}

/* --- Pie de página --- */
.pie {
  font-size: 0.72rem;
  color: var(--color-fecha);
  opacity: 0.5;
  letter-spacing: 0.05em;
  text-align: center;
}

/* --- Diseño adaptable a pantallas pequeñas --- */
@media (max-width: 400px) {
  .tarjeta-reloj {
    padding: 36px 28px;
  }
}
