/* ============================================================
   洛可可宫廷风动画样式 - rococo-animations.css
   四大独特动画：金箔飘散、水晶吊灯摇曳、丝绸波纹、玫瑰花瓣飘落
   所有动画均使用 transform 和 opacity 属性，避免重排和重绘
   ============================================================ */

/* --- 动画一：金箔飘散（Gold Foil Scatter） --- */
/* 页面核心模块加载时触发，金箔碎片从元素周围飘散 */
@keyframes rococo-gold-foil-scatter {
  0% {
    transform: translateY(0) rotate(0deg) scale(1);
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
  100% {
    transform: translateY(-80px) rotate(720deg) scale(0);
    opacity: 0;
  }
}

.rococo-gold-foil-container {
  position: relative;
  overflow: hidden;
}

.rococo-gold-foil {
  position: absolute;
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #FFD700, #FFA500, #FFD700);
  pointer-events: none;
  z-index: 10;
  will-change: transform, opacity;
}

.rococo-gold-foil--1 {
  top: 50%;
  left: 20%;
  animation: rococo-gold-foil-scatter 0.8s ease-out forwards;
  animation-delay: 0s;
  border-radius: 2px;
  transform: rotate(45deg);
}

.rococo-gold-foil--2 {
  top: 40%;
  left: 40%;
  animation: rococo-gold-foil-scatter 0.8s ease-out forwards;
  animation-delay: 0.1s;
  border-radius: 50%;
  width: 6px;
  height: 6px;
}

.rococo-gold-foil--3 {
  top: 60%;
  left: 60%;
  animation: rococo-gold-foil-scatter 0.8s ease-out forwards;
  animation-delay: 0.2s;
  border-radius: 1px;
  width: 10px;
  height: 4px;
}

.rococo-gold-foil--4 {
  top: 30%;
  left: 75%;
  animation: rococo-gold-foil-scatter 0.8s ease-out forwards;
  animation-delay: 0.15s;
  border-radius: 50%;
  width: 5px;
  height: 5px;
}

.rococo-gold-foil--5 {
  top: 70%;
  left: 30%;
  animation: rococo-gold-foil-scatter 0.8s ease-out forwards;
  animation-delay: 0.25s;
  width: 7px;
  height: 3px;
}

/* 持续飘散版本（用于中奖公告等区域） */
@keyframes rococo-gold-foil-float {
  0% {
    transform: translateY(0) translateX(0) rotate(0deg);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 0.6;
  }
  100% {
    transform: translateY(-200px) translateX(30px) rotate(360deg);
    opacity: 0;
  }
}

.rococo-gold-foil-continuous {
  position: absolute;
  width: 6px;
  height: 6px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  pointer-events: none;
  z-index: 5;
  will-change: transform, opacity;
  animation: rococo-gold-foil-float 3s ease-in-out infinite;
}

.rococo-gold-foil-continuous:nth-child(2) { left: 15%; animation-delay: 0.5s; animation-duration: 3.5s; }
.rococo-gold-foil-continuous:nth-child(3) { left: 30%; animation-delay: 1s; animation-duration: 2.8s; }
.rococo-gold-foil-continuous:nth-child(4) { left: 50%; animation-delay: 1.5s; animation-duration: 3.2s; }
.rococo-gold-foil-continuous:nth-child(5) { left: 70%; animation-delay: 0.8s; animation-duration: 3.8s; }
.rococo-gold-foil-continuous:nth-child(6) { left: 85%; animation-delay: 2s; animation-duration: 3s; }

/* --- 动画二：水晶吊灯摇曳（Chandelier Sway） --- */
/* 页面顶部装饰性吊灯的持续微弱摇曳 */
@keyframes rococo-chandelier-sway {
  0%, 100% {
    transform: rotate(-2deg) translateX(0);
  }
  25% {
    transform: rotate(1.5deg) translateX(3px);
  }
  50% {
    transform: rotate(-1deg) translateX(-2px);
  }
  75% {
    transform: rotate(2deg) translateX(1px);
  }
}

@keyframes rococo-chandelier-glow {
  0%, 100% {
    opacity: 0.6;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
  }
  50% {
    opacity: 1;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.6), 0 0 40px rgba(255, 215, 0, 0.2);
  }
}

.rococo-chandelier {
  position: relative;
  text-align: center;
  padding-top: 2rem;
}

.rococo-chandelier__fixture {
  display: inline-block;
  font-size: 2.5rem;
  color: #FFD700;
  transform-origin: top center;
  animation: rococo-chandelier-sway 6s ease-in-out infinite;
  will-change: transform;
  filter: drop-shadow(0 0 10px rgba(255, 215, 0, 0.3));
}

.rococo-chandelier__glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255, 215, 0, 0.08) 0%, transparent 70%);
  pointer-events: none;
  animation: rococo-chandelier-glow 4s ease-in-out infinite;
  will-change: opacity;
}

/* --- 动画三：丝绸波纹（Silk Ripple） --- */
/* 鼠标悬停在卡片或按钮上时触发 */
@keyframes rococo-silk-ripple {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.rococo-silk-ripple {
  background-size: 200% 200%;
  background-image: linear-gradient(
    135deg,
    var(--rococo-velvet-purple) 0%,
    rgba(255, 215, 0, 0.08) 25%,
    var(--rococo-velvet-purple) 50%,
    rgba(232, 180, 184, 0.06) 75%,
    var(--rococo-velvet-purple) 100%
  );
  transition: background-position 0.6s ease;
  will-change: background-position;
}

.rococo-silk-ripple:hover {
  animation: rococo-silk-ripple 2s ease infinite;
}

/* 按钮丝绸波纹 */
.rococo-btn--primary.rococo-silk-ripple {
  background-size: 200% 200%;
  background-image: linear-gradient(
    135deg,
    #FFD700 0%,
    #FFA500 25%,
    #FFD700 50%,
    #FFEC8B 75%,
    #FFD700 100%
  );
}

/* --- 动画四：玫瑰花瓣飘落（Rose Petal Fall） --- */
/* 特定区域持续运行的装饰动画 */
@keyframes rococo-petal-fall {
  0% {
    transform: translateY(-20px) translateX(0) rotate(0deg) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  50% {
    transform: translateY(50vh) translateX(40px) rotate(180deg) scale(0.8);
    opacity: 0.6;
  }
  100% {
    transform: translateY(100vh) translateX(-20px) rotate(360deg) scale(0.4);
    opacity: 0;
  }
}

.rococo-petal-container {
  position: relative;
  overflow: hidden;
}

.rococo-petal {
  position: absolute;
  top: -20px;
  pointer-events: none;
  z-index: 5;
  will-change: transform, opacity;
}

.rococo-petal__shape {
  width: 12px;
  height: 16px;
  background: radial-gradient(ellipse at 30% 30%, #E8B4B8, #D4A0A4);
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  box-shadow: 0 0 4px rgba(232, 180, 184, 0.3);
}

.rococo-petal:nth-child(1) { left: 10%; animation: rococo-petal-fall 8s ease-in-out infinite; animation-delay: 0s; }
.rococo-petal:nth-child(2) { left: 25%; animation: rococo-petal-fall 10s ease-in-out infinite; animation-delay: 2s; }
.rococo-petal:nth-child(3) { left: 40%; animation: rococo-petal-fall 7s ease-in-out infinite; animation-delay: 4s; }
.rococo-petal:nth-child(4) { left: 55%; animation: rococo-petal-fall 9s ease-in-out infinite; animation-delay: 1s; }
.rococo-petal:nth-child(5) { left: 70%; animation: rococo-petal-fall 11s ease-in-out infinite; animation-delay: 3s; }
.rococo-petal:nth-child(6) { left: 85%; animation: rococo-petal-fall 8.5s ease-in-out infinite; animation-delay: 5s; }
.rococo-petal:nth-child(7) { left: 5%; animation: rococo-petal-fall 9.5s ease-in-out infinite; animation-delay: 6s; }
.rococo-petal:nth-child(8) { left: 50%; animation: rococo-petal-fall 7.5s ease-in-out infinite; animation-delay: 3.5s; }

/* --- 页面入场动画 --- */
@keyframes rococo-fade-in-up {
  0% {
    transform: translateY(30px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

.rococo-animate-in {
  opacity: 0;
  animation: rococo-fade-in-up 0.6s ease-out forwards;
}

.rococo-animate-in--delay-1 { animation-delay: 0.1s; }
.rococo-animate-in--delay-2 { animation-delay: 0.2s; }
.rococo-animate-in--delay-3 { animation-delay: 0.3s; }
.rococo-animate-in--delay-4 { animation-delay: 0.4s; }
.rococo-animate-in--delay-5 { animation-delay: 0.5s; }

/* --- 皇冠闪烁装饰 --- */
@keyframes rococo-crown-shimmer {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 15px rgba(255, 215, 0, 0.6));
  }
}

.rococo-crown-icon {
  display: inline-block;
  animation: rococo-crown-shimmer 3s ease-in-out infinite;
  will-change: filter;
}

/* --- 减少动画偏好支持 --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
