/* 上古圣兽 · 送礼特效 V2 */
:root { --particleColor: #39ffc9; }

/* 屏幕轻微震动，仅高阶神兽触发 */
body.shake-screen { animation: softShake 0.4s ease-out; }
@keyframes softShake {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3px, 2px); }
  40%  { transform: translate(3px, -2px); }
  60%  { transform: translate(-2px, 1px); }
  80%  { transform: translate(2px, -1px); }
  100% { transform: translate(0, 0); }
}

.gift-layer {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.gift-layer[style*="display: flex"] { display: flex !important; }

.gift-wrap {
  position: relative;
  width: 340px;
  height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gift-animal {
  position: relative;
  width: 280px;
  height: 280px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: giftIn 0.9s ease-out forwards,
             floatBreath 3.2s ease-in-out infinite,
             giftFadeOut 1.5s ease-in 10.5s forwards;
  filter: drop-shadow(0 0 18px var(--particleColor));
}

/* 静态预览：不播动画 */
.gift-animal.gift-static {
  animation: none !important;
  filter: drop-shadow(0 0 10px var(--particleColor));
}

.gift-text {
  margin-top: 12px;
  font-size: 20px;
  font-weight: bold;
  color: #fff;
  text-shadow: 0 0 8px var(--particleColor);
  opacity: 0;
  animation: textFade 1s ease-out 0.6s forwards,
             textFadeOut 1.5s ease-in 10.5s forwards;
  white-space: nowrap;
}

.particle {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--particleColor);
  opacity: 0.75;
  animation: particleRise 8s linear forwards;
  pointer-events: none;
}

@keyframes giftIn {
  0%   { transform: translateY(140px) scale(0.35); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
@keyframes floatBreath {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}
@keyframes giftFadeOut {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes textFade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes textFadeOut {
  0%   { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes particleRise {
  0%   { transform: translateY(0) scale(1); opacity: 0.8; }
  100% { transform: translateY(-180px) scale(0.2); opacity: 0; }
}

/* 窄版 283px 下缩小 */
body.narrow .gift-wrap { width: 260px; height: 280px; }
body.narrow .gift-animal { width: 200px; height: 200px; }
body.narrow .gift-text { font-size: 16px; }

/* 旧橙紫横幅样式已下线，横幅改由 ui-refresh.css 的 .banner-name 提供 */

body.narrow .ob-dot { width: 20px; height: 20px; flex-basis: 20px; }
body.narrow .ob-tag { width: 34px; height: 32px; flex-basis: 34px; }
body.narrow .ob-tag span { font-size: 17px; }

@media (prefers-reduced-motion: reduce) {
  .ob-light, .ob-topline, .ob-shimmer, .ob-p { animation: none; }
}
