/* 动效：3D 翻卡 / 玉光呼吸 / 掉落 / 扫描线；reduced-motion 降级 */
.fcard-inner { transition: transform .62s cubic-bezier(.22, .78, .24, 1); }
.fcard.flipped .fcard-inner { transform: rotateY(180deg); }

/* 卡面入场 */
.fcard-front, .fcard-back { animation: cardIn .38s ease both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fcard-back { animation: none; }

/* 标题微光 */
.hero-title {
  background: linear-gradient(100deg, #FFFFFF 8%, #A8F0D0 42%, #E6DCFF 78%, #FFFFFF);
  background-size: 220% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 9s linear infinite;
}
@keyframes shine { to { background-position: 220% center; } }

/* 玉光呼吸 */
.mode-tag { animation: breathe 3.6s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 rgba(127, 233, 200, 0); }
  50% { box-shadow: 0 0 14px rgba(127, 233, 200, .24); }
}
.cdot.on { animation: dotPulse 1.8s ease-in-out infinite; }
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }

/* 玉珠缓慢浮动 */
@keyframes jadeFloat {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-3px, -8px); }
}

/* 扫描线（很轻，只做氛围） */
body::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 5;
  background: repeating-linear-gradient(0deg, transparent 0 2px, rgba(255, 255, 255, .012) 2px 3px);
  opacity: .55;
}
.hero::before { animation: scan 12s linear infinite; }
@keyframes scan { from { transform: translateY(0); } to { transform: translateY(-8px); } }

/* 结果条 / 掉落 */
.result-bar { animation: slideUp .34s ease both; }
.drop-card { animation: dropIn .5s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-16px) scale(.94) rotate(-2deg); }
  to { opacity: 1; transform: none; }
}
.drop-card .gun-sil { animation: gunGlow 2.4s ease-in-out infinite; }
@keyframes gunGlow {
  0%, 100% { filter: drop-shadow(0 0 6px var(--gun-hue)); }
  50% { filter: drop-shadow(0 0 16px var(--gun-hue)); }
}
.drop-card.r-legendary { animation: dropIn .5s cubic-bezier(.2, 1.3, .4, 1) both, legendPulse 2.2s ease-in-out infinite .5s; }
@keyframes legendPulse {
  0%, 100% { box-shadow: 0 0 18px rgba(232, 200, 106, .28); }
  50% { box-shadow: 0 0 34px rgba(232, 200, 106, .5); }
}

/* 结算分数 */
.big-score { animation: scorePop .6s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes scorePop { from { opacity: 0; transform: scale(.82); } to { opacity: 1; transform: none; } }

/* Toast */
.toast { animation: toastIn .28s ease both; transition: opacity .4s ease, transform .4s ease; }
.toast.out { opacity: 0; transform: translateX(16px); }
@keyframes toastIn { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }

/* 弹层 */
.ov-panel { animation: ovIn .24s ease both; }
@keyframes ovIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* 按钮悬浮微动（不承载信息） */
.mission-card:not(.locked):hover { border-color: rgba(127, 233, 200, .5); }
.mission-card:not(.locked) { transition: border-color .18s, transform .18s; }
.mission-card:not(.locked):hover { transform: translateY(-2px); }

/* 无障碍：减少动态效果（音频不受影响，只管动效） */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  body::after { display: none; }
  .hero-glow, .sage-art { animation: none !important; transform: none !important; }
  .fcard-inner { transition: none !important; }
  .fcard.flipped .fcard-inner { transform: none !important; }
  .fcard.flipped .fcard-front { display: none; }
  .fcard.flipped .fcard-back {
    transform: none !important;
    backface-visibility: visible !important; -webkit-backface-visibility: visible !important;
    opacity: 1;
  }
  .hero-title { background: none; -webkit-text-fill-color: var(--txt-1); color: var(--txt-1); }
}
