body {
    background: radial-gradient(circle at center, #1a2a6c, #b21f1f, #fdbb2d);
    background-size: 400% 400%;
    animation: gradientBG 15s ease infinite;
    color: white;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    overflow-x: hidden; /* Evita lo spostamento laterale */
    overflow-y: hidden; /* Bloccato di base su PC, ma sbloccato sotto su mobile */
}

@keyframes gradientBG {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 25px;
    padding: 40px;
    text-align: center;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

#box-indizio {
    font-size: 24px;
    line-height: 1.6;
    min-height: 150px;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-out { opacity: 0; transform: translateY(-20px); }
.fade-in { opacity: 1; transform: translateY(0); }

/* --- AGGIORNAMENTO PUNTO 3: TIMER DINAMICO --- */

.timer-bar {
    width: 100%;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin-top: 25px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.timer-fill {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #00ff88, #00ffee);
    box-shadow: 0 0 15px #00ff88;
    border-radius: 10px;
    transition: width linear, background 0.5s ease, box-shadow 0.5s ease;
}

.timer-warning {
    background: linear-gradient(90deg, #f39c12, #f1c40f) !important;
    box-shadow: 0 0 20px #f39c12 !important;
}

.timer-critical {
    background: linear-gradient(90deg, #ff4b2b, #ff416c) !important;
    box-shadow: 0 0 25px #ff4b2b !important;
    animation: pulseGlow 0.5s infinite alternate;
}

@keyframes pulseGlow {
    from { 
        opacity: 0.8; 
        filter: brightness(1);
    }
    to { 
        opacity: 1; 
        filter: brightness(1.5);
        transform: scaleY(1.2);
    }
}

.btn-modern {
    background: linear-gradient(45deg, #00dbde, #fc00ff);
    border: none;
    padding: 15px 30px;
    color: white;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.btn-modern:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,219,222,0.4);
}

.btn-modern:active {
    transform: scale(0.95);
    filter: brightness(1.2);
}

.input-modern {
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.1);
    color: white;
    width: 80%;
    margin-bottom: 10px;
}

/* --- OTTIMIZZAZIONE SPECIFICA PER TELEFONINI (SCHERMI PICCOLI) --- */
@media (max-width: 600px) {
    body {
        overflow-y: auto !important; 
        height: auto !important;
        min-height: 100vh;
        padding: 20px 0;
    }

    .glass-card {
        width: 92% !important;
        padding: 20px !important;
        margin: auto;
    }

    #msg-conferma-identikit h2 {
        font-size: 1.5rem !important; /* Leggermente più piccolo per sicurezza */
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    #msg-conferma-identikit h3 {
        font-size: 1.1rem !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    #msg-conferma-identikit, 
    .grid-opzioni,
    .btn-opzione {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
}