/* Reset and general styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none !important; /* Hide cursor globally */
    /* Kiosk Touch Optimizations */
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none;   /* Safari */
    -khtml-user-select: none;    /* Konqueror HTML */
    -moz-user-select: none;      /* Old versions of Firefox */
    -ms-user-select: none;       /* Internet Explorer/Edge */
    user-select: none;           /* Non-prefixed version */
    /* Disable double-tap to zoom */
    touch-action: pan-y; 
}

img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #ff761b; /* Arancione flat come da grafica */
    color: #fff;
    width: 100vw;
    height: 100vh;
    overflow: hidden; /* Hide scrollbars */
    /* Disable pull-to-refresh */
    overscroll-behavior-y: contain;
}

:root {
    /* --- VARIABILI PER LA GESTIONE DEL LAYOUT --- */
    
    /* 1. Altezza del div del titolo */
    --titolo-altezza: 25%;
    
    /* 2. Altezza totale del contenitore che raggruppa i 3 bottoni */
    --bottoni-container-altezza: 75%;
    
    /* 3. Posizione Y dei bottoni rispetto al resto della pagina (margine superiore o negativo) */
    --bottoni-margine-top: 140px;
    
    /* 4. Altezza del singolo contenitore del bottone (33.33% divide l'altezza in 3 parti uguali) */
    --singolo-bottone-altezza: 330px;
    
    /* 5. Spazio tra un bottone e l'altro (margine superiore di ciascun bottone) */
    --singolo-bottone-margine-top: 40px;
    
    /* 6. Dimensione dell'immagine del bottone */
    --bottone-img-altezza: 100%;
    --bottone-img-larghezza-max: 80%;
}

.container {
    display: flex;
    flex-direction: column;
    width: 100vh;
    height: 100vw;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg);
}

/* Title Band */
.title-band {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: var(--titolo-altezza);
    padding: 20px;
}

.title-band img {
    width: 100%;
    object-fit: contain;
}

/* Contenitore dei 3 bottoni */
.buttons-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: var(--bottoni-container-altezza);
    margin-top: var(--bottoni-margine-top);
}

/* Singolo Bottone Container */
.button-band {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: var(--singolo-bottone-altezza);
    margin-top: var(--singolo-bottone-margine-top);
    padding: 0px;
    position: relative;
    cursor: none !important;
    overflow: visible;
    transition: transform 0.1s ease-out, filter 0.2s ease-out;
    animation: floating 4s ease-in-out infinite;
}

.button-band:nth-child(1) { animation-delay: 0s; }
.button-band:nth-child(2) { animation-delay: -1.33s; }
.button-band:nth-child(3) { animation-delay: -2.66s; }

.button-band img {
    width: auto;
    height: var(--bottone-img-altezza);
    max-width: var(--bottone-img-larghezza-max);
    object-fit: contain;
    transform-origin: center;
    z-index: 10;
    position: relative;
}

/* Visual Feedback on Touch (Animation) */
.button-band.active img {
    animation: accentuatedPress 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* --- Particles Animation --- */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1; /* Dietro a tutto il layout */
    opacity: 1;
}

@keyframes floatParticle {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translate(var(--tx), var(--ty)) scale(0);
        opacity: 0;
    }
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0px); }
}

@keyframes accentuatedPress {
    0% {
        transform: scale(1) translateY(0);
        filter: brightness(1);
    }
    30% {
        /* Compressione forte verso l'interno */
        transform: scale(0.75) translateY(12px);
        filter: brightness(1.4);
    }
    60% {
        /* Rimbalzo verso l'esterno */
        transform: scale(1.08) translateY(-6px);
        filter: brightness(1.1);
    }
    85% {
        /* Assestamento */
        transform: scale(0.95) translateY(3px);
    }
    100% {
        /* Ritorno allo stato normale */
        transform: scale(1) translateY(0);
        filter: brightness(1);
    }
}

/* --- Blob Animation --- */
.blob-canvas {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Make canvas larger than the button to allow blob expansion */
    width: 150%;
    height: 150%;
    z-index: 1;
    pointer-events: none; /* Let clicks pass through to the button */
}
