/* Añadidos: pantalla inicial + "Te quiero mucho" al final */

/* ---------- Pantalla inicial ---------- */
#intro {
  position: fixed; inset: 0; z-index: 1000; width: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  border: 0; cursor: pointer; color: #fff; font: inherit;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse at center, rgba(20, 24, 60, .55), rgba(1, 1, 19, .92));
  -webkit-tap-highlight-color: transparent;
  transition: opacity .8s ease, transform .8s ease;
}
#intro.out { opacity: 0; transform: scale(1.08); pointer-events: none; }
.intro-icon { font-size: 84px; animation: bob 2.4s ease-in-out infinite; filter: drop-shadow(0 0 22px rgba(230, 243, 49, .45)); }
.intro-title {
  font-family: "Dancing Script", cursive; font-weight: 700; font-size: clamp(36px, 10vw, 60px);
  text-shadow: 0 0 18px rgba(230, 243, 49, .35); padding: 0 16px; text-align: center;
}
.intro-hint {
  font-size: 14px; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
  padding: 11px 22px; border: 1.5px solid rgba(230, 243, 49, .75); border-radius: 999px;
  color: #f4f8b0; animation: pulse 1.8s ease-in-out infinite;
}
@keyframes bob { 50% { transform: translateY(-12px) rotate(6deg); } }
@keyframes pulse { 50% { transform: scale(1.06); box-shadow: 0 0 22px rgba(230, 243, 49, .35); } }

/* El original pausa todo con .container; la pantalla inicial debe moverse igual */
.container #intro, .container #intro * { animation-play-state: running !important; }

/* ---------- Mensaje final ---------- */
#msg {
  position: fixed; left: 16px; right: 16px; top: max(6vh, env(safe-area-inset-top));
  z-index: 500; text-align: center; pointer-events: none; color: #fff;
}
.para {
  font-family: "Dancing Script", cursive; font-weight: 600; font-size: clamp(26px, 7vw, 40px);
  color: #f4f8b0; opacity: 0; animation: fadeUp .9s ease var(--d) forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.line {
  font-family: "Dancing Script", cursive; font-weight: 700; font-size: clamp(50px, 14vw, 92px);
  line-height: 1.05;
  text-shadow: 0 0 10px rgba(255, 255, 255, .55), 0 0 28px rgba(255, 70, 90, .55), 0 0 60px rgba(255, 40, 70, .35);
}
.word { display: inline-block; white-space: nowrap; }
.ch {
  display: inline-block; opacity: 0; transform: translateY(20px) scale(.7); filter: blur(6px);
  animation: letter .75s cubic-bezier(.2, .8, .2, 1) var(--d) forwards;
}
@keyframes letter { to { opacity: 1; transform: none; filter: blur(0); } }
.big-heart {
  display: block; margin: 12px auto 0; width: clamp(60px, 17vw, 100px); overflow: visible;
  opacity: 0; transform: scale(0);
  filter: drop-shadow(0 0 18px rgba(255, 20, 50, .8));
  animation: heartIn .9s cubic-bezier(.3, 1.6, .5, 1) var(--d) forwards,
             beat 1.15s ease-in-out calc(var(--d) + .9s) infinite;
}
@keyframes heartIn { to { opacity: 1; transform: scale(1); } }
@keyframes beat {
  0%, 60%, 100% { transform: scale(1); }
  15% { transform: scale(1.18); }
  30% { transform: scale(1); }
  45% { transform: scale(1.1); }
}

/* En móvil (vertical) agrandamos las flores para que llenen más la pantalla */
@media (max-aspect-ratio: 3/4) {
  .flowers { transform: scale(1.3); transform-origin: bottom center; }
}

/* En pantallas anchas (ordenador) bajamos un poco las flores para dejar sitio al texto */
@media (min-aspect-ratio: 1/1) {
  .flowers { transform: scale(0.75) translateY(10%); }
}
