/** 掼蛋游戏特效样式 */

/* 爆炸特效 */
.bomb-effect {
    position: absolute;
    pointer-events: none;
    animation: bombExplode 1.5s ease-out forwards;
}

.bomb-effect img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.bomb-bg {
    width: 100%;
    height: 100%;
    animation: bombBgPulse 1.5s ease-out;
}

.bomb-core {
    width: 60%;
    height: 60%;
    animation: bombCoreScale 1.5s ease-out;
}

.bomb-ring {
    width: 120%;
    height: 120%;
    animation: bombRingExpand 1.5s ease-out;
}

.bomb-beam {
    width: 80%;
    height: 80%;
    animation: bombBeamFlash 1.5s ease-out;
}

.bomb-spark {
    width: 100%;
    height: 100%;
    animation: bombSparkFly 1.5s ease-out;
}

.bomb-dust {
    width: 150%;
    height: 150%;
    animation: bombDustSpread 1.5s ease-out;
}

@keyframes bombExplode {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    60% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

@keyframes bombBgPulse {
    0%, 100% { opacity: 0; }
    30%, 70% { opacity: 0.8; }
}

@keyframes bombCoreScale {
    0% { transform: translate(-50%, -50%) scale(0); }
    30% { transform: translate(-50%, -50%) scale(1.5); }
    70% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
}

@keyframes bombRingExpand {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    40% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(2); opacity: 0; }
}

@keyframes bombBeamFlash {
    0%, 100% { opacity: 0; }
    30%, 50% { opacity: 1; }
}

@keyframes bombSparkFly {
    0% { transform: translate(-50%, -50%) scale(0); opacity: 1; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

@keyframes bombDustSpread {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0; }
    40% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.8); opacity: 0; }
}

/* 同花顺特效 */
.flush-effect {
    position: absolute;
    pointer-events: none;
    animation: flushShow 2s ease-in-out forwards;
}

.flush-effect img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.flush-main {
    width: 100%;
    height: 100%;
    animation: flushMainAnim 2s ease-in-out;
}

.flush-particles {
    width: 120%;
    height: 120%;
    animation: flushParticlesAnim 2s ease-in-out;
}

@keyframes flushShow {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8) rotate(-10deg); }
    20% { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(0deg); }
    80% { opacity: 1; transform: translate(-50%, -50%) scale(1.1) rotate(5deg); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.2) rotate(0deg); }
}

@keyframes flushMainAnim {
    0% { filter: brightness(0.5); }
    30% { filter: brightness(1.5) drop-shadow(0 0 30px gold); }
    70% { filter: brightness(1.2) drop-shadow(0 0 20px gold); }
    100% { filter: brightness(1); }
}

@keyframes flushParticlesAnim {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    30% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
    70% { opacity: 0.8; transform: translate(-50%, -50%) scale(1.1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(1.5); }
}

/* 飞机特效 */
.plane-effect {
    position: absolute;
    pointer-events: none;
}

.plane-effect img {
    position: absolute;
}

.plane-main {
    width: 80%;
    height: 80%;
    animation: planeFly 4s ease-in-out forwards;
}

.plane-trail {
    width: 60%;
    height: 60%;
    left: -30%;
    animation: planeTrail 4s ease-in-out forwards;
    display: none; /* 隐藏尾焰 */
}

.plane-cloud {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    bottom: -70%;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    opacity: 1;
    animation: planeCloud 4s ease-in-out forwards;
}

@keyframes planeCloud {
    0% { opacity: 1; transform: translateX(-50%) scale(0.8); }
    10% { opacity: 1; transform: translateX(-50%) scale(1); }
    90% { opacity: 1; transform: translateX(-50%) scale(1.1); }
    100% { opacity: 1; transform: translateX(-50%) scale(0.9); }
}

@keyframes planeFly {
    0% { transform: scale(0.8); opacity: 0; }
    10% { transform: scale(1); opacity: 1; }
    90% { transform: scale(1); opacity: 1; }
    100% { transform: scale(0.8); opacity: 0; }
}

@keyframes planeTrail {
    0% { opacity: 0; transform: scaleX(0.5); }
    20% { opacity: 1; transform: scaleX(1); }
    80% { opacity: 1; transform: scaleX(1.2); }
    100% { opacity: 0; transform: scaleX(0.5); }
}

/* 出牌动画增强 */
.my-card.selected {
    transform: translateY(-30px);
    z-index: 100;
    box-shadow: 0 5px 20px rgba(255, 215, 0, 0.5);
}

.my-card.playing {
    animation: cardPlay 0.5s ease-out forwards;
}

@keyframes cardPlay {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-50px) scale(1.1); }
    100% { transform: translateY(-100px) scale(0.8); opacity: 0; }
}

/* 音效图标动画 */
.sound-icon {
    animation: soundWave 1s ease-in-out infinite;
}

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

/* 倒计时警告动画 */
.countdown-warning {
    animation: countdownPulse 0.5s ease-in-out infinite;
    color: #ff4444;
}

@keyframes countdownPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

/* 胜利特效 */
.win-effect {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    background: radial-gradient(circle, rgba(255,215,0,0.3) 0%, transparent 70%);
    animation: winGlow 2s ease-in-out;
}

@keyframes winGlow {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}