
    
    html, body, h3 {
        margin: 0;
        padding: 0;
        height: 100%;
        overflow: hidden;
        font-family: "Nunito Sans", sans-serif;
    }

    #viewport-container {
        width: 100vw;
        height: 100vh;
        overflow-x: auto;
        overflow-y: hidden;
    }

    #visor {
        display: block;
    }

    #logos-institucionals {
        position: fixed;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        height: auto;
        z-index: 9999;
        pointer-events: none;
    }

    #popup {
        position: fixed;
        top: 0;
        right: 0;
        width: 420px;
        height: 100vh;
        background: white;
        border-radius: 0;
        padding: 20px;
        box-sizing: border-box;
        z-index: 9999;
        transform: translateX(100%);
        transition: transform 0.5s ease;
        overflow-y: auto;
    }

    #popup.popup-visible {
        transform: translateX(0);
    }

    #popup.popup-hidden {
        transform: translateX(100%);
    }

    #popup.popup-autoctona {
        background-color: #809C4B;
        border: 2px solid #3C5829;

        .popup-close {
            color: #3C5829;
        }
        .categoria {
            color: #3C5829;
            font-weight: bold;
            margin: 0;
        }

        .label {
            color: #3C5829;
        }
    }

    #popup.popup-migratoria {
        background-color: #e6b400;
        border: 2px solid #6f5700;

        .popup-close {
            color: #6f5700;
        }
        .categoria {
            color: #6f5700;
            font-weight: bold;
            margin: 0;
        }

        .label {
            color: #6f5700;
        }

        #popup-categoria {
            display: none;
        }
    }

    #popup.popup-invasora {
        background-color: #8f0000;
        border: 2px solid #c80000;

        .popup-close {
            color: #ffa1a1;
        }
        .categoria {
            color: #ffa1a1;
            font-weight: bold;
            margin: 0;
        }

        .label {
            color: #ffa1a1;
        }

        #popup-categoria {
            display: none;
        }
    }

    .popup-close {
        align-self: center;
        text-align: right;
        margin-right: 40px;
        font-size: 60px;
        font-weight: 100;
        font-weight: bold;
        cursor: pointer;
    }

    .popup-hidden {
        display: none;
    }

    .imatge-popup {
        max-width: 100%;
    }

    .galeria-img {
        height: 100vh;
        width: auto;
        display: block;
    }
    .animal-wrapper {
        position: absolute;
        width: auto;
        aspect-ratio: 1 / 1;
        display: flex;
        justify-content: center;
        align-items: center;
        border-radius: 50%;
        transition: transform 0.3s, background-color 0.3s;
    }

    .animal-wrapper.active {
        border-radius: 50%;
        transform: scale(1.15);
    }

    .animal-wrapper.active.autoctona {
        background-color: rgba(0, 180, 0, 0.6);
    }
    .animal-wrapper.active.migratoria {
        background-color: rgba(240, 200, 0, 0.6);
    }
    .animal-wrapper.active.invasora {
        background-color: rgba(255, 0, 0, 0.6);
    }

    .animal {
        width: 100%;
        height: auto;
        pointer-events: none;
    }

    .popup-header {
        margin-left: 15px;
    }

    .nom-animal {
        font-size: 24px;
        font-weight: bold;
        color: #F2E7D0;
    }

    #nom-en-llati {
        font-style: italic;
    }

    .popup-info {
        margin-top: 10px;
        display: grid;
        border-radius: 6px;
    }

    .popup-info .row {
        display: grid;
        grid-template-columns: 130px 1fr;
        background: rgba(255,255,255,0.3);
        border-radius: 0px;
        border-bottom: 1px solid black;
    }
    .popup-info .row:last-child {
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
    }
    .popup-info .row:last-child {
        border-bottom: none;
    }

    .popup-info .label {
        font-weight: bold;
        margin: 10px 10px 10px 15px;
    }

    .popup-info .value {
        padding: 10px 10px 10px 15px;
    }
    .popup-info .row .value {
        text-align: left;
        background-color: #F2E7D0;
        border-radius: 0px;
    }
    .popup-info .row:last-child {
        border-bottom-left-radius: 30px;
    }
    .popup-info .row:last-child .value {
        border-bottom-right-radius: 30px;
    }

    .popup.autoctona {
        background: rgba(0, 180, 0, 0.6);
    }
    .popup.migratoria {
        background: rgba(240, 200, 0, 0.6);
    }
    .popup.invasora {
        background: rgba(255, 0, 0, 0.6);
    }

    .scroll-zone {
        position: fixed;
        top: 0;
        width: 80px;
        height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        pointer-events: none;
        font-size: 40px;
        color: white;
        opacity: 0;
        transition: opacity .2s;
        z-index: 9998;
        font-weight: bold;
        user-select: none;
    }

    #scroll-left {
        left: 0;
        background: linear-gradient(to right, rgba(0,0,0,0.3), transparent);
    }

    #scroll-right {
        right: 0;
        background: linear-gradient(to left, rgba(0,0,0,0.3), transparent);
    }

    @media (max-width: 1000px) {
        #logos-institucionals {
            left: 0;
            right: 0;
            bottom: 0;
            width: 100%;
            max-width: none;
            padding: 8px 12px;
            box-sizing: border-box;
        }
        .imatge-popup {
            max-height: 200px;
            width: auto;
        }
    }

    @media (max-width: 900px) {
        .scroll-zone {
            display: none;
        }

        #popup {
            width: 100vw;
            height: 100dvh;
            right: 0;
            border-radius: 0;
            padding: 20px;
            transform: translateX(100%);
        }

        #popup.popup-visible {
            transform: translateX(0);
    }

    @media (max-width: 900px) and (orientation: landscape) {
        #popup {
            width: 60vw;
            height: 100dvh;
        }
        
    }
}