/* ═══════════════════════════════════════════════════════════════
   REALITY FRACTURE — Interactive Fracture Map
   Cosmic navigation interface with nodes and connections
   ═══════════════════════════════════════════════════════════════ */

.fracture-map__viewport {
    position: relative;
    width: 100%;
    height: 500px;
    background: var(--deep);
    border: 1px solid var(--border-ghost);
    overflow: hidden;
}

.fracture-map__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ── Map Nodes ─────────────────────────────────────────────── */
.fracture-map__nodes {
    position: absolute;
    inset: 0;
}

.map-node {
    position: absolute;
    transform: translate(-50%, -50%);
    cursor: none;
    z-index: 5;
}

.map-node__core {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--electric-blue);
    box-shadow: 0 0 8px var(--electric-blue-glow),
                0 0 20px rgba(0, 212, 255, 0.2);
    animation: node-pulse 3s ease-in-out infinite;
    transition: transform var(--duration-fast) var(--ease-out-expo),
                box-shadow var(--duration-fast) ease;
}

.map-node:hover .map-node__core {
    transform: scale(1.5);
    box-shadow: 0 0 12px var(--electric-blue),
                0 0 40px rgba(0, 212, 255, 0.4),
                0 0 80px rgba(0, 212, 255, 0.15);
}

.map-node__ring {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid rgba(0, 212, 255, 0.2);
    transform: translate(-50%, -50%);
    animation: marker-ring-expand 3s ease-out infinite;
}

.map-node__label {
    position: absolute;
    top: -32px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-mono);
    font-size: 0.6rem;
    letter-spacing: 0.2em;
    color: var(--text-dim);
    text-transform: uppercase;
    white-space: nowrap;
    opacity: 0;
    transition: opacity var(--duration-fast) ease,
                color var(--duration-fast) ease;
    pointer-events: none;
}

.map-node:hover .map-node__label {
    opacity: 1;
    color: var(--electric-blue);
}

/* Node variants */
.map-node--primary .map-node__core {
    width: 20px;
    height: 20px;
    background: var(--spectral-cyan);
    box-shadow: 0 0 12px var(--spectral-cyan),
                0 0 30px rgba(6, 255, 208, 0.3);
}

.map-node--warning .map-node__core {
    background: var(--neon-violet);
    box-shadow: 0 0 8px var(--neon-violet-glow),
                0 0 20px rgba(139, 92, 246, 0.3);
}

.map-node--warning .map-node__ring {
    border-color: rgba(139, 92, 246, 0.2);
}

.map-node--danger .map-node__core {
    background: var(--radioactive-lime);
    box-shadow: 0 0 8px var(--radioactive-lime),
                0 0 20px rgba(200, 255, 0, 0.3);
}

.map-node--danger .map-node__ring {
    border-color: rgba(200, 255, 0, 0.2);
}

/* ── Tooltip ───────────────────────────────────────────────── */
.fracture-map__tooltip {
    position: absolute;
    padding: 8px 16px;
    background: rgba(10, 10, 26, 0.95);
    border: 1px solid var(--border-accent);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--electric-blue);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--duration-fast) ease;
    z-index: 10;
    white-space: nowrap;
    backdrop-filter: blur(8px);
}

.fracture-map__tooltip.visible {
    opacity: 1;
}

/* Grid overlay */
.fracture-map__viewport::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 1;
    pointer-events: none;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .fracture-map__viewport {
        height: 350px;
    }
}
