body {
    font-family: Helvetica, Arial, sans-serif;
    padding: 0;
    margin: 0;
    background-color: #222;
    overflow: hidden;
    -webkit-user-select: none;
       -moz-user-select: none;
         -o-user-select: none;
        -ms-user-select: none;
            user-select: none;
}

canvas {
    position: absolute;
    top: 0;
    left: 0;
}

.info {
    position: absolute;
    top: 0;
    left: 0;
    padding: 5px 15px;
    color: #eee;
    font-size: 13px;
    background-color: rgba(0, 0, 0, .5);
    z-index: 2;
}

/* ========= OVERLAY PANEL ========= */

.overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 10;
}

.overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
}

.overlay-content {
    position: relative;
    max-width: min(900px, 92vw);
    max-height: min(80vh, 700px);
    padding: 32px 40px;
    border-radius: 18px;
    background: rgba(12, 12, 12, 0.96);
    box-shadow:
        0 18px 55px rgba(0, 0, 0, 0.7),
        0 0 0 1px rgba(255, 255, 255, 0.06);
    color: #f5f5f5;
    overflow: auto;
}

.overlay-close {
    position: absolute;
    top: 14px;
    right: 16px;
    border: none;
    background: transparent;
    color: #aaa;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

.overlay-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

#overlay-title {
    margin: 0 0 12px;
    font-size: 26px;
    letter-spacing: 0.04em;
}

#overlay-body {
    font-size: 15px;
    line-height: 1.6;
    color: #ddd;
}

/* Optional: simple styling for images/text inside overlay */
#overlay-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 12px 0;
}

#overlay-body p {
    margin: 0 0 10px;
}
