/* intro.css - XHELOS 3 "The Last Guardian" Cinematic-Specific Styles */

/* Responsive sizing system using vmin for proper scaling */
:root {
    /* Max-limited sizes to prevent giant elements on small viewports */
    --mother-size: min(140px, calc(14 * var(--scale, 1vmin)));
    --tentacle-base: min(150px, calc(15 * var(--scale, 1vmin)));
    --tentacle-height-base: min(30px, calc(3 * var(--scale, 1vmin)));
    --eye-size: min(14px, calc(1.4 * var(--scale, 1vmin)));
    --ship-width: min(120px, calc(12 * var(--scale, 1vmin)));
    --ship-height: min(36px, calc(3.6 * var(--scale, 1vmin)));
}

/* ========================================
   ANIMATION CONTAINER
   ======================================== */
.animation-container {
    width: 100%;
    max-width: 1400px;
    height: 80vh;
    position: relative;
    background: #000;
    box-shadow: 0 0 50px rgba(74, 222, 128, 0.2);
    margin: 0 auto;
    overflow: hidden;
}

@media (max-width: 1400px) {
    .animation-container {
        height: 51.4vw; /* Maintain 21:14 ratio */
        max-height: 720px;
    }
}

.impact-scene {
    width: 100%;
    height: 100%;
    position: relative;
    background: radial-gradient(ellipse at 60% 50%, #0a0e27 0%, #000 70%);
}

/* ========================================
   SPACE BACKGROUND
   ======================================== */
.stars {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(calc(0.2 * var(--scale)) calc(0.2 * var(--scale)) at calc(2 * var(--scale)) calc(3 * var(--scale)), white, transparent),
        radial-gradient(calc(0.2 * var(--scale)) calc(0.2 * var(--scale)) at calc(4 * var(--scale)) calc(7 * var(--scale)), white, transparent),
        radial-gradient(calc(0.1 * var(--scale)) calc(0.1 * var(--scale)) at calc(5 * var(--scale)) calc(5 * var(--scale)), white, transparent);
    background-size: calc(20 * var(--scale)) calc(20 * var(--scale));
    animation: starsFloat 100s linear infinite;
}

@keyframes starsFloat {
    from { transform: translateX(0); }
    to { transform: translateX(calc(20 * var(--scale))); }
}

/* ========================================
   MOTHER MIND ENTITY
   ======================================== */
.mother-mind {
    position: absolute;
    width: var(--mother-size);
    height: var(--mother-size);
    right: 7%;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: all 2s ease-in-out;  /* For smooth centering animation */
}

/* Mother's Shield */
.mother-shield {
    position: absolute;
    width: 130%;
    height: 130%;
    top: -15%;
    left: -15%;
    border: calc(0.3 * var(--scale)) solid rgba(74, 222, 128, 0.8);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74, 222, 128, 0.2), transparent);
    animation: shieldPulse 2s infinite;
    z-index: 3;
}

/* Mother centering animations - use these classes after attack */
.mother-mind.centering {
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
}

.mother-mind.centering ~ .tentacle,
.centering .tentacle {
    right: 50% !important;  /* Tentacles move with Mother to center */
}

/* Alternative: Animated centering */
@keyframes motherMoveToCenter {
    0% {
        right: 7%;
        left: auto;
        transform: translateY(-50%);
    }
    100% {
        right: auto;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

.mother-mind.moving-to-center {
    animation: motherMoveToCenter 2s ease-in-out forwards;
}

/* Trigger centering after explosion - add this class after shield breaks */
.mother-mind.after-explosion {
    animation: motherMoveToCenter 1.5s ease-out forwards;
    animation-delay: 0.5s;  /* Small delay after explosion */
}

.mother-mind.after-explosion ~ .tentacle,
.after-explosion .tentacle {
    animation: tentacleAdjust 1.5s ease-out forwards;
    animation-delay: 0.5s;
}

@keyframes tentacleAdjust {
    from {
        right: 70%;
    }
    to {
        right: 50%;
    }
}

.mother-shield.breaking {
    animation: shieldBreak 2s forwards;
}

@keyframes shieldPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.05);
        opacity: 1;
    }
}

@keyframes shieldBreak {
    0% { 
        opacity: 0.8;
        border-color: rgba(74, 222, 128, 0.8);
    }
    20% {
        opacity: 1;
        border-color: rgba(74, 222, 128, 1);
        filter: brightness(2);
        transform: scale(1.05);
    }
    40% { 
        opacity: 1;
        border-color: rgba(220, 38, 38, 0.8);
        transform: scale(1.1);
        filter: brightness(1.5) hue-rotate(45deg);
    }
    60% {
        border-width: 1px;
        transform: scale(1.2);
        filter: brightness(1) hue-rotate(90deg);
    }
    80% {
        opacity: 0.5;
        transform: scale(1.3);
        filter: blur(2px);
    }
    100% { 
        opacity: 0;
        transform: scale(1.4);
        filter: blur(5px);
    }
}

/* Shield Effects */
.shield-fragment {
    position: absolute;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.6), transparent);
    clip-path: polygon(20% 0%, 80% 0%, 100% 100%, 0% 100%);
    opacity: 0;
    animation: fragmentFall 2s ease-in forwards;
}

@keyframes fragmentFall {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg);
    }
    100% {
        opacity: 0;
        transform: translate(var(--fx), var(--fy)) rotate(360deg);
    }
}

.shield-halo {
    position: absolute;
    width: calc(30 * var(--scale));
    height: calc(30 * var(--scale));
    border: calc(0.3 * var(--scale)) solid #4ade80;
    border-radius: 50%;
    background: radial-gradient(circle, 
        transparent 30%, 
        rgba(74, 222, 128, 0.3) 50%, 
        rgba(74, 222, 128, 0.1) 70%, 
        transparent);
    animation: shieldHaloExpand 1.5s ease-out forwards;
}

@keyframes shieldHaloExpand {
    0% {
        width: calc(26 * var(--scale));
        height: calc(26 * var(--scale));
        opacity: 0;
        filter: brightness(2);
    }
    20% {
        opacity: 1;
        filter: brightness(1.5);
    }
    100% {
        width: calc(80 * var(--scale));
        height: calc(80 * var(--scale));
        opacity: 0;
        filter: brightness(1);
    }
}

.shield-impact {
    position: absolute;
    width: 60px;
    height: 50px;
    background: radial-gradient(circle, #4ade80, #22c55e, transparent);
    border-radius: 50%;
    opacity: 0;
    animation: shieldImpact 0.6s ease-out;
    pointer-events: none;
    z-index: 15;
}

@keyframes shieldImpact {
    0% {
        opacity: 0;
        transform: scale(0);
        filter: brightness(2);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
        filter: brightness(1.5);
        box-shadow: 0 0 calc(2 * var(--scale)) #4ade80, 0 0 calc(4 * var(--scale)) #22c55e;
    }
    100% {
        opacity: 0;
        transform: scale(2);
        filter: brightness(1);
    }
}

/* Mother Body */
.mother-body {
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 30% 30%, #4ade80, #22c55e, #16a34a);
    border-radius: 40% 60% 50% 50%;
    position: relative;
    box-shadow: 0 0 calc(6 * var(--scale)) #4ade80, inset 0 0 calc(6 * var(--scale)) rgba(0, 0, 0, 0.5);
    animation: organicMorph 8s ease-in-out infinite;
    z-index: 2;
}

.mother-body.dying {
    animation: motherDeath 6s forwards;
}

@keyframes organicMorph {
    0%, 100% { border-radius: 40% 60% 50% 50%; }
    25% { border-radius: 60% 40% 60% 40%; }
    50% { border-radius: 50% 50% 40% 60%; }
    75% { border-radius: 40% 60% 60% 40%; }
}

@keyframes motherDeath {
    0% { filter: brightness(1) saturate(1); }
    20% { filter: brightness(1.5) saturate(1.2); transform: scale(1.05); }
    50% { filter: brightness(0.8) saturate(0.7) hue-rotate(20deg); transform: scale(1); }
    80% { filter: brightness(0.5) saturate(0.3) grayscale(0.5); transform: scale(0.98); }
    100% { filter: brightness(0.2) saturate(0) grayscale(1); transform: scale(0.95); }
}

/* Eyes */
.mother-eyes {
    position: absolute;
    width: 100%;
    height: 100%;
}

.eye {
    position: absolute;
    width: var(--eye-size);
    height: var(--eye-size);
    background: radial-gradient(circle, #fff, #4ade80);
    border-radius: 50%;
    box-shadow: 0 0 calc(1.5 * var(--scale, 1vmin)) #4ade80;
    animation: eyeBlink 4s infinite;
}

.eye.closing {
    animation: eyeClose 2s forwards;
}

.eye:nth-child(1) { top: 30%; left: 25%; }
.eye:nth-child(2) { top: 25%; left: 60%; }
.eye:nth-child(3) { top: 50%; left: 40%; }
.eye:nth-child(4) { top: 60%; left: 70%; }
.eye:nth-child(5) { top: 70%; left: 30%; }

@keyframes eyeBlink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

@keyframes eyeClose {
    0% { transform: scaleY(1); opacity: 1; }
    100% { transform: scaleY(0); opacity: 0; }
}




/* Tentacles */
.tentacles-container {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
    pointer-events: none;
}

.tentacle {
    position: absolute;
    background: linear-gradient(to right, #4ade80, #22c55e, #16a34a);
    border-radius: 60% 40% 40% 60% / 50% 50% 50% 50%;
    transform-origin: right center;
    box-shadow: 0 calc(0.5 * var(--scale, 1vmin)) calc(2 * var(--scale, 1vmin)) rgba(74, 222, 128, 0.5);
    right: 70%;  /* Original position on right */
    left: auto;
    top: 50%;
    transition: right 2s ease-in-out;  /* Smooth transition when Mother moves */
}

.tentacle:nth-child(1) {
    width: calc(var(--tentacle-base) * 1.2);
    height: var(--tentacle-height-base);
    top: 20%;
    transform: translateY(-50%) rotate(30deg);
    animation: tentacleWave1 3s ease-in-out infinite;
}

.tentacle:nth-child(2) {
    width: calc(var(--tentacle-base) * 1.33);
    height: calc(var(--tentacle-height-base) * 1.17);
    top: 35%;
    transform: translateY(-50%) rotate(15deg);
    animation: tentacleWave2 3.5s ease-in-out infinite;
}

.tentacle:nth-child(3) {
    width: calc(var(--tentacle-base) * 1.4);
    height: calc(var(--tentacle-height-base) * 1.33);
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    animation: tentacleWave3 4s ease-in-out infinite;
}

.tentacle:nth-child(4) {
    width: calc(var(--tentacle-base) * 1.27);
    height: calc(var(--tentacle-height-base) * 1.17);
    top: 65%;
    transform: translateY(-50%) rotate(-15deg);
    animation: tentacleWave4 3.2s ease-in-out infinite;
}

.tentacle:nth-child(5) {
    width: calc(var(--tentacle-base) * 1.13);
    height: var(--tentacle-height-base);
    top: 80%;
    transform: translateY(-50%) rotate(-30deg);
    animation: tentacleWave5 3.8s ease-in-out infinite;
}

/* Tentacle Animations */
@keyframes tentacleWave1 {
    0% { transform: translateY(-50%) rotate(30deg) translateX(0) scale(1); }
    25% { transform: translateY(-50%) rotate(28deg) translateX(-15px) scale(1.02); }
    50% { transform: translateY(-50%) rotate(31deg) translateX(-10px) scale(0.98); }
    75% { transform: translateY(-50%) rotate(27deg) translateX(-20px) scale(1.01); }
    100% { transform: translateY(-50%) rotate(30deg) translateX(0) scale(1); }
}

@keyframes tentacleWave2 {
    0% { transform: translateY(-50%) rotate(15deg) translateX(0) scale(1); }
    20% { transform: translateY(-50%) rotate(13deg) translateX(-18px) scale(0.98); }
    40% { transform: translateY(-50%) rotate(17deg) translateX(-12px) scale(1.03); }
    60% { transform: translateY(-50%) rotate(14deg) translateX(-22px) scale(0.99); }
    80% { transform: translateY(-50%) rotate(16deg) translateX(-8px) scale(1.02); }
    100% { transform: translateY(-50%) rotate(15deg) translateX(0) scale(1); }
}

@keyframes tentacleWave3 {
    0% { transform: translateY(-50%) rotate(0deg) translateX(0) scale(1); }
    33% { transform: translateY(-50%) rotate(-1deg) translateX(-20px) scale(1.04); }
    66% { transform: translateY(-50%) rotate(2deg) translateX(-15px) scale(0.97); }
    100% { transform: translateY(-50%) rotate(0deg) translateX(0) scale(1); }
}

@keyframes tentacleWave4 {
    0% { transform: translateY(-50%) rotate(-15deg) translateX(0) scale(1); }
    30% { transform: translateY(-50%) rotate(-13deg) translateX(-18px) scale(1.02); }
    50% { transform: translateY(-50%) rotate(-17deg) translateX(-10px) scale(0.96); }
    70% { transform: translateY(-50%) rotate(-14deg) translateX(-25px) scale(1.03); }
    100% { transform: translateY(-50%) rotate(-15deg) translateX(0) scale(1); }
}

@keyframes tentacleWave5 {
    0% { transform: translateY(-50%) rotate(-30deg) translateX(0) scale(1); }
    25% { transform: translateY(-50%) rotate(-28deg) translateX(-15px) scale(0.98); }
    50% { transform: translateY(-50%) rotate(-32deg) translateX(-8px) scale(1.02); }
    75% { transform: translateY(-50%) rotate(-27deg) translateX(-20px) scale(0.99); }
    100% { transform: translateY(-50%) rotate(-30deg) translateX(0) scale(1); }
}

/* Tentacle Retract Animations */
.tentacle:nth-child(1).retracting {
    animation: tentacleRetract1 0.8s ease-out forwards;
}

.tentacle:nth-child(2).retracting {
    animation: tentacleRetract2 0.8s ease-out forwards;
}

.tentacle:nth-child(3).retracting {
    animation: tentacleRetract3 0.8s ease-out forwards;
}

.tentacle:nth-child(4).retracting {
    animation: tentacleRetract4 0.8s ease-out forwards;
}

.tentacle:nth-child(5).retracting {
    animation: tentacleRetract5 0.8s ease-out forwards;
}

@keyframes tentacleRetract1 {
    0% { transform: translateY(-50%) rotate(30deg) translateX(0); }
    100% { transform: translateY(-50%) rotate(30deg) translateX(40px); }
}

@keyframes tentacleRetract2 {
    0% { transform: translateY(-50%) rotate(15deg) translateX(0); }
    100% { transform: translateY(-50%) rotate(15deg) translateX(45px); }
}

@keyframes tentacleRetract3 {
    0% { transform: translateY(-50%) rotate(0deg) translateX(0); }
    100% { transform: translateY(-50%) rotate(0deg) translateX(50px); }
}

@keyframes tentacleRetract4 {
    0% { transform: translateY(-50%) rotate(-15deg) translateX(0); }
    100% { transform: translateY(-50%) rotate(-15deg) translateX(45px); }
}

@keyframes tentacleRetract5 {
    0% { transform: translateY(-50%) rotate(-30deg) translateX(0); }
    100% { transform: translateY(-50%) rotate(-30deg) translateX(40px); }
}

/* Tentacle Die Animations */
.tentacle:nth-child(1).dying {
    animation: tentacleDie1 3s forwards;
}

.tentacle:nth-child(2).dying {
    animation: tentacleDie2 4s forwards;
}

.tentacle:nth-child(3).dying {
    animation: tentacleDie3 5s forwards;
}

.tentacle:nth-child(4).dying {
    animation: tentacleDie4 6s forwards;
}

.tentacle:nth-child(5).dying {
    animation: tentacleDie5 7s forwards;
}

@keyframes tentacleDie1 {
    0% { 
        filter: saturate(1); 
        opacity: 1; 
        transform: translateY(-50%) rotate(30deg) translateX(40px);
    }
    100% { 
        filter: saturate(0); 
        opacity: 0.3; 
        transform: translateY(-50%) rotate(30deg) translateX(60px) scale(0.8);
    }
}

@keyframes tentacleDie2 {
    0% { 
        filter: saturate(1); 
        opacity: 1;
        transform: translateY(-50%) rotate(15deg) translateX(45px);
    }
    100% { 
        filter: saturate(0); 
        opacity: 0.3; 
        transform: translateY(-50%) rotate(15deg) translateX(65px) scale(0.8);
    }
}

@keyframes tentacleDie3 {
    0% { 
        filter: saturate(1); 
        opacity: 1;
        transform: translateY(-50%) rotate(0deg) translateX(50px);
    }
    100% { 
        filter: saturate(0); 
        opacity: 0.3; 
        transform: translateY(-50%) rotate(0deg) translateX(70px) scale(0.8);
    }
}

@keyframes tentacleDie4 {
    0% { 
        filter: saturate(1); 
        opacity: 1;
        transform: translateY(-50%) rotate(-15deg) translateX(45px);
    }
    100% { 
        filter: saturate(0); 
        opacity: 0.3; 
        transform: translateY(-50%) rotate(-15deg) translateX(65px) scale(0.8);
    }
}

@keyframes tentacleDie5 {
    0% { 
        filter: saturate(1); 
        opacity: 1;
        transform: translateY(-50%) rotate(-30deg) translateX(40px);
    }
    100% { 
        filter: saturate(0); 
        opacity: 0.3; 
        transform: translateY(-50%) rotate(-30deg) translateX(60px) scale(0.8);
    }
}

/* ========================================
   HUMAN FLEET
   ======================================== */
.human-fleet {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Main Battleship */
.battleship {
    position: absolute;
    left: calc(-20 * var(--scale, 1vmin));
    top: 50%;
    transform: translateY(-50%);
    width: var(--ship-width);
    height: calc(var(--ship-height) * 1.25);
    z-index: 15;
}

.battleship.approaching {
    animation: shipApproach 6s ease-out forwards;
}

.battleship.ramming {
    animation: shipRam 3s ease-in forwards;
}

@keyframes shipApproach {
    0% { left: calc(-20 * var(--scale, 1vmin)); transform: translateY(-50%) scale(0.8); }
    100% { left: 10%; transform: translateY(-50%) scale(1); }
}

@keyframes shipRam {
    0% { left: 10%; transform: translateY(-50%) scale(1); }
    100% { left: 120%; transform: translateY(-50%) scale(1.2); }
}

.ship-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #475569, #1e293b);
    clip-path: polygon(0% 40%, 70% 30%, 95% 0%, 100% 50%, 95% 100%, 70% 70%, 0% 60%);
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
}

.antimatter-core {
    position: absolute;
    width: 30px;
    height: 30px;
    background: radial-gradient(circle, #fff, #60a5fa, #3b82f6);
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 50px #60a5fa;
}

.antimatter-core.charging {
    animation: coreCharge 2s forwards;
}

@keyframes coreCharge {
    0% { opacity: 0; transform: translateY(-50%) scale(0); }
    50% { opacity: 1; transform: translateY(-50%) scale(1.5); }
    100% { opacity: 1; transform: translateY(-50%) scale(2); filter: brightness(2); }
}

.ship-cockpit {
    position: absolute;
    width: 25px;
    height: 12px;
    background: linear-gradient(90deg, #60a5fa, #3b82f6);
    top: 16px;
    left: 60%;
    clip-path: polygon(0 0, 100% 0, 80% 100%, 20% 100%);
    box-shadow: 0 0 15px #60a5fa;
}

.engine-thrust {
    position: absolute;
    left: -30px;
    top: 35%;
    width: 35px;
    height: 12px;
    background: linear-gradient(90deg, #f59e0b, #fb923c, transparent);
    filter: blur(2px);
    animation: thrustPulse 0.2s infinite;
}

.engine-thrust.maximum {
    width: 60px;
    animation: thrustMaximum 0.1s infinite;
}

@keyframes thrustPulse {
    0%, 100% { opacity: 0.8; transform: scaleX(1); }
    50% { opacity: 1; transform: scaleX(1.2); }
}

@keyframes thrustMaximum {
    0%, 100% { opacity: 1; transform: scaleX(1.5); filter: brightness(1.5); }
    50% { opacity: 1; transform: scaleX(2); filter: brightness(2); }
}

/* Support Ships */
.support-ship {
    position: absolute;
}

.support-ship.approaching {
    animation: supportApproach 6s ease-out forwards;
}

.support-ship.retreating {
    animation: supportRetreat 2s ease-in forwards;
}

.cruiser { width: 100px; height: 30px; }
.cruiser-1 { left: -180px; top: 20%; }
.cruiser-2 { left: -200px; top: 70%; }

.destroyer { width: 70px; height: 20px; }
.destroyer-1 { left: -150px; top: 35%; }
.destroyer-2 { left: -170px; top: 55%; }
.destroyer-3 { left: -190px; top: 25%; }

.fighter { width: 35px; height: 12px; }
.fighter-1 { left: -120px; top: 15%; }
.fighter-2 { left: -100px; top: 40%; }
.fighter-3 { left: -140px; top: 65%; }
.fighter-4 { left: -160px; top: 80%; }

.support-ship-body {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #334155, #1e293b);
    position: relative;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
    clip-path: polygon(0% 40%, 70% 35%, 90% 20%, 100% 50%, 90% 80%, 70% 65%, 0% 60%);
}

@keyframes supportApproach {
    0% { transform: translateX(0) scale(0.8); }
    100% { transform: translateX(250px) scale(1); }
}

@keyframes supportRetreat {
    0% { transform: translateX(300px) scale(1); }
    100% { transform: translateX(-100px) scale(0.8); opacity: 0.5; }
}

/* ========================================
   WEAPONS & EFFECTS
   ======================================== */

/* Escape Pods - Launch from battleship position */
.escape-pod {
    position: absolute;
    width: calc(0.8 * var(--scale, 1vmin));
    height: calc(0.8 * var(--scale, 1vmin));
    background: radial-gradient(circle, #fbbf24, #f59e0b);
    border-radius: 50%;
    opacity: 0;
    /* Start from ship's position */
    left: 25%;  /* Where battleship stops after approach */
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 calc(0.5 * var(--scale, 1vmin)) #f59e0b;
}

/* Different escape trajectories for multiple pods */
.escape-pod.launching {
    animation: podEscape 3s ease-out forwards;
}

.escape-pod:nth-child(1) {
    animation: podEscape1 3s ease-out forwards;
}

.escape-pod:nth-child(2) {
    animation: podEscape2 3s ease-out forwards;
}

.escape-pod:nth-child(3) {
    animation: podEscape3 3s ease-out forwards;
}

@keyframes podEscape1 {
    0% {
        opacity: 0;
        left: 25%;
        top: 50%;
        transform: translate(0, -50%) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(0, -50%) scale(1);
    }
    100% {
        opacity: 0.3;
        left: 5%;
        top: 30%;
        transform: translate(calc(-20 * var(--scale, 1vmin)), -50%) scale(0.5);
    }
}

@keyframes podEscape2 {
    0% {
        opacity: 0;
        left: 25%;
        top: 50%;
        transform: translate(0, -50%) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(0, -50%) scale(1);
    }
    100% {
        opacity: 0.3;
        left: 10%;
        top: 50%;
        transform: translate(calc(-25 * var(--scale, 1vmin)), -50%) scale(0.5);
    }
}

@keyframes podEscape3 {
    0% {
        opacity: 0;
        left: 25%;
        top: 50%;
        transform: translate(0, -50%) scale(0);
    }
    10% {
        opacity: 1;
        transform: translate(0, -50%) scale(1);
    }
    100% {
        opacity: 0.3;
        left: 5%;
        top: 70%;
        transform: translate(calc(-20 * var(--scale, 1vmin)), -50%) scale(0.5);
    }
}

@keyframes podEscape {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0);
    }
    10% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
    100% {
        opacity: 0.3;
        transform: translateY(-50%) translateX(calc(-30 * var(--scale, 1vmin))) scale(0.6);
    }
}

/* Lasers */
.laser {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, #3b82f6, #60a5fa, transparent);
    opacity: 0;
    transform-origin: left center;
    filter: blur(0.5px);
    box-shadow: 0 0 10px #60a5fa;
}

.laser.firing {
    animation: laserFire 0.5s ease-out;
}

@keyframes laserFire {
    0% { opacity: 0; transform: scaleX(0); }
    50% { opacity: 1; transform: scaleX(1); }
    100% { opacity: 0; transform: scaleX(1.2); }
}

/* Bio Beams */
#bioBeams {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.bio-beam {
    position: absolute;
    width: 0;
    height: calc(0.4 * var(--scale, 1vmin));  /* Responsive height */
    background: linear-gradient(90deg, #4ade80, #22c55e, #16a34a, transparent);
    opacity: 0;
    transform-origin: right center;
    filter: blur(0.8px);
    box-shadow: 0 0 25px #4ade80, 0 0 50px #22c55e;
}

.bio-beam.firing {
    animation: bioBeamFire 1.8s ease-out;
}

@keyframes bioBeamFire {
    0% { opacity: 0; width: 0; }
    20% { opacity: 1; width: calc(80 * var(--scale, 1vmin)); filter: brightness(2); }  /* Was 600px */
    60% { opacity: 1; width: calc(110 * var(--scale, 1vmin)); filter: brightness(1.5); }  /* Was 850px */
    100% { opacity: 0; width: calc(140 * var(--scale, 1vmin)); filter: brightness(1); }  /* Was 1100px - longer! */
}

/* Explosions */
.explosion {
    position: absolute;
    border-radius: 50%;
    opacity: 0;
}

.explosion.small {
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, #fbbf24, #f59e0b, transparent);
}

.explosion.large {
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, #fff, #fbbf24, #f59e0b, #dc2626, transparent);
}

.explosion.exploding {
    animation: explode 1s ease-out;
}

@keyframes explode {
    0% { opacity: 0; transform: scale(0); }
    50% { opacity: 1; transform: scale(1.5); }
    100% { opacity: 0; transform: scale(2); }
}

/* Impact Flash */
.impact-flash {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    opacity: 0;
    pointer-events: none;
    z-index: 100;
}

.impact-flash.flashing {
    animation: impactFlash 2s forwards;
}

@keyframes impactFlash {
    0% { opacity: 0; }
    10% { opacity: 1; }
    100% { opacity: 0; }
}

/* Shockwave */
.shockwave {
    position: absolute;
    width: 50px;
    height: 50px;
    border: 3px solid #4ade80;
    border-radius: 50%;
    opacity: 0;
    z-index: 20;
}

.shockwave.expanding {
    animation: shockwaveExpand 3s forwards;
}

@keyframes shockwaveExpand {
    0% { width: 50px; height: 50px; opacity: 0; }
    5% { opacity: 1; }
    100% { width: 2000px; height: 2000px; opacity: 0; }
}

/* Fragments */
.fragment {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 10px currentColor;
}

.fragment.scattering {
    animation: fragmentFly 5s forwards;
}

@keyframes fragmentFly {
    0% { opacity: 0; transform: translate(0, 0) scale(1); }
    10% { opacity: 1; }
    100% { opacity: 0.5; transform: var(--fragment-direction) scale(0.5); }
}

/* ========================================
   CHARACTER PORTRAITS (Intro-specific)
   ======================================== */
   
/* Navigator dialogue (not in base animation.css) */
.dialogue-panel.navigator {
    border-color: #60a5fa;
}

.navigator .character-portrait {
    border-color: #60a5fa;
    background: linear-gradient(135deg, rgba(96, 165, 250, 0.2), rgba(0, 0, 0, 0.5));
}

.navigator .character-name {
    color: #94a3b8;
}

/* Specific character images */
.voss .character-portrait img,
.mother .character-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.voss .character-portrait img {
    filter: brightness(1.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.mother .character-portrait img {
    filter: brightness(1.1) saturate(1.2);
    border: 1px solid rgba(74, 222, 128, 0.3);
}


/* death-effects.css - Mother Mind Death Sequence Effects */

/* ========================================
   BIO-GAS ERUPTIONS
   ======================================== */
.bio-gas-eruption {
    position: absolute;
    width: 120px;
    height: 120px;
    background: radial-gradient(circle, 
        rgba(74, 222, 128, 0.9), 
        rgba(167, 139, 250, 0.7),
        rgba(34, 197, 94, 0.4),
        transparent);
    border-radius: 40% 60%;
    filter: blur(3px);
    mix-blend-mode: screen;
    animation: gasErupt 4s ease-out forwards;
    z-index: 12;
}

@keyframes gasErupt {
    0% {
        transform: scale(0) translateY(0) rotate(0deg);
        opacity: 0;
    }
    20% {
        transform: scale(0.8) translateY(-20px) rotate(45deg);
        opacity: 1;
        filter: blur(2px) brightness(1.5);
    }
    60% {
        transform: scale(2) translateY(-100px) rotate(90deg);
        opacity: 0.8;
        filter: blur(5px) brightness(1.2);
    }
    100% {
        transform: scale(3.5) translateY(-250px) rotate(180deg);
        opacity: 0;
        filter: blur(10px);
    }
}

/* ========================================
   VOLCANIC BURSTS
   ======================================== */
.volcanic-burst {
    position: absolute;
    background: radial-gradient(circle,
        #ffffff 0%,
        #fbbf24 20%,
        #f59e0b 40%,
        #dc2626 60%,
        #7c2d12 80%,
        transparent);
    border-radius: 50%;
    animation: volcanicBurst 2s ease-out forwards;
}

@keyframes volcanicBurst {
    0% {
        width: 30px;
        height: 30px;
        opacity: 1;
        filter: brightness(2);
        box-shadow: 0 0 50px #fbbf24;
    }
    50% {
        width: 100px;
        height: 100px;
        opacity: 0.8;
        filter: brightness(1.5);
    }
    100% {
        width: 200px;
        height: 200px;
        opacity: 0;
        filter: brightness(1);
    }
}

/* ========================================
   ENERGY DISCHARGE BOLTS
   ======================================== */
.energy-bolt {
    position: absolute;
    width: 3px;
    height: 400px;
    background: linear-gradient(
        transparent 0%,
        rgba(96, 165, 250, 0.3) 20%,
        #60a5fa 40%,
        #ffffff 50%,
        #60a5fa 60%,
        rgba(96, 165, 250, 0.3) 80%,
        transparent 100%
    );
    left: 50%;
    top: 50%;
    transform-origin: center bottom;
    animation: boltDischarge 1.5s ease-out forwards;
    filter: blur(1px);
    box-shadow: 0 0 20px #60a5fa;
    z-index: 15;
}

@keyframes boltDischarge {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-50%) scaleY(0) rotate(var(--rotation));
    }
    30% {
        opacity: 1;
        transform: translateX(-50%) translateY(-50%) scaleY(1.2) rotate(var(--rotation));
        filter: brightness(2) blur(0px);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-50%) scaleY(1.5) rotate(var(--rotation));
        filter: brightness(1) blur(3px);
    }
}

/* ========================================
   psiCHIC WAVES
   ======================================== */
.psichic-wave {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 3px solid rgba(167, 139, 250, 0.8);
    border-radius: 50%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    animation: psichicPulse 2s ease-out forwards;
}

@keyframes psichicPulse {
    0% {
        width: 100px;
        height: 100px;
        opacity: 1;
        border-width: 3px;
    }
    100% {
        width: 600px;
        height: 600px;
        opacity: 0;
        border-width: 1px;
    }
}

/* ========================================
   SPORE PARTICLES (FRAGMENTS)
   ======================================== */
.spore-particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, #4ade80, #22c55e);
    border-radius: 50%;
    box-shadow: 0 0 10px #4ade80;
    animation: sporeFloat 5s ease-out forwards;
}

@keyframes sporeFloat {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    20% {
        opacity: 1;
        transform: translate(var(--tx), var(--ty)) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(calc(var(--tx) * 3), calc(var(--ty) * 3)) scale(0.5);
    }
}


/* final-explosion.css - Mother Mind Final Explosion Effects */

/* ========================================
   EXPLODING BODY
   ======================================== */
.mother-body.exploding {
    animation: bodyDisintegrate 0.3s forwards;
}

@keyframes bodyDisintegrate {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
        filter: brightness(2);
    }
    100% {
        transform: scale(0);
        opacity: 0;
    }
}

/* ========================================
   FLYING BODY CHUNKS
   ======================================== */
.body-chunk {
    position: absolute;
    background: radial-gradient(circle, #2d3a2f, #1a1f1b);
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    filter: grayscale(1) brightness(0.4);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
    animation: chunkFly var(--duration) ease-out forwards;
}

@keyframes chunkFly {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    100% {
        opacity: 0.3;
        transform: translate(var(--tx), var(--ty)) rotate(var(--rotation)) scale(0.3);
    }
}

/* ========================================
   FLYING TENTACLE PIECES
   ======================================== */
.tentacle-piece {
    position: absolute;
    background: linear-gradient(135deg, #2d3a2f, #1a1f1b);
    border-radius: 50% 20% 50% 20%;
    filter: grayscale(1) brightness(0.3);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.8);
    animation: tentacleFly var(--duration) ease-out forwards;
}

@keyframes tentacleFly {
    0% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
    30% {
        transform: translate(calc(var(--tx) * 0.3), calc(var(--ty) * 0.3)) rotate(calc(var(--rotation) * 0.3)) scale(1.1);
    }
    100% {
        opacity: 0.2;
        transform: translate(var(--tx), var(--ty)) rotate(var(--rotation)) scale(0.2);
    }
}

/* ========================================
   GORE SPLATTER
   ======================================== */
.gore-splatter {
    position: absolute;
    background: radial-gradient(circle, 
        rgba(74, 222, 128, 0.3), 
        rgba(34, 197, 94, 0.2),
        transparent);
    border-radius: 40% 60% 50% 50%;
    filter: blur(2px) grayscale(0.8);
    animation: splatter var(--duration) ease-out forwards;
}

@keyframes splatter {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0);
    }
    20% {
        opacity: 0.8;
        transform: translate(calc(var(--tx) * 0.2), calc(var(--ty) * 0.2)) scale(0.5);
    }
    100% {
        opacity: 0.1;
        transform: translate(var(--tx), var(--ty)) scale(2);
    }
}

/* ========================================
   EXPLOSION CORE
   ======================================== */
.explosion-core {
    position: absolute;
    width: 400px;
    height: 400px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle,
        #ffffff,
        rgba(74, 222, 128, 0.8),
        rgba(34, 197, 94, 0.4),
        transparent);
    border-radius: 50%;
    opacity: 0;
    animation: coreExplosion 1s ease-out forwards;
    z-index: 50;
}

@keyframes coreExplosion {
    0% {
        width: 100px;
        height: 100px;
        opacity: 0;
    }
    10% {
        opacity: 1;
        filter: brightness(3);
    }
    100% {
        width: 800px;
        height: 800px;
        opacity: 0;
        filter: brightness(1);
    }
}

/* ========================================
   SHOCKWAVE RING
   ======================================== */
.explosion-ring {
    position: absolute;
    width: 200px;
    height: 200px;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(74, 222, 128, 0.5);
    border-radius: 50%;
    opacity: 0;
    animation: ringExpand 2s ease-out forwards;
}

@keyframes ringExpand {
    0% {
        width: 200px;
        height: 200px;
        opacity: 0;
        border-width: 10px;
    }
    10% {
        opacity: 1;
    }
    100% {
        width: 1500px;
        height: 1500px;
        opacity: 0;
        border-width: 1px;
    }
}

/* ========================================
   SCREEN SHAKE
   ======================================== */
.impact-scene.shaking,
.animation-container.shaking {
    animation: screenShake 0.8s ease-out;
}

@keyframes screenShake {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-10px, 5px); }
    20% { transform: translate(10px, -5px); }
    30% { transform: translate(-5px, 10px); }
    40% { transform: translate(5px, -10px); }
    50% { transform: translate(-8px, 2px); }
    60% { transform: translate(8px, -2px); }
    70% { transform: translate(-3px, 6px); }
    80% { transform: translate(3px, -6px); }
    90% { transform: translate(-1px, 1px); }
}

@keyframes shipShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px) translateY(2px); }
    50% { transform: translateX(5px) translateY(-2px); }
    75% { transform: translateX(-3px) translateY(1px); }
}