body {
  font-family: 'Segoe UI', sans-serif;
  background-image: url('hellokity.jpg');
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  margin: 0;
  overflow: hidden;
}

.carta {
  width: 90%;
  max-width: 500px;   /* más grande en pantallas grandes */
  min-height: 250px;  /* altura mínima para que no se vea aplastada */
  perspective: 1000px;
  position: relative;
}

.frente, .contenido {
  width: 100%;
  min-height: 250px;
  position: absolute;
  backface-visibility: hidden;
  border: 2px solid #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  background: white;
  text-align: center;
  box-sizing: border-box;
}

.frente {
  background: linear-gradient(135deg, #ff7eb9, #ff65a3);
}

.contenido {
  transform: rotateY(180deg);
}

.carta.abierta .frente {
  transform: rotateY(180deg);
}

.carta.abierta .contenido {
  transform: rotateY(0deg);
}

/* Botones adaptables */
button {
  padding: 12px 18px;
  font-size: 1.1em;
  border: none;
  border-radius: 6px;
  background: #dd0202da;
  color: white;
  cursor: pointer;
  margin-top: 12px;
}

button:hover {
  background: #ff2e63;
}

/* Corazones flotando */
.corazones {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.corazon {
  position: absolute;
  font-size: 28px;
  color: red;
  animation: flotar 5s linear infinite;
}

@keyframes flotar {
  0% { transform: translateY(100vh) scale(0.5); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(-10vh) scale(1.2); opacity: 0; }
}

/* 📱 Ajustes para móviles */
@media (max-width: 600px) {
  .carta {
    width: 95%;
    min-height: 300px;   /* más alto en móviles */
  }

  .frente, .contenido {
    font-size: 1em;
    padding: 20px;
  }

  button {
    font-size: 1em;
    padding: 10px 15px;
  }

  .corazon {
    font-size: 22px;
  }
}


