.bg-grid-pattern {
    position: fixed;
    inset: 0;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0.01) 1px, transparent 1px),
                      linear-gradient(to bottom, rgba(255, 255, 255, 0.01) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    animation: gridFade 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 85%);
    -webkit-mask-image: radial-gradient(circle at 50% 50%, black 30%, transparent 85%);
}

@keyframes gridFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.ambient-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    mix-blend-mode: screen;
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}
.glow-purple {
    background-color: #804DFF;
    animation: floatGlow 18s ease-in-out infinite alternate;
}
.glow-blue {
    background-color: #2563eb;
    animation: floatGlow2 22s ease-in-out infinite alternate-reverse;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 20px) scale(1.05); }
}
@keyframes floatGlow2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-40px, -20px) scale(0.95); }
}

.pixel-art {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.animate-weapon {
    animation: syncWaveAxe 6s ease-in-out infinite;
    transform-origin: bottom right;
}
.animate-key {
    animation: syncWaveKey 6s ease-in-out infinite;
    animation-delay: -2s;
}
.animate-ghost {
    animation: syncWaveGhost 6s ease-in-out infinite;
    animation-delay: -4s;
}
.animate-lite-float {
    animation: pureLiteFloat 3.2s cubic-bezier(0.445, 0.05, 0.55, 0.95) infinite alternate;
    will-change: transform, filter;
}

@keyframes syncWaveAxe {
    0%, 100% { transform: translateY(0px) rotate(-6deg); }
    50% { transform: translateY(-16px) rotate(6deg); }
}
@keyframes syncWaveKey {
    0%, 100% { transform: translateY(0px) rotate(8deg); }
    50% { transform: translateY(-16px) rotate(-8deg); }
}
@keyframes syncWaveGhost {
    0%, 100% { transform: translateY(0px) rotate(-3deg); opacity: 0.95; }
    50% { transform: translateY(-16px) rotate(3deg); opacity: 0.75; }
}
@keyframes pureLiteFloat {
    0% { transform: translateY(2px) rotate(13deg) scale(0.97); filter: drop-shadow(0 0 2px rgba(128, 77, 255, 0.5)); }
    100% { transform: translateY(-8px) rotate(13deg) scale(1.03); filter: drop-shadow(0 0 14px rgba(167, 139, 250, 0.8)); }
}