#cats-popup-container {
    display: none; 
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 600px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    z-index: 1000; 
    animation: fadeIn 0.5s ease-in-out;
    height: auto;
}
    #cats-popup-container span {
        text-align: end;
    }
    .difficulty-buttons  {
        margin-bottom: 40px;
        display: flex; 
        justify-content: center; 
        
    }
    .difficulty-buttons button {
        padding: 10px 20px;
        margin: 2px;
        color: black;
        border: 1px solid #ddd;
        background-color: white;
        cursor: pointer;
        transition: background-color 0.3s, color 0.3s;
        font-size: clamp(14px, 2vw, 18px);
        text-align: center; 
        box-sizing: border-box; 
        min-width: 0; 
        font-weight: 400;
        width: 30%;
    }
        .difficulty-buttons button.active {
            background: linear-gradient(160deg, #00d2ff, #3a7bd5);
            border-color: #007bff;
            color: white;
            border: 1px solid #ddd;
        }
        .difficulty-buttons button.active:hover {
            background: linear-gradient(160deg, #00d2ff, #3a7bd5);
        }
        .difficulty-buttons button:hover {
            background-color: #f0f0f0;
        }
    
    #categories-container {
        display: flex;
        align-items: stretch;
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        height: auto;
    }
    #cats-popup-container p {
        font-size: large;
        font-weight: bold;
        margin-top: 20px;
        margin-bottom: 6px;
    }
        .category-div, .all-categories-div {
            flex-grow: 1;
            flex-shrink: 1;
            padding: 10px 20px;
            margin: 2px;
            border: 1px solid #ddd;
            cursor: pointer;
            transition: background-color 0.3s, color 0.3s;
            font-size: clamp(14px, 2vw, 18px);
            text-align: center; 
            box-sizing: border-box; 
            min-width: 0; 
            font-weight: 400;
        }
            .category-div-container > .category-div:last-child, 
            .all-categories-div-container > .all-categories-div:last-child {
                margin-right: 0; 
            }
            .category-div:hover, .all-categories-div:hover {
                background-color: #f0f0f0;
            }
            .category-div.active, .all-categories-div.active {
                background: linear-gradient(160deg, #00d2ff, #3a7bd5);
                color: white;
                border-color: #007bff;
            }
            
#popup-overlay {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 999;
}
#cats-popup-close {
    position: absolute;
    top: 0;
    right: 5px;
    font-size: 24px;
    color: #666;
    cursor: pointer;
}
    @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
    }
        @media (max-height: 740px) {
            #cats-popup-container {
                height: calc(var(--vh, 1vh) * 60);
                overflow-y: scroll; 
            }
        }