/* ===========================================
   TAROT COMMON STYLES
   Shared by tarot.html, tarot-gothica.html, tarot-abysses.html
   =========================================== */

/* Tarot Card Animation Overlay */
#tarotOverlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  display: none;
  overflow: hidden;
  background: #000;
}

/* Animation scene (1080x1920 scaled to fit, cards only) */
.tarot-scene {
  width: 1080px;
  height: 1920px;
  position: absolute;
  left: 50%;
  top: 50%;
  transform-origin: center center;
  transform: translate(-50%, -50%) scale(var(--anim-scale, 1));
  z-index: 1;
}
#tarotBgVideo {
  width: 100%;
  height: auto;
  max-height: 100vh;
  object-fit: contain;
  z-index: 0;
}

/* 3D card elements */
.anim-card {
  position: absolute;
  width: 1024px;
  height: 1536px;
  transform-style: preserve-3d;
  will-change: transform, left, top, opacity;
}
.anim-card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
}
.anim-face {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  pointer-events: none;
  user-select: none;
}
.anim-back { transform: rotateY(0deg); }
.anim-front { transform: rotateY(180deg); }

/* Cards Overlay during speaking */
#cardsOverlay {
  position: absolute;
  left: 10px;
  top: 45%;
  transform: translateY(-50%);
  z-index: 10;
  display: none;
  flex-direction: column;
  gap: 10px;
}
.card-overlay {
  width: 145px;
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.4s ease-out;
}
.card-overlay.show {
  opacity: 1;
  transform: translateX(0);
}
#figureCard.show {
  transform: translateX(0) rotate(2deg);
}
#symboleCard.show {
  transform: translateX(0) rotate(-2deg);
}
.card-overlay.hide {
  opacity: 0;
  transform: translateX(50px);
}
.card-overlay img {
  width: 100%;
}

/* 3-card mode */
#bonusCard.show {
  transform: translateX(0) rotate(-1deg);
}
#cardsOverlay.three-cards {
  gap: 0;
  top: 48%;
}
#cardsOverlay.three-cards .card-overlay {
  width: 133px;
  margin-top: -15px;
}
#cardsOverlay.three-cards .card-overlay:first-child {
  margin-top: 0;
}

