
/* Reset y fuente general */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: 'Quicksand', sans-serif;
  flex-direction: column;
  gap: 20px;
}

/* Video de fondo con crossfade */
.bgVideo {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
  transition: opacity 1s ease; /* fade in fade out para cambiar de videos*/
}

/*Ajustes para vista iOS*/
video {
  object-fit: cover;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none; 
}


/* Tarjeta*/
.weather-card {
  width: 500px;
  padding: 25px 30px;
  border-radius: 30px;
  text-align: center;
  color: #fff;
  transition: all 0.5s;
  box-shadow: 0 15px 40px rgba(0,0,0,0.2);

  /* transparencia + blur en el fondo */
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.25);

  cursor: pointer;

  /* tarjeta flotante animada */
  animation: float 6s ease-in-out infinite;
}

/* Hover zoom */
.weather-card:hover {
  transform: scale(1.05);
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* animacion flotante */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}


/* Header */
.weather-header h2 { font-size: 1.8rem; }
.weather-header p { font-size: 1rem; color: #fff; margin-top: 5px; }

/* icono, temperatura, descripción */
.weather-main { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  margin-bottom: 20px; 
}

.weather-icon i { 
  font-size: 3rem; 
  transition: color 0.5s; 
  margin-top: 10px;
}

/* Centrado vertical opcional */
.weather-main .weather-icon { 
  display: flex;
  justify-content: center;
  align-items: center;
}

.temperature { display: flex; align-items: baseline; font-size: 2rem; }
.temperature span:last-child { font-size: 1rem; margin-left: 2px; }

.weather-desc { font-size: 1rem; color: #fff; margin-top: 5px; }

/* Footer con barras de info */
.weather-footer { display: flex; justify-content: space-around; margin-top: 20px; flex-wrap: wrap; gap: 15px; }
.info p:first-child { font-size: 0.9rem; color: #ddd; margin-bottom: 5px; }
.info p:last-child { font-weight: bold; margin-top: 5px; }
.humidity-bar, .wind-bar, .rain-bar { width: 100px; height: 8px; background: rgba(255,255,255,0.2); border-radius: 4px; overflow: hidden; margin: 0 auto 5px auto; }
.humidity-fill, .wind-fill, .rain-fill { height: 100%; width: 0%; background: yellow; border-radius: 4px; transition: width 0.5s; }


/* Botones */
.weather-buttons { margin-top: 20px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.weather-buttons button {
  border: none;
  background: rgba(255,255,255,0.3);
  padding: 7px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
  color: #fff;
}
.weather-buttons button:hover { background: rgba(255,255,255,0.6); }


/* Mensaje informativo */
.disclaimer {
  font-size: 0.85rem;
  color: #fff;
  margin-top: 15px;
  opacity: 0.8;
}

/* Contenedor de botones centrado debajo de la tarjeta */
.social-buttons {
  margin-top: 30px; /* espacio debajo de la tarjeta */
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.social-buttons a {
  text-decoration: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  transition: all 0.3s;
}

.social-buttons a:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}



/* Responsive  */
@media (max-width: 850px) {
  .weather-card { width: 80%; padding: 20px; }
  .temperature { font-size: 1.8rem; }
  .weather-icon i { font-size: 2.8rem; margin-bottom: 30px; }
}

@media (max-width: 550px) {
  .weather-card { width: 95%; padding: 15px; }
  .temperature { font-size: 1.5rem; }
  .weather-icon i { font-size: 2.5rem; margin-bottom: 25px; }
  
  /* Footer vertical para responsive */
  .weather-footer { flex-direction: column; gap: 15px; }

  /* Botones en dos filas */
  .weather-buttons { justify-content: center; gap: 10px; flex-wrap: wrap; }

  /* Texto de info chiquito */
  .info p:first-child { font-size: 0.85rem; }
}
