/* --- RESET E IMPOSTAZIONI DI BASE --- */
body { 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    text-align: center; 
    padding: 20px; 
    margin: 0;
    background-color: #f0f2f5; 
    color: #333;
}

h1 {
    color: #0056b3;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

h3 {
    color: #666;
    font-weight: normal;
    margin-bottom: 30px;
    font-size: 1rem;
}

/* --- GRIGLIA CONTENITORE --- */
.multi-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 25px;
    padding: 10px;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- CARD SINGOLA --- */
.card { 
    background: white; 
    padding: 20px; 
    border-radius: 15px; 
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.1); 
    width: 100%;
    max-width: 400px; /* Dimensione ideale per mobile e desktop */
    box-sizing: border-box;
	transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease;
    cursor: default;
}

/* EFFETTO HOVER */
.card:hover {
    transform: translateY(-10px); /* Solleva la card */
    box-shadow: 0 15px 30px rgba(0,0,0,0.15); /* Ombra più profonda */
}

/* Opzionale: un leggero feedback anche sul QR Code */
.card:hover canvas {
    border-color: #0056b3;
    transition: border-color 0.3s ease;
}

/* --- CANVAS (IL QR CODE VISIBILE) --- */
canvas { 
    display: block; 
    margin: 0 auto; 
    width: 100%; 
    max-width: 350px; 
    height: auto !important; 
    aspect-ratio: 1 / 1; /* Fondamentale per bloccare la forma quadrata su Android */
    border: 1px solid #eee; 
    border-radius: 10px; 
    background-color: #fff;
}

/* --- BOTTONE SCARICA --- */
button { 
    margin-top: 20px; 
    padding: 15px 25px; 
    cursor: pointer; 
    background: #0056b3; 
    color: white; 
    border: none; 
    border-radius: 10px; 
    font-weight: bold; 
    font-size: 16px; 
    width: 100%;
    transition: background 0.2s, transform 0.1s;
    -webkit-tap-highlight-color: transparent; /* Toglie il flash blu al tocco su mobile */
}

button:active {
    background: #004494;
    transform: scale(0.98);
}

/* --- TRUCCO PER ANDROID/CHROME --- */
/* NON USARE display: none su questo ID. 
   Se lo nascondi con display:none, Chrome Android non renderizza l'immagine 
   e il canvas finale risulterà bianco o col QR nero di default.
*/
#qrcode-hidden {
    position: fixed;
    top: -5000px; /* Lo buttiamo fuori dallo schermo */
    left: -5000px;
    width: 1000px;
    height: 1000px;
    opacity: 0; /* Invisibile ma "presente" per il browser */
    pointer-events: none;
}

/* Media query per cellulari piccoli */
@media (max-width: 480px) {
    body { padding: 10px; }
    .card { padding: 15px; }
    h1 { font-size: 1.4rem; }
}