* {
  box-sizing: border-box;
}

body {
  margin: 0;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f6e3c5;
  font-family: Arial, sans-serif;
  overflow: hidden;
}

/* ===== CORAZONES FONDO ===== */
.hearts {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}
.heart-bg {
  position: absolute;
  top: -40px;
  color: rgba(255, 120, 150, 0.35);
  font-size: 18px;
  animation: fall linear infinite;
}
@keyframes fall {
  to {
    transform: translateY(110vh);
  }
}

/* ===== ESCENA ===== */
.scene {
  position: relative;
  width: 360px;
  height: 520px;
  z-index: 2;
}

/* ===== CAJA ===== */
.box {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 140px;
  background: #8b5a2b;
  border-radius: 16px;
  box-shadow: inset 0 10px 0 rgba(255, 255, 255, 0.15);
  z-index: 5;
}
.box::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 0;
  width: 100%;
  height: 30px;
  background: #9c6734;
  border-radius: 16px 16px 8px 8px;
}

/* ===== OSO ===== */
.bear {
  position: absolute;
  bottom: 220px;
  left: 50%;
  transform: translateX(-50%);
  width: 180px;
  height: 170px;
  background: #6d4026;
  border-radius: 50%;
  z-index: 3;
}

/* OREJAS */
.ear {
  position: absolute;
  top: -22px;
  width: 42px;
  height: 42px;
  background: #6d4026;
  border-radius: 50%;
}
.ear.left {
  left: 18px;
}
.ear.right {
  right: 18px;
}

/* CARA */
.face {
  position: absolute;
  top: 55px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 60px;
  background: #8a5535;
  border-radius: 50%;
}
.eye {
  position: absolute;
  top: 22px;
  width: 8px;
  height: 8px;
  background: #000;
  border-radius: 50%;
}
.eye.left {
  left: 18px;
}
.eye.right {
  right: 18px;
}

/* BRAZOS */
.arm {
  position: absolute;
  bottom: 10px;
  width: 55px;
  height: 70px;
  background: #6d4026;
  border-radius: 30px;
  transform-origin: top center;
}
.arm.left {
  left: -10px;
  transform: rotate(20deg);
}
.arm.right {
  right: -10px;
  transform: rotate(-20deg);
}

/* ===== CARTAS ===== */
.cards {
  position: absolute;
  bottom: 230px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
}
.card {
  position: absolute;
  width: 160px;
  min-height: 70px;
  padding: 10px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 14px;
  opacity: 0;
}

/* ===== ANIMACIONES ===== */
@keyframes bearUp {
  from {
    transform: translate(-50%, 60px);
  }
  to {
    transform: translate(-50%, 0);
  }
}
@keyframes armMove {
  0% {
    transform: rotate(20deg);
  }
  50% {
    transform: rotate(-10deg);
  }
  100% {
    transform: rotate(20deg);
  }
}
@keyframes cardFloat {
  0% {
    transform: translate(-50%, 40px) scale(0.7);
    opacity: 0;
  }
  20% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -220px) scale(1);
    opacity: 0;
  }
}

.play .bear {
  animation: bearUp 1.2s ease-out forwards;
}
.play .arm {
  animation: armMove 1.4s ease-in-out infinite;
}
