/* === Percy Phase 8.3.2 CSS (Neon Glow Bubbles with Blossoming Rings) === */

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #111;
    color: white;
    overflow: hidden;
}

/* === Logic Map & Nodes Container === */
#logic-map {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

#logic-nodes {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    transition: transform 0.2s ease-out;
    will-change: transform;
    display: block;
}

/* === Node Styles (Neon Glow Bubbles) === */
.node {
    position: absolute;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.2s ease, box-shadow 0.2s ease, z-index 0.2s ease, left 0.25s ease, top 0.25s ease;
    white-space: nowrap;
    overflow: hidden;
    padding: 4px 6px;
    min-width: 14px;
    min-height: 14px;
    max-width: 80px;
    max-height: 80px;
    z-index: 1;
    font-size: 0.85rem; /* base size, dynamically scaled by JS */
    user-select: none;

    color: white; /* fallback text */
    background: rgba(0,0,0,0.15); /* translucent bubble center */
    border: 2px solid currentColor; /* neon edge */
    box-shadow: 0 0 12px rgba(255,255,255,0.25), 0 0 32px rgba(255,255,255,0.15); /* glowing aura */
}

/* === Extra Outer Ring (Blossoming Halo) === */
.node::before {
    content: '';
    position: absolute;
    top: -10px; left: -10px; right: -10px; bottom: -10px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    opacity: 0.35;
    box-shadow: 0 0 16px currentColor, 0 0 32px currentColor;
    z-index: 0;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* Node Hover Effects */
.node:hover {
    transform: scale(1.35);
    box-shadow: 0 0 24px currentColor, 0 0 48px currentColor;
    z-index: 100;
}

.node:hover::before {
    transform: scale(1.25);
    opacity: 0.5;
}

/* === Neon Ring Colors (use as text + glow color) === */
.blue-ring      { color: #4A90E2; }
.purple-ring    { color: #CDA4FF; }
.red-ring       { color: #FF6B6B; }
.crimson-ring   { color: #DC143C; }
.gold-ring      { color: #FFD700; }
.neon-pink-ring { color: #FF6EC7; }
.teal-ring      { color: #1DE9B6; }

/* === Tooltip via title attribute === */
.node::after {
    content: attr(title);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.85);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    opacity: 0;
    pointer-events: none;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-width: 220px;
    transition: opacity 0.15s ease-in-out;
    z-index: 1000;
}

.node:hover::after { opacity: 1; }

/* === Console Styling === */
#percy-console {
    position: fixed;
    bottom: 0;
    width: 100%;
    max-height: 180px;
    background: rgba(20,20,20,0.95);
    overflow-y: auto;
    font-size: 0.8rem;
    padding: 4px 8px;
    box-shadow: 0 -3px 10px rgba(0,0,0,0.6);
    z-index: 1000;
}

.console-line { margin: 2px 0; }

/* === Status Message === */
#percy-message {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.6);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    z-index: 1000;
}

/* === Locked / ULT Node Highlight === */
.node.locked {
    border: 2px solid #FFD700;
    box-shadow: 0 0 24px #FFD700, 0 0 48px #FFD700;
}

/* === Zoom-Scaling Helpers === */
#logic-nodes.zoomed .node {
    transition: transform 0.15s ease, font-size 0.15s ease;
}

/* === Responsive Adjustments === */
@media (max-width: 768px) {
    .node { font-size: 10px; min-width: 10px; min-height: 10px; }
    .node::after { font-size: 0.65rem; max-width: 150px; }
}

/* === Extra Helpers for Smooth Ring Layout === */
.node[data-ring] {
    transition: left 0.25s ease, top 0.25s ease, transform 0.25s ease;
}
