/* 光效特效系统 - 发光边框、光环、光柱 */

/* 5星金色光柱效果 */
.glow-pillar-5 {
    position: relative;
}

.glow-pillar-5::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 200%;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(251, 191, 36, 0.9) 20%,
        rgba(245, 158, 11, 0.9) 50%,
        rgba(251, 191, 36, 0.9) 80%,
        transparent
    );
    box-shadow: 0 0 20px rgba(251, 191, 36, 0.8),
                0 0 40px rgba(251, 191, 36, 0.6);
    animation: pillarPulse 2s ease-in-out infinite;
}

@keyframes pillarPulse {
    0%, 100% {
        opacity: 0.6;
        transform: translateX(-50%) scaleY(0.9);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scaleY(1.1);
    }
}

/* 4星紫色光环效果 */
.glow-ring-4 {
    position: relative;
}

.glow-ring-4::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    border-radius: 50%;
    border: 2px solid rgba(168, 85, 247, 0.6);
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.8),
                inset 0 0 15px rgba(168, 85, 247, 0.4);
    animation: ringExpand 1.5s ease-out infinite;
}

@keyframes ringExpand {
    0% {
        transform: translate(-50%, -50%) scale(0.9);
        opacity: 0.8;
    }
    100% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0;
    }
}

/* 发光边框效果 - 科技感 */
.glow-border {
    position: relative;
    border: 1px solid transparent;
}

.glow-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 2px;
    background: linear-gradient(135deg,
        var(--color-primary-light),
        var(--color-secondary),
        var(--color-primary-light)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderGlow 3s ease infinite;
}

@keyframes borderGlow {
    0%, 100% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
}

/* 脉冲光效 - 用于按钮和重要元素 */
.pulse-glow {
    position: relative;
    animation: pulseGlow 2s ease-in-out infinite;
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 10px rgba(99, 102, 241, 0.5),
                    0 0 20px rgba(99, 102, 241, 0.3),
                    0 0 30px rgba(99, 102, 241, 0.1);
    }
    50% {
        box-shadow: 0 0 20px rgba(99, 102, 241, 0.8),
                    0 0 40px rgba(99, 102, 241, 0.6),
                    0 0 60px rgba(99, 102, 241, 0.4);
    }
}

/* 稀有度光效 - 3星蓝色 */
.rarity-glow-3 {
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5),
                0 0 30px rgba(59, 130, 246, 0.3);
}

/* 稀有度光效 - 4星紫色 */
.rarity-glow-4 {
    box-shadow: 0 0 20px rgba(168, 85, 247, 0.6),
                0 0 40px rgba(168, 85, 247, 0.4);
    animation: glowPulse4 2s ease-in-out infinite;
}

@keyframes glowPulse4 {
    0%, 100% {
        box-shadow: 0 0 20px rgba(168, 85, 247, 0.6),
                    0 0 40px rgba(168, 85, 247, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(168, 85, 247, 0.8),
                    0 0 60px rgba(168, 85, 247, 0.6);
    }
}

/* 稀有度光效 - 5星金色 */
.rarity-glow-5 {
    box-shadow: 0 0 25px rgba(251, 191, 36, 0.7),
                0 0 50px rgba(251, 191, 36, 0.5),
                0 0 75px rgba(245, 158, 11, 0.3);
    animation: glowPulse5 1.5s ease-in-out infinite;
}

@keyframes glowPulse5 {
    0%, 100% {
        box-shadow: 0 0 25px rgba(251, 191, 36, 0.7),
                    0 0 50px rgba(251, 191, 36, 0.5),
                    0 0 75px rgba(245, 158, 11, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(251, 191, 36, 1),
                    0 0 80px rgba(251, 191, 36, 0.8),
                    0 0 120px rgba(245, 158, 11, 0.6);
    }
}

/* 扫光效果 - 用于卡片和按钮 */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        left: -100%;
    }
    20%, 100% {
        left: 100%;
    }
}

/* 粒子爆发容器 */
.particle-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(251, 191, 36, 1), rgba(251, 191, 36, 0));
    border-radius: 50%;
    animation: particleFloat 1.5s ease-out forwards;
}

@keyframes particleFloat {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--px), var(--py)) scale(0);
        opacity: 0;
    }
}

/* 霓虹文字效果 */
.neon-text {
    text-shadow:
        0 0 5px rgba(99, 102, 241, 0.8),
        0 0 10px rgba(99, 102, 241, 0.6),
        0 0 20px rgba(99, 102, 241, 0.4),
        0 0 40px rgba(99, 102, 241, 0.2);
    animation: neonFlicker 3s ease-in-out infinite;
}

@keyframes neonFlicker {
    0%, 100% {
        text-shadow:
            0 0 5px rgba(99, 102, 241, 0.8),
            0 0 10px rgba(99, 102, 241, 0.6),
            0 0 20px rgba(99, 102, 241, 0.4);
    }
    50% {
        text-shadow:
            0 0 10px rgba(99, 102, 241, 1),
            0 0 20px rgba(99, 102, 241, 0.8),
            0 0 40px rgba(99, 102, 241, 0.6),
            0 0 80px rgba(99, 102, 241, 0.4);
    }
}
