/* ======== ESTILO GENERAL ======== */
body {
  font-family: "Poppins", Arial, sans-serif;
  background: url("imagenes/fondo.avif") no-repeat center center fixed;
  background-size: cover; /* la imagen se adapta a toda la pantalla */
  text-align: center;
  margin: 0;
  padding: 0;
  color: #222;
}

/* ======== TÍTULO ======== */
h1 {
  font-size: 7vw;
  margin: 20px 0;
  color: #000000;
  text-shadow: 2px 2px 4px #fff;
  font-weight: 800;
  letter-spacing: 2px;
  background: rgba(255, 255, 255, 0.836); /* capa blanca translúcida */
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
}
/* ======== CARTA ======== */
#carta {
  width: 95%;
  max-width: 600px;
  height: auto;
  margin: 30px auto;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  background: rgb(252, 251, 251); /* capa translúcida */
  padding: 15px;
  transition: transform 0.3s ease;
}

#carta:hover {
  transform: scale(1.08);
}

/* ======== BOTONES ======== */
button {
  margin: 12px;
  padding: 60px 80px; /* más espacio interno */
  font-size: 42px; /* texto más grande */
  border: 8px solid #000;   /* ✅ borde negro */  
  border-radius: 12px;
  background-color: #fff;
  color: #333;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.3s ease;
}

button:hover {
  background-color: #ffcc00;
  color: #000;
  transform: translateY(-3px) scale(1.05);
}

button.activo {
  background-color: #ff6600;
  color: #fff;
  border: 3px solid #000;   /* mantiene borde negro */
}

.oculto {
  display: none;
}
/* ======== ANIMACIONES ======== */
#carta.revolviendo {
  animation: zoomFade 0.5s ease-in-out infinite; /* más suave */
}

@keyframes zoomFade {
  0% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
  50% {
    transform: scale(1.1) rotate(10deg);
    opacity: 0.7;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

/* ======== MENSAJE FINAL ======== */
#mensajeFinal {
  font-size: 5vw;
  color: #b22222;
  font-weight: bold;
  margin-top: 20px;
  animation: aparecer 1s ease forwards;
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ======== RESPONSIVO ======== */
@media (max-width: 600px) {
  h1 {
    font-size: 8vw;
  }
  #carta {
    width: 95%;
    max-width: 300px;
  }
  button {
    font-size: 4.5vw;
    padding: 3vw 6vw;
  }
}

#pantallaCarga {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 5vw;
  color: #b22222;
  z-index: 9999;
}
