/* ═══════════════════════════════════════════════════════════════════════════ */
/* SPECTACULAR EFFECTS: HIGH IMPACT ANIMATIONS AND TEXTURES                  */
/* ═══════════════════════════════════════════════════════════════════════════ */

/* ━━━━━━━ ENTRANCE ANIMATIONS (Keyframes) ━━━━━━━ */

@keyframes spectacular-zoom-in {
    0% { transform: scale(0.3) perspective(1000px) translate3d(0, 50px, -200px); opacity: 0; }
    70% { transform: scale(1.1) perspective(1000px) translate3d(0, -10px, 50px); opacity: 1; }
    100% { transform: scale(1) perspective(1000px) translate3d(0, 0, 0); opacity: 1; }
}

@keyframes spectacular-bounce {
    0% { transform: translateY(-300px); opacity: 0; }
    60% { transform: translateY(30px); opacity: 1; }
    80% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

@keyframes spectacular-flip-3d {
    0% { transform: rotateY(180deg) perspective(1000px); opacity: 0; }
    100% { transform: rotateY(0deg) perspective(1000px); opacity: 1; }
}

@keyframes spectacular-vortex {
    0% { transform: rotate(-540deg) scale(0); opacity: 0; }
    100% { transform: rotate(0deg) scale(1); opacity: 1; }
}

@keyframes spectacular-glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); filter: hue-rotate(90deg); }
    40% { transform: translate(-3px, -3px); filter: hue-rotate(180deg); }
    60% { transform: translate(3px, 3px); filter: hue-rotate(270deg); }
    80% { transform: translate(3px, -3px); filter: hue-rotate(360deg); }
    100% { transform: translate(0); }
}

/* ━━━━━━━ CLASSES (Applied to .dropdown-menu or .btn) ━━━━━━━ */

.anim-zoom-in { animation: spectacular-zoom-in 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
.anim-bounce { animation: spectacular-bounce 0.8s cubic-bezier(0.36, 0, 0.66, -0.56) forwards; }
.anim-flip-3d { animation: spectacular-flip-3d 0.7s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.anim-vortex { animation: spectacular-vortex 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67) forwards; }
.anim-glitch:hover { animation: spectacular-glitch 0.2s linear infinite; }

/* ━━━━━━━ ADVANCED TEXTURES ━━━━━━━ */

.menu-texture-mercury::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 100; opacity: 0.4;
    background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
    box-shadow: inset 0 0 50px rgba(255,255,255,0.2);
    mix-blend-mode: overlay;
}

.menu-texture-fractal::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 100; opacity: 0.15;
    background-image: url("https://www.transparenttextures.com/patterns/cubes.png");
    filter: drop-shadow(0 0 2px #fff);
}

.menu-texture-circuit::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 100; opacity: 0.1;
    background-image: url("https://www.transparenttextures.com/patterns/microchip.png");
}

.menu-texture-stardust::after {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 100; opacity: 0.1;
    background-image: url("https://www.transparenttextures.com/patterns/stardust.png");
    animation: stardust-twinkle 4s infinite;
}

@keyframes stardust-twinkle { 0%, 100% { opacity:0.05; } 50% { opacity:0.15; } }

/* ━━━━━━━ HOVER TRANSFORMATIONS ━━━━━━━ */

.btn-spectacular-tilt {
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease !important;
}

.btn-spectacular-tilt:hover {
    transform: perspective(500px) rotateX(10deg) rotateY(-10deg) scale(1.1) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4) !important;
}

.btn-spectacular-glow:hover {
    animation: glow-pulse 1.5s infinite;
    z-index: 10;
}

@keyframes glow-pulse {
    0% { box-shadow: 0 0 5px rgba(255,255,255,0.2), 0 0 0px rgba(255,255,255,0.1); }
    50% { box-shadow: 0 0 20px rgba(255,255,255,0.6), 0 0 30px rgba(255,255,255,0.3); }
    100% { box-shadow: 0 0 5px rgba(255,255,255,0.2), 0 0 0px rgba(255,255,255,0.1); }
}

/* ━━━━━━━ MASTER VFX UPGRADES (Gamer Level) ━━━━━━━ */

.preview-stage {
    position: relative;
    overflow: hidden;
}

/* Texturas Locales de Alta Calidad */
.menu-texture-wood::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0.8;
    background: url("../img/textures/wood.png") center/cover;
    mix-blend-mode: multiply;
}
.menu-texture-steel::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0.6;
    background: url("../img/textures/steel.png") center/cover;
    mix-blend-mode: overlay;
}
.menu-texture-fire::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0.5;
    background: url("../img/textures/fire.png") center/cover;
    mix-blend-mode: color-dodge;
    animation: texture-pulse 4s infinite alternate;
}
.menu-texture-nebula::before {
    content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 1; opacity: 0.7;
    background: url("../img/textures/nebula.png") center/cover;
    mix-blend-mode: screen;
}

@keyframes texture-pulse {
    0% { opacity: 0.4; transform: scale(1); }
    100% { opacity: 0.7; transform: scale(1.05); }
}

/* Líneas de escaneo (Retro-Digital) */
.scanlines-overlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(0, 0, 0, 0.1) 50%
    );
    background-size: 100% 4px;
    opacity: 0.3;
    animation: scanlines-move 20s linear infinite;
}

@keyframes scanlines-move {
    from { background-position: 0 0; }
    to { background-position: 0 100%; }
}

/* Grano Digital / Ruido */
.noise-filter {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 11;
    opacity: 0.03;
    background-image: url("https://www.transparenttextures.com/patterns/60-lines.png");
}

/* Parallax Background */
.parallax-bg {
    transition: transform 0.1s ease-out;
    will-change: transform;
}
