* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  background: linear-gradient(135deg, #ffb6c1, #ffe6f2, #ffd1dc);
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  font-family: "Poppins", sans-serif;
}

.heart-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: -1;
}

.heart-bg::before,
.heart-bg::after {
  content: "💖💞💗💘💝";
  position: absolute;
  width: 100%;
  text-align: center;
  font-size: 40px;
  opacity: 0.1;
  animation: floatHearts 10s linear infinite;
}

.heart-bg::after {
  animation-delay: -5s;
}

@keyframes floatHearts {
  0% { transform: translateY(100vh) rotate(0deg); }
  100% { transform: translateY(-100vh) rotate(360deg); }
}

.form-container {
  background: rgba(255, 182, 193, 0.9);
  padding: 30px;
  border-radius: 25px;
  box-shadow: 0 0 40px rgba(255, 0, 150, 0.3);
  text-align: center;
  animation: fadeIn 1.5s ease;
  width: 90%;
  max-width: 400px;
}

.form-container h2 {
  color: #ff007f;
  margin-bottom: 10px;
  font-size: clamp(1.5em, 4vw, 2em);
  text-shadow: 0 0 10px white;
}

.sub {
  color: #fff;
  margin-bottom: 25px;
  font-size: clamp(0.9em, 3vw, 1em);
  opacity: 0.9;
}

input {
  padding: 12px 20px;
  border: none;
  border-radius: 20px;
  font-size: 16px;
  outline: none;
  text-align: center;
  width: 100%;
  max-width: 250px;
  margin-bottom: 20px;
  background: #fff0f5;
}

button {
  background: linear-gradient(90deg, #ff69b4, #ff1493);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 1em;
  cursor: pointer;
  transition: 0.3s;
  box-shadow: 0 0 15px rgba(255, 105, 180, 0.5);
}

button:hover {
  background: linear-gradient(90deg, #ff1493, #ff69b4);
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(255, 105, 180, 0.7);
}

.animation-container {
  position: relative;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

#nameDisplay {
  font-size: clamp(2em, 8vw, 3em);
  color: #ff007f;
  animation: fadeOut 3s ease-in-out forwards;
  text-shadow: 0 0 20px white;
  text-align: center;
  z-index: 10;
}

@keyframes fadeOut {
  0% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(15); }
}

#heartCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#loveText {
  position: absolute;
  color: #ff007f;
  font-size: clamp(2em, 8vw, 4em);
  text-shadow: 0 0 20px white;
  display: none;
  text-align: center;
  padding: 0 20px;
  z-index: 10;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.8); }
  to { opacity: 1; transform: scale(1); }
}

/* Responsive para móviles */
@media (max-width: 480px) {
  .form-container {
    padding: 20px;
  }
  
  input {
    width: 90%;
  }
}

center{
    display: none;
}

