* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #0d0221 0%, #000000 100%);
  font-family: 'Trebuchet MS', 'Segoe UI', Verdana, sans-serif;
}

#fireworks-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.content {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  padding: 2rem;
  text-align: center;
}

.title {
  max-width: 900px;
  text-align: center;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.4;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35em;
  text-shadow: 0 0 15px rgba(255, 255, 255, 0.25);
}

.subtitle {
  max-width: 700px;
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  font-weight: 700;
  line-height: 1.5;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3em;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.2);
}

.title span,
.subtitle span {
  background: linear-gradient(
    90deg,
    #ff4d6d,
    #ffb703,
    #8ac926,
    #1982c4,
    #6a4c93,
    #ff4d6d
  );
  background-size: 400% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: colorShift 6s linear infinite, floaty 3s ease-in-out infinite;
  display: inline-block;
}

/* Desfase para que cada palabra "flote" de forma distinta */
.title span:nth-child(1)  { animation-delay: 0s, 0.1s; }
.title span:nth-child(2)  { animation-delay: -0.2s, 0.2s; }
.title span:nth-child(3)  { animation-delay: -0.3s, 0.2s; }


.subtitle span:nth-child(1)  { animation-delay: -1.5s, 0.3s; }
.subtitle span:nth-child(2)  { animation-delay: -2s, 0.1s; }
.subtitle span:nth-child(3)  { animation-delay: -2.3s, 0.2s; }
.subtitle span:nth-child(4)  { animation-delay: -2s, 0.4s; }
.subtitle span:nth-child(5)  { animation-delay: -2.6s, 0.3s; }
.subtitle span:nth-child(6)  { animation-delay: -2.9s, 0.4s; }
.subtitle span:nth-child(7)  { animation-delay: -3s, 0.6s; }
.subtitle span:nth-child(8)  { animation-delay: -3.2s, 0.5s; }
.subtitle span:nth-child(9)  { animation-delay: -3.5s, 0.6s; }
.subtitle span:nth-child(10) { animation-delay: -3.8s, 0.7s; }
.subtitle span:nth-child(11) { animation-delay: -4s, 0.8s; }
.subtitle span:nth-child(12) { animation-delay: -4.2s, 0.8s; }
.subtitle span:nth-child(13) { animation-delay: -4.4s, 0.9s; }
.subtitle span:nth-child(14) { animation-delay: -4.5s, 0.9s; }
.subtitle span:nth-child(15) { animation-delay: -5s, 1s; }
.subtitle span:nth-child(16) { animation-delay: -5.3s, 0.5s; }
.subtitle span:nth-child(17) { animation-delay: -5.6s, 0.7s; }
.subtitle span:nth-child(18) { animation-delay: -5.9s, 0.9s; }
.subtitle span:nth-child(19) { animation-delay: -6.2s, 0.3s; }
.subtitle span:nth-child(20) { animation-delay: -6.5s, 0.4s; }
.subtitle span:nth-child(21) { animation-delay: -6.8s, 0.5s; }
.subtitle span:nth-child(22) { animation-delay: -7.1s, 0.6s; }
.subtitle span:nth-child(23) { animation-delay: -7.4s, 0.8s; }

@keyframes colorShift {
  0%   { background-position: 0% 50%; }
  100% { background-position: 400% 50%; }
}

@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

/* El emoji tiene su propio pequeño rebote */
.title span:last-child {
  animation: floaty 1.8s ease-in-out infinite;
}
