/* ============================================================================
   src/styles/fx.css · 昆特牌 · 全屏特效层与 DOM 辅助动效
   Owner: vfx
   ----------------------------------------------------------------------------
   · 只消费 theme.css 的设计 token，全部带 hex fallback（theme.css 未就位也可用）。
   · 所有层 pointer-events:none，绝不遮挡交互。
   · z-index 可被 theme.css / index.html 覆盖：--fx-z-canvas / --fx-z-dom。
     默认低于常见的 tooltip / modal 浮层（≥100）。
   ============================================================================ */

:root {
  --fx-z-canvas: 60;   /* 与 theme.css #fx-canvas 一致 */
  --fx-z-dom: 65;      /* 高于对局 UI（10/40），低于 tooltip(70) / toast(80) */
  --fx-faction: var(--gold, #c9a227);
  --fx-faction-glow: var(--gold-bright, #f0d078);
  --fx-faction-weak: rgba(201, 162, 39, 0.22);
  --fx-faction-soft: rgba(201, 162, 39, 0.08);
}

/* ------------------------------------------------------------------ canvas */
.fx-canvas {
  position: fixed;
  inset: 0;
  display: block;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: var(--fx-z-canvas, 60);
  contain: strict;
}

/* -------------------------------------------------------------- DOM layer */
.fx-layer {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: var(--fx-z-dom, 70);
  font-family: var(--font-ui, "Avenir Next", "PingFang SC", "Noto Sans SC", system-ui, sans-serif);
  color: var(--paper, #e7dcc2);
  -webkit-user-select: none;
  user-select: none;
}
.fx-layer *,
.fx-layer *::before,
.fx-layer *::after {
  box-sizing: border-box;
  pointer-events: none;
}

/* ============================================================== 天气色调层 */
.fx-weather-tint {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 900ms var(--ease-out, cubic-bezier(0.22, 0.8, 0.3, 1));
}
.fx-weather-tint.is-active {
  opacity: 1;
}
.fx-tint-layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms var(--ease-out, cubic-bezier(0.22, 0.8, 0.3, 1));
}
.fx-tint-layer.is-on {
  opacity: 1;
}

/* 霜：蓝白冷调 + 四角结霜 */
.fx-tint-layer--frost {
  background:
    radial-gradient(120% 85% at 50% -8%, rgba(196, 232, 255, 0.2), transparent 64%),
    radial-gradient(90% 70% at 12% 104%, rgba(150, 205, 245, 0.14), transparent 70%),
    radial-gradient(90% 70% at 88% 104%, rgba(150, 205, 245, 0.12), transparent 72%);
}
.fx-tint-layer--frost::before {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow:
    inset 0 0 170px rgba(190, 230, 255, 0.3),
    inset 0 0 34px rgba(228, 246, 255, 0.2);
}
.fx-tint-layer--frost::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(40% 28% at 0% 0%, rgba(224, 246, 255, 0.3), transparent 72%),
    radial-gradient(34% 24% at 100% 0%, rgba(224, 246, 255, 0.24), transparent 72%),
    radial-gradient(40% 28% at 0% 100%, rgba(204, 238, 255, 0.2), transparent 74%),
    radial-gradient(34% 24% at 100% 100%, rgba(204, 238, 255, 0.2), transparent 74%);
}

/* 雾：灰白乳浊 + 去饱和 */
.fx-tint-layer--fog {
  background:
    radial-gradient(140% 110% at 50% 100%, rgba(206, 205, 196, 0.18), transparent 72%),
    linear-gradient(180deg, rgba(196, 196, 188, 0.08), rgba(160, 162, 158, 0.16));
}
.fx-tint-layer--fog::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(45% 30% at 20% 70%, rgba(220, 220, 212, 0.09), transparent 70%),
    radial-gradient(50% 34% at 78% 40%, rgba(210, 212, 208, 0.08), transparent 72%);
  animation: fx-fog-drift 26s ease-in-out infinite alternate;
}
.fx-tint-layer--fog::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 160px rgba(198, 200, 194, 0.16);
}

/* 雨：底部青灰压暗 */
.fx-tint-layer--rain {
  background:
    linear-gradient(180deg, rgba(96, 128, 158, 0.0), rgba(66, 96, 126, 0.12) 60%, rgba(40, 62, 86, 0.2)),
    radial-gradient(120% 80% at 50% 0%, rgba(140, 172, 200, 0.08), transparent 70%);
}

/* 风暴：青紫雷云 + 边缘压暗 */
.fx-tint-layer--storm {
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(122, 112, 190, 0.16), transparent 66%),
    linear-gradient(180deg, rgba(72, 66, 120, 0.14), rgba(16, 22, 42, 0.24));
}
.fx-tint-layer--storm::before {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 180px rgba(30, 36, 72, 0.5);
}

@keyframes fx-fog-drift {
  from {
    transform: translate3d(-3%, 1%, 0) scale(1.04);
  }
  to {
    transform: translate3d(4%, -2%, 0) scale(1.1);
  }
}

/* ================================================================= 暗角 */
.fx-vignette {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  background: radial-gradient(
    ellipse 72% 70% at 50% 50%,
    transparent 30%,
    var(--fx-vig-color, rgba(0, 0, 0, 0.78)) 100%
  );
}

/* ================================================================= 幽灵牌 */
.fx-ghost-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  perspective: 1200px;
}
.fx-ghost {
  position: fixed;
  left: 0;
  top: 0;
  margin: 0;
  transform-origin: 50% 50%;
  pointer-events: none;
  will-change: transform, opacity;
  z-index: 1;
}
.fx-ghost--clone {
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.62));
}
.fx-ghost--placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  border-radius: var(--card-radius, 10px);
  border: 1px solid rgba(201, 162, 39, 0.8);
  background:
    radial-gradient(120% 100% at 50% 18%, var(--fx-faction-soft, rgba(201, 162, 39, 0.08)), rgba(10, 8, 6, 0.96) 72%),
    var(--ink-1, #0d0b09);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.7),
    inset 0 0 0 1px rgba(0, 0, 0, 0.65),
    inset 0 0 30px rgba(0, 0, 0, 0.85);
}
.fx-ghost__emblem {
  width: 44%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--fx-faction-glow, #f0d078);
  background:
    repeating-conic-gradient(
      from 0deg,
      var(--fx-faction-weak, rgba(201, 162, 39, 0.22)) 0deg 6deg,
      transparent 6deg 30deg
    ),
    radial-gradient(circle at 50% 42%, var(--fx-faction-glow, #f0d078), var(--fx-faction, #c9a227) 48%, rgba(8, 6, 5, 0.92) 74%);
  box-shadow:
    0 0 18px var(--fx-faction-weak, rgba(201, 162, 39, 0.22)),
    inset 0 0 16px rgba(0, 0, 0, 0.7);
  opacity: 0.92;
}
.fx-ghost__name {
  max-width: 86%;
  font-family: var(--font-display, "Palatino Linotype", "Songti SC", serif);
  font-size: 13px;
  line-height: 1.25;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--gold-bright, #f0d078);
  text-shadow: 0 1px 2px #000, 0 0 12px rgba(0, 0, 0, 0.9);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.fx-ghost--back {
  border-color: rgba(201, 162, 39, 0.55);
  background:
    repeating-linear-gradient(45deg, rgba(201, 162, 39, 0.05) 0 6px, transparent 6px 12px),
    radial-gradient(100% 80% at 50% 30%, rgba(201, 162, 39, 0.12), rgba(8, 6, 5, 0.98) 70%),
    var(--ink-1, #0d0b09);
}
.fx-ghost--back .fx-ghost__emblem {
  border-radius: 8px;
  transform: rotate(45deg);
  width: 34%;
  border-color: rgba(201, 162, 39, 0.45);
}
.fx-ghost--back .fx-ghost__name {
  display: none;
}

/* ============================================================ 领袖全屏特写 */
.fx-leader-closeup {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 0 60px rgba(0, 0, 0, 0.8));
}
.fx-closeup-inner {
  transform: scale(2.15);
  transform-origin: center center;
  filter: drop-shadow(0 26px 52px rgba(0, 0, 0, 0.8)) drop-shadow(0 0 24px var(--fx-faction-weak, rgba(201, 162, 39, 0.22)));
}
.fx-closeup-card {
  position: relative !important;
  left: auto !important;
  top: auto !important;
  margin: 0 !important;
  outline: 1px solid rgba(201, 162, 39, 0.42);
  outline-offset: 9px;
  border-radius: var(--card-radius, 10px);
}
.fx-leader-emblem {
  position: relative;
  width: 168px;
  height: 224px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  border: 1px solid rgba(201, 162, 39, 0.75);
  border-radius: 12px;
  background:
    radial-gradient(100% 80% at 50% 24%, var(--fx-faction-soft, rgba(201, 162, 39, 0.08)), rgba(8, 6, 5, 0.97) 74%),
    var(--ink-1, #0d0b09);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.7),
    inset 0 0 42px rgba(0, 0, 0, 0.9),
    0 22px 60px rgba(0, 0, 0, 0.7);
}
.fx-leader-emblem__ring {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 1px solid var(--fx-faction-glow, #f0d078);
  background:
    repeating-conic-gradient(
      from 0deg,
      var(--fx-faction-weak, rgba(201, 162, 39, 0.22)) 0deg 5deg,
      transparent 5deg 26deg
    ),
    radial-gradient(circle at 50% 45%, var(--fx-faction-glow, #f0d078), var(--fx-faction, #c9a227) 52%, rgba(6, 5, 4, 0.95) 76%);
  box-shadow: 0 0 30px var(--fx-faction-weak, rgba(201, 162, 39, 0.22));
}
.fx-leader-emblem__name {
  font-family: var(--font-display, "Palatino Linotype", "Songti SC", serif);
  font-size: 15px;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  color: var(--gold-bright, #f0d078);
  text-shadow: 0 0 18px rgba(240, 208, 120, 0.3), 0 2px 4px #000;
}

/* ================================================================= 小局横幅 */
.fx-banner-host {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.fx-banner {
  position: relative;
  min-width: min(720px, 82vw);
  padding: 24px clamp(26px, 6vw, 96px);
  text-align: center;
  color: var(--paper, #e7dcc2);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(7, 6, 5, 0.86) 13%,
    rgba(13, 11, 9, 0.94) 50%,
    rgba(7, 6, 5, 0.86) 87%,
    transparent
  );
}
.fx-banner__rule {
  width: min(560px, 72vw);
  height: 1px;
  margin: 0 auto 14px;
  background: linear-gradient(90deg, transparent, var(--gold, #c9a227), transparent);
  opacity: 0.7;
}
.fx-banner__rule--bottom {
  margin: 18px auto 0;
}
.fx-banner__eyebrow {
  font-size: 11px;
  letter-spacing: 0.48em;
  padding-left: 0.48em;
  color: var(--paper-faint, #8f8570);
  text-transform: uppercase;
}
.fx-banner__title {
  font-family: var(--font-display, "Palatino Linotype", "Songti SC", serif);
  font-size: clamp(46px, 7vw, 82px);
  line-height: 1.06;
  letter-spacing: 0.18em;
  padding-left: 0.18em;
  color: var(--gold-bright, #f0d078);
  text-shadow: 0 0 34px rgba(240, 208, 120, 0.35), 0 3px 6px rgba(0, 0, 0, 0.9);
}
.fx-banner--lose .fx-banner__title {
  color: #e05a4a;
  text-shadow: 0 0 30px rgba(224, 90, 74, 0.3), 0 3px 6px rgba(0, 0, 0, 0.9);
}
.fx-banner--draw .fx-banner__title {
  color: var(--paper-dim, #c9bda3);
  text-shadow: 0 3px 6px rgba(0, 0, 0, 0.9);
}
.fx-banner__score {
  margin-top: 4px;
  font-family: var(--font-display, "Palatino Linotype", "Songti SC", serif);
  font-size: clamp(16px, 2vw, 22px);
  letter-spacing: 0.32em;
  color: var(--paper-dim, #c9bda3);
}
.fx-banner__gems {
  display: flex;
  justify-content: center;
  gap: clamp(22px, 5vw, 58px);
  margin-top: 14px;
}
.fx-gem-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}
.fx-gem-group__label {
  font-size: 10px;
  letter-spacing: 0.3em;
  padding-left: 0.3em;
  color: var(--paper-faint, #8f8570);
}
.fx-gem-group__row {
  display: flex;
  gap: 8px;
}
.fx-gem {
  width: 15px;
  height: 17px;
  clip-path: polygon(50% 0, 100% 26%, 100% 74%, 50% 100%, 0 74%, 0 26%);
  background: #17120d;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0.4);
}
.fx-gem.is-lit {
  background: linear-gradient(160deg, #f7e3a0 0%, #c9a227 55%, #6d5518 100%);
  box-shadow: 0 0 8px rgba(240, 208, 120, 0.5);
}
.fx-gem.is-lost {
  background: #1a1210;
  opacity: 0.6;
}

/* ================================================================= 比赛结束 */
.fx-gameover {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px clamp(40px, 10vw, 150px);
  text-align: center;
  background: radial-gradient(60% 100% at 50% 50%, rgba(7, 6, 5, 0.84), transparent 76%);
}
.fx-gameover__eyebrow {
  font-size: 12px;
  letter-spacing: 0.6em;
  padding-left: 0.6em;
  color: var(--paper-faint, #8f8570);
}
.fx-gameover__title {
  font-family: var(--font-display, "Palatino Linotype", "Songti SC", serif);
  font-size: clamp(64px, 12vw, 150px);
  line-height: 1;
  letter-spacing: 0.24em;
  padding-left: 0.24em;
  color: var(--gold-bright, #f0d078);
  text-shadow: 0 0 60px rgba(240, 208, 120, 0.4), 0 4px 10px rgba(0, 0, 0, 0.95);
}
.fx-gameover--lose .fx-gameover__title {
  color: #b3352b;
  text-shadow: 0 0 52px rgba(150, 30, 20, 0.5), 0 4px 10px rgba(0, 0, 0, 0.95);
}
.fx-gameover--draw .fx-gameover__title {
  color: var(--paper-dim, #c9bda3);
}
.fx-gameover__sub {
  font-size: 13px;
  letter-spacing: 0.28em;
  color: var(--paper-dim, #c9bda3);
}

/* ================================================================= 抛硬币 */
.fx-coin-host {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fx-coin-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  perspective: 1100px;
}
.fx-coin {
  position: relative;
  width: 148px;
  height: 148px;
  transform-style: preserve-3d;
  will-change: transform, opacity;
}
.fx-coin__face {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.fx-coin__face--front {
  background: radial-gradient(circle at 34% 28%, #fbeab5, #c9a227 46%, #7a5f1c 78%, #4a3a10 100%);
  box-shadow:
    inset 0 0 0 5px rgba(240, 208, 120, 0.55),
    inset 0 0 34px rgba(0, 0, 0, 0.45),
    0 18px 36px rgba(0, 0, 0, 0.65);
}
.fx-coin__face--front::after {
  content: "";
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  border: 2px solid rgba(74, 58, 16, 0.55);
  box-shadow: inset 0 0 20px rgba(255, 240, 200, 0.25);
}
.fx-coin__face--back {
  transform: rotateX(180deg);
  background: radial-gradient(circle at 60% 30%, #2a2016, #120d09 72%);
  box-shadow:
    inset 0 0 0 4px rgba(201, 162, 39, 0.55),
    inset 0 0 30px #000,
    0 18px 36px rgba(0, 0, 0, 0.7);
}
.fx-coin__sun {
  width: 56%;
  height: 56%;
  background: repeating-conic-gradient(from 0deg, rgba(94, 72, 18, 0.8) 0deg 3deg, transparent 3deg 15deg);
  clip-path: polygon(50% 0%, 58% 42%, 100% 50%, 58% 58%, 50% 100%, 42% 58%, 0% 50%, 42% 42%);
}
.fx-coin__rune {
  width: 34%;
  height: 34%;
  border: 2px solid rgba(240, 208, 120, 0.65);
  transform: rotate(45deg);
  box-shadow: 0 0 18px rgba(240, 208, 120, 0.25), inset 0 0 12px rgba(240, 208, 120, 0.2);
}
.fx-coin__shadow {
  width: 132px;
  height: 22px;
  margin-top: -14px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 70%);
  filter: blur(3px);
}
.fx-coin__label {
  margin-top: 10px;
  font-size: 13px;
  letter-spacing: 0.42em;
  padding-left: 0.42em;
  color: var(--paper-dim, #c9bda3);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 260ms ease, transform 260ms ease;
  text-shadow: 0 2px 4px #000;
}
.fx-coin__label.is-show {
  opacity: 1;
  transform: none;
}

/* ===================================================================== toast */
.fx-toasts {
  position: absolute;
  left: 50%;
  top: 11%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
}
.fx-toast {
  max-width: min(72vw, 760px);
  overflow: hidden;
  padding: 9px 20px 9px 18px;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-left: 2px solid var(--gold, #c9a227);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(18, 14, 10, 0.94), rgba(8, 6, 5, 0.96));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.55);
  color: var(--paper, #e7dcc2);
  font-size: 13px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px #000;
}

/* ===================================================================== flash */
.fx-flash {
  position: absolute;
  inset: 0;
  z-index: 7;
  opacity: 0;
  background: #fff8e0;
  mix-blend-mode: screen;
}

/* ================================================================ 菜单符文 */
.fx-runes {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 1400ms ease;
}
.fx-runes.is-active {
  opacity: 1;
}
.fx-runes__ring {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  border: 1px solid var(--fx-faction-glow, #f0d078);
  opacity: 0.32;
}
.fx-runes__ring--outer {
  width: min(92vmin, 1080px);
  height: min(92vmin, 1080px);
  border-style: dashed;
  animation: fx-rune-spin 120s linear infinite;
}
.fx-runes__ring--mid {
  width: min(64vmin, 740px);
  height: min(64vmin, 740px);
  border-color: var(--fx-faction-weak, rgba(201, 162, 39, 0.22));
  opacity: 0.28;
  animation: fx-rune-spin-rev 90s linear infinite;
}
.fx-runes__ring--inner {
  width: min(40vmin, 450px);
  height: min(40vmin, 450px);
  border-style: dotted;
  animation: fx-rune-spin 68s linear infinite;
}
.fx-runes__sigil {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: min(18vmin, 210px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: repeating-conic-gradient(
    from 0deg,
    var(--fx-faction-weak, rgba(201, 162, 39, 0.22)) 0deg 2deg,
    transparent 2deg 44deg
  );
  box-shadow: 0 0 90px var(--fx-faction-weak, rgba(201, 162, 39, 0.22));
}
.fx-runes__core {
  width: 38%;
  height: 38%;
  clip-path: polygon(50% 0%, 61% 35%, 100% 35%, 68% 57%, 79% 100%, 50% 72%, 21% 100%, 32% 57%, 0% 35%, 39% 35%);
  background: linear-gradient(160deg, var(--fx-faction-glow, #f0d078), transparent);
  opacity: 0.5;
}
@keyframes fx-rune-spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}
@keyframes fx-rune-spin-rev {
  to {
    transform: translate(-50%, -50%) rotate(-360deg);
  }
}

/* ================================================================ 震屏 */
.fx-shaking {
  animation: fx-shake 520ms cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes fx-shake {
  10%,
  90% {
    transform: translate3d(calc(var(--fx-shake-i, 1) * -1px), calc(var(--fx-shake-i, 1) * 0.5px), 0);
  }
  20%,
  80% {
    transform: translate3d(calc(var(--fx-shake-i, 1) * 1.5px), calc(var(--fx-shake-i, 1) * -0.5px), 0);
  }
  30%,
  50%,
  70% {
    transform: translate3d(calc(var(--fx-shake-i, 1) * -2.2px), 0, 0);
  }
  40%,
  60% {
    transform: translate3d(calc(var(--fx-shake-i, 1) * 2.2px), calc(var(--fx-shake-i, 1) * 0.4px), 0);
  }
}

/* ====================================================== 卡牌 / 行状态附加动效
   只加 class，不覆盖 visualist 的卡片本体样式；动画结束由 JS 移除 class。 */
.fx-burning {
  animation: fx-burn 1s var(--ease-out, cubic-bezier(0.22, 0.8, 0.3, 1)) forwards;
}
@keyframes fx-burn {
  0% {
    filter: none;
  }
  28% {
    filter: drop-shadow(0 0 16px rgba(255, 122, 47, 0.9)) brightness(1.08);
  }
  100% {
    filter: brightness(0.42) sepia(0.45) saturate(0.55);
    opacity: 0.3;
  }
}

.fx-shatter {
  animation: fx-shatter 680ms ease-out forwards;
}
@keyframes fx-shatter {
  0% {
    opacity: 1;
    filter: brightness(1.7);
  }
  100% {
    opacity: 0;
    transform: scale(1.05) rotate(1deg);
    filter: brightness(0.3);
  }
}

.fx-power-up {
  animation: fx-power-up 720ms ease-out;
}
@keyframes fx-power-up {
  0% {
    box-shadow: 0 0 0 rgba(240, 208, 120, 0);
  }
  30% {
    box-shadow: 0 0 26px rgba(240, 208, 120, 0.85), inset 0 0 0 1px rgba(240, 208, 120, 0.75);
    filter: brightness(1.14);
  }
  100% {
    box-shadow: 0 0 0 rgba(240, 208, 120, 0);
  }
}
.fx-power-down {
  animation: fx-power-down 720ms ease-out;
}
@keyframes fx-power-down {
  0% {
    box-shadow: 0 0 0 rgba(255, 107, 90, 0);
  }
  30% {
    box-shadow: 0 0 24px rgba(255, 107, 90, 0.7), inset 0 0 0 1px rgba(255, 107, 90, 0.65);
    filter: brightness(0.88) saturate(0.9);
  }
  100% {
    box-shadow: 0 0 0 rgba(255, 107, 90, 0);
  }
}

.fx-landed {
  animation: fx-landed 620ms ease-out;
}
@keyframes fx-landed {
  0% {
    filter: brightness(1.55) saturate(1.15);
  }
  45% {
    filter: brightness(1.08);
  }
  100% {
    filter: none;
  }
}

.fx-gold-breathe {
  animation: fx-gold-breathe 1.65s ease-in-out 2;
}
@keyframes fx-gold-breathe {
  0%,
  100% {
    box-shadow: inset 0 0 0 1px rgba(201, 162, 39, 0);
  }
  50% {
    box-shadow:
      inset 0 0 0 1px rgba(240, 208, 120, 0.5),
      inset 0 0 44px rgba(240, 208, 120, 0.1);
  }
}

.fx-mardroeme {
  animation: fx-mardroeme 1.4s ease-out;
}
@keyframes fx-mardroeme {
  0% {
    filter: none;
  }
  28% {
    filter: drop-shadow(0 0 14px rgba(255, 60, 40, 0.9)) saturate(1.45) hue-rotate(-14deg);
  }
  100% {
    filter: none;
  }
}

.fx-revive-row {
  animation: fx-revive-row 1.1s ease-out;
}
@keyframes fx-revive-row {
  0% {
    box-shadow: inset 0 0 0 1px rgba(168, 230, 192, 0);
  }
  40% {
    box-shadow: inset 0 0 64px rgba(168, 230, 192, 0.2), 0 0 26px rgba(168, 230, 192, 0.16);
  }
  100% {
    box-shadow: inset 0 0 0 1px rgba(168, 230, 192, 0);
  }
}

.fx-token-rise {
  animation: fx-token-rise 1.4s ease-out;
}
@keyframes fx-token-rise {
  0% {
    filter: drop-shadow(0 0 0 rgba(240, 208, 120, 0));
  }
  30% {
    filter: drop-shadow(0 0 22px rgba(240, 208, 120, 0.9)) brightness(1.16);
  }
  100% {
    filter: none;
  }
}

.fx-dim-row {
  animation: fx-dim-row 700ms ease-out;
}
@keyframes fx-dim-row {
  0% {
    filter: brightness(1);
  }
  32% {
    filter: brightness(0.62) saturate(0.65);
  }
  100% {
    filter: brightness(1);
  }
}

/* ============================================ prefers-reduced-motion 降级 */
@media (prefers-reduced-motion: reduce) {
  .fx-canvas {
    display: none;
  }
  .fx-shaking {
    animation: none !important;
  }
  .fx-runes__ring--outer,
  .fx-runes__ring--mid,
  .fx-runes__ring--inner,
  .fx-tint-layer--fog::before {
    animation: none !important;
  }
  .fx-burning,
  .fx-shatter,
  .fx-power-up,
  .fx-power-down,
  .fx-landed,
  .fx-gold-breathe,
  .fx-mardroeme,
  .fx-revive-row,
  .fx-token-rise,
  .fx-dim-row {
    animation: none !important;
  }
  .fx-tint-layer,
  .fx-weather-tint {
    transition-duration: 240ms;
  }
}
