.tarot-container {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 30px;
}

.tarot-card {
  width: 100px;
  height: 160px;
  background: linear-gradient(45deg, #6a3093, #a044ff);
  border-radius: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 40px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s ease;
}

.tarot-card.flipped {
  transform: rotateY(180deg);
}

/* 确保翻转动画不被GSAP覆盖 */
.tarot-card.flipped {
  transform: rotateY(180deg) !important;
}

.tarot-card-front, .tarot-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 10px;
}

.tarot-card-front {
  background: linear-gradient(45deg, #6a3093, #a044ff);
}

.tarot-card-back {
  background: linear-gradient(45deg, #ffd166, #ff9e7d);
  transform: rotateY(180deg);
  padding: 10px;
  text-align: center;
  font-size: 14px;
  color: #1a1a2e;
  font-weight: bold;
}

.shuffle-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background: linear-gradient(45deg, #9c27b0, #673ab7);
  border-radius: 15px;
  color: white;
  font-weight: bold;
  text-align: center;
  margin: 0 auto 30px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
}

.shuffle-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(156, 39, 176, 0.4);
}

.divination-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background: linear-gradient(45deg, #ffd166, #ff6b6b);
  border-radius: 15px;
  color: white;
  font-weight: bold;
  text-align: center;
  margin: 0 auto 30px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  animation: divinationGlow 2s ease-in-out infinite alternate;
}

.divination-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(255, 209, 102, 0.4);
}

@keyframes divinationGlow {
  0% {
    box-shadow: 0 0 20px rgba(255, 209, 102, 0.3);
  }
  100% {
    box-shadow: 0 0 30px rgba(255, 209, 102, 0.6), 0 0 40px rgba(255, 107, 107, 0.4);
  }
}



.back-btn {
  display: block;
  width: 100%;
  padding: 15px;
  background: linear-gradient(45deg, #9c27b0, #673ab7);
  border-radius: 15px;
  color: white;
  font-weight: bold;
  text-align: center;
  text-decoration: none;
  margin-top: 20px;
}

/* 神秘科技转场效果 */
.mystical-transition {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.mystical-transition.active {
  opacity: 1;
}

.mystical-transition.fade-out {
  opacity: 0;
}

.transition-content {
  text-align: center;
  color: #fff;
}

.mystical-symbol {
  font-size: 80px;
  margin-bottom: 20px;
  animation: mysticalGlow 2s ease-in-out infinite alternate;
}

.tech-lines {
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #00d4ff, transparent);
  margin: 20px auto;
  position: relative;
  overflow: hidden;
}

.tech-lines::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: techScan 2s linear infinite;
}

.transition-text {
  font-size: 24px;
  font-weight: 300;
  margin-bottom: 30px;
  color: #00d4ff;
  text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
  letter-spacing: 2px;
}

.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  background: #00d4ff;
  border-radius: 50%;
  animation: loadingPulse 1.5s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes mysticalGlow {
  0% {
    text-shadow: 0 0 20px rgba(0, 212, 255, 0.5);
    transform: scale(1);
  }
  100% {
    text-shadow: 0 0 40px rgba(0, 212, 255, 0.8), 0 0 60px rgba(0, 212, 255, 0.4);
    transform: scale(1.1);
  }
}

@keyframes techScan {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

@keyframes loadingPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* 移动端背景修复 */
@media (max-width: 768px) {
  body {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%) !important;
    background-attachment: fixed !important;
    -webkit-background-size: cover !important;
    -moz-background-size: cover !important;
    background-size: cover !important;
  }
  
  body::before {
    background: 
        radial-gradient(circle at 20% 30%, rgba(156, 39, 176, 0.2) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(33, 150, 243, 0.2) 0%, transparent 40%),
        url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="%23ffffff" fill-opacity="0.05"/></svg>') !important;
  }
}