/* ===== effects.css — 动画 ===== */

@keyframes breath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

@keyframes bump {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

@keyframes card-in {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

@keyframes pop-in {
  0% { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}

@keyframes notif-in {
  from { opacity: 0; transform: translateY(-12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes notif-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-12px); }
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@keyframes meter-shake {
  0%, 100% { transform: scaleX(1); }
  25% { transform: scaleX(1.05); }
  75% { transform: scaleX(0.95); }
}

@keyframes float-up {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-30px); }
}

@keyframes float-down {
  0% { opacity: 0; transform: translateY(0); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translateY(30px); }
}

/* 飞入/飞出的粒子容器 */
.float-particle {
  position: absolute;
  font-family: var(--font-num);
  font-weight: 700;
  font-size: 16px;
  pointer-events: none;
  animation: float-up 800ms var(--ease-soft) forwards;
  z-index: 60;
}
.float-particle.is-down {
  animation: float-down 800ms var(--ease-soft) forwards;
  color: var(--color-accent);
}
.float-particle.is-up {
  color: var(--color-account-green);
}

/* 数字滚动 */
.value-rolling {
  display: inline-block;
  transition: transform var(--duration-mid) var(--ease-spring);
}
.value-rolling.is-bump {
  transform: scale(1.15);
}

/* 进度条 */
.progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--color-divider);
  z-index: 5;
}
.progress-bar-fill {
  height: 100%;
  background: var(--color-accent);
  width: 0%;
  transition: width var(--duration-mid) var(--ease-soft);
}

/* ===== Toast ===== */
.toast-layer {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2000;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.toast {
  background: rgba(28, 28, 30, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 22px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  opacity: 0;
  transform: translateY(8px) scale(0.95);
  transition: opacity 240ms var(--ease-soft), transform 240ms var(--ease-spring);
  max-width: 80vw;
  text-align: center;
}
.toast.is-shown {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.toast-warn { background: rgba(250, 157, 59, 0.95); }
.toast-error { background: rgba(250, 81, 81, 0.95); }
.toast-success { background: rgba(7, 193, 96, 0.95); }
