/* ==========================================================================
   静心过渡与微动效规范 (Tranquil Transitions & Easing Curves)
   ========================================================================== */

/* 核心缓动曲线与时间常量 */
:root {
  --ease-calm: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-switch: 300ms;
}

/* 名言卡片切换过渡动画类 (Card Switch Transition) */
.card-content-transition {
  transition: opacity var(--duration-switch) var(--ease-calm),
              transform var(--duration-switch) var(--ease-calm);
  will-change: opacity, transform;
}

.card-content-transition.initial-loading {
  opacity: 0;
  transform: translateY(4px);
}

.card-content-transition.fade-out {
  opacity: 0;
  transform: translateY(6px) scale(0.985);
}

.card-content-transition.fade-in {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* 随机抽签轻盈重聚动效 (Random Draw Resonance) */
@keyframes drawResonance {
  0% {
    opacity: 0.2;
    transform: scale(0.96) rotate(-0.5deg);
    filter: blur(2px);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.01) rotate(0.2deg);
    filter: blur(0px);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
    filter: blur(0);
  }
}

.anim-draw {
  animation: drawResonance 400ms var(--ease-calm) forwards;
}

/* 呼吸式微妙气韵动效 (Ambient Paper Glow) */
@keyframes paperAmbient {
  0%, 100% {
    box-shadow: 0 16px 48px -12px rgba(44, 34, 24, 0.09), 0 3px 10px rgba(44, 34, 24, 0.04);
  }
  50% {
    box-shadow: 0 20px 52px -10px rgba(44, 34, 24, 0.12), 0 4px 12px rgba(44, 34, 24, 0.06);
  }
}

.quote-card {
  animation: paperAmbient 8s ease-in-out infinite;
}

/* 无障碍：减少动效模式 (Respect prefers-reduced-motion) */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
