html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background-color: #fff6f8;
  color: #333;
}

body.night {
  background: #0f0f1a;
  color: #f2f2f2;
}

body.night section {
  background: transparent;
}

body.night .hero {
  background:
    linear-gradient(rgba(0,0,0,0.55), rgba(0,0,0,0.55)),
    url("img/hero-night.jpg") center / cover no-repeat;
}

body.night .hero h1 {
  text-shadow: 
    0 0 12px rgba(200,200,255,0.8),
    0 0 30px rgba(180,180,255,0.6);
}

body.night .koi {
  opacity: 0.85;
}


body.night #music-btn {
  background: rgba(200, 200, 255, 0.8);
}



/* 🌸 PÉTALOS ANIMADOS */
.petals {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: hidden;
  z-index: 1;
}

.petal {
  position: absolute;
  top: -10%;
  width: 18px;
  height: 18px;
  background: rgba(255,182,193,0.9);
  border-radius: 0 50% 50% 50%;
  opacity: 0.8;
  animation: fall linear infinite;
}

@keyframes fall {
  to {
    transform: translateY(110vh) rotate(360deg);
  }
}


/* KOI NO YOKAN */
.koi {
  font-family: 'Montserrat', sans-serif;
  font-size: 0.95rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  opacity: 0;
  margin-bottom: 10px;
  animation: fadeIn 1.5s ease-out forwards;
  animation-delay: 0.4s;
}

/* HERO */
.hero {
  height: 100vh;
  background: 
    linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)),
    url("img/hero-day.jpg") center / cover no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  overflow: hidden;
  position: relative;
  transition: background 1.5s ease;
}

.hero h1 {
  font-family: 'Great Vibes', cursive;
  font-size: 6rem; /* MÁS GRANDE */
  font-weight: normal;
  letter-spacing: 3px;
  margin: 0;
  opacity: 0;
  animation: floatIn 1.8s ease-out forwards, glow 3s ease-in-out infinite;
  text-shadow: 0 0 8px rgba(255,255,255,0.6);
}


.hero p {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem; /* MÁS GRANDE */
  letter-spacing: 1.5px;
  margin-top: 15px;
  opacity: 0;
  animation: fadeIn 1.5s ease-out forwards;
  animation-delay: 1.2s;
}

.meaning {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px;
  background: #fff6f8;
}

.meaning p {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  line-height: 1.7;
  max-width: 900px;
  padding: 0 20px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.meaning.show p {
  opacity: 1;
  transform: translateY(0);
}

body.night .meaning p {
  color: #f0f0ff;
}

body.night .word {
  text-shadow: 0 0 6px rgba(180,180,255,0.4);
}

.letter {
  min-height: 100vh;
  background: #fff0f5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
}

.letter h2 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.5rem, 6vw, 3.2rem);
  margin-bottom: 30px;
}

.letter p {
  max-width: 900px;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  line-height: 1.9;
  padding: 0 10px;
}

.letter-char {
  opacity: 0;
  display: inline-block;
  transform: translateY(6px);
  animation: charFade 0.4s ease forwards;
}

@keyframes charFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

body.night .letter {
  color: #f2f2ff;
}

#typewriter {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  max-width: 900px;
  line-height: 1.9;
  padding: 0 20px;
}

.secret {
  min-height: 100vh;
  background: #fff6f8;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
}

.secret h2 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  margin-bottom: 20px;
}

.secret input {
  padding: 12px 14px;
  font-size: 1rem;
  margin: 10px 0;
  border-radius: 10px;
  border: 1px solid #ccc;
  width: min(260px, 90%);
}

.secret button {
  padding: 10px 26px;
  border: none;
  border-radius: 20px;
  background: pink;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
}

body.night .secret {
  color: #f2f2ff;
}

body.night .secret input {
  background: #1a1a2e;
  color: #f2f2ff;
  border: 1px solid #444;
}

body.night .secret button {
  background: rgba(200,200,255,0.8);
}

#secret-text {
  margin-top: 30px;
  max-width: 900px;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.15rem, 3.5vw, 1.45rem);
  line-height: 1.9;
  padding: 0 20px;
}

/* Estado inicial (oculta) */
.secret-hidden {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: opacity 1.2s ease, transform 1.2s ease;
  display: none;
}

/* Estado visible (cuando se abre) */
.secret-visible {
  display: block;
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* cada palabra */
.secret-word {
  opacity: 0;
  transform: translateY(10px);
  display: inline-block;
  margin-right: 6px;
  animation: wordFade 0.6s ease forwards;
}

/* animación palabra */
@keyframes wordFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ✨ brillo suave SOLO al desbloquear */
.secret-glow {
  animation: secretGlow 2.5s ease-in-out;
}

@keyframes secretGlow {
  0% {
    text-shadow: 0 0 0 rgba(255, 182, 193, 0);
  }
  40% {
    text-shadow:
      0 0 12px rgba(255, 182, 193, 0.9),
      0 0 22px rgba(255, 192, 203, 0.8);
  }
  100% {
    text-shadow: 0 0 0 rgba(255, 182, 193, 0);
  }
}

.about {
  min-height: 100vh;
  background: #fff7fb;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 70px 20px;
  text-align: center;

  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.about.show {
  opacity: 1;
  transform: translateY(0);
}

.about h2 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.6rem, 6vw, 3.3rem);
  margin-bottom: 40px;
}

.about p {
  max-width: 900px;
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.05rem, 3.4vw, 1.35rem);
  line-height: 1.9;
  margin-bottom: 24px;
  padding: 0 10px;
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.9s ease, transform 0.9s ease;
}

.about p.show {
  opacity: 1;
  transform: translateY(0);
}

.about-quote {
  font-style: italic;
  margin-top: 30px;
}

.highlight {
  font-weight: 600;
  color: #d6336c;
  position: relative;
}

.highlight::after {
  content: '';
  position: absolute;
  left: -4px;
  right: -4px;
  bottom: 2px;
  height: 40%;
  background: rgba(255, 182, 193, 0.35);
  z-index: -1;
  border-radius: 6px;
}

body.night .highlight {
  color: #ffb4d8;
}

body.night .highlight::after {
  background: rgba(200, 160, 255, 0.35);
}

section {
  padding: 60px 20px;
  text-align: center;
}

/* ===== GALERÍA ROMÁNTICA ===== */

.gallery {
  min-height: 100vh;
  padding: 100px 20px;
  text-align: center;
  background: linear-gradient(to bottom, #fff6f8, #fff0f5);
}

.gallery h2 {
  font-family: 'Great Vibes', cursive;
  font-size: clamp(2.6rem, 6vw, 3.4rem);
  margin-bottom: 60px;
  color: #383737fb;
}

/* Contenedor tipo collage elegante */
.gallery .images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: auto;
}

/* Imagen uniforme */
.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 22px;
  box-shadow: 0 15px 30px rgba(214, 51, 108, 0.15);
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

/* Hover suave */
.gallery img:hover {
  transform: translateY(-8px) scale(1.03);
  box-shadow: 0 20px 40px rgba(214, 51, 108, 0.25);
}

body.night .gallery {
  background: #0f0f1a;
}

body.night .gallery h2 {
  color: #ffffff;
}

body.night .gallery img {
  box-shadow: 0 15px 35px rgba(180, 180, 255, 0.08);
}

body.night .gallery img:hover {
  box-shadow: 0 20px 45px rgba(180, 180, 255, 0.18);
}

/* ===== LIGHTBOX ===== */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease;
  z-index: 9999;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-img {
  max-width: 90%;
  max-height: 85%;
  border-radius: 25px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
  transform: scale(0.9);
  transition: transform 0.4s ease;
}

.lightbox.active .lightbox-img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 2.5rem;
  color: white;
  cursor: pointer;
}

body.night .lightbox {
  background: rgba(15, 15, 26, 0.95);
}

/* Footer oculto al inicio */
footer {
  background: #f8c8d8;
  padding: 20px;
  text-align: center;
  font-weight: bold;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1.2s ease, transform 1.2s ease, background 1s ease, color 1s ease;
}

/* Footer visible */
footer.show {
  opacity: 1;
  transform: translateY(0);
}

body.night footer {
  background: #1a1a2e;
  color: #e6e6f0;
}

body.night footer p {
  text-shadow: 0 0 6px rgba(180,180,255,0.4);
}

#music-control {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 999;
}

#music-btn {
  background: rgba(255, 182, 193, 0.85);
  border: none;
  border-radius: 50%;
  width: 55px;
  height: 55px;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}

#music-btn:hover {
  transform: scale(1.1);
}

#volume {
  width: 90px;
  accent-color: pink;
  cursor: pointer;
}

/* CONTENEDOR DE LUZ */
.light-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
}

/* PARTÍCULA */
.light {
  position: absolute;
  width: 6px;
  height: 6px;
  background: rgba(255, 240, 200, 0.8);
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(255, 230, 180, 0.9);
  animation: floatLight linear infinite;
  opacity: 0.8;
}

/* ===== BOTÓN MENÚ ===== */

.menu-btn {
  position: fixed;
  top: 20px;
  left: 20px;
  font-size: 1.8rem;
  background: rgba(255,182,193,0.9);
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  z-index: 10001;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* ===== OVERLAY ===== */

.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  z-index: 9998;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== SIDEBAR ===== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  height: 100%;
  background: #fff6f8;
  padding: 40px 25px;
  box-shadow: 5px 0 25px rgba(0,0,0,0.15);

  transform: translateX(-100%);
  transition: transform 0.4s ease;
  z-index: 9999;

  display: flex;
  flex-direction: column;
}

.sidebar.active {
  left: 0;
  transform: translateX(0);
}

.sidebar h3 {
  font-family: 'Great Vibes', cursive;
  font-size: 2rem;
  margin-bottom: 30px;
  color: #d6336c;
}

.secret-link {
  margin-bottom: 15px;
  padding: 12px;
  border: none;
  border-radius: 15px;
  background: pink;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s ease;
}

.secret-link:hover {
  transform: scale(1.05);
}

.password-box {
  margin-top: 20px;
  display: none;
  flex-direction: column;
}

.password-box input {
  padding: 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  margin-bottom: 10px;
}

.password-box button {
  padding: 10px;
  border: none;
  border-radius: 10px;
  background: #d6336c;
  color: white;
  cursor: pointer;
}

#password-error {
  color: red;
  font-size: 0.9rem;
  margin-top: 5px;
}

/* 💖 Animación contraseña correcta */

.sidebar.unlocked {
  animation: unlockGlow 1.5s ease;
}

@keyframes unlockGlow {
  0% {
    box-shadow: 0 0 0 rgba(255, 182, 193, 0);
  }
  50% {
    box-shadow: 0 0 25px rgba(255, 182, 193, 0.9);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 182, 193, 0);
  }
}

.password-success {
  animation: inputGlow 1s ease;
}

@keyframes inputGlow {
  0% { box-shadow: 0 0 0 rgba(255,105,180,0); }
  50% { box-shadow: 0 0 20px rgba(255,105,180,0.9); }
  100% { box-shadow: 0 0 0 rgba(255,105,180,0); }
}

/* ✨ Partículas suaves sidebar */

.sidebar-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.sidebar-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 182, 193, 0.7);
  border-radius: 50%;
  animation: sidebarFloat linear infinite;
}

@keyframes sidebarFloat {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  to {
    transform: translateY(-20%);
    opacity: 0;
  }
}

/* 🌙 Modo noche */

body.night .sidebar {
  background: #1a1a2e;
  color: #f2f2ff;
}

body.night .secret-link {
  background: rgba(200,200,255,0.8);
}

body.night .menu-btn {
  background: rgba(200,200,255,0.8);
}

/* ANIMACIÓN */
@keyframes floatLight {
  from {
    transform: translateY(110vh);
  }
  to {
    transform: translateY(-10vh);
  }
}

/* CONTENEDOR */
.stars {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* ESTRELLA */
.star {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(200,200,255,0.9);
  animation: twinkle ease-in-out infinite, drift linear infinite;
  opacity: 0.8;
}

/* Palabras individuales */
.word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  animation: wordFade 0.6s ease forwards;
}

/* PARPADEO */
@keyframes twinkle {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* DESPLAZAMIENTO LENTO */
@keyframes drift {
  from { transform: translateY(0); }
  to { transform: translateY(10vh); }
}

/* KEYFRAMES */
@keyframes floatIn {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes glow {
  0% {
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
  }
  50% {
    text-shadow: 0 0 18px rgba(255,182,193,0.9);
  }
  100% {
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
  }
}

/* 📱 RESPONSIVE - MÓVIL */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 4.2rem;
  }

  .hero p {
    font-size: 1.2rem;
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 3.6rem;
  }

  .hero p {
    font-size: 1.1rem;
  }
}

@media (max-width: 480px) {
  .koi {
    font-size: 0.8rem;
    letter-spacing: 3px;
  }

  #volume {
    width: 70px;
  }
}

@media (max-width: 480px) {
  .meaning p {
    line-height: 1.8;
  }
}

@media (max-width: 480px) {
  #typewriter {
    line-height: 2;
  }
}

@media (max-width: 480px) {
  #secret-text {
    line-height: 2;
  }
}

/* ===== MÓVIL ===== */
@media (max-width: 768px) {

  /* SIDEBAR */
  #sidebar {
    width: 70%; /* más ancho en pantallas pequeñas */
    padding: 40px 25px;
  }

  #sidebar a {
    font-size: 1.3rem; /* enlaces más grandes */
  }

  /* BOTÓN HAMBURGUESA */
  #hamburger {
    width: 50px;
    height: 50px;
  }

  #hamburger span {
    height: 6px;
  }

  /* SECRET */
  .secret input {
    width: 80%; /* ocupa más espacio */
    font-size: 1.1rem;
    padding: 14px 16px;
  }

  .secret button {
    font-size: 1.1rem;
    padding: 12px 28px;
  }
}

/* PARA CELULARES MÁS PEQUEÑOS */
@media (max-width: 480px) {

  #sidebar {
    width: 85%;
    padding: 50px 20px;
  }

  #sidebar a {
    font-size: 1.5rem;
  }

  #hamburger {
    width: 45px;
    height: 45px;
  }

  #hamburger span {
    height: 5px;
  }

  .secret input {
    width: 90%;
    font-size: 1.2rem;
    padding: 16px 18px;
  }

  .secret button {
    font-size: 1.2rem;
    padding: 14px 30px;
  }
}