/* ========================================================================== */
/* SPECTRAL GARDEN // - Brutalist Clean Light Theme with Nebula Violet */
/* ========================================================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-drag: none;
}

body {
    background-color: #f4f4f4;
    font-family: "Courier New", Courier, monospace;
    color: #111111;
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    width: 100vw;
    cursor: url('assets/images/star_cursor.png') 32 2, auto;
}

.screen-frame {
    position: fixed;
    inset: 0;
    z-index: 10002;
    border-radius: 0;
    background-image:
        linear-gradient(90deg, rgba(34, 211, 238, 0.72), rgba(139, 92, 246, 0.72) 52%, rgba(232, 121, 249, 0.72)),
        linear-gradient(90deg, rgba(34, 211, 238, 0.72), rgba(139, 92, 246, 0.72) 52%, rgba(232, 121, 249, 0.72)),
        linear-gradient(180deg, rgba(34, 211, 238, 0.72), rgba(139, 92, 246, 0.72) 52%, rgba(232, 121, 249, 0.72)),
        linear-gradient(180deg, rgba(34, 211, 238, 0.72), rgba(139, 92, 246, 0.72) 52%, rgba(232, 121, 249, 0.72));
    background-size: 100% 3px, 100% 3px, 3px 100%, 3px 100%;
    background-position: top left, bottom left, top left, top right;
    background-repeat: no-repeat;
    box-shadow: inset 0 0 7px rgba(168, 85, 247, 0.06);
    pointer-events: none;
}

a, button, .retro-btn, .close-btn, .icon, .start-btn, .submenu-item, .menu-item, input, .window-header {
    cursor: url('assets/images/star_cursor.png') 32 2, pointer !important;
}

body.bomb-armed #game-stage,
body.bomb-armed #game-stage * {
    cursor: crosshair !important;
}

body.bomb-armed #game-stage::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 8;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, rgba(147, 51, 234, 0.08), transparent 70%),
        linear-gradient(135deg, rgba(88, 28, 135, 0.08), rgba(192, 132, 252, 0.12));
    box-shadow: inset 0 0 45px rgba(147, 51, 234, 0.5), inset 0 0 110px rgba(126, 34, 206, 0.3);
    animation: bomb-armed-screen-pulse 0.7s ease-in-out infinite alternate;
}

body.bomb-armed #canvas-container {
    animation: bomb-armed-screen-shake 0.13s steps(2, end) infinite;
}

#bomb-arm-prompt {
    position: fixed;
    z-index: 100010;
    top: 12px;
    left: 50%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 270px;
    padding: 10px 18px;
    transform: translateX(-50%);
    border: 2px solid #c084fc;
    background: rgba(30, 10, 55, 0.94);
    color: #ffffff;
    text-align: center;
    box-shadow: 0 0 12px #a855f7, inset 0 0 14px rgba(192, 132, 252, 0.3);
    animation: bomb-prompt-pulse 0.7s ease-in-out infinite alternate;
    pointer-events: none;
}

#bomb-arm-prompt strong {
    color: #e9d5ff;
    font-size: 14px;
    letter-spacing: 2px;
}

#bomb-arm-prompt span {
    color: #f5d0fe;
    font-size: 10px;
    letter-spacing: 1px;
}

#bomb-aim-indicator {
    position: fixed;
    z-index: 100011;
    top: 50%;
    left: 50%;
    width: 66px;
    height: 66px;
    border: 2px solid rgba(232, 121, 249, 0.95);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 10px #a855f7, inset 0 0 12px rgba(192, 132, 252, 0.55);
    pointer-events: none;
    animation: bomb-reticle-pulse 0.45s ease-in-out infinite alternate;
}

#bomb-aim-indicator::before,
#bomb-aim-indicator::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    background: #f5d0fe;
    box-shadow: 0 0 8px #c084fc;
    transform: translate(-50%, -50%);
}

#bomb-aim-indicator::before {
    width: 86px;
    height: 2px;
}

#bomb-aim-indicator::after {
    width: 2px;
    height: 86px;
}

#bomb-aim-indicator span {
    position: absolute;
    inset: 20px;
    border: 2px dashed #ffffff;
    border-radius: 50%;
    animation: bomb-reticle-spin 1.2s linear infinite;
}

@keyframes bomb-armed-screen-pulse {
    from { opacity: 0.45; }
    to { opacity: 1; }
}

@keyframes bomb-armed-screen-shake {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(1px, -1px); }
    50% { transform: translate(-1px, 1px); }
    75% { transform: translate(1px, 1px); }
}

@keyframes bomb-prompt-pulse {
    from { filter: brightness(0.85); }
    to { filter: brightness(1.25); }
}

@keyframes bomb-reticle-pulse {
    from { opacity: 0.7; scale: 0.9; }
    to { opacity: 1; scale: 1.1; }
}

@keyframes bomb-reticle-spin {
    to { transform: rotate(360deg); }
}

body.bomb-burst-flash::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(139, 92, 246, 0.18);
    z-index: 100008;
    pointer-events: none;
    animation: flash-decay 0.2s ease-out forwards;
}

@keyframes flash-decay {
    0% { opacity: 1; }
    100% { opacity: 0; }
}

.sparkle-trail {
    position: fixed;
    width: 6px;
    height: 6px;
    pointer-events: none;
    z-index: 100004;
    transform: translate(-50%, -50%);
    clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
    background-color: #8b5cf6;
}

/* CRT Screen Scanlines and Subtle Light Toning */
.crt-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.02) 50%), linear-gradient(90deg, rgba(139, 92, 246, 0.01), rgba(0, 0, 0, 0.005), rgba(0, 0, 204, 0.01));
    background-size: 100% 4px, 6px 100%;
    z-index: 9999;
    pointer-events: none;
}

.vhs-flicker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.01);
    opacity: 0.05;
    z-index: 9998;
    pointer-events: none;
    animation: flicker 0.15s infinite;
}

@keyframes flicker {
    0% { opacity: 0.05; }
    50% { opacity: 0.07; }
    100% { opacity: 0.04; }
}

#damage-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(139, 92, 246, 0);
    z-index: 100005;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.05s ease-out;
}

#canvas-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 1;
    transition: opacity 0.18s ease-out;
}

#level-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: url('assets/images/backgrounds/spectral_garden_bg.png');
    background-position: center;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    opacity: 0.00;
    pointer-events: none;
    transition: opacity 0.18s ease-out;
}

body.orb-damaged #level-background {
    opacity: 0.4;
}

body.boss-active.orb-damaged #level-background {
    opacity: 0.6;
}

body.orb-damaged #canvas-container {
    opacity: 0.7;
}

body.boss-active.orb-damaged #canvas-container {
    opacity: 0.5;
}

.apps-showcase-window,
.vst-showcase-window {
    z-index: 20;
    min-width: 260px;
    overflow: hidden;
    resize: both;
    border-color: #67e8f9;
    background: #f8fafc;
    box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.55), 0 14px 38px rgba(0, 0, 0, 0.4);
}

.apps-showcase-window .window-body,
.vst-showcase-window .window-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

.apps-showcase-window .window-preview,
.vst-showcase-window .vst-preview {
    height: clamp(90px, 16vh, 145px);
    flex: 0 0 clamp(90px, 16vh, 145px);
}

.apps-showcase-window .app-data-box {
    height: auto;
    max-height: 52px;
    min-height: 30px;
    padding: 6px;
}

.showcase-action-bar {
    flex: 0 0 auto;
    width: 100%;
    margin: 0;
}

.showcase-action-bar > .retro-btn {
    display: block;
    width: 100%;
    padding: 5px 8px;
    font-size: 9px;
    line-height: 1.2;
}

#desktop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: calc(100vh - 40px);
    z-index: 10;
    padding: 20px;
    padding-bottom: 60px;
    overflow: visible;
}

.wallpaper-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: "Courier New", Courier, monospace;
    font-size: clamp(2rem, 7vw, 5.5rem);
    font-weight: 900;
    letter-spacing: 12px;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
    pointer-events: none;
    z-index: 1;
    color: rgba(var(--health-color, 139, 92, 246), var(--health-text-alpha, 0.025));
    text-shadow: 
        -3px 0px 0px rgba(var(--health-color, 139, 92, 246), var(--health-glow-opacity, 0.12)),
        3px 0px 0px rgba(0, 0, 0, 0.06),
        0px 0px var(--health-glow-size, 6px) rgba(var(--health-color, 139, 92, 246), var(--health-glow-opacity, 0.12));
    animation: wallpaper-pulse 8s ease-in-out infinite;
    
    /* Flex container layout to line up text and image seamlessly */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px; /* Controls spacing between SPECTRAL, the logo, and GARDEN */
}

.wallpaper-logo > span {
    display: inline-flex;
}

.wallpaper-logo > span > span {
    display: inline-block;
    will-change: transform, opacity;
}

.wallpaper-glitch-pixel {
    position: absolute;
    z-index: 2;
    pointer-events: none;
    background: var(--glitch-color);
    box-shadow: 0 0 5px var(--glitch-color), 0 0 10px var(--glitch-color);
    mix-blend-mode: screen;
    animation: wallpaper-static-glitch 360ms steps(2, end) forwards;
}

@keyframes wallpaper-static-glitch {
    0%, 100% {
        opacity: 0;
        transform: translate(0, 0);
    }
    14%, 32%, 58%, 78% {
        opacity: 0.95;
        transform: translate(var(--glitch-x), var(--glitch-y));
    }
    24%, 46%, 68% {
        opacity: 0.2;
        transform: translate(calc(var(--glitch-x) * -0.35), calc(var(--glitch-y) * 0.4));
    }
}

.wallpaper-inline-logo {
    width: 65px;  /* Scaled slightly for a clean text balance */
    height: 68px;
    object-fit: contain;
    opacity: 0.18; /* Starts much softer and less bold */
    filter:
        drop-shadow(0 0 var(--health-glow-size, 6px) rgba(var(--health-color, 139, 92, 246), var(--health-glow-opacity, 0.12)))
        drop-shadow(0 0 calc(var(--health-glow-size, 6px) * 1.5) rgba(var(--health-color, 139, 92, 246), var(--health-glow-opacity, 0.12)));
    animation: inline-logo-pulse 8s ease-in-out infinite;
}

@keyframes inline-logo-pulse {
    0%, 100% {
        opacity: 0.15;
        transform: scale(1);
    }
    50% {
        opacity: 0.30; /* Fades gently up to match the text pulse weight */
        transform: scale(1.02);
    }
}

body.orb-damaged .wallpaper-logo {
    animation: damage-nebula-pulse 0.85s ease-out both;
}

body.orb-damaged .wallpaper-inline-logo {
    animation: damage-nebula-logo-pulse 0.85s ease-out both;
}

body.orb-exploding .wallpaper-logo > span > span {
    animation: wordmark-explode 1.05s cubic-bezier(0.16, 0.75, 0.35, 1) both;
    animation-delay: var(--explode-delay);
}

body.orb-exploding .wallpaper-inline-logo {
    animation: wordmark-logo-burst 1.05s ease-out both;
}

@keyframes wordmark-explode {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
        color: rgba(255, 255, 255, 0.75);
        text-shadow: 0 0 0 rgba(255, 0, 0, 0);
    }
    22% {
        opacity: 0.95;
        color: #ff1a3d;
        text-shadow: 0 0 10px rgba(255, 26, 61, 0.95), 0 0 28px rgba(204, 0, 51, 0.8);
        transform: translate(calc(var(--explode-x) * 0.45), calc(var(--explode-y) * 0.45)) scale(1.18);
    }
    55% {
        opacity: 0.9;
        color: #8f102b;
        text-shadow: 0 0 16px rgba(204, 0, 51, 0.75);
        transform: translate(var(--explode-x), var(--explode-y)) scale(0.95);
    }
    100% {
        opacity: 0;
        color: #000000;
        text-shadow: 0 0 0 rgba(0, 0, 0, 0);
        transform: translate(calc(var(--explode-x) * 1.45), calc(var(--explode-y) * 1.45)) scale(0.82);
    }
}

@keyframes wordmark-logo-burst {
    0% {
        opacity: 0.18;
        transform: scale(1);
    }
    22% {
        opacity: 1;
        transform: scale(1.25) rotate(12deg);
        filter: brightness(0) saturate(100%) invert(15%) sepia(96%) saturate(5755%) hue-rotate(337deg) brightness(103%) contrast(112%) drop-shadow(0 0 12px #ff1a3d) drop-shadow(0 0 28px #cc0033);
    }
    55% {
        opacity: 0.75;
        transform: scale(1.05) rotate(-8deg);
        filter: brightness(0) saturate(100%) invert(11%) sepia(80%) saturate(4500%) hue-rotate(337deg) brightness(70%) contrast(110%) drop-shadow(0 0 10px #8f102b);
    }
    100% {
        opacity: 0;
        transform: scale(0.65) rotate(22deg);
        filter: brightness(0);
    }
}

@keyframes damage-nebula-pulse {
    0% {
        opacity: 0.7;
        color: rgba(192, 132, 252, 0.08);
        text-shadow: 0 0 0 rgba(168, 85, 247, 0);
        transform: translate(-50%, -50%) scale(1);
    }
    35% {
        opacity: 1;
        color: rgba(221, 190, 255, 0.9);
        text-shadow:
            0 0 8px rgba(192, 132, 252, 0.95),
            0 0 22px rgba(168, 85, 247, 0.9),
            0 0 48px rgba(126, 34, 206, 0.75);
        transform: translate(-50%, -50%) scale(1.035);
    }
    100% {
        opacity: 0.7;
        color: rgba(192, 132, 252, 0.08);
        text-shadow: 0 0 0 rgba(168, 85, 247, 0);
        transform: translate(-50%, -50%) scale(1);
    }
}

@keyframes damage-nebula-logo-pulse {
    0%, 100% {
        opacity: 0.18;
        filter: drop-shadow(0 0 5px rgba(0, 0, 0, 0.03));
    }
    35% {
        opacity: 0.95;
        filter:
            drop-shadow(0 0 8px rgba(221, 190, 255, 0.95))
            drop-shadow(0 0 20px rgba(168, 85, 247, 0.9))
            drop-shadow(0 0 34px rgba(126, 34, 206, 0.75));
    }
}

@media (prefers-reduced-motion: reduce) {
    body.orb-exploding .wallpaper-logo > span > span {
        animation-name: wordmark-explode-reduced;
        animation-duration: 0.55s;
    }

    body.orb-exploding .wallpaper-inline-logo {
        animation-duration: 0.55s;
    }

    .confetti-npc-aura,
    .confetti-npc-sparkle,
    .confetti-npc img,
    .confetti-bomb-projectile::before {
        animation: none;
    }

    @keyframes wordmark-explode-reduced {
        0% { color: rgba(255, 255, 255, 0.75); opacity: 1; }
        25% { color: #ff1a3d; opacity: 1; }
        100% { color: #000000; opacity: 0; transform: translateY(-3px); }
    }
}

#orb-core-logo {
    position: fixed;
    z-index: 11;
    top: 50vh;
    left: 50vw;
    width: 34px;
    height: 34px;
    object-fit: contain;
    transform: translate(-50%, -50%);
    filter: drop-shadow(0 0 4px #ffffff) drop-shadow(0 0 9px #a855f7) drop-shadow(0 0 15px #22d3ee);
    pointer-events: none;
    animation: orb-logo-glow 2s ease-in-out infinite;
}

@keyframes orb-logo-glow {
    0%, 100% {
        opacity: 0.88;
        filter: drop-shadow(0 0 4px #ffffff) drop-shadow(0 0 8px #a855f7) drop-shadow(0 0 12px #22d3ee);
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 6px #ffffff) drop-shadow(0 0 12px #a855f7) drop-shadow(0 0 19px #22d3ee);
    }
}

@keyframes wallpaper-pulse {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
}

@keyframes wallpaper-pulse {
    0%, 100% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.02);
    }
}

.desktop-icons {
    display: none;
}

/* Brutalist Light Windows Styling */
.window {
    background-color: #ffffff;
    border: 2px solid #111111;
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.85);
    border-radius: 0px;
    display: flex;
    flex-direction: column;
    min-width: 250px;
    position: absolute;
    z-index: 10;
}

#tos-window,
#contact-window {
    border-color: #0f766e;
    box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.85), 0 0 12px rgba(20, 184, 166, 0.2);
}

#tos-window::after,
#contact-window::after {
    content: "";
    position: absolute;
    inset: 3px;
    z-index: 0;
    border: 1px solid rgba(20, 184, 166, 0.58);
    background: repeating-linear-gradient(
        0deg,
        transparent 0 3px,
        rgba(20, 184, 166, 0.035) 3px 4px
    );
    pointer-events: none;
    animation: teal-static-trim 0.18s steps(2, end) infinite alternate;
}

#tos-window > *,
#contact-window > * {
    position: relative;
    z-index: 1;
}

#tos-window .window-header,
#contact-window .window-header {
    border-bottom-color: #14b8a6;
}

#tos-window .close-btn,
#contact-window .close-btn {
    border-color: #14b8a6;
    color: #5eead4;
}

#tos-window .close-btn:hover,
#contact-window .close-btn:hover {
    background: #0f766e;
    color: #ffffff;
}

@keyframes teal-static-trim {
    from { opacity: 0.55; }
    to { opacity: 0.8; }
}

.window.showcase-window {
    position: fixed;
    z-index: 100020;
}

.window-header {
    background: #111111;
    color: #ffffff;
    padding: 6px 10px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #8b5cf6;
    font-size: 12px;
}

#taskbar .taskbar-right > button[onclick*="tos-window"],
#taskbar .taskbar-right > button[onclick*="contact-window"],
#taskbar .taskbar-right > .taskbar-forum-btn {
    border-color: #8b5cf6 !important;
    color: #8b5cf6;
    animation: taskbar-purple-flicker 2.8s steps(2, end) infinite;
}

#taskbar .taskbar-right > button[onclick*="tos-window"]:hover,
#taskbar .taskbar-right > button[onclick*="contact-window"]:hover,
#taskbar .taskbar-right > .taskbar-forum-btn:hover {
    color: #ffffff;
    box-shadow: 3px 3px 0 #8b5cf6;
    animation: none;
}

@keyframes taskbar-purple-flicker {
    0%, 84%, 100% {
        box-shadow: 0 0 2px rgba(139, 92, 246, 0.12);
        text-shadow: none;
    }
    88% {
        box-shadow: 0 0 6px rgba(139, 92, 246, 0.42), 0 0 11px rgba(139, 92, 246, 0.18);
        text-shadow: 0 0 4px rgba(139, 92, 246, 0.35);
    }
    92% {
        box-shadow: 0 0 3px rgba(139, 92, 246, 0.2);
        text-shadow: none;
    }
    96% {
        box-shadow: 0 0 7px rgba(139, 92, 246, 0.36), 0 0 12px rgba(139, 92, 246, 0.15);
        text-shadow: 0 0 3px rgba(139, 92, 246, 0.3);
    }
}

.window-title {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.close-btn {
    background: #111111;
    border: 1px solid #8b5cf6;
    color: #8b5cf6;
    font-size: 11px;
    font-weight: bold;
    width: 22px;
    height: 22px;
    text-align: center;
    line-height: 18px;
}

.close-btn:hover {
    background: #8b5cf6;
    color: #ffffff;
}

.close-btn:active {
    background: #6b21a8;
}

.window-body {
    padding: 12px;
    color: #111111;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.retro-btn {
    display: inline-block;
    padding: 6px 12px;
    background: #ffffff;
    border: 2px solid #111111;
    color: #111111;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: bold;
    box-shadow: 3px 3px 0px #111111;
    transition: transform 0.05s ease, background 0.05s;
}

.retro-btn:hover {
    background: #111111;
    color: #ffffff;
    box-shadow: 3px 3px 0px #8b5cf6;
}

.retro-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 1px 1px 0px #111111;
}

.retro-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.action-bar {
    display: flex;
    gap: 8px;
}

.vst-platform-note {
    margin-top: auto;
    padding: 7px 9px;
    border-left: 2px solid #a855f7;
    background: rgba(168, 85, 247, 0.08);
    color: #5b21b6;
    font-size: 10px;
    line-height: 1.4;
}

.window-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 8px;
    border-top: 1px dashed #cccccc;
    gap: 8px;
}

.nav-btn {
    flex: 1;
    font-weight: bold;
}

.vst-preview, .window-preview {
    width: 100%;
    height: 180px;
    background-color: #000000;
    border: 2px solid #111111;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.vst-preview img, .window-preview img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.terminal-body {
    background-color: #0b0b0b;
    border: 1px solid #333333;
    font-family: 'Courier New', monospace;
    height: 220px;
    overflow-y: auto;
}

#terminal-output, #admin-terminal-output {
    flex-grow: 1;
    white-space: pre-wrap;
    color: #00ff66;
}

#terminal-form, #admin-terminal-form {
    display: flex;
    align-items: center;
    margin-top: auto;
}

.prompt {
    color: #8b5cf6;
    margin-right: 5px;
}

#terminal-input, #admin-terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: #00ff66;
    font-family: inherit;
    font-size: inherit;
    flex-grow: 1;
}

.control-row {
    display: flex;
    justify-content: space-between;
}

.game-terminal-box {
    background-color: #eaeaea;
    border: 1px solid #111111;
    color: #111111;
    font-family: monospace;
    padding: 8px;
    height: 100px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 11px;
}

/* Taskbar Styling */
#taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40px;
    background-color: #ffffff;
    border-top: 2px solid #111111;
    box-shadow: 0 -3px 15px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 10000;
}

.start-btn {
    background-color: #111111;
    border: 2px solid #a855f7;
    color: #ffffff;
    font-family: inherit;
    font-size: 12px;
    font-weight: bold;
    padding: 4px 14px;
    outline: none;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.55), 0 0 16px rgba(168, 85, 247, 0.25);
    transition: background 0.15s;
}

.start-btn:hover {
    background: #7cfc00;
}

.start-btn:active {
    background: #7cfc00;
}

.taskbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 85%;
}

.kills-display-box {
    display: flex;
    align-items: center;
    gap: 5px;
    height: 26px;
    margin-left: 8px;
    padding: 0 8px;
    border: 1px solid rgba(139, 92, 246, 0.55);
    background: rgba(139, 92, 246, 0.07);
    color: #5b21b6;
    font: bold 10px monospace;
    letter-spacing: 0.4px;
    white-space: nowrap;
}

.kills-display-box span:last-child {
    min-width: 1.5ch;
    color: #111111;
    text-align: right;
}

#system-clock {
    background-color: #eaeaea;
    border: 1px solid #111111;
    color: #111111;
    padding: 4px 10px;
    font-size: 11px;
    font-family: monospace;
    display: flex;
    align-items: center;
    height: 28px;
}

.level-display-box {
    background-color: #eaeaea;
    border: 1px solid #8b5cf6;
    color: #8b5cf6;
    padding: 4px 10px;
    font-size: 11px;
    font-family: monospace;
    display: flex;
    align-items: center;
    height: 28px;
    font-weight: bold;
}

.lives-display-box {
    background-color: #eaeaea;
    border: 1px solid #8b5cf6;
    color: #8b5cf6;
    padding: 4px 10px;
    font-size: 11px;
    font-family: monospace;
    display: flex;
    align-items: center;
    height: 28px;
    font-weight: bold;
}

/* XP Taskbar Widget */
.xp-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 28px;
    width: 100px;
    background-color: #eaeaea;
    border: 1px solid #111111;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 9px;
}

.xp-label {
    display: flex;
    justify-content: space-between;
    color: #111111;
    font-weight: bold;
}

.xp-bar-outer {
    width: 100%;
    height: 4px;
    background-color: #cccccc;
    border: 1px solid #111111;
    margin-top: 1px;
    overflow: hidden;
}

.xp-bar-inner {
    width: 0%;
    height: 100%;
    background-color: #8b5cf6;
    transition: width 0.1s ease-out;
}

/* Energy Reserve Taskbar Widget */
.energy-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 28px;
    width: 100px;
    background-color: #eaeaea;
    border: 1px solid #111111;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 9px;
}

.energy-label {
    display: flex;
    justify-content: space-between;
    color: #111111;
    font-weight: bold;
}

.energy-bar-outer {
    width: 100%;
    height: 4px;
    background-color: #cccccc;
    border: 1px solid #111111;
    margin-top: 1px;
    overflow: hidden;
}

.energy-bar-inner {
    width: 100%;
    height: 100%;
    background-color: #7dd3fc;
    transition: width 0.1s ease-out;
}

/* Health Progress Taskbar Widget */
.shield-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 28px;
    width: 110px;
    background-color: #eaeaea;
    border: 1px solid #111111;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 9px;
}

.shield-label {
    display: flex;
    justify-content: space-between;
    color: #111111;
    font-weight: bold;
}

.shield-bar-outer {
    width: 100%;
    height: 4px;
    background-color: #cccccc;
    border: 1px solid #111111;
    margin-top: 1px;
    overflow: hidden;
}

.shield-bar-inner {
    width: 100%;
    height: 100%;
    background-color: #8b5cf6;
    transition: width 0.1s ease-out;
}

/* How To Play Flush Taskbar Popup */
#help-submenu-container {
    position: relative;
    display: flex;
    align-items: center;
}

#help-submenu-trigger {
    font-family: inherit;
    font-size: 10px;
    font-weight: bold;
    height: 28px;
    padding: 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    color: #111111;
    background: #eaeaea;
    border: 1px solid #111111;
}

#help-submenu {
    display: none;
    position: absolute;
    bottom: 38px;
    right: 0;
    width: 290px;
    background-color: #ffffff;
    border: 2px solid #111111;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
    padding: 10px;
    z-index: 10002;
}

.help-content-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-family: monospace;
    font-size: 10px;
    color: #111111;
    line-height: 1.3;
}

.help-title {
    color: #8b5cf6;
    font-weight: bold;
    border-bottom: 1px dashed #111111;
    padding-bottom: 4px;
    margin-bottom: 2px;
}

/* Pause Menu Styling */
.pause-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 100030;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pause-content {
    background: #ffffff;
    border: 2px solid #111111;
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.9);
    width: 360px;
    padding: 24px;
    text-align: center;
    font-family: monospace;
    color: #111111;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pause-header {
    color: #111111;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 2px;
}

.pause-sub {
    font-size: 10px;
    color: #555555;
    letter-spacing: 1px;
}

.pause-btn-row {
    display: flex;
    justify-content: center;
    margin-top: 5px;
}

/* Game Over Leaderboard Modal Styling */
.gameover-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 100020;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gameover-content {
    background: #ffffff;
    border: 2px solid #8b5cf6;
    box-shadow: 8px 8px 0px rgba(0, 0, 0, 0.9);
    width: 380px;
    padding: 20px;
    text-align: center;
    font-family: monospace;
    color: #111111;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gameover-header {
    color: #8b5cf6;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 2px;
}

.gameover-score-display {
    font-size: 18px;
    color: #111111;
    font-weight: bold;
}

.gameover-content p {
    font-size: 11px;
    color: #555555;
}

#leaderboard-name-input {
    background: #eaeaea;
    border: 1px solid #111111;
    color: #111111;
    font-family: monospace;
    font-size: 14px;
    padding: 8px;
    text-align: center;
    outline: none;
    letter-spacing: 2px;
}

.gameover-btn-row {
    display: flex;
    justify-content: center;
}

.leaderboard-table-container {
    background: #eaeaea;
    border: 1px solid #111111;
    padding: 10px;
    max-height: 160px;
    overflow-y: auto;
    font-size: 11px;
    text-align: left;
}

.lb-title {
    color: #8b5cf6;
    font-weight: bold;
    text-align: center;
    margin-bottom: 6px;
    font-size: 10px;
    letter-spacing: 1px;
}

.lb-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px dotted #cccccc;
}

.lb-row span:nth-child(2) {
    color: #8b5cf6;
    font-weight: bold;
}

/* Boss HUD Panel */
.boss-hud {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 320px;
    background-color: #ffffff;
    border: 2px solid #8b5cf6;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
    padding: 10px;
    z-index: 100009;
    font-family: monospace;
    text-align: center;
}

.boss-title {
    color: #8b5cf6;
    font-weight: bold;
    font-size: 11px;
    letter-spacing: 2px;
    margin-bottom: 5px;
}

.boss-hp-bar-outer {
    width: 100%;
    height: 10px;
    background-color: #eaeaea;
    border: 1px solid #111111;
    overflow: hidden;
    margin-bottom: 4px;
}

.boss-hp-bar-inner {
    width: 100%;
    height: 100%;
    background-color: #8b5cf6;
    transition: width 0.1s ease;
}

.boss-hp-text {
    font-size: 9px;
    color: #555555;
}

/* Boss Entity */
.boss-entity {
    position: fixed;
    top: 0;
    left: 0;
    width: 100px;
    height: 100px;
    background-color: #111111;
    border: 2px solid #8b5cf6;
    box-shadow: 0 0 25px rgba(139, 92, 246, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: #8b5cf6;
    z-index: 996;
    pointer-events: none;
}

.boss-entity.boss-retreating {
    opacity: 0;
    transition: transform 0.9s ease-in, opacity 0.9s ease-in;
}

.boss-projectile {
    position: fixed;
    top: 0;
    left: 0;
    width: 12px;
    height: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #8b5cf6;
    z-index: 995;
    pointer-events: none;
    will-change: transform;
}

.boss-charge-line {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    background-color: rgba(139, 92, 246, 0.5);
    z-index: 994;
    pointer-events: none;
    transform-origin: top left;
}

#bug-submenu-container {
    position: relative;
    display: flex;
    align-items: center;
}

#bug-submenu-trigger {
    font-family: inherit;
    font-size: 10px;
    font-weight: bold;
    width: 24px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    outline: none;
    background: #eaeaea;
    border: 1px solid #111111;
}

#bug-submenu {
    display: none;
    position: absolute;
    bottom: 35px;
    right: 0;
    background-color: #ffffff;
    border: 2px solid #111111;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
    padding: 8px 12px;
    z-index: 10002;
    white-space: nowrap;
}

.bug-counter-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #8b5cf6;
    font-family: monospace;
    font-size: 11px;
    font-weight: bold;
}

.bug-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-align: left;
}

.bug-stats-grid span {
    color: #111111;
}

.audio-controls {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 116px;
    padding-left: 10px;
    border-left: 1px solid #cccccc;
}

.audio-controls label {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.audio-controls output {
    color: #111111;
}

#game-volume {
    width: 100%;
    margin: 0;
    accent-color: #8b5cf6;
}

#game-mute-toggle {
    min-height: 24px;
    padding: 2px 6px;
    font-family: inherit;
    font-size: 10px;
    font-weight: bold;
    background: #eaeaea;
}

.bug-submenu-icon {
    font-size: 18px;
    display: inline-block;
}

.retro-tooltip-text {
    visibility: hidden;
    background-color: #111111;
    color: #ffffff;
    border: 1px solid #8b5cf6;
    text-align: center;
    padding: 4px 8px;
    position: absolute;
    z-index: 100003;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 10px;
    font-family: monospace;
    pointer-events: none;
}

.bug-submenu-icon:hover ~ .retro-tooltip-text {
    visibility: visible;
}

.data-bug {
    position: absolute;
    width: 24px;
    height: 24px;
    z-index: 999;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    will-change: transform;
}

.data-bug.healer-bug {
    filter: drop-shadow(0px 0px 6px #8b5cf6) !important;
}

.showcase-ally {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 140px;
    min-height: 118px;
    padding: 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    overflow: hidden;
    color: #f3e8ff;
    background: rgba(12, 7, 28, 0.96);
    border: 2px solid #a855f7;
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.9), inset 0 0 14px rgba(99, 102, 241, 0.28);
    text-align: center;
    cursor: pointer;
    will-change: transform;
    animation: showcase-ally-glow 2s ease-in-out infinite;
    isolation: isolate;
}

.showcase-ally::before,
.showcase-ally::after {
    content: "";
    position: absolute;
    pointer-events: none;
}

.showcase-ally::before {
    z-index: 2;
    inset: -5px;
    border: 2px dotted #ffffff;
    outline: 1px dashed #67e8f9;
    outline-offset: 2px;
    filter: drop-shadow(0 0 5px rgba(103, 232, 249, 0.9));
    animation: showcase-static 0.16s steps(2, end) infinite;
}

.showcase-ally::after {
    z-index: 2;
    inset: 2px;
    border: 1px solid rgba(103, 232, 249, 0.4);
    background:
        repeating-linear-gradient(0deg, transparent 0 5px, rgba(103, 232, 249, 0.12) 6px 7px),
        repeating-linear-gradient(90deg, transparent 0 8px, rgba(192, 132, 252, 0.11) 9px 10px);
    box-shadow: inset 0 0 14px rgba(103, 232, 249, 0.22);
    opacity: 0.5;
    animation: showcase-forcefield 1.8s ease-in-out infinite;
}

.showcase-ally:hover {
    filter: brightness(1.25);
}

.showcase-ally img {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 66px;
    object-fit: contain;
    pointer-events: none;
}

.showcase-ally-name,
.showcase-ally-prompt {
    position: relative;
    z-index: 3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
}

.showcase-ally-name {
    font-size: 10px;
    font-weight: bold;
}

.showcase-ally-prompt {
    color: #67e8f9;
    font-size: 8px;
    letter-spacing: 1px;
}

@keyframes showcase-static {
    0% { transform: translate(0, 0); opacity: 0.8; }
    25% { transform: translate(1px, -1px); opacity: 1; }
    50% { transform: translate(-1px, 1px); opacity: 0.65; }
    75% { transform: translate(1px, 1px); opacity: 0.95; }
    100% { transform: translate(-1px, -1px); opacity: 0.75; }
}

@keyframes showcase-forcefield {
    0%, 100% { opacity: 0.25; filter: hue-rotate(0deg); }
    50% { opacity: 0.75; filter: hue-rotate(35deg); }
}

@keyframes showcase-ally-glow {
    0%, 100% {
        border-color: #a855f7;
        box-shadow: 0 0 10px rgba(168, 85, 247, 0.75), inset 0 0 12px rgba(99, 102, 241, 0.22);
    }
    50% {
        border-color: #67e8f9;
        box-shadow: 0 0 18px rgba(34, 211, 238, 0.85), inset 0 0 16px rgba(168, 85, 247, 0.3);
    }
}

.showcase-ally-burst {
    width: 1040px;
    height: 1040px;
    border: 5px double #67e8f9;
    background: radial-gradient(circle, rgba(192, 132, 252, 0.4), rgba(34, 211, 238, 0.12) 45%, transparent 72%);
    box-shadow: 0 0 30px #a855f7, inset 0 0 50px rgba(103, 232, 249, 0.9);
    z-index: 100007;
}

body.showcase-burst-flash::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 100008;
    pointer-events: none;
    background: rgba(192, 132, 252, 0.22);
    animation: showcase-flash 0.24s ease-out forwards;
}

@keyframes showcase-flash {
    from { opacity: 1; }
    to { opacity: 0; }
}

.bug-particle {
    position: fixed;
    width: 4px;
    height: 4px;
    pointer-events: none;
    z-index: 999;
    border-radius: 50%;
    background-color: #8b5cf6;
}

/* Collectible Power-up Node */
.retro-powerup {
    position: absolute;
    background: #ffffff;
    border: 2px solid #111111;
    color: #111111;
    font-family: monospace;
    font-size: 10px;
    font-weight: bold;
    padding: 5px 8px;
    box-shadow: 2px 2px 0px #111111;
    z-index: 998;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.retro-powerup.health-potion {
    border-color: #8b5cf6;
    color: #8b5cf6;
}

.retro-powerup.bomb-powerup {
    border-color: #a855f7;
    color: #a855f7;
}

.retro-powerup.energy-cell {
    border-color: #111111;
    color: #111111;
}

/* Visual Aura Waves */
.aura-wave {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: 990;
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 1;
    transition: transform 0.4s cubic-bezier(0.1, 0.8, 0.3, 1), opacity 0.4s ease-out;
}

.aura-wave.damage {
    width: 360px;
    height: 360px;
    border: 4px solid #8b5cf6;
    background: rgba(139, 92, 246, 0.05);
}

.aura-wave.knockback {
    width: 480px;
    height: 480px;
    border: 4px solid #111111;
    background: rgba(17, 17, 17, 0.05);
}

.aura-wave.expanded {
    transform: translate(-50%, -50%) scale(1.0);
    opacity: 0;
}

.aoe-explosion {
    position: absolute;
    border: 3px double #8b5cf6;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.06);
    pointer-events: none;
    z-index: 100006;
    transform: translate(-50%, -50%) scale(0.1);
    opacity: 1;
    transition: transform 0.6s cubic-bezier(0.1, 0.8, 0.3, 1), opacity 0.6s ease-out;
}

.aoe-explosion.detonated {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
}

.fighter-orb {
    position: absolute;
    width: 14px;
    height: 14px;
    background: #8b5cf6;
    border: 2px solid #111111;
    border-radius: 50%;
    z-index: 998;
    pointer-events: none;
    will-change: transform;
}

.laser-beam {
    position: absolute;
    height: 2px;
    background: #8b5cf6;
    z-index: 997;
    pointer-events: none;
    transform-origin: top left;
}

.spiral-vortex-wrapper {
    position: absolute;
    width: 220px;
    height: 220px;
    z-index: 998;
    pointer-events: none;
    will-change: transform;
}

.spiral-vortex-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spiral-ring {
    position: absolute;
    border-radius: 50%;
    border: 2px dashed #111111;
}

.ring-1 {
    width: 100%;
    height: 100%;
    animation: spin-clockwise 1.6s linear infinite;
}

.ring-2 {
    width: 75%;
    height: 75%;
    border-color: #8b5cf6;
    animation: spin-counter 1.1s linear infinite;
}

.ring-3 {
    width: 45%;
    height: 45%;
    animation: spin-clockwise 0.7s linear infinite;
}

.vortex-symbol {
    font-size: 34px;
    z-index: 999;
    color: #8b5cf6;
}

@keyframes spin-clockwise {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-counter {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* Level Announcement Banner Glitch Overlay */
.level-banner {
    position: fixed;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    text-align: center;
    z-index: 100007;
    pointer-events: none;
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.5s ease;
}

.level-banner.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.0);
}

.level-banner-glitch {
    font-size: clamp(2.5rem, 9vw, 6.5rem);
    font-weight: 900;
    color: #111111;
    text-transform: uppercase;
    letter-spacing: 14px;
    text-shadow: 
        -3px -3px 0px #8b5cf6,
        3px 3px 0px #666666;
}

.level-banner-subtext {
    font-size: 13px;
    color: #8b5cf6;
    letter-spacing: 8px;
    margin-top: 15px;
    text-transform: uppercase;
    font-weight: bold;
}

#start-menu {
    position: fixed;
    bottom: 40px;
    left: 10px;
    width: 260px;
    background-color: #ffffff;
    border: 2px solid #111111;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
    display: none;
    z-index: 10001;
}

.start-menu-inner {
    display: flex;
    width: 100%;
}

.start-menu-sidebar {
    width: 32px;
    background: #111111;
    border-right: 2px solid #8b5cf6;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 10px;
}

.sidebar-text {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-weight: bold;
    color: #ffffff;
    font-size: 11px;
    letter-spacing: 2px;
}

.start-menu-content {
    flex-grow: 1;
    padding: 5px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.menu-item {
    position: relative;
    padding: 8px 12px;
    color: #5b21b6;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    border-left: 3px solid transparent;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.menu-item:hover {
    background: linear-gradient(100deg, rgba(124, 58, 237, 0.16), rgba(217, 70, 239, 0.12));
    color: #ffffff;
    border-left-color: #a855f7;
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.55), inset 0 0 12px rgba(217, 70, 239, 0.18);
    text-shadow: 0 0 8px rgba(192, 132, 252, 0.9);
    background-color: #24133d;
}

.menu-item-arrow {
    font-size: 9px;
}

.submenu {
    display: none;
    position: absolute;
    left: 100%;
    bottom: 0;
    background-color: #ffffff;
    border: 2px solid #111111;
    width: 200px;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.8);
    z-index: 10002;
    padding: 6px;
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #8b5cf6 #eaeaea;
}

.submenu::-webkit-scrollbar {
    width: 10px;
}

.submenu::-webkit-scrollbar-track {
    background: #eaeaea;
    border: 1px solid #111111;
}

.submenu::-webkit-scrollbar-thumb {
    background: #8b5cf6;
    border: 1px solid #111111;
}

.menu-item:hover .submenu,
.submenu:hover {
    display: block;
}

.submenu-item {
    padding: 8px 10px;
    color: #0e7490;
    font-size: 11px;
    border-left: 3px solid transparent;
    transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.submenu-item:hover {
    background: linear-gradient(100deg, rgba(34, 211, 238, 0.16), rgba(129, 140, 248, 0.14));
    color: #ffffff;
    border-left-color: #22d3ee;
    box-shadow: 0 0 12px rgba(34, 211, 238, 0.45), inset 0 0 10px rgba(129, 140, 248, 0.16);
    text-shadow: 0 0 7px rgba(103, 232, 249, 0.85);
    background-color: #102a3a;
}

.menu-item:focus-within,
.submenu-item:focus-visible {
    outline: 2px solid #a855f7;
    outline-offset: -2px;
}

/* Mobile responsive settings */
@media screen and (max-width: 768px) {
    body {
        cursor: default !important;
    }
    a, button, .retro-btn, .close-btn, .icon, .start-btn, .submenu-item, .menu-item, input, .window-header {
        cursor: default !important;
    }
    .window {
        width: 90% !important;
        left: 5% !important;
    }
    .showcase-ally {
        width: 118px;
        min-height: 108px;
        padding: 6px;
    }
    .showcase-ally img {
        height: 58px;
    }
    #taskbar {
        padding: 0 5px;
    }
    .taskbar-right {
        gap: 4px;
    }
    .xp-container, .energy-container, .shield-container {
        width: 60px;
        padding: 2px;
        font-size: 7px;
    }
    .xp-label span:nth-child(2),
    .energy-label span:nth-child(2),
    .shield-label span:nth-child(2) {
        display: none;
    }
    #system-clock {
        padding: 4px 6px;
        font-size: 9px;
    }
}

/* ========================================================================== */
/* Clean Left-Alignment & Styling for App / Terms Data Boxes                  */
/* ========================================================================== */
.app-data-box {
    background-color: #eaeaea;
    border: 1px solid #111111;
    color: #111111;
    font-family: monospace;
    padding: 12px;
    height: 140px;
    overflow-y: auto;
    white-space: pre-wrap;
    font-size: 11px;
    text-align: left !important;
    line-height: 1.5;
}

#tos-window .app-data-box {
    background-color: #ffffff;
    height: 160px;
}

.app-data-box a {
    color: #8b5cf6;
    text-decoration: underline;
}

.app-data-box a:hover {
    background-color: #111111;
    color: #ffffff;
    text-decoration: none;
}

.app-data-box > .retro-btn {
    display: block;
    width: max-content;
    margin-bottom: 10px;
}

.app-launch-bar:empty {
    display: none;
}

.app-launch-bar > .retro-btn {
    width: 100%;
}

/* ========================================================================== */
/* Contact Box Clean Left Alignment Fix                                       */
/* ========================================================================== */
.contact-box {
    background-color: #eaeaea;
    border: 1px solid #111111;
    color: #111111;
    font-family: monospace;
    padding: 14px;
    height: auto;
    overflow-y: auto;
    white-space: normal !important;
    text-align: left !important;
    font-size: 11px;
    line-height: 1.6;
}

.contact-box a {
    color: #8b5cf6;
    text-decoration: underline;
}

.contact-box a:hover {
    background-color: #111111;
    color: #ffffff;
    text-decoration: none;
}
/* ========================================================================== */
/* Terms Box Clean Left Alignment Fix                                         */
/* ========================================================================== */
.terms-box {
    background-color: #ffffff;
    border: 1px solid #111111;
    color: #111111;
    font-family: monospace;
    padding: 14px;
    height: 160px;
    overflow-y: auto;
    white-space: normal !important;
    text-align: left !important;
    font-size: 11px;
    line-height: 1.6;
}

.terms-box a {
    color: #8b5cf6;
    text-decoration: underline;
}

.terms-box a:hover {
    background-color: #111111;
    color: #ffffff;
    text-decoration: none;
}
/* Background Image Watermark Styling */
.background-logo-watermark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 1; /* Sits behind windows (z-index 10) but above the canvas */
    opacity: 0.12; /* Adjust this to make it more subtle or prominent (0.05 to 0.25) */
    display: flex;
    align-items: center;
    justify-content: center;
}

.background-logo-watermark img {
    width: 108px;
    height: 111px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.2));
}
/* ========================================================================== */
/* Mobile Taskbar Optimization & Compact Scaling                              */
/* ========================================================================== */

@media screen and (max-width: 768px) {
    #taskbar {
        padding: 0 4px;
        gap: 4px;
        justify-content: space-between;
    }

    /* Fix the VOID start button size on mobile so it isn't massive */
    .start-btn {
        padding: 2px 8px !important;
        font-size: 10px !important;
        display: flex !important;
        align-items: center !important;
        white-space: nowrap !important;
    }
    
    .start-btn img {
        width: 11px !important;
        height: 11px !important;
        margin-right: 2px !important;
    }

    .kills-display-box {
        flex: 0 0 auto;
        height: 24px;
        margin-left: 2px;
        padding: 0 5px;
        gap: 3px;
        font-size: 9px;
    }

    .taskbar-right {
        gap: 3px;
        max-width: 80%;
        display: flex;
        align-items: center;
        overflow: visible; /* Prevent clipping bugs */
    }

    /* Hide full status widgets on mobile to prevent overlapping, they live in the drawer instead */
    .taskbar-right > .retro-btn:not(#mobile-taskbar-toggle),
    .taskbar-right > .lives-display-box,
    .taskbar-right > .level-display-box,
    .taskbar-right > .xp-container,
    .taskbar-right > .energy-container,
    .taskbar-right > .shield-container,
    .taskbar-right > #help-submenu-container,
    .taskbar-right > #bug-submenu-container,
    .taskbar-right > #system-clock {
        display: none !important;
    }

    /* Show the mobile menu drawer toggle button */
    #mobile-taskbar-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        height: 28px;
        padding: 0 8px;
        background: #eaeaea;
        border: 1px solid #111111;
        font-family: monospace;
        font-weight: bold;
        font-size: 10px;
        color: #111111;
    }
}
/* --- SPECTRAL TORNADO / V-TEX STYLING --- */
.spiral-vortex-wrapper {
    position: absolute;
    width: 220px;
    height: 220px;
    pointer-events: none;
    z-index: 90;
    filter: drop-shadow(0 0 18px rgba(168, 85, 247, 0.7));
}

.spiral-vortex-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spiral-vortex-inner::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: conic-gradient(from 0deg, transparent 0deg, rgba(34, 211, 238, 0.08) 45deg, rgba(168, 85, 247, 0.72) 105deg, rgba(217, 70, 239, 0.25) 165deg, transparent 230deg, rgba(34, 211, 238, 0.55) 300deg, transparent 360deg);
    filter: blur(8px);
    animation: vortexGlowSpin 1.8s linear infinite, vortexGlowPulse 0.8s ease-in-out infinite alternate;
}

.vortex-symbol {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.45), rgba(88, 28, 135, 0.45) 58%, transparent 78%);
    border-radius: 50%;
    filter: drop-shadow(0 0 12px #22d3ee) drop-shadow(0 0 22px #a855f7);
    animation: vortexCorePulse 0.65s ease-in-out infinite alternate;
}

.vortex-symbol img {
    position: relative;
    z-index: 1;
    animation: vortexIconSpin 2.2s linear infinite reverse;
}

.vortex-debris {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    pointer-events: none;
    transform-origin: 0 0;
    color: var(--orbit-color);
    font-size: 15px;
    font-weight: bold;
    line-height: 0;
    text-shadow: 0 0 5px currentColor, 0 0 11px currentColor;
    animation: vortexParticleOrbit var(--orbit-duration) linear infinite;
}

@keyframes vortexGlowSpin {
    from { transform: translate(-50%, -50%) rotate(0deg) scale(0.9); }
    to { transform: translate(-50%, -50%) rotate(360deg) scale(1.08); }
}

@keyframes vortexGlowPulse {
    from { opacity: 0.65; }
    to { opacity: 1; }
}

@keyframes vortexParticleOrbit {
    from { transform: rotate(var(--orbit-angle)) translateX(var(--orbit-radius)) rotate(0deg); }
    to { transform: rotate(calc(var(--orbit-angle) + 360deg)) translateX(var(--orbit-radius)) rotate(-360deg); }
}

@keyframes vortexCorePulse {
    from { transform: translate(-50%, -50%) scale(0.9); }
    to { transform: translate(-50%, -50%) scale(1.1); }
}

@keyframes vortexIconSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* --- UPGRADED F-SYS FIGHTER DRONES --- */
.fighter-orb {
    position: absolute;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 85;
    filter: drop-shadow(0 0 12px rgba(0, 255, 255, 0.9));
}

/* Engine Exhaust Thruster Glow */
.fighter-orb::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 6px;
    background: linear-gradient(90deg, transparent, #00ffff, #ffffff);
    border-radius: 50%;
    box-shadow: 0 0 10px #00ffff;
    animation: thrusterFlicker 0.1s ease-in-out infinite alternate;
}

/* Targeting Reticle Ring */
.fighter-orb::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 40px;
    border: 1px dashed rgba(0, 255, 255, 0.5);
    border-radius: 50%;
    animation: droneReticleSpin 3s linear infinite;
}

@keyframes thrusterFlicker {
    0% { width: 10px; opacity: 0.6; }
    100% { width: 18px; opacity: 1; }
}

@keyframes droneReticleSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Windowed Astral's End playfield */
.game-window {
    position: absolute;
    z-index: 101;
    width: 50vw;
    height: 50vh;
    min-width: min(480px, calc(100vw - 16px));
    min-height: min(340px, calc(100vh - 56px));
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 56px);
    overflow: hidden;
    resize: both;
    background: #090d1c;
    border: 2px solid #a78bfa;
    box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.42), 0 12px 42px rgba(0, 0, 0, 0.55), 0 0 28px rgba(139, 92, 246, 0.28);
}

.game-window.is-maximized {
    inset: 10px 10px 50px;
    width: auto;
    height: auto;
    max-width: none;
    max-height: none;
    resize: none;
}

#desktop {
    background:
        radial-gradient(ellipse at 16% 18%, rgba(34, 211, 238, 0.16), transparent 32%),
        radial-gradient(ellipse at 84% 76%, rgba(139, 92, 246, 0.22), transparent 38%),
        linear-gradient(145deg, #080b18 0%, #111126 48%, #080f1d 100%);
}

#desktop::before {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.055) 1px, transparent 1px);
    background-size: 36px 36px;
    content: "";
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.85), transparent 90%);
    pointer-events: none;
}

#desktop .wallpaper-logo {
    color: rgba(196, 181, 253, 0.08);
    text-shadow:
        -3px 0 rgba(34, 211, 238, 0.08),
        3px 0 rgba(139, 92, 246, 0.12),
        0 0 28px rgba(139, 92, 246, 0.16);
}

.game-window .window-header {
    flex: 0 0 34px;
    min-height: 34px;
    border-bottom-color: #22d3ee;
    cursor: move;
}

.game-window-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.window-control {
    width: 22px;
    height: 22px;
    border: 1px solid #67e8f9;
    background: #111827;
    color: #67e8f9;
    font: bold 12px monospace;
}

.window-control:hover {
    color: #ffffff;
    background: #6d28d9;
}

.game-toolbar {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    min-height: 48px;
    padding: 5px 7px;
    color: #e9d5ff;
    background: linear-gradient(90deg, #101327, #1a1230 55%, #0c1d2b);
    border-bottom: 1px solid rgba(103, 232, 249, 0.55);
    font: bold 9px monospace;
}

.game-toolbar .kills-display-box,
.game-toolbar .lives-display-box,
.game-toolbar .level-display-box {
    flex: 0 0 auto;
    height: 25px;
    margin: 0;
    padding: 0 6px;
    border: 1px solid rgba(167, 139, 250, 0.55);
    background: rgba(139, 92, 246, 0.1);
    color: #e9d5ff;
    font-size: 9px;
}

.game-toolbar .kills-display-box span:last-child,
.game-toolbar .level-display-box span {
    color: #67e8f9;
}

.game-toolbar .xp-container,
.game-toolbar .energy-container,
.game-toolbar .shield-container {
    flex: 1 1 90px;
    min-width: 75px;
    margin: 0;
}

.game-toolbar .xp-label,
.game-toolbar .energy-label,
.game-toolbar .shield-label {
    color: #111111;
    font-size: 8px;
}

.game-toolbar #help-submenu-container,
.game-toolbar #bug-submenu-container {
    position: relative;
    flex: 0 0 auto;
    margin: 0;
}

.game-toolbar #help-submenu-trigger,
.game-toolbar #bug-submenu-trigger {
    width: auto;
    height: 26px;
    padding: 5px 7px;
    font-size: 9px;
    white-space: nowrap;
}

.game-toolbar #help-submenu,
.game-toolbar #bug-submenu {
    position: absolute;
    z-index: 20;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    bottom: auto;
    width: min(320px, calc(100vw - 24px));
    max-height: min(50vh, 360px);
    overflow: auto;
    color: #eee8f5;
    background: rgba(10, 12, 29, 0.98);
    border: 1px solid #a78bfa;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.game-toolbar #help-submenu {
    padding: 12px;
}

.game-toolbar .help-content-inner p {
    margin-top: 8px;
    line-height: 1.5;
}

.game-stage {
    position: relative;
    isolation: isolate;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 45%, rgba(42, 30, 75, 0.2), rgba(5, 8, 19, 0.08) 72%);
}

.game-stage #canvas-container,
.game-stage #level-background,
.game-stage #damage-overlay {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.game-stage #canvas-container {
    z-index: 1;
}

.game-stage #level-background {
    z-index: 0;
}

.game-stage #damage-overlay {
    z-index: 3;
}

.game-stage .wallpaper-logo {
    top: auto;
    bottom: 8px;
    left: 50%;
    z-index: 7;
    width: max-content;
    max-width: calc(100% - 24px);
    gap: 0.12em;
    transform: translateX(-50%);
    font-size: clamp(24px, 4vw, 48px);
    letter-spacing: 0.12em;
    white-space: nowrap;
    color: rgba(196, 181, 253, 0.12);
    text-shadow:
        -2px 0 rgba(34, 211, 238, 0.12),
        2px 0 rgba(139, 92, 246, 0.2),
        0 0 24px rgba(139, 92, 246, 0.22);
    animation-name: game-wordmark-pulse;
}

.game-stage .wallpaper-inline-logo {
    width: 1em;
    height: 1em;
}

body.orb-damaged .game-stage .wallpaper-logo {
    animation-name: game-wordmark-damage-pulse;
}

@keyframes game-wordmark-pulse {
    0%, 100% {
        opacity: 0.7;
        transform: translateX(-50%) scale(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scale(1.02);
    }
}

@keyframes game-wordmark-damage-pulse {
    0%, 100% {
        opacity: 0.7;
        color: rgba(192, 132, 252, 0.12);
        text-shadow: 0 0 0 rgba(168, 85, 247, 0);
        transform: translateX(-50%) scale(1);
    }
    35% {
        opacity: 1;
        color: rgba(221, 190, 255, 0.9);
        text-shadow:
            0 0 8px rgba(192, 132, 252, 0.95),
            0 0 22px rgba(168, 85, 247, 0.9),
            0 0 48px rgba(126, 34, 206, 0.75);
        transform: translateX(-50%) scale(1.035);
    }
}

.game-stage #orb-core-logo,
.game-stage .level-banner,
.game-stage .pause-modal,
.game-stage .gameover-modal,
.game-stage .boss-hud {
    position: absolute;
}

.game-stage #orb-core-logo {
    z-index: 4;
}

.game-stage .level-banner {
    top: 50%;
    z-index: 5;
}

.game-stage .pause-modal,
.game-stage .gameover-modal {
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.game-stage .pause-content,
.game-stage .gameover-content {
    width: min(380px, calc(100% - 24px));
    max-height: calc(100% - 24px);
    overflow: auto;
}

.game-stage .boss-hud {
    top: 12px;
    z-index: 6;
    width: min(320px, calc(100% - 24px));
}

#game-entities-layer {
    position: fixed;
    inset: 0;
    z-index: 10002;
    overflow: hidden;
    pointer-events: none;
    clip-path: inset(0 100% 100% 0);
}

#game-entities-layer .showcase-ally {
    pointer-events: auto;
}

@media (max-width: 768px) {
    #desktop {
        position: relative;
        width: 100%;
        height: calc(100vh - 40px);
        height: calc(100svh - 40px);
        min-height: 0;
        overflow: hidden;
        padding: 0;
    }

    #apps-window,
    #vst-window {
        display: none !important;
    }

    #games-window.game-window,
    #games-window.game-window.is-maximized {
        position: absolute !important;
        inset: 8px 8px 48px !important;
        width: auto !important;
        height: auto !important;
        min-width: 0 !important;
        min-height: 0 !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        resize: none !important;
    }

    .game-stage .wallpaper-logo {
        bottom: 6px;
        gap: 0.04em;
        font-size: clamp(20px, 6vw, 30px);
        letter-spacing: 0.06em;
    }

    .game-toolbar {
        gap: 4px;
        padding: 4px;
    }

    .game-toolbar .xp-container,
    .game-toolbar .energy-container,
    .game-toolbar .shield-container {
        flex-basis: 72px;
    }

    #taskbar .taskbar-right > button[onclick*="tos-window"],
    #taskbar .taskbar-right > button[onclick*="contact-window"],
    #taskbar .taskbar-right > .taskbar-forum-btn,
    #taskbar .taskbar-right > #system-clock {
        display: flex !important;
        align-items: center;
        height: 26px !important;
        padding: 0 4px !important;
        font-size: 8px !important;
    }
}

body {
    touch-action: manipulation;
}
/* --- UNIQUE POWER-UP THEMES --- */
.retro-powerup {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(10, 10, 15, 0.85);
    border: 2px solid #555;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
    z-index: 50;
    pointer-events: none;
    animation: powerupFloat 2s ease-in-out infinite alternate;
}

/* 1. Fighter Power-Up (Cyan Hologram Theme) */
.retro-powerup.fighter-powerup {
    border-color: #00ffff;
    box-shadow: 0 0 12px rgba(0, 255, 255, 0.4), inset 0 0 6px rgba(0, 255, 255, 0.2);
    color: #00ffff;
}

/* 2. Vortex Power-Up (Electric Purple Theme) */
.retro-powerup.tornado-powerup {
    border-color: #cc00ff;
    box-shadow: 0 0 12px rgba(204, 0, 255, 0.4), inset 0 0 6px rgba(204, 0, 255, 0.2);
    color: #cc00ff;
}

/* 3. Bomb Power-Up (Amber Warning Theme) */
.retro-powerup.bomb-powerup {
    border-color: #ff9900;
    box-shadow: 0 0 12px rgba(255, 153, 0, 0.4), inset 0 0 6px rgba(255, 153, 0, 0.2);
    color: #ff9900;
}

/* 4. Extra Life / Heart Theme */
.retro-powerup.extra-life {
    border-color: #d946ef;
    box-shadow: 0 0 12px rgba(255, 0, 85, 0.4), inset 0 0 6px rgba(255, 0, 85, 0.2);
    color: #d946ef;
}

/* 5. Health Potion Theme */
.retro-powerup.health-potion {
    border-color: #00ff66;
    box-shadow: 0 0 12px rgba(0, 255, 102, 0.4), inset 0 0 6px rgba(0, 255, 102, 0.2);
    color: #00ff66;
}

/* 6. Energy Cell Theme */
.retro-powerup.energy-cell {
    border-color: #ffd700;
    box-shadow: 0 0 12px rgba(255, 215, 0, 0.4), inset 0 0 6px rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

@keyframes powerupFloat {
    0% { transform: translateY(0px) scale(1); }
    100% { transform: translateY(-6px) scale(1.03); }
}


/* --- ADVANCED FIGHTER DRONE STYLING --- */
.fighter-drone-unit {
    position: absolute;
    width: 48px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 45;
    pointer-events: none;
    will-change: transform;
}

.fighter-drone-unit::before {
    content: "";
    position: absolute;
    width: 42px;
    height: 27px;
    background: var(--drone-glow);
    clip-path: polygon(0 14%, 100% 50%, 0 86%, 24% 50%);
    opacity: 0.72;
    filter: drop-shadow(0 0 5px var(--drone-glow));
    animation: droneHullPulse 0.75s ease-in-out infinite alternate;
}

.fighter-drone-unit .drone-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 0 5px #ffffff) drop-shadow(0 0 9px var(--drone-glow));
}

.fighter-drone-unit .drone-engine {
    position: absolute;
    left: -13px;
    top: 50%;
    width: 24px;
    height: 7px;
    transform: translateY(-50%);
    border-radius: 100% 0 0 100%;
    background: linear-gradient(90deg, transparent, var(--drone-glow));
    filter: drop-shadow(0 0 5px var(--drone-glow));
    animation: droneEngineFlicker 0.14s steps(2, end) infinite alternate;
    z-index: 1;
}

.fighter-drone-unit .drone-core-glow {
    position: absolute;
    width: 34px;
    height: 28px;
    background: radial-gradient(ellipse, var(--drone-glow) 0%, transparent 72%);
    border-radius: 50%;
    animation: dronePulse 1s ease-in-out infinite alternate;
    z-index: 0;
}

.enemy-fighter {
    position: absolute;
    width: 64px;
    height: 48px;
    z-index: 44;
    pointer-events: none;
    will-change: transform, filter;
    filter: drop-shadow(0 0 5px #fb7185) drop-shadow(0 0 10px rgba(244, 63, 94, 0.72));
}

.enemy-fighter img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform: rotate(-90deg);
}

.enemy-fighter-hit {
    filter: brightness(2) drop-shadow(0 0 12px #ffffff);
}

.enemy-fighter-projectile {
    position: absolute;
    width: 12px;
    height: 5px;
    border-radius: 5px;
    background: #fb7185;
    box-shadow: 0 0 6px #fb7185, 0 0 12px #f43f5e;
    z-index: 995;
    pointer-events: none;
}

.mine-item,
.mine-fragment {
    position: absolute;
    pointer-events: none;
    will-change: transform;
}

.mine-item {
    width: 38px;
    height: 38px;
    z-index: 997;
    filter: drop-shadow(0 0 7px #c084fc) drop-shadow(0 0 13px rgba(168, 85, 247, 0.8));
}

.mine-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.mine-fragment {
    width: 20px;
    height: 20px;
    z-index: 996;
    object-fit: contain;
    filter: drop-shadow(0 0 5px #fb923c);
}

#game-time-effect {
    position: fixed;
    z-index: 100009;
    top: 56px;
    left: 50%;
    transform: translate(-50%, -8px);
    padding: 8px 14px;
    border: 2px solid currentColor;
    background: rgba(5, 5, 15, 0.94);
    font: bold 12px monospace;
    letter-spacing: 1px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

#game-time-effect.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

#game-time-effect.game-time-effect--slow {
    color: #c084fc;
    box-shadow: 0 0 14px rgba(168, 85, 247, 0.75);
}

#game-time-effect.game-time-effect--fast {
    color: #fb923c;
    box-shadow: 0 0 14px rgba(249, 115, 22, 0.75);
}

@keyframes dronePulse {
    0% { transform: scale(0.8); opacity: 0.5; }
    100% { transform: scale(1.4); opacity: 1; }
}

@keyframes droneHullPulse {
    from { opacity: 0.45; transform: scale(0.92); }
    to { opacity: 0.85; transform: scale(1.04); }
}

@keyframes droneEngineFlicker {
    from { opacity: 0.55; width: 17px; }
    to { opacity: 1; width: 25px; }
}

.fighter-trail-particle {
    position: fixed;
    z-index: 44;
    pointer-events: none;
    font-size: 11px;
    line-height: 1;
    text-shadow: 0 0 4px currentColor, 0 0 9px currentColor;
    animation: fighterTrailFade 550ms ease-out forwards;
}

@keyframes fighterTrailFade {
    from {
        opacity: 0.95;
        transform: translate3d(0, 0, 0) scale(var(--trail-scale));
        filter: drop-shadow(0 0 5px currentColor);
    }
    to {
        opacity: 0;
        transform: translate3d(calc(-20px + var(--trail-drift)), -8px, 0) scale(0.15);
        filter: drop-shadow(0 0 0 currentColor);
    }
}

.fire-demon {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100012;
    width: 68px;
    height: 68px;
    display: grid;
    place-items: center;
    pointer-events: none;
    will-change: transform;
    animation: fireDemonHover 0.8s ease-in-out infinite alternate;
}

.fire-demon img {
    position: relative;
    z-index: 1;
    width: 62px;
    height: 62px;
    object-fit: contain;
    filter:
        drop-shadow(0 0 6px #fff3b0)
        drop-shadow(0 0 13px var(--demon-glow))
        drop-shadow(0 0 25px var(--demon-glow));
    animation: fireDemonFlicker 0.13s steps(2, end) infinite alternate, fireDemonFlare 1.1s ease-in-out infinite alternate;
}

.fire-demon-aura {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0 12%, #fff2ae 18%, #ff6a00 28%, transparent 38% 50%, var(--demon-glow) 62%, #ffb000 74%, transparent 86% 100%);
    filter: blur(8px);
    opacity: 0.95;
    animation: fireDemonAura 0.42s linear infinite;
}

.fire-demon-flame {
    position: absolute;
    inset: -7px;
    border-radius: 50%;
    background:
        radial-gradient(ellipse at 50% 80%, rgba(255, 238, 129, 0.95), transparent 38%),
        radial-gradient(ellipse at 25% 55%, rgba(255, 65, 0, 0.78), transparent 55%),
        radial-gradient(ellipse at 75% 45%, rgba(255, 132, 0, 0.82), transparent 58%);
    filter: blur(5px);
    mix-blend-mode: screen;
    animation: fireDemonFlameFlow 0.32s ease-in-out infinite alternate;
}

.fire-demon-trail {
    position: fixed;
    z-index: 100011;
    pointer-events: none;
    font-size: 19px;
    line-height: 1;
    text-shadow: 0 0 7px #fff2ae, 0 0 14px currentColor, 0 0 26px currentColor;
    animation: fireDemonTrailFade 720ms ease-out forwards;
}

.fireball-projectile {
    position: fixed;
    top: -8px;
    left: -8px;
    z-index: 100013;
    width: 24px;
    height: 19px;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
    isolation: isolate;
    background: radial-gradient(ellipse at 65% 50%, #fff8b0 0 12%, #ffd23f 30%, #ff6a00 60%, var(--fireball-glow) 82%);
    box-shadow: 0 0 9px #fff2ae, 0 0 19px #ff6a00, 0 0 32px var(--fireball-glow);
    animation: fireballFlicker 0.1s steps(2, end) infinite alternate;
}

.fireball-projectile::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 50%;
    right: 8px;
    width: 72px;
    height: 18px;
    transform: translateY(-50%);
    border-radius: 50% 0 0 50%;
    background: linear-gradient(90deg, transparent, var(--fireball-glow) 35%, #ff8a00 76%, #fff2ae);
    filter: blur(5px);
    opacity: 1;
    background-size: 200% 100%;
    animation: fireballTrailFlow 0.24s linear infinite;
}

.confetti-npc {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100012;
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    pointer-events: none;
    will-change: transform;
}

.confetti-npc img {
    position: relative;
    z-index: 1;
    width: 68px;
    height: 68px;
    object-fit: contain;
    filter:
        drop-shadow(0 0 5px #ffffff)
        drop-shadow(0 0 12px var(--confetti-glow))
        drop-shadow(0 0 20px #67e8f9);
    animation: confettiNpcFloat 1.2s ease-in-out infinite alternate;
}

.confetti-npc-aura {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        transparent 0 8%,
        var(--confetti-glow) 15%,
        #f472b6 28%,
        transparent 39% 48%,
        #67e8f9 59%,
        #93c5fd 71%,
        transparent 84% 100%
    );
    filter: blur(9px);
    opacity: 0.8;
    animation: confettiNpcAura 2.4s linear infinite;
}

.confetti-npc-sparkle {
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 24% 28%, rgba(244, 114, 182, 0.8), transparent 25%),
        radial-gradient(circle at 76% 35%, rgba(103, 232, 249, 0.85), transparent 28%),
        radial-gradient(circle at 48% 82%, rgba(192, 132, 252, 0.8), transparent 34%);
    filter: blur(7px);
    mix-blend-mode: screen;
    animation: confettiNpcSparkle 1s ease-in-out infinite alternate;
}

.confetti-npc-trail {
    position: fixed;
    z-index: 100011;
    pointer-events: none;
    font-size: 18px;
    line-height: 1;
    text-shadow: 0 0 7px currentColor, 0 0 15px currentColor;
    animation: confettiNpcTrailFade 650ms ease-out forwards;
}

.confetti-bomb-projectile {
    position: fixed;
    top: -12px;
    left: -12px;
    z-index: 100013;
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    pointer-events: none;
    will-change: transform;
    background: radial-gradient(circle at 35% 30%, #ffffff 0 7%, #f9a8d4 15%, #a855f7 48%, #312e81 78%);
    box-shadow:
        0 0 7px #ffffff,
        0 0 15px #f472b6,
        0 0 25px #67e8f9;
}

.confetti-bomb-projectile::before {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(103, 232, 249, 0.9);
    border-radius: 50%;
    box-shadow: 0 0 8px #c084fc, inset 0 0 7px #f472b6;
    animation: confettiBombRing 750ms ease-in-out infinite alternate;
}

.confetti-bomb-projectile span {
    position: absolute;
    width: 5px;
    height: 5px;
    border-radius: 1px;
    box-shadow: 0 0 6px currentColor;
}

.confetti-bomb-projectile span:nth-child(1) {
    top: -4px;
    left: 7px;
    color: #f472b6;
    background: currentColor;
}

.confetti-bomb-projectile span:nth-child(2) {
    top: 5px;
    right: -4px;
    color: #67e8f9;
    background: currentColor;
}

.confetti-bomb-projectile span:nth-child(3) {
    bottom: -3px;
    left: 5px;
    color: #c084fc;
    background: currentColor;
}

.confetti-bomb-projectile span:nth-child(4) {
    top: 4px;
    left: -4px;
    color: #93c5fd;
    background: currentColor;
}

@keyframes fireDemonHover {
    from { margin-top: -5px; }
    to { margin-top: 5px; }
}

@keyframes fireDemonFlicker {
    from { filter: drop-shadow(0 0 5px #fff3b0) drop-shadow(0 0 11px var(--demon-glow)); }
    to { filter: drop-shadow(0 0 9px #ffffff) drop-shadow(0 0 20px var(--demon-glow)) drop-shadow(0 0 30px #ff6a00); }
}

@keyframes fireDemonAura {
    to { transform: rotate(360deg) scale(1.16); }
}

@keyframes fireDemonFlare {
    from { transform: scale(0.96) rotate(-3deg); }
    to { transform: scale(1.08) rotate(3deg); }
}

@keyframes fireDemonFlameFlow {
    from { opacity: 0.7; transform: scale(0.88) rotate(-8deg); }
    to { opacity: 1; transform: scale(1.15) rotate(8deg); }
}

@keyframes fireDemonTrailFade {
    from { opacity: 0.95; transform: translate3d(0, 0, 0) scale(1); }
    to { opacity: 0; transform: translate3d(calc(-18px + var(--trail-drift)), -12px, 0) scale(0.15); }
}

@keyframes fireballFlicker {
    from { filter: brightness(0.85) saturate(1.1); }
    to { filter: brightness(1.5) saturate(1.6); }
}

@keyframes confettiNpcFloat {
    from { transform: translateY(-3px) scale(0.97); }
    to { transform: translateY(3px) scale(1.04); }
}

@keyframes confettiNpcAura {
    to { transform: rotate(360deg) scale(1.12); }
}

@keyframes confettiNpcSparkle {
    from { opacity: 0.45; transform: scale(0.9); }
    to { opacity: 0.95; transform: scale(1.08); }
}

@keyframes confettiNpcTrailFade {
    from { opacity: 0.95; transform: translate3d(0, 0, 0) scale(1); }
    to { opacity: 0; transform: translate3d(-18px, -10px, 0) scale(0.2); }
}

@keyframes confettiBombRing {
    from { transform: scale(0.85); opacity: 0.55; }
    to { transform: scale(1.2); opacity: 1; }
}

@keyframes fireballTrailFlow {
    from { background-position: 100% 50%; opacity: 0.72; }
    to { background-position: 0 50%; opacity: 1; }
}

.retro-powerup {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    background: rgba(10, 10, 15, 0.9);
    border: 2px solid #555;
    border-radius: 4px;
    font-family: monospace;
    font-size: 11px;
    color: #ffffff; /* <--- Forces all power-up text to be bright white by default */
    z-index: 50;
    pointer-events: none;
    animation: powerupFloat 2s ease-in-out infinite alternate;
}

/* Optional: Make the text match the neon glow of each individual box type */
.retro-powerup.fighter-powerup { color: #00ffff; }
.retro-powerup.tornado-powerup { color: #cc00ff; }
.retro-powerup.bomb-powerup { color: #ff9900; }
.retro-powerup.extra-life { color: #d946ef; }
.retro-powerup.health-potion { color: #00ff66; }
.retro-powerup.energy-cell { color: #ffd700; }

/* Floating icon-only collectibles */
.retro-powerup {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    box-shadow: none;
    font-size: 30px;
    z-index: 998;
    animation: powerupFloat 1.8s ease-in-out infinite alternate, powerupGlow 1.1s ease-in-out infinite alternate;
}

.retro-powerup img {
    width: 36px !important;
    height: 36px !important;
    object-fit: contain;
}

.retro-powerup::before,
.retro-powerup::after {
    position: absolute;
    color: currentColor;
    pointer-events: none;
    text-shadow: 0 0 5px currentColor, 0 0 10px currentColor;
    animation: powerupSparkle 1.2s ease-in-out infinite;
}

.retro-powerup::before {
    content: "✦";
    top: -5px;
    right: -2px;
    font-size: 13px;
}

.retro-powerup::after {
    content: "✧";
    bottom: 0;
    left: -4px;
    font-size: 11px;
    animation-delay: 0.55s;
}

.retro-powerup.fighter-powerup { color: #22d3ee; }
.retro-powerup.tornado-powerup { color: #c084fc; }
.retro-powerup.bomb-powerup { color: #fb923c; }
.retro-powerup.extra-life { color: #f0abfc; }
.retro-powerup.health-potion { color: #7cfc00; }
.retro-powerup.energy-cell { color: #fde047; }
.retro-powerup.time-fracture { color: #c084fc; }
.retro-powerup.time-forward { color: #fb923c; }

@keyframes powerupGlow {
    from { filter: drop-shadow(0 0 5px currentColor) drop-shadow(0 0 9px currentColor); }
    to { filter: drop-shadow(0 0 10px currentColor) drop-shadow(0 0 17px currentColor); }
}

@keyframes powerupSparkle {
    0%, 100% { opacity: 0.35; transform: scale(0.65) rotate(0deg); }
    50% { opacity: 1; transform: scale(1.2) rotate(35deg); }
}

/* Neon slime-green VOID button with an animated static halo */
.start-btn {
    position: relative;
    isolation: isolate;
    border-color: #a855f7;
    box-shadow: 0 0 8px rgba(168, 85, 247, 0.55), 0 0 16px rgba(168, 85, 247, 0.25);
}

.start-btn:hover,
.start-btn:active,
.start-btn.is-open,
.start-btn:focus-visible {
    background: #7cfc00;
    border-color: #b7ff4a;
    color: #102000;
    box-shadow: 0 0 8px #7cfc00, 0 0 18px rgba(124, 252, 0, 0.8), inset 0 0 10px rgba(217, 255, 166, 0.65);
}

.start-btn::before,
.start-btn::after {
    content: "";
    position: absolute;
    pointer-events: none;
    opacity: 0;
}

.start-btn::before {
    inset: -4px;
    border: 1px dashed rgba(192, 132, 252, 0.95);
    box-shadow: 0 0 8px #a855f7, inset 0 0 5px rgba(168, 85, 247, 0.55);
    opacity: 0.65;
    animation: void-neon-static 0.32s steps(2, end) infinite;
}

.start-btn::after {
    inset: -8px;
    background:
        radial-gradient(circle at 2% 25%, #e9d5ff 0 1px, transparent 2px),
        radial-gradient(circle at 96% 18%, #a855f7 0 1px, transparent 2px),
        radial-gradient(circle at 8% 88%, #c084fc 0 1px, transparent 2px),
        radial-gradient(circle at 92% 78%, #e9d5ff 0 1px, transparent 2px),
        radial-gradient(circle at 48% 0%, #a855f7 0 1px, transparent 2px),
        radial-gradient(circle at 66% 100%, #c084fc 0 1px, transparent 2px);
    opacity: 0.8;
    animation: void-neon-static 0.32s steps(2, end) infinite;
}

.start-btn:hover::before,
.start-btn:hover::after,
.start-btn:active::before,
.start-btn:active::after,
.start-btn.is-open::before,
.start-btn.is-open::after,
.start-btn:focus-visible::before,
.start-btn:focus-visible::after {
    opacity: 1;
    animation: void-neon-static 0.32s steps(2, end) infinite;
}

.start-btn:hover::before,
.start-btn:active::before,
.start-btn.is-open::before,
.start-btn:focus-visible::before {
    border-color: rgba(183, 255, 74, 0.95);
    box-shadow: 0 0 8px #7cfc00, inset 0 0 5px rgba(124, 252, 0, 0.55);
}

.start-btn:hover::after,
.start-btn:active::after,
.start-btn.is-open::after,
.start-btn:focus-visible::after {
    background:
        radial-gradient(circle at 2% 25%, #e1ffad 0 1px, transparent 2px),
        radial-gradient(circle at 96% 18%, #7cfc00 0 1px, transparent 2px),
        radial-gradient(circle at 8% 88%, #b7ff4a 0 1px, transparent 2px),
        radial-gradient(circle at 92% 78%, #e1ffad 0 1px, transparent 2px),
        radial-gradient(circle at 48% 0%, #7cfc00 0 1px, transparent 2px),
        radial-gradient(circle at 66% 100%, #b7ff4a 0 1px, transparent 2px);
}

@keyframes void-neon-static {
    0% { transform: translate(0, 0); background-position: 0 0, 0 0, 0 0, 0 0, 0 0, 0 0; }
    50% { transform: translate(1px, -1px); background-position: 2px -1px, -1px 2px, 1px 2px, -2px -1px, 1px -2px, -1px 1px; }
    100% { transform: translate(-1px, 1px); background-position: -1px 2px, 2px -1px, -2px 1px, 1px 2px, -1px 1px, 2px -2px; }
}