@keyframes explosionShake {
    0% { transform: translate3d(0, 0, 0) rotate(0deg); }
    10% { transform: translate3d(-10px, -10px, 0) rotate(-1deg); }
    20% { transform: translate3d(10px, -10px, 0) rotate(1deg); }
    30% { transform: translate3d(-10px, 10px, 0) rotate(-1deg); }
    40% { transform: translate3d(10px, 10px, 0) rotate(1deg); }
    50% { transform: translate3d(-5px, -5px, 0) rotate(-0.5deg); }
    60% { transform: translate3d(5px, 5px, 0) rotate(0.5deg); }
    70% { transform: translate3d(0, 0, 0) rotate(0deg); }
    100% { transform: translate3d(0, 0, 0) rotate(0deg); }
}

body.exploding .container, body.exploding .cinematic-scene {
    animation: explosionShake 0.4s ease-out;
    will-change: transform;
}

/* --- THE EXPLOSIVE TRANSITION WIPE --- */
#transition-wipe {
    position: fixed;
    top: var(--wipe-y, 50%);
    left: var(--wipe-x, 50%);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 35% 35%, #1a1a1a, #000 70%);
    clip-path: polygon(50% 0%, 65% 20%, 100% 10%, 75% 40%, 100% 60%, 70% 70%, 80% 100%, 50% 80%, 20% 100%, 30% 70%, 0% 60%, 25% 40%, 0% 10%, 35% 20%);
    transform: translate3d(-50%, -50%, 0) scale(0) rotate(0deg);
    z-index: 9990;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.9, 0.03, 0.05, 0.9);
    will-change: transform;
}

#transition-wipe.wipe-in {
    transform: translate3d(-50%, -50%, 0) scale(400) rotate(45deg);
    pointer-events: all;
}

/* --- THE ANIMATION SCENES --- */
.cinematic-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    width: 100%; height: 100%;
    background: radial-gradient(ellipse at center, #0b0b0f 0%, #000 100%);
    z-index: 9995;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cinematic-scene {
    position: relative;
    width: 800px;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: opacity 0.5s ease;
    opacity: 1;
}

.cinematic-pc { position: absolute; left: 0; top: 120px; z-index: 5; filter: drop-shadow(0 0 18px rgba(0,0,0,0.6)); }
.cinematic-bot { position: absolute; right: 0; top: 120px; z-index: 5; filter: drop-shadow(0 0 18px rgba(0,0,0,0.6)); }

.cinematic-stream {
    position: absolute;
    left: 140px;
    right: 140px;
    top: 145px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    z-index: 1;
    overflow: hidden;
}

.binary-row {
    color: #2dffa3;
    font-family: 'Share Tech Mono', monospace;
    font-size: 18px;
    white-space: nowrap;
    opacity: 0.4;
    letter-spacing: 4px;
    text-shadow: 0 0 8px rgba(45, 255, 163, 0.5);
    will-change: content;
}

.binary-row.red { color: #ff2e5b; opacity: 0.6; font-weight: bold; text-shadow: 0 0 8px rgba(255, 46, 91, 0.6); }

/* Packet & Particles */
.cinematic-packet {
    position: absolute;
    top: 50%;
    left: 70px;
    transform: translate3d(-50%, -50%, 0) scale(0);
    width: 100px;
    height: auto;
    z-index: 10;
    will-change: transform, left, filter;
}

.h-particle {
    position: absolute;
    font-weight: bold;
    font-family: var(--font-display, 'Share Tech Mono', monospace);
    color: #fff;
    text-shadow: 0 0 15px var(--neon-red), 0 0 30px var(--neon-red);
    pointer-events: none;
    font-size: 2em;
    z-index: 15;
    will-change: transform, opacity;
}

/* Hacker */
.cinematic-hacker {
    position: absolute;
    left: 50%;
    transform: translate3d(-50%, 0, 0);
    top: -200px;
    z-index: 20;
    opacity: 0;
    filter: drop-shadow(0 0 22px rgba(255, 46, 91, 0.5));
    will-change: top, opacity;
}

/* SKIP BUTTON */
.skip-btn {
    position: absolute;
    bottom: 40px;
    right: 40px;
    background: rgba(255,255,255,0.04);
    backdrop-filter: blur(8px);
    border: 1.5px solid rgba(255,255,255,0.25);
    border-radius: 8px;
    color: #bbb;
    font-family: 'Share Tech Mono', monospace;
    font-size: 1.2em;
    padding: 14px 28px;
    cursor: pointer;
    transition: 0.2s;
    z-index: 10000;
}

.skip-btn:hover {
    border-color: #fff;
    color: #fff;
    background: rgba(255,255,255,0.1);
    box-shadow: 0 0 24px rgba(255,255,255,0.35);
    transform: translateY(-1px);
}