/* B"H - VISUAL ENGINE CSS */

.visual-layer {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 50; /* Behind panels, above background */
    overflow: hidden;
}

#canvas-bg, #canvas-ui {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; /* Crucial: Let clicks pass through rain */
}

/* B"H - FIXED COORDINATE SPACE */
.editor-canvas {
    position: fixed; /* Changed from absolute to fixed */
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 100;
}

.minimap-canvas {
    position: absolute;
    top: 0; right: 0;
    width: 100px; height: 100%;
    z-index: 150;
    opacity: 0.8;
    background: rgba(0,0,0,0.2);
    border-left: 1px solid var(--color-border);
    cursor: pointer;
    pointer-events: auto; /* Interactive */
    touch-action: none; /* Prevent browser scrolling on mobile */
}

/* HUD */
.hud-stats {
    position: absolute;
    bottom: 20px;
    right: 120px; /* Left of minimap */
    background: rgba(0, 20, 40, 0.8);
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 8px 12px;
    border-radius: 4px;
    font-family: var(--font-code);
    font-size: 0.8em;
    pointer-events: auto; /* B"H - Fixed: Allow clicks on buttons */
    z-index: 200;
    display: none; /* Hidden by default, toggled via options */
    box-shadow: 0 0 15px var(--glow-cyan);
    backdrop-filter: blur(4px);
    text-shadow: 0 0 5px var(--neon-cyan);
    transition: width 0.2s, min-width 0.2s; 
}

.hud-row {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    line-height: 1.4;
}

/* Graph Nav */
.graph-nav-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 12, 20, 0.95);
    z-index: 30000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}
.graph-nav-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}
#graph-canvas {
    width: 100%; height: 100%;
}
#graph-nav-close {
    position: absolute;
    top: 20px; right: 20px;
    z-index: 30001;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border);
    width: 44px; height: 44px; /* Larger hit target */
}

/* Color Preview Orbs */
.color-orb {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 5px;
    border: 1px solid white;
    box-shadow: 0 0 5px rgba(255,255,255,0.5);
    vertical-align: middle;
    cursor: pointer;
    transition: transform 0.1s;
}
.color-orb:hover {
    transform: scale(1.5);
}

/* Shockwave Animation Class */
.shockwave-active {
    animation: shockwave-pulse 0.1s ease-out;
}
@keyframes shockwave-pulse {
    0% { transform: scale(1); filter: hue-rotate(0deg); }
    50% { transform: scale(1.002); filter: hue-rotate(15deg); }
    100% { transform: scale(1); filter: hue-rotate(0deg); }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .minimap-canvas {
        width: 40px; /* Thinner on mobile */
        opacity: 0.6;
    }
    
    .hud-stats {
        right: 50px; /* Push left */
        bottom: 10px;
        font-size: 0.7em;
        padding: 4px 8px;
    }
    
    .color-orb {
        width: 12px; height: 12px; /* Bigger touch target */
    }
}