/* 游戏特效样式 - 金茂府：打假风暴 */

/* 点击特效 */
.click-effect {
    position: absolute;
    pointer-events: none;
    color: #ff4757;
    font-weight: bold;
    font-size: 1.5rem;
    z-index: 10;
    animation: clickEffect 1s ease-out forwards;
}

@keyframes clickEffect {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(1.5) translateY(-50px);
    }
}

/* 怒火值增加特效 */
.points-gain {
    position: absolute;
    top: -20px;
    right: -20px;
    color: #ff4757;
    font-weight: bold;
    font-size: 1.2rem;
    pointer-events: none;
    animation: pointsGain 1.5s ease-out forwards;
}

@keyframes pointsGain {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    50% {
        transform: scale(1.2) translateY(-10px);
    }
    100% {
        opacity: 0;
        transform: scale(0.8) translateY(-30px);
    }
}

/* 目标震动效果 */
.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* 目标破损效果 */
.damage-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path d="M20,20 L80,80 M80,20 L20,80" stroke="red" stroke-width="3" opacity="0.7"/></svg>');
    background-size: 20px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 15px;
}

.click-target.damaged .damage-overlay {
    opacity: 1;
}

/* 随机事件样式 - 增强版 */
.random-event {
    position: absolute;
    background: linear-gradient(135deg, #ff4757 0%, #c44569 50%, #f8b500 100%);
    color: #fff;
    padding: 15px 20px;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    animation: enhancedFallDown 3s linear forwards;
    z-index: 5;
    border: 3px solid #fff;
    box-shadow: 
        0 0 20px rgba(255, 71, 87, 0.6),
        0 0 40px rgba(255, 71, 87, 0.4),
        inset 0 2px 10px rgba(255, 255, 255, 0.3);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.8),
        0 0 10px rgba(255, 255, 255, 0.5);
    text-align: center;
    min-width: 120px;
    transform-style: preserve-3d;
    
    /* 添加闪烁边框动画 */
    animation: enhancedFallDown 3s linear forwards, borderGlow 1s infinite alternate;
}

/* 增强的下降动画，带旋转和缩放 */
@keyframes enhancedFallDown {
    0% {
        top: -80px;
        opacity: 1;
        transform: scale(0.8) rotate(-10deg);
    }
    20% {
        transform: scale(1.1) rotate(5deg);
    }
    40% {
        transform: scale(0.95) rotate(-2deg);
    }
    60% {
        transform: scale(1.05) rotate(1deg);
    }
    80% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
        transform: scale(0.8) rotate(5deg);
    }
}

/* 边框发光动画 */
@keyframes borderGlow {
    0% {
        box-shadow: 
            0 0 20px rgba(255, 71, 87, 0.6),
            0 0 40px rgba(255, 71, 87, 0.4),
            inset 0 2px 10px rgba(255, 255, 255, 0.3);
    }
    100% {
        box-shadow: 
            0 0 30px rgba(255, 71, 87, 0.8),
            0 0 60px rgba(255, 71, 87, 0.6),
            inset 0 2px 15px rgba(255, 255, 255, 0.5);
    }
}

/* 移动端慢速下降动画 - 增强版 */
@keyframes enhancedFallDownSlow {
    0% {
        top: -80px;
        opacity: 1;
        transform: scale(0.8) rotate(-15deg);
    }
    15% {
        transform: scale(1.2) rotate(8deg);
    }
    30% {
        transform: scale(0.9) rotate(-5deg);
    }
    45% {
        transform: scale(1.1) rotate(3deg);
    }
    60% {
        transform: scale(0.95) rotate(-1deg);
    }
    75% {
        transform: scale(1.05) rotate(2deg);
    }
    85% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    100% {
        top: 100%;
        opacity: 0;
        transform: scale(0.7) rotate(10deg);
    }
}

.random-event:hover {
    background: linear-gradient(135deg, #ff6b7a 0%, #e74c3c 50%, #f39c12 100%);
    transform: scale(1.15) rotate(2deg);
    animation-play-state: paused; /* 悬停时暂停动画 */
    box-shadow: 
        0 0 25px rgba(255, 71, 87, 0.8),
        0 0 50px rgba(255, 71, 87, 0.6),
        inset 0 2px 15px rgba(255, 255, 255, 0.4);
}

/* 爆炸特效动画 */
@keyframes explode {
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.2) rotate(180deg);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.5) rotate(360deg);
        opacity: 0;
    }
}

@keyframes explodeParticle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(calc(var(--end-x) - var(--start-x, 0px)), calc(var(--end-y) - var(--start-y, 0px))) scale(0);
        opacity: 0;
    }
}

.explosion-particle {
    box-shadow: 0 0 6px currentColor;
}

/* 彩蛋小人样式 */
.easter-egg-character {
    position: fixed;
    z-index: 1000;
    cursor: pointer;
    animation: easterEggMove 12s ease-in-out forwards;
    transition: transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.easter-egg-character:hover,
.easter-egg-character:active {
    transform: scale(1.1);
}

/* 移动端彩蛋小人适配 */
@media (max-width: 768px) {
    .easter-egg-character {
        animation: easterEggMoveMobile 12s ease-in-out forwards;
    }
}

.easter-egg-body {
    width: 40px;
    height: 60px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-radius: 20px 20px 10px 10px;
    position: relative;
    border: 2px solid #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* 移动端小人尺寸适配 */
@media (max-width: 768px) {
    .easter-egg-body {
        width: 50px;
        height: 70px;
    }
}

.easter-egg-head {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, #feca57, #ff9ff3);
    border-radius: 50%;
    position: absolute;
    top: -20px;
    left: 2.5px;
    border: 2px solid #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* 移动端头部尺寸适配 */
@media (max-width: 768px) {
    .easter-egg-head {
        width: 45px;
        height: 45px;
        left: 2.5px;
        top: -25px;
    }
}

.easter-egg-head::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    width: 6px;
    height: 6px;
    background: #2c2c2c;
    border-radius: 50%;
    box-shadow: 12px 0 0 #2c2c2c;
}

/* 移动端眼睛适配 */
@media (max-width: 768px) {
    .easter-egg-head::before {
        top: 12px;
        left: 10px;
        width: 8px;
        height: 8px;
        box-shadow: 16px 0 0 #2c2c2c;
    }
}

.easter-egg-head::after {
    content: '';
    position: absolute;
    top: 18px;
    left: 12px;
    width: 10px;
    height: 6px;
    background: #2c2c2c;
    border-radius: 0 0 10px 10px;
}

/* 移动端嘴巴适配 */
@media (max-width: 768px) {
    .easter-egg-head::after {
        top: 25px;
        left: 14px;
        width: 14px;
        height: 8px;
    }
}

.easter-egg-text {
    position: absolute;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #e74c3c;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    border: 2px solid #e74c3c;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: textBounce 1s infinite alternate;
}

/* 移动端文字适配 */
@media (max-width: 768px) {
    .easter-egg-text {
        top: -60px;
        font-size: 16px;
        padding: 10px 15px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

.easter-egg-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #e74c3c;
}

/* PC端彩蛋移动动画 */
@keyframes easterEggMove {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    25% {
        transform: translate(calc(50vw - 50%), calc(50vh - 50%)) rotate(180deg);
        opacity: 1;
    }
    75% {
        transform: translate(calc(50vw - 50%), calc(50vh - 50%)) rotate(540deg);
        opacity: 1;
    }
    100% {
        transform: translate(calc(100vw + 100px), -100px) rotate(720deg);
        opacity: 0;
    }
}

/* 移动端彩蛋移动动画 - 更小的移动范围 */
@keyframes easterEggMoveMobile {
    0% {
        transform: translate(0, 0) rotate(0deg);
        opacity: 1;
    }
    30% {
        transform: translate(calc(50vw - 50%), calc(45vh - 50%)) rotate(180deg);
        opacity: 1;
    }
    70% {
        transform: translate(calc(50vw - 50%), calc(45vh - 50%)) rotate(540deg);
        opacity: 1;
    }
    100% {
        transform: translate(calc(100vw + 80px), -80px) rotate(720deg);
        opacity: 0;
    }
}

@keyframes textBounce {
    0% {
        transform: translateX(-50%) translateY(0);
    }
    100% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* 彩蛋点击特效 */
.easter-egg-click-effect {
    position: fixed;
    z-index: 1001;
    color: #e74c3c;
    font-weight: bold;
    font-size: 18px;
    pointer-events: none;
    animation: easterEggClickAnim 1.5s ease-out forwards;
}

@keyframes easterEggClickAnim {
    0% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    100% {
        transform: scale(1.5) translateY(-50px);
        opacity: 0;
    }
}

/* 连击特效 */
.combo-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(45deg, #ff4757, #ff6b7a);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: bold;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.5);
    animation: comboShow 2s ease-out forwards;
    z-index: 20;
}

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

/* 工具使用特效 */
.tool-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    border-radius: 15px;
    z-index: 15;
}

.tool-effect.hammer {
    background: radial-gradient(circle, rgba(255, 193, 7, 0.8) 0%, transparent 70%);
    animation: hammerEffect 0.8s ease-out forwards;
}

.tool-effect.bomb {
    background: radial-gradient(circle, rgba(255, 71, 87, 0.9) 0%, rgba(255, 165, 0, 0.5) 50%, transparent 70%);
    animation: bombEffect 1.2s ease-out forwards;
}

.tool-effect.eraser {
    background: linear-gradient(45deg, 
        transparent 40%, 
        rgba(255, 255, 255, 0.8) 50%, 
        transparent 60%);
    animation: eraserEffect 1s ease-out forwards;
}

@keyframes hammerEffect {
    0% {
        opacity: 0;
        transform: scale(0.5) rotate(-45deg);
    }
    50% {
        opacity: 1;
        transform: scale(1.2) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: scale(1) rotate(45deg);
    }
}

@keyframes bombEffect {
    0% {
        opacity: 0;
        transform: scale(0.2);
    }
    30% {
        opacity: 1;
        transform: scale(1.5);
    }
    60% {
        transform: scale(1.8);
    }
    100% {
        opacity: 0;
        transform: scale(2.5);
    }
}

@keyframes eraserEffect {
    0% {
        opacity: 0;
        transform: translateX(-100%);
    }
    50% {
        opacity: 1;
        transform: translateX(0%);
    }
    100% {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* 粒子效果 */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #ff4757;
    border-radius: 50%;
    animation: particleEffect 1.5s ease-out forwards;
}

@keyframes particleEffect {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0) translate(var(--dx), var(--dy));
    }
}

/* 愤怒火焰效果 */
.fire-effect {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, #ff4757 0%, #ff6b7a 30%, transparent 70%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: fireFlicker 1s ease-in-out infinite alternate;
    opacity: 0;
}

.click-target.angry .fire-effect {
    opacity: 0.8;
}

@keyframes fireFlicker {
    0% {
        transform: translateX(-50%) scale(1) rotate(0deg);
    }
    100% {
        transform: translateX(-50%) scale(1.1) rotate(5deg);
    }
}

/* 场景切换动画 */
.scene-transition {
    animation: sceneTransition 0.5s ease-in-out;
}

@keyframes sceneTransition {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    50% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 进度条动画 */
.progress-fill {
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 20px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    animation: progressShine 2s ease-in-out infinite;
}

@keyframes progressShine {
    0% {
        transform: translateX(-20px);
    }
    100% {
        transform: translateX(200px);
    }
}

/* 十字架特殊效果 */
.cross-effect {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(90deg, transparent 45%, rgba(255, 255, 255, 0.8) 50%, transparent 55%),
        linear-gradient(0deg, transparent 45%, rgba(255, 255, 255, 0.8) 50%, transparent 55%);
    animation: crossErase 2s ease-out forwards;
    opacity: 0;
}

.scene-6 .cross-effect {
    opacity: 1;
}

@keyframes crossErase {
    0% {
        opacity: 0;
        transform: scale(2);
    }
    50% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.5);
    }
}

/* 承诺气泡破裂效果 */
.promise-bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    animation: bubbleFloat 3s ease-in-out infinite;
}

.promise-bubble.pop {
    animation: bubblePop 0.5s ease-out forwards;
}

@keyframes bubbleFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-20px) scale(1.1);
    }
}

@keyframes bubblePop {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(2);
    }
}

/* 统计数字动画 */
.counter-animation {
    animation: counterUp 1s ease-out forwards;
}

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

/* 评论点赞动画 */
.like-animation {
    animation: likeHeart 0.6s ease-out forwards;
}

@keyframes likeHeart {
    0% {
        transform: scale(1);
    }
    30% {
        transform: scale(1.4);
    }
    100% {
        transform: scale(1);
    }
}

/* 响应式特效调整 */
@media (max-width: 768px) {
    .click-effect {
        font-size: 1.2rem;
    }
    
    .points-gain {
        font-size: 1rem;
    }
    
    .combo-indicator {
        font-size: 1.2rem;
        padding: 8px 16px;
    }
    
    .fire-effect {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .click-effect {
        font-size: 1rem;
    }
    
    .combo-indicator {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    .fire-effect {
        width: 30px;
        height: 30px;
    }
}
