:root {
  --rosa-claro: #ffe1ef;
  --rosa: #ff9ec7;
  --rosa-fuerte: #ff5fa2;
  --rosa-oscuro: #d63384;
  --fucsia: #ff2e93;
  --dorado: #ffd700;
  --blanco: #fffafc;
  --texto: #6b2545;
  --sombra: rgba(214, 51, 132, 0.25);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--texto);
  background: linear-gradient(160deg, #fff0f6 0%, #ffd6e8 40%, #ffb6d5 100%);
  background-attachment: fixed;
  position: relative;
}

#confetti-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.balloons {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.balloon {
  position: absolute;
  bottom: -120px;
  font-size: 2.6rem;
  opacity: 0.85;
  animation: flotar 14s linear infinite;
  filter: drop-shadow(0 4px 6px var(--sombra));
}

.b1 { left: 5%;  animation-delay: 0s;  font-size: 2.2rem; }
.b2 { left: 20%; animation-delay: 2s;  font-size: 3rem; }
.b3 { left: 40%; animation-delay: 4s;  font-size: 2rem; }
.b4 { left: 60%; animation-delay: 1s;  font-size: 2.8rem; }
.b5 { left: 80%; animation-delay: 3s;  font-size: 2.3rem; }
.b6 { left: 92%; animation-delay: 5s;  font-size: 2.6rem; }

@keyframes flotar {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0.9; }
  50%  { transform: translateY(-60vh) translateX(20px) rotate(8deg); }
  100% { transform: translateY(-125vh) translateX(-15px) rotate(-6deg); opacity: 0.7; }
}

.invitation {
  position: relative;
  z-index: 2;
  max-width: 560px;
  margin: 0 auto;
  padding: 2.5rem 1.2rem 3rem;
}

.hero {
  text-align: center;
  padding: 2rem 0 1rem;
  animation: aparecer 1.2s ease;
}

.pretitle {
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rosa-oscuro);
  margin-bottom: 0.5rem;
}

.nombre {
  font-family: 'Great Vibes', cursive;
  font-size: 5rem;
  line-height: 1;
  margin: 0;
  background: linear-gradient(90deg, var(--fucsia), var(--rosa-oscuro), var(--dorado));
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: brillo 4s linear infinite;
  text-shadow: 0 6px 18px var(--sombra);
}

@keyframes brillo {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

.numero-edad {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.6rem 0 1rem;
  animation: latir 2.4s ease-in-out infinite;
}

.edad {
  font-size: 4.5rem;
  font-weight: 700;
  color: var(--rosa-fuerte);
  text-shadow: 0 4px 10px var(--sombra);
}

.texto-anios {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--rosa-oscuro);
}

@keyframes latir {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

.frase {
  font-style: italic;
  color: var(--rosa-oscuro);
  font-size: 1.05rem;
}

@keyframes aparecer {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(6px);
  border-radius: 24px;
  padding: 1.8rem 1.5rem;
  margin-top: 1.8rem;
  box-shadow: 0 10px 30px var(--sombra);
  border: 2px solid var(--rosa-claro);
  animation: aparecer 1s ease;
  animation-fill-mode: both;
}

.card h2 {
  text-align: center;
  color: var(--rosa-oscuro);
  margin-top: 0;
  font-size: 1.4rem;
}

.detalles .detalle-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--rosa);
}

.detalles .detalle-item:last-child {
  border-bottom: none;
}

.detalles .icono {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.detalles strong {
  color: var(--rosa-oscuro);
  font-size: 1.05rem;
}

.detalles p {
  margin: 0.15rem 0 0;
  font-size: 0.9rem;
  color: var(--texto);
  opacity: 0.85;
}

.countdown-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  margin-top: 1rem;
}

.tiempo {
  background: linear-gradient(160deg, var(--rosa-fuerte), var(--fucsia));
  color: #fff;
  border-radius: 16px;
  padding: 0.8rem 0.3rem;
  text-align: center;
  box-shadow: 0 6px 14px var(--sombra);
}

.tiempo span {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.tiempo small {
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.9;
}

.mensaje-countdown {
  text-align: center;
  font-weight: 600;
  color: var(--rosa-oscuro);
  margin-top: 1rem;
  margin-bottom: 0;
}

.rsvp-sub {
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.85;
  margin-top: -0.5rem;
}

.campo {
  margin-bottom: 1rem;
}

.campo label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--rosa-oscuro);
  margin-bottom: 0.35rem;
}

.campo input[type="text"],
.campo input[type="number"],
.campo textarea {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  border: 2px solid var(--rosa);
  font-family: inherit;
  font-size: 0.95rem;
  background: #fff;
  color: var(--texto);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.campo input:focus,
.campo textarea:focus {
  outline: none;
  border-color: var(--fucsia);
  box-shadow: 0 0 0 3px rgba(255, 46, 147, 0.2);
}

.asistencia {
  display: flex;
  gap: 1.2rem;
  flex-wrap: wrap;
}

.asistencia label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  font-size: 0.9rem;
}

.btn-confirmar {
  width: 100%;
  padding: 0.9rem;
  border: none;
  border-radius: 50px;
  background: linear-gradient(90deg, var(--rosa-fuerte), var(--fucsia));
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px var(--sombra);
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.btn-confirmar:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 12px 26px var(--sombra);
}

.btn-confirmar:active {
  transform: translateY(0) scale(0.98);
}

.rsvp-respuesta {
  margin-top: 1rem;
  padding: 0.9rem;
  border-radius: 14px;
  text-align: center;
  font-weight: 600;
  background: var(--rosa-claro);
  color: var(--rosa-oscuro);
  animation: aparecer 0.5s ease;
}

.footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--rosa-oscuro);
  opacity: 0.8;
}

.btn-musica {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  z-index: 5;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(160deg, var(--rosa-fuerte), var(--fucsia));
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 8px 20px var(--sombra);
  animation: latir 2.4s ease-in-out infinite;
}

@media (max-width: 400px) {
  .nombre { font-size: 3.8rem; }
  .edad { font-size: 3.4rem; }
  .tiempo span { font-size: 1.3rem; }
}
