/* ============================================
   HoloCards - Holographic Game Card Showcase
   Flat2VR Studios | Ray-Ban Display (600x600)
   ============================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { width: 100%; height: 100%; }
body {
  background: #0a0a0f;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#app {
  width: 100vmin;
  height: 100vmin;
  position: relative;
  overflow: hidden;
}

/* ---- Background ambient glow ---- */
.ambient-glow {
  position: absolute;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(120, 80, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  transition: background 0.6s ease;
}

/* ---- Card Container ---- */
.card-stage {
  position: absolute;
  /* Center the stage: 72% wide means 14% from each side, 80% tall means 6% top + 14% bottom for dots */
  left: 14%;
  top: 6%;
  width: 72%;
  height: 80%;
  z-index: 1;
}

/* ---- Holographic Card ---- */
.holo-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 18px;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  will-change: transform, opacity;
  perspective: 800px;
}

.holo-card.active {
  transform: translateX(0) translateY(0) scale(1);
  opacity: 1;
  z-index: 10;
}

.holo-card.left {
  transform: translateX(-120%) scale(0.85) rotateY(15deg);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  contain: strict;
}

.holo-card.right {
  transform: translateX(120%) scale(0.85) rotateY(-15deg);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
  contain: strict;
}

/* Slide transitions */
.holo-card.slide-out-left {
  transform: translateX(-120%) scale(0.85) rotateY(15deg);
  opacity: 0;
}

.holo-card.slide-out-right {
  transform: translateX(120%) scale(0.85) rotateY(-15deg);
  opacity: 0;
}

.holo-card.slide-in-from-right {
  transform: translateX(0) scale(1);
  opacity: 1;
}

.holo-card.slide-in-from-left {
  transform: translateX(0) scale(1);
  opacity: 1;
}

@keyframes cardFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

.holo-card.active {
  animation: cardFloat 4s ease-in-out infinite both;
}

/* ---- Holographic Border (the star of the show) ---- */
.holo-border {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 6px;
  overflow: hidden;
}

/* Multi-layer holographic foil effect — only animate on active card */
.holo-border::before {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 0deg,
    #ff0080, #ff8c00, #ffd700, #00ff88,
    #00bfff, #8a2be2, #ff0080, #ff8c00,
    #ffd700, #00ff88, #00bfff, #8a2be2, #ff0080
  );
  animation: holoRotate 6s linear infinite;
  animation-play-state: paused;
  z-index: 0;
}

.holo-card.active .holo-border::before {
  animation-play-state: running;
}

.holo-border::after {
  content: '';
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(
    from 180deg,
    transparent, rgba(255, 255, 255, 0.3), transparent,
    rgba(255, 255, 255, 0.15), transparent, rgba(255, 255, 255, 0.3), transparent
  );
  animation: holoRotate 4s linear infinite reverse;
  animation-play-state: paused;
  mix-blend-mode: overlay;
  z-index: 1;
}

.holo-card.active .holo-border::after {
  animation-play-state: running;
}

@keyframes holoRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Holographic shimmer overlay on the border */
.holo-shimmer {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    transparent 20%,
    rgba(255, 255, 255, 0.1) 30%,
    rgba(255, 255, 255, 0.25) 35%,
    transparent 45%,
    transparent 55%,
    rgba(255, 255, 255, 0.1) 65%,
    rgba(255, 255, 255, 0.2) 70%,
    transparent 80%
  );
  background-size: 300% 300%;
  animation: shimmerSlide 5s ease-in-out infinite;
  animation-play-state: paused;
  z-index: 5;
  pointer-events: none;
  mix-blend-mode: screen;
}

.holo-card.active .holo-shimmer {
  animation-play-state: running;
}

@keyframes shimmerSlide {
  0% { background-position: 100% 100%; }
  50% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

/* ---- Card Inner (sits inside the border) ---- */
.card-inner {
  position: absolute;
  inset: 6px;
  border-radius: 13px;
  background: #111118;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  z-index: 2;
}

/* ---- Card Header: Set name ---- */
.card-header {
  padding: 10px 14px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.card-set-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
}

.card-number {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255, 255, 255, 0.3);
  font-variant-numeric: tabular-nums;
}

/* ---- Card Art ---- */
.card-art-frame {
  position: relative;
  margin: 6px 10px;
  border-radius: 8px;
  overflow: hidden;
  flex: 1;
  min-height: 0;
}

.card-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

/* Holographic foil overlay on the art */
.card-art-holo {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    125deg,
    rgba(255, 0, 128, 0.06) 0%,
    rgba(0, 255, 136, 0.06) 25%,
    rgba(0, 191, 255, 0.08) 50%,
    rgba(138, 43, 226, 0.06) 75%,
    rgba(255, 215, 0, 0.06) 100%
  );
  background-size: 400% 400%;
  animation: artHoloShift 8s ease-in-out infinite;
  animation-play-state: paused;
  mix-blend-mode: screen;
  pointer-events: none;
}

.holo-card.active .card-art-holo {
  animation-play-state: running;
}

@keyframes artHoloShift {
  0%, 100% { background-position: 0% 50%; }
  25% { background-position: 100% 0%; }
  50% { background-position: 100% 100%; }
  75% { background-position: 0% 100%; }
}

/* In-card trailer frame */
.trailer-frame {
  position: absolute;
  inset: 0;
  z-index: 5;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
}

.trailer-frame.active {
  opacity: 1;
  pointer-events: auto;
}

.trailer-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.trailer-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trailer-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 48px;
  cursor: pointer;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.trailer-play-btn svg {
  width: 100%;
  height: 100%;
}

.trailer-close-zone {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 60px;
  height: 60px;
  z-index: 10;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 8px 0 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trailer-close-zone::after {
  content: '\2715';
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.card-art.hidden,
.card-art-holo.hidden {
  opacity: 0;
  transition: opacity 0.4s ease;
}

/* ---- Card Footer: Title + Badges ---- */
.card-footer {
  padding: 8px 14px 12px;
  flex-shrink: 0;
}

.card-footer-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.card-title {
  font-size: 16px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.card-release {
  font-size: 10px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.card-badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.badge {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.2px;
  padding: 3px 7px;
  border-radius: 3px;
  color: #fff;
  text-transform: uppercase;
}

.badge-steam {
  background: linear-gradient(135deg, #1b2838, #2a475e);
}

.badge-quest {
  background: linear-gradient(135deg, #1c1c4a, #3d2fa5);
}

.badge-psvr2 {
  background: linear-gradient(135deg, #003087, #0070d1);
}

/* ---- Card Shadow ---- */
.card-shadow {
  position: absolute;
  bottom: -14px;
  left: 10%;
  width: 80%;
  height: 24px;
  background: radial-gradient(ellipse, rgba(100, 60, 255, 0.2) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(8px);
  z-index: -1;
  animation: shadowPulse 4s ease-in-out infinite;
  animation-play-state: paused;
}

.holo-card.active .card-shadow {
  animation-play-state: running;
}

@keyframes shadowPulse {
  0%, 100% { opacity: 0.6; transform: scaleX(1); }
  50% { opacity: 0.9; transform: scaleX(1.05); }
}


/* ---- Dot indicators ---- */
.dot-nav {
  position: absolute;
  bottom: 3%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 20;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
}

.dot.active {
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 0 8px rgba(180, 140, 255, 0.5);
  transform: scale(1.15);
}


/* ---- Sparkle particles (ambient) ---- */
.sparkle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  pointer-events: none;
  z-index: 0;
  animation: sparkleFade 3s ease-in-out infinite;
}

@keyframes sparkleFade {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50% { opacity: 0.8; transform: scale(1.2); }
}
