/* ===================================
   额外动画效果
   =================================== */

/* 脉冲动画 */
@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 20, 60, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(220, 20, 60, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 20, 60, 0);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* 打字机效果 */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--secondary-red); }
}

.typewriter {
    overflow: hidden;
    border-right: 3px solid var(--secondary-red);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

/* 旋转动画 */
@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.rotate-animation {
    animation: rotate 2s linear infinite;
}

/* 波纹效果 */
@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 1;
    }
    100% {
        transform: scale(4);
        opacity: 0;
    }
}

.ripple-effect {
    position: relative;
    overflow: hidden;
}

.ripple-effect::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(220, 20, 60, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple-effect:hover::before {
    width: 300px;
    height: 300px;
}

/* 渐变边框动画 */
@keyframes gradient-border {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-border {
    position: relative;
    background: var(--dark-card);
    border-radius: var(--border-radius-large);
    overflow: hidden;
}

.gradient-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8B0000, #DC143C, #B22222, #8B0000);
    background-size: 400% 400%;
    z-index: -1;
    animation: gradient-border 3s ease infinite;
    border-radius: var(--border-radius-large);
}

/* 图标弹跳动画 */
@keyframes icon-bounce {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.15); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.1); }
}

.icon-bounce:hover i {
    animation: icon-bounce 0.6s ease-in-out;
}

/* 卡片翻转效果 */
.card-flip {
    perspective: 1000px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.card-flip:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: var(--border-radius);
}

.card-back {
    transform: rotateY(180deg);
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
}

/* 粒子上升动画 */
@keyframes particle-rise {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-100vh) scale(1.5);
        opacity: 0;
    }
}

.particle-rise {
    animation: particle-rise 8s linear infinite;
}

/* 光泽扫过效果 */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.shine-effect:hover::after {
    transform: translateX(100%) rotate(30deg);
    opacity: 1;
}

/* 数字滚动动画 */
@keyframes count-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.count-up {
    animation: count-up 0.8s ease-out;
}

/* 模糊聚焦效果 */
.focus-effect {
    filter: blur(2px);
    opacity: 0.7;
    transition: all 0.5s ease;
}

.focus-effect:hover {
    filter: blur(0);
    opacity: 1;
}

/* 3D倾斜效果 */
.tilt-effect {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt-effect:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* 进度条填充动画 */
@keyframes progress-fill {
    from { width: 0; }
    to { width: var(--progress-width); }
}

.progress-bar {
    background: rgba(139, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
    height: 8px;
    margin: 10px 0;
}

.progress-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 10px;
    animation: progress-fill 1.5s ease-out forwards;
    transition: width 0.3s ease;
}

/* 闪烁星星效果 */
@keyframes twinkle {
    0%, 100% { opacity: 0.3; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.2); }
}

.star {
    position: absolute;
    background: var(--secondary-red);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: twinkle 2s ease-in-out infinite;
}

/* 波浪动画 */
@keyframes wave {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
}

.wave-animation {
    animation: wave 2s ease-in-out infinite;
}

/* 缩放脉冲 */
@keyframes scale-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.scale-pulse {
    animation: scale-pulse 2s ease-in-out infinite;
}

/* 颜色循环 */
@keyframes color-cycle {
    0% { color: var(--primary-red); }
    25% { color: var(--secondary-red); }
    50% { color: var(--accent-red); }
    75% { color: var(--light-red); }
    100% { color: var(--primary-red); }
}

.color-cycle {
    animation: color-cycle 4s ease-in-out infinite;
}

/* 霓虹灯效果 */
.neon-glow {
    text-shadow: 
        0 0 10px var(--secondary-red),
        0 0 20px var(--secondary-red),
        0 0 30px var(--secondary-red),
        0 0 40px var(--dark-red);
    animation: neon-flicker 1.5s infinite alternate;
}

@keyframes neon-flicker {
    0%, 100% { text-shadow: 0 0 10px var(--secondary-red), 0 0 20px var(--secondary-red), 0 0 30px var(--secondary-red), 0 0 40px var(--dark-red); }
    50% { text-shadow: 0 0 5px var(--secondary-red), 0 0 10px var(--secondary-red), 0 0 15px var(--secondary-red), 0 0 20px var(--dark-red); }
}

/* 心跳动画 */
@keyframes heartbeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(1); }
    75% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

/* 边框流动动画 */
.border-flow {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.border-flow::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, transparent, var(--secondary-red), transparent);
    animation: border-flow-rotate 2s linear infinite;
    z-index: -1;
    border-radius: var(--border-radius);
}

@keyframes border-flow-rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 背景图案动画 */
@keyframes pattern-move {
    0% { background-position: 0 0; }
    100% { background-position: 50px 50px; }
}

.pattern-bg {
    background-image: 
        radial-gradient(circle at 20% 50%, transparent 20%, rgba(139, 0, 0, 0.1) 21%),
        radial-gradient(circle at 80% 50%, transparent 20%, rgba(139, 0, 0, 0.1) 21%);
    background-size: 100px 100px;
    animation: pattern-move 10s linear infinite;
}

/* 弹跳进入动画 */
@keyframes bounce-in {
    0% { transform: scale(0.3); opacity: 0; }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { transform: scale(1); opacity: 1; }
}

.bounce-in {
    animation: bounce-in 0.6s ease-out;
}

/* 震动效果 */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake-on-hover:hover {
    animation: shake 0.5s ease-in-out;
}

/* 透明度闪烁 */
@keyframes opacity-flash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.opacity-flash {
    animation: opacity-flash 1s ease-in-out 3;
}

/* 网格背景动画 */
@keyframes grid-move {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, 20px); }
}

.grid-bg {
    background-image: 
        linear-gradient(rgba(139, 0, 0, 0.1) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 0, 0, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    animation: grid-move 5s linear infinite;
}
