body {
    margin: 0;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: #111;
    color: #fff;
}

canvas {
    display: block;
}

#info-panel {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 450px; /* Further increased width for testing */
    max-width: 90%; /* Ensure it doesn't overflow small screens, but allows wider */
    max-height: 90vh;
    background-color: rgba(0, 0, 0, 0.8);
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
    transition: opacity 0.3s, visibility 0.3s;
}

#info-panel.hidden {
    opacity: 0;
    visibility: hidden;
}

#info-panel h2 {
    margin-top: 0;
    color: #00aaff;
}

#close-panel-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

#node-image-container img {
    width: 100%;
    border-radius: 5px;
    margin-top: 10px;
}

#loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 24px;
    color: #fff;
}

#hover-label {
    position: fixed; /* Changed to fixed to ensure it's relative to viewport */
    top: 10px; /* Adjusted top position */
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.75); /* Slightly more opaque */
    color: #fff;
    padding: 10px 18px; /* Slightly adjusted padding */
    border-radius: 5px;
    font-size: 16px;
    pointer-events: none; /* So it doesn't interfere with mouse events on the canvas */
    z-index: 1000; /* Ensure it's on top */
    transition: opacity 0.2s, visibility 0.2s;
}

#hover-label.hidden {
    opacity: 0;
    visibility: hidden;
}
