html, body {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
}

.container {
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  padding: 0;
  background-color: #000000;
  position: relative;
}

@media (max-width: 768px) {
  .container {
    background-image:
      linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)),
      url('images/image1.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
  }
}

.loader {
  position: fixed;
  inset: 0;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  transition: opacity 0.6s ease;
}

.loader.hide {
  opacity: 0;
  pointer-events: none;
}

.loader-spinner {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid rgba(255, 92, 92, 0.25);
  border-top-color: #ff5c5c;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.heart-btn {
  position: absolute;
  top: 38%;
  left: 50%;
  width: 120px;
  height: 132px;
  cursor: pointer;
  z-index: 20;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  animation: fade-in-slow 1.98s ease-out 0.4s forwards;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

@keyframes fade-in-slow {
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
  }
}

.heart-btn:hover .heart {
  opacity: 0.95;
}

.heart {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  shape-rendering: geometricPrecision;
  opacity: 0.72;
  filter: drop-shadow(0 0 10px rgba(255, 70, 90, 0.35));
  transition: opacity 0.25s ease;
}

.burst-particle {
  position: absolute;
  top: 55%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: radial-gradient(circle, #ff8a9a 0%, #e63950 55%, transparent 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

.burst-ring {
  position: absolute;
  top: 55%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border-radius: 50%;
  border: 2px solid rgba(255, 100, 120, 0.8);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

.heart-btn.playing .heart {
  animation: heart-burst 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.heart-btn.playing .burst-particle {
  animation: particle-fly 0.85s ease-out forwards;
  animation-delay: calc(var(--i) * 0.02s);
}

.heart-btn.playing .burst-ring {
  animation: ring-expand 0.7s ease-out forwards;
}

@keyframes heart-burst {
  0% {
    transform: scale(1);
    opacity: 0.72;
    filter: drop-shadow(0 0 6px rgba(255, 70, 90, 0.3)) brightness(1);
  }
  15% {
    transform: scale(0.82);
    opacity: 0.85;
  }
  35% {
    transform: scale(1.55);
    opacity: 1;
    filter: drop-shadow(0 0 28px rgba(255, 80, 100, 0.95)) brightness(1.4);
  }
  55% {
    transform: scale(1.05);
    opacity: 0.9;
    filter: drop-shadow(0 0 14px rgba(255, 80, 100, 0.6)) brightness(1.15);
  }
  75% {
    transform: scale(1.22);
    opacity: 0.8;
    filter: drop-shadow(0 0 18px rgba(255, 80, 100, 0.7)) brightness(1.2);
  }
  100% {
    transform: scale(1);
    opacity: 0.72;
    filter: drop-shadow(0 0 10px rgba(255, 70, 90, 0.4)) brightness(1.05);
  }
}

@keyframes particle-fly {
  0% {
    opacity: 0;
    transform: rotate(calc(var(--i) * 45deg)) translateY(0) scale(0.4);
  }
  20% {
    opacity: 1;
    transform: rotate(calc(var(--i) * 45deg)) translateY(-18px) scale(1.1);
  }
  100% {
    opacity: 0;
    transform: rotate(calc(var(--i) * 45deg)) translateY(-72px) scale(0.15);
  }
}

@keyframes ring-expand {
  0% {
    opacity: 0.9;
    transform: scale(0.5);
    border-color: rgba(255, 120, 140, 0.9);
  }
  100% {
    opacity: 0;
    transform: scale(4.2);
    border-color: rgba(255, 80, 100, 0);
  }
}

.heart-btn.pulsing .heart {
  animation: heartbeat 1.1s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  15%      { transform: scale(1.16); }
  30%      { transform: scale(1); }
  45%      { transform: scale(1.1); }
  60%      { transform: scale(1); }
}

.heart-btn.hide {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  pointer-events: none;
  transition: none;
}

.heart-btn.sello {
  translate: 0 -25vh;
  scale: 0.42;
  transition: translate 1.4s cubic-bezier(0.65, 0, 0.35, 1), scale 1.4s cubic-bezier(0.65, 0, 0.35, 1);
}

.heart-btn.sale {
  animation: salida-cereza 1s ease forwards;
}

@keyframes salida-cereza {
  from { opacity: 1; transform: translate(-50%, -50%) scale(1.5); }
  to { opacity: 0; transform: translate(-50%, -50%) scale(1.2); }
}

.intro-banner {
  position: absolute;
  left: 50%;
  top: 55%;
  width: min(92vw, 420px);
  z-index: 25;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.86);
  transition:
    opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.8s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 1.4s;
}

.intro-banner.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
  transition:
    opacity 1.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.8s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

.intro-banner.sale {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.06);
  transition:
    opacity 1.2s ease,
    transform 1.4s ease;
}

.intro-banner.hide {
  display: none;
}

.intro-banner-inner {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 4;
  border-radius: 18px;
  overflow: hidden;
  background: #120708;
  border: 1px solid rgba(255, 120, 140, 0.3);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
}

.intro-banner-inner::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 38%, transparent 62%);
  pointer-events: none;
}

.escena {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 72% center;
  transform: scale(1.04);
  will-change: transform;
}

.intro-banner.show .escena {
  animation: acercamiento 16s ease-out forwards;
}

@keyframes acercamiento {
  from { transform: scale(1.04); }
  to { transform: scale(1.16); }
}

.franja {
  position: absolute;
  left: 0;
  right: 0;
  height: 7%;
  z-index: 2;
  background: #000;
}

.franja-arriba { top: 0; }
.franja-abajo { bottom: 0; }

.credito {
  position: absolute;
  top: calc(7% + 10px);
  left: 14px;
  z-index: 3;
  margin: 0;
  font-family: 'Poppins', system-ui, sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  opacity: 0.85;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.8);
}

.credito span {
  font-weight: 500;
  opacity: 0.75;
}

.subtitulo {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: calc(7% + 16px);
  z-index: 3;
  min-height: 1.3em;
  text-align: center;
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 7.5vw, 2rem);
  line-height: 1.2;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.85);
}

.subtitulo .palabra {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  animation: palabra 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i) * 0.14s);
}

@keyframes palabra {
  from { opacity: 0; transform: translateY(10px); filter: blur(4px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  .intro-banner.show .escena { animation: none; }
  .subtitulo .palabra { animation-duration: 0.01s; animation-delay: 0s; }
  .heart-btn.sello { transition: none; }
}

.fuego,
.fuego-brillo {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  transition: opacity 2.4s ease;
}

.fuego {
  width: 100%;
  height: 72%;
}

.fuego-brillo {
  height: 85%;
  transition: none;
  background:
    radial-gradient(ellipse 55% 70% at 0% 100%, rgba(255, 120, 30, 0.6), rgba(200, 40, 15, 0.25) 45%, transparent 75%),
    radial-gradient(ellipse 55% 70% at 100% 100%, rgba(255, 120, 30, 0.6), rgba(200, 40, 15, 0.25) 45%, transparent 75%),
    linear-gradient(to top, rgba(255, 80, 20, 0.28), transparent 35%);
}

.fuego.on { opacity: 1; }

.title-section {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  z-index: 10;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.6s ease 0.5s;
}

.title-section.show {
  opacity: 1;
  pointer-events: auto;
}

.title {
  position: relative;
  color: #fff;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-size: 2.6rem;
  letter-spacing: 2px;
  margin: 0 0 18px 0;
  text-shadow:
    0 2px 10px rgba(0,0,0,0.6),
    0 0 24px rgba(255, 92, 92, 0.45),
    0 0 48px rgba(192, 57, 43, 0.25);
}

.info-box {
  width: min(80vw, 340px);
  height: 200px;
  border-radius: 12px;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.63), rgba(0, 0, 0, 0.63)),
    url('images/image2.gif');
  background-size: cover;
  background-position: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  opacity: 1;
  transform: none;
  transition: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
}

.title-section.show .info-box {
  opacity: 1;
  transform: none;
}

.lyrics {
  color: #fff;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.3rem;
  line-height: 1.5;
  letter-spacing: 0.4px;
  text-align: center;
  text-shadow:
    0 2px 8px rgba(0,0,0,0.75),
    0 0 18px rgba(255, 92, 92, 0.35);
  margin: 0;
  display: inline-block;
  min-height: 1.5em;
}

.lyrics::after {
  content: '|';
  display: inline-block;
  margin-left: 2px;
  font-weight: 700;
  color: #ff8a9a;
  animation: lyrics-cursor-blink 0.8s step-end infinite;
}

.lyrics.done::after {
  animation: none;
  opacity: 0;
}

@keyframes lyrics-cursor-blink {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.outro-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0.9s;
}

.outro-overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition:
    opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

.outro-overlay-inner {
  width: min(85vw, 340px);
  min-height: 220px;
  border-radius: 16px;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.55)),
    url('images/image1.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px 20px;
  box-sizing: border-box;
  transform: scale(0.94);
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.outro-overlay.show .outro-overlay-inner {
  transform: scale(1);
}

.outro-instagram-link {
  color: #fff;
  font-family: 'Poppins', system-ui, sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0,0,0,0.75);
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(255, 92, 92, 0.22);
  border: 1px solid rgba(255, 138, 154, 0.6);
  backdrop-filter: blur(2px);
  transition: background 0.25s ease, transform 0.25s ease;
}

.outro-instagram-link:hover {
  background: rgba(255, 92, 92, 0.35);
  transform: translateY(-2px);
}

.outro-handle {
  font-weight: 700;
  color: #ff8a9a;
}
