/* RESET E IMPOSTAZIONI BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #ffffff;
    overflow: hidden;
    height: 100vh;
    width: 100vw;
}

.catalogo-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagina {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 1440px;
    max-height: 2560px;
    aspect-ratio: 1440 / 2560;
    overflow: hidden;
    background-color: white;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.contenuto-pagina {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ========== TESTO IMMAGINE ========== */
.testo-link {
    position: absolute;
    bottom: 50px;
    right: 20px;
    font-family: sans-serif;
    font-weight: bold;
    font-size: clamp(14px, 4vw, 24px);
    color: #000000;
    text-shadow: none;
    background: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    z-index: 9999;
    max-width: 80%;
    text-align: right;
    cursor: pointer;
    pointer-events: auto;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
    border-radius: 8px;
}

.testo-link:hover {
    opacity: 0.7;
}

@media (max-width: 768px) {
    .testo-link {
        font-size: 14px;
        padding: 6px 12px;
        white-space: normal;
        text-align: left;
        max-width: 90%;
        bottom: 20px;
        left: 10px;
        pointer-events: auto;
    }
}

/* ========== STILE PER IMMAGINI PIXELATE ========== */
.immagine-random {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #ffffff;
    cursor: pointer;
}

.immagine-random canvas {
    width: 95%;
    height: auto;
    max-width: 95%;
    max-height: 95%;
    display: block;
    image-rendering: crisp-edges;
    image-rendering: pixelated;
    image-rendering: optimize-contrast;
    cursor: pointer;
    z-index: 1;
    position: relative;
}

/* ========== UTILITY ========== */
img, video, button {
    -webkit-tap-highlight-color: transparent;
    outline: none;
}