/* ============================================================
   🌈 Invitación mágica de cumpleaños - Danyka Sabik
   Autor: ChatGPT Web Design
   Descripción: Estilos mejorados, responsive y con animaciones mágicas
=============================================================== */

/* ---- Configuración base ---- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background: radial-gradient(circle at top right, #fbc2eb, #a6c1ee);
  background-size: 400% 400%;
  animation: fondoMagico 10s ease-in-out infinite;
  overflow-x: hidden;
  text-align: center;
  color: #4a2671;
  position: relative;
  min-height: 100vh;
}

/* ✨ Animación del fondo en movimiento */
@keyframes fondoMagico {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ---- Contenedor principal ---- */
.contenedor {
  max-width: 420px;
  margin: 60px auto 40px;
  background: rgba(255, 255, 255, 0.85);
  border-radius: 25px;
  padding: 25px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: all 1s ease;
}

.contenedor.mostrar {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ============================================================
   🌟 TÍTULO MÁGICO RESPONSIVE
=============================================================== */

.titulo-magico {
  margin-top: 0.8rem;
  line-height: 1.3em;
  animation: aparecer 1.5s ease forwards;
  text-align: center;
}

/* 💖 Nombre principal */
.nombre {
  display: block;
  font-weight: 800;
  font-size: clamp(1.8rem, 6vw, 3rem);
  background: linear-gradient(90deg, #ff7ad9, #ffb3ec, #8e2de2, #4a00e0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

/* 🎂 Frase "Cumple 4 años" */
.cumple {
  font-size: clamp(1.2rem, 4vw, 2rem);
  font-weight: 700;
  color: #ff6f91;
  margin-top: 0.5rem;
  text-shadow:
    0 0 8px #ff94dc,
    0 0 15px #c77dff,
    0 0 30px #9d4edd;
  animation: parpadeo 2.5s ease-in-out infinite alternate;
}

/* Animación aparición título */
@keyframes aparecer {
  0% { opacity: 0; transform: scale(0.8) rotate(-5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); }
}

/* Animación parpadeo para "cumple" */
@keyframes parpadeo {
  0% { text-shadow: 0 0 10px #ff94dc, 0 0 25px #9d4edd; }
  50% { text-shadow: 0 0 18px #ffb3ec, 0 0 40px #c77dff; }
  100% { text-shadow: 0 0 12px #ff94dc, 0 0 28px #b77bff; }
}

/* 🦄 Imagen del unicornio */
.unicornio {
  width: 100%;
  max-width: 250px;
  margin: 20px auto;
  animation: flotar 5s ease-in-out infinite;
  filter: drop-shadow(0 0 12px rgba(255, 192, 255, 0.8));
}

/* Animación flotante para la imagen */
@keyframes flotar {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* 🧚‍♀️ Subtítulo */
.subtitulo {
  font-size: clamp(1rem, 3.5vw, 1.4rem);
  color: #7b3fa3;
  margin-top: 10px;
  text-shadow: 1px 1px 4px rgba(255,255,255,0.9);
}

/* 📝 Texto y descripción */
.texto, .descripcion {
  font-size: clamp(0.95rem, 3vw, 1.1rem);
  color: #4b2c65;
  margin-top: 10px;
  line-height: 1.5;
  padding: 0 10px;
  text-align: center;
}

/* 🎉 Botones de acción */
.botones {
  margin-top: 25px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  padding: 0 10px;
}

.boton {
  flex: 1 1 180px;
  max-width: 220px;
  padding: 14px 20px;
  border-radius: 40px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 6px 15px rgba(0,0,0,0.15);
  transition: all 0.4s ease;
  color: #4b2c65;
  background: linear-gradient(45deg, #fbc2eb, #a6c1ee);
}

.boton::before {
  content: "";
  position: absolute;
  top: 0; left: -75%;
  width: 50%;
  height: 100%;
  background: rgba(255,255,255,0.6);
  transform: skewX(-25deg);
  transition: left 0.5s ease;
  z-index: 1;
}

.boton:hover::before {
  left: 125%;
}

.boton:hover {
  transform: scale(1.05);
  z-index: 2;
}

/* Colores específicos para cada tipo de botón */
.asistire {
  background: linear-gradient(45deg, #ff9a9e, #fad0c4);
}

.talvez {
  background: linear-gradient(45deg, #fbc2eb, #a6c1ee);
}

.noasistire {
  background: linear-gradient(45deg, #d4fc79, #96e6a1);
}

.ubicacion {
  background: linear-gradient(45deg, #a1c4fd, #c2e9fb);
}

/* ---- Footer ---- */
footer {
  margin-top: 2rem;
  font-size: 0.9rem;
  color: #4b2c65;
  opacity: 0.85;
  padding-bottom: 20px;
}

/* ---- Canvas confeti ---- */
#confeti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ---- Media Queries para móviles y tablets ---- */
@media (max-width: 600px) {
  .contenedor {
    margin: 40px 15px 30px;
    padding: 20px;
    max-width: 95%;
  }

  .botones {
    flex-direction: column;
    gap: 12px;
  }

  .boton {
    flex: 1 1 auto;
    max-width: 100%;
  }
}