/* === ESTILOS BASE === */
body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  background: linear-gradient(to bottom, #0b1a3b, #1a1a2e); /* Fondo tipo "La noche estrellada" */
  color: black;
  overflow-x: hidden;
  position: relative;
}

/* === HERO (Encabezado) === */
.hero {
  height: 100vh;
  background: url("https://upload.wikimedia.org/wikipedia/commons/thumb/e/ea/Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg/640px-Van_Gogh_-_Starry_Night_-_Google_Art_Project.jpg") center center / cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* Ajusta la opacidad según el contraste deseado */
  z-index: 1;
}

.hero * {
  z-index: 2;
}

.hero h1 {
  font-size: 3em;
  font-family: 'Great Vibes', cursive;
  color: #fff;
  margin-bottom: 10px;
  animation: fadeIn 2s ease;
}

.subtitulo {
  font-size: 1.2em;
  margin-bottom: 30px;
  color: #fff;
}

button {
  padding: 12px 24px;
  font-size: 16px;
  background-color: #ff6f91;
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  box-shadow: 0 4px 10px rgba(255, 111, 145, 0.3);
}

button:hover {
  background-color: #d6336c;
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(255, 111, 145, 0.6);
}

/* === CARTA DE AMOR === */
.carta {
  padding: 50px;
  max-width: 700px;
  margin: 40px auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: none;
  animation: fadeIn 1s ease;
  line-height: 1.6;
}

#texto-carta {
  font-family: 'Times New Roman', serif;
  font-size: 1.3em;
  color: black;
}

/* === GALERÍA GENERAL === */
.galeria {
  padding: 40px;
  text-align: center;
  display: none;
}

.galeria h2 {
  font-family: 'Great Vibes', cursive;
  font-size: 2.5em;
  margin-bottom: 20px;
  color: #d6336c;
}

/* === VIDEOS === */
.videos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.videos video {
  width: 220px;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.videos video:hover {
  transform: scale(1.05);
}

/* === FOTOS === */
.imagenes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 20px;
}

.foto {
  text-align: center;
  max-width: 200px;
}

.foto img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.foto img:hover {
  transform: scale(1.05);
}

.foto p {
  margin-top: 10px;
  font-size: 0.9em;
  color: #fff;
}

/* === LIGHTBOX === */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
  animation: fadeIn 0.5s ease;
}

.lightbox:target {
  display: flex;
  cursor: zoom-out;
}

/* === ANIMACIONES === */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}

@keyframes subir {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-120vh); opacity: 0; }
}

/* === CORAZONES VOLANDO === */
.floating-heart {
  position: fixed;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  animation: subir 4s linear forwards;
  color: #ff6f91;
  pointer-events: none;
  z-index: 10000;
}

.floating-heart::before {
  content: "💖";
}

/* === GALERÍA SEPARADOR === */
.galeria::before {
  content: "❤️";
  display: block;
  font-size: 2em;
  margin-bottom: 10px;
  animation: pulse 2s infinite;
}

/* === RESPONSIVE === */
@media (max-width: 600px) {
  .videos video,
  .foto img {
    width: 100%;
    height: auto;
  }

  .imagenes {
    flex-direction: column;
    align-items: center;
  }

  .hero h1 {
    font-size: 2.2em;
  }
}

.escribiendo {
  white-space: pre-wrap;
  font-size: 1em;
  line-height: 1.6;
  animation: fadeIn 1s ease;
}

.gift-overlay {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background: linear-gradient(to bottom, #0b1a3b, #1a1a2e); /* Fondo oscuro coherente */
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 1.5s ease;
}

.gift-box {
  font-size: 5rem;
  cursor: pointer;
  animation: pulse 1.5s infinite;
  transition: transform 0.3s ease;
}

.gift-box:hover {
  transform: scale(1.1);
}

#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, #0b1a3b, #1a1a2e); /* Fondo tipo "La noche estrellada" */
  z-index: -1;
}

.videos video {
  opacity: 0;
  transform: translateY(20px);
  animation: aparecerVideo 0.8s forwards;
}

.videos video:nth-child(1) { animation-delay: 0.2s; }
.videos video:nth-child(2) { animation-delay: 0.4s; }
.videos video:nth-child(3) { animation-delay: 0.6s; }
.videos video:nth-child(4) { animation-delay: 0.8s; }
.videos video:nth-child(5) { animation-delay: 1s; }
.videos video:nth-child(6) { animation-delay: 1.2s; }

@keyframes aparecerVideo {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
