
/* FORCE RESET: MAP STYLES */

/* Ensure container establishes a stacking context */
.map-container {
    position: relative;
    z-index: 1;
    background: #1a1a2e; /* Fallback */
}

/* Background at bottom */
.map-background {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0; /* Lowest */
    opacity: 0.8;
}

/* Nodes Container on top of background */
.map-nodes-container {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 10; /* Above background */
    pointer-events: none; /* Let clicks pass to background if hitting empty space */
}

/* Map Node - The "Bubble" */
.map-node {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #fff; /* Solid white base */
    border: 4px solid #333;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    z-index: 20; /* High z-index */
    pointer-events: auto; /* Re-enable clicks */
    transform: translate(-50%, -50%); /* Center on coordinate */
}

/* Ensure icons are visible */
.node-icon {
    z-index: 2;
    position: relative;
}

/* Completed nodes - Hidden */
.map-node.completed {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

/* Label Bubble */
.node-label {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #000;
    color: #ffd700;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: bold;
    border: 2px solid #ffd700;
    white-space: nowrap;
    z-index: 30; /* Above node */
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    display: block !important;
    opacity: 1 !important;
}

/* Range/Scope Animation (The "Bubble" effect) */
.map-node::after {
    content: '';
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    border: 2px dashed rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: bubble-pulse 2s infinite;
    z-index: -1;
}

@keyframes bubble-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.2); opacity: 0.3; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* Fix Random Nodes */
.map-node.random {
    background-color: #e8f5e9;
    border-color: #2e7d32;
}
.map-node.random .node-label {
    background: #2e7d32;
    color: #fff;
    border-color: #fff;
}

/* Fix Fixed Nodes */
.map-node.fixed {
    background-color: #fffde7;
    border-color: #fbc02d;
}

/* Fix Portal Nodes */
.map-node.portal {
    background-color: #f3e5f5;
    border-color: #7b1fa2;
}
