/* Fondo animado */
body {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: linear-gradient(-45deg, #ffccd5, #ffd6e0, #ffe6f0, #ffdee9);
  background-size: 400% 400%;
  animation: fondoAnimado 15s ease infinite;
  color: #7a2a42;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

@keyframes fondoAnimado {
  0% {background-position: 0% 50%;}
  50% {background-position: 100% 50%;}
  100% {background-position: 0% 50%;}
}

/* Caja principal más transparente */
.welcome-container {
  max-width: 420px;
  margin: 60px auto;
  padding: 30px 20px;
  background: rgba(255, 255, 255, 0.6); /* más transparente */
  border-radius: 20px;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  position: relative;
  z-index: 10;
  text-align: center;
}

/* Carta con cursiva */
#carta {
  white-space: pre-wrap;
  font-size: 1.3em;
  line-height: 1.5;
  color: #7a2a42;
  font-family: 'Georgia', 'Times New Roman', serif;
  font-style: italic;
  text-align: left;
  margin-top: 20px;
  min-height: 220px;
  opacity: 0;
  transition: opacity 1.5s ease;
}
#carta.mostrar {
  opacity: 1;
}

/* Estrellas */
.stars {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  background:
    radial-gradient(2px 2px at 10% 20%, white, transparent),
    radial-gradient(1.5px 1.5px at 50% 10%, white, transparent),
    radial-gradient(2.5px 2.5px at 80% 30%, white, transparent),
    radial-gradient(1.2px 1.2px at 30% 80%, white, transparent),
    radial-gradient(2px 2px at 60% 70%, white, transparent);
  background-repeat: no-repeat;
  animation: twinkle 4s linear infinite;
  z-index: 1;
}

@keyframes twinkle {
  0%, 100% {opacity: 1;}
  50% {opacity: 0.3;}
}

/* Pétalos */
.petalos {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 3;
}

.petalo {
  position: absolute;
  width: 12px;
  height: 12px;
  background: #ffc0cbcc;
  border-radius: 50%;
  filter: drop-shadow(0 0 1px #ff9ccbcc);
  animation-timing-function: linear;
  animation-fill-mode: forwards;
  box-shadow: 0 0 5px 1px #f5a1c6aa;
  pointer-events: none;
  z-index: 3;
}

@keyframes caerPetalo {
  0% { transform: translateY(0) rotate(0); opacity: 1; }
  100% { transform: translateY(100vh) rotate(360deg); opacity: 0; }
}

@keyframes explotarPetalo {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* Corazones al tocar */
.touch-hearts {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 20;
}
.corazon {
  position: absolute;
  font-size: 25px;
  color: #ff2d55;
  animation: explotar 1s ease-out forwards;
}
@keyframes explotar {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2); opacity: 0; top: -30px; }
}

/* Frase bajo corazón */
.frase-touch {
  position: absolute;
  color: #ff4d7e;
  font-weight: 700;
  font-size: 14px;
  animation: fraseFade 1.5s ease forwards;
}
@keyframes fraseFade {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-30px); }
}

/* Frases inspiradoras que caen */
.frase-cae {
  position: absolute;
  color: #d14770cc;
  font-weight: 600;
  font-size: 16px;
  pointer-events: none;
  opacity: 0.7;
  white-space: nowrap;
  text-shadow: 0 0 4px #f7a1b3aa;
  animation: caerFrase 10s linear forwards;
}
@keyframes caerFrase {
  0% { transform: translateY(0); opacity: 0.7; }
  100% { transform: translateY(100vh); opacity: 0; }
}

/* Oso emoji flotando */
.oso-container {
  width: 100px;
  height: 100px;
  margin: auto;
  margin-bottom: 25px;
  animation: flotando 6s ease-in-out infinite;
  z-index: 10;
}
.oso-emoji {
  font-size: 5rem;
}
@keyframes flotando {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Regalo CSS con frase visible */
.gift {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #d14770;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 5px 10px rgba(0,0,0,0.15);
  animation: flotarRegalo 3s ease-in-out infinite;
  z-index: 11;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gift-label {
  color: white;
  font-size: 11px;
  font-weight: bold;
  text-align: center;
  padding: 4px;
  pointer-events: none;
}
@keyframes flotarRegalo {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
