/*
 * Motion override
 * - 默认尊重 prefers-reduced-motion: reduce
 * - 当 <html data-force-motion="true"> 时，只对“被 reduce 禁用会直接坏体验”的特效做定点恢复
 *
 * 注意：不要用全局的 animation/transition: revert !important。
 * revert 会回退到 UA 样式，导致作者样式里的动画/过渡也被抹掉（例如 bird 投喂粒子会瞬间消失）。
 */

@media (prefers-reduced-motion: reduce) {
  /* Bird：点击投喂特效（能量环 + 散射粒子 + 掉落粒子） */
  html[data-force-motion="true"] .bird-energy-ring {
    animation: birdRing 0.85s ease-out forwards !important;
  }

  html[data-force-motion="true"] .bird-feed-grain {
    transition: transform 0.9s cubic-bezier(0.55, 0.12, 0.25, 1.15),
      opacity 0.9s ease !important;
  }

  html[data-force-motion="true"] .bird-seed {
    animation: seedFall 0.9s ease-in forwards !important;
  }

  /* 首页缩略图：恢复悬浮缩放效果 */
  html[data-force-motion="true"] .post-thumbnail img,
  html[data-force-motion="true"] .posts-grid.layout-1 .post-thumbnail img,
  html[data-force-motion="true"] .posts-grid.layout-2 .post-thumbnail img {
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
  }

  /* Header 工具按钮：恢复图标变换动画 */
  html[data-force-motion="true"] .tool-button {
    transition: all 0.2s ease !important;
  }

  html[data-force-motion="true"] .tool-button i {
    transition: transform 0.3s ease !important;
  }

  /* 进度按钮：恢复图标切换动画 */
  html[data-force-motion="true"] .header-tools .scroll-progress .progress-icon {
    transition: opacity 0.22s ease, transform 0.25s cubic-bezier(0.4, 0.14, 0.3, 1) !important;
  }

  html[data-force-motion="true"] .header-tools .scroll-progress .progress-text::before {
    transition: opacity 0.18s ease !important;
  }

  /* 主题切换：恢复脉冲动画 */
  html[data-force-motion="true"] .theme-switch .icon-theme.is-pulse {
    animation: pulse 1s infinite !important;
  }
}
