

.popup-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 999;
}

.popup-content {
    z-index: 1000;
    display: none;
    background-color: #272727;
    color: rgb(225, 242, 245);
    border: 2px solid rgba(225, 242, 245, 0.5);
    padding: 1.2em;
    border-radius: 0.3em;
    position: fixed;
    max-width: 90vw;        /* Prevent it from going too wide on large screens */
    width: max-content;     /* Fit to content size */
    min-width: 200px;       /* Optional: ensure some readable base size */
    box-sizing: border-box; /* Ensure padding doesn’t break sizing */
    will-change: opacity, transform;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.2);
    line-height: 1.5;
}

button.popup-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ff4d4d;
    color: white;
    border: none;
    font-size: 16px;
    font-weight: bold;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    /*    transition: background 0.2s ease-in-out, transform 0.1s ease-in-out;   */
}

button.popup-close:hover {
    background: #d63031; /* Darker red on hover */
    transform: scale(1.1); /* Slight zoom effect */
}

button.popup-close:active {
    background: #b22222; /* Even darker red when clicked */
    transform: scale(0.95); /* Click effect */
}

@keyframes popup-fade-drop {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.popup-content.active {
    display: block;
    animation: popup-fade-drop 150ms ease-out;
}

@keyframes popup-fade-out {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-5px) scale(0.8);
    }
}

.popup-content.fading-out {
    animation: popup-fade-out 150ms ease-in forwards;
}
