/* Importiamo un font professionale */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

body {
    font-family: 'Roboto', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    background-color: #eef2f5;
    color: #333;
}

.game-container {
    text-align: center;
    background: #ffffff;
    padding: 50px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 700px;
}

h1 {
    font-size: 2.2em;
    color: #4a6783;
    margin-bottom: 20px;
}

/* Animazione per la schermata di presentazione */
#intro-screen h1, #intro-screen p, #intro-screen button {
    animation: fadeInSlideUp 1s ease-out;
}

#intro-screen h1 { animation-delay: 0.2s; }
#intro-screen p:nth-of-type(1) { animation-delay: 0.4s; }
#intro-screen p:nth-of-type(2) { animation-delay: 0.6s; }
#intro-screen p:nth-of-type(3) { animation-delay: 0.8s; }
#intro-screen p:nth-of-type(4) { animation-delay: 1.0s; }
#intro-screen button { animation-delay: 1.2s; }

@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stili per le schermate */
.hidden {
    display: none;
}

/* Stile per i pulsanti */
button {
    font-family: 'Roboto', sans-serif;
    padding: 12px 30px;
    font-size: 1em;
    cursor: pointer;
    border: none;
    border-radius: 5px;
    background-color: #5b7996;
    color: white;
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #4a6783;
}

/* Migliore visibilità per il punteggio e la barra di progresso */
.progress-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

#score-display {
    font-size: 2em;
    font-weight: 700;
    color: #5b7996;
    margin-bottom: 10px;
}

#progress-bar-container {
    width: 80%;
    height: 10px;
    background-color: #ddd;
    border-radius: 5px;
    overflow: hidden;
}

#progress-bar {
    height: 100%;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.5s ease;
}

/* Affermazione in movimento */
.statement-area {
    min-height: 250px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin-bottom: 30px;
}

#statement {
    background: #f0f4f7;
    color: #4a6783;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #cdd5df;
    cursor: grab;
    width: 80%;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    font-size: 1em;
    position: absolute;
    top: 0;
    transition: transform 0.2s ease, opacity 0.5s ease;
    animation: drop 6s linear forwards;
}

#statement:active {
    cursor: grabbing;
}

/* Animazione di caduta */
@keyframes drop {
    0% { transform: translateY(0); }
    100% { transform: translateY(220px); }
}

/* Zone di rilascio */
.drop-zones {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 30px;
}

.drop-zone {
    width: calc(33.33% - 10px);
    padding: 40px 10px;
    border-radius: 5px;
    border: 2px dashed #92a2b2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.2em;
    color: #5b7996;
    cursor: default;
    background-color: #f8f8f8;
    transition: all 0.2s ease;
}

#true-zone {
    border-color: #4CAF50;
    color: #4CAF50;
}

#false-zone {
    border-color: #F44336;
    color: #F44336;
}

#trash-zone {
    border-color: #999;
    color: #555;
}

.drop-zone.over {
    border-color: #2196F3;
    background-color: #e3f2fd;
}

/* Messaggi di feedback */
#feedback-message {
    margin-top: 20px;
    font-weight: bold;
    min-height: 20px;
    font-size: 1.2em;
    animation: pulse 0.5s ease-in-out;
}

/* Animazione di "pulsazione" per il feedback */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* 1. Stile per la scritta di istruzione in alto */
.instruction-text {
    font-size: 1.1em;
    font-weight: 700;
    color: #4a6783;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    background: #f0f4f7;
    padding: 5px 15px;
    border-radius: 20px;
    display: inline-block;
}

/* 2. Stile per l'area controlli e il tasto Ferma */
.controls-area {
    margin-bottom: 20px;
}

#pause-button {
    background-color: #f39c12; /* Un bell'arancione per la pausa */
    margin-top: 0; /* Rimuoviamo il margine superiore standard */
    min-width: 120px;
}

#pause-button:hover {
    background-color: #e67e22;
}

/* 3. La classe per bloccare l'animazione */
.paused-animation {
    animation-play-state: paused !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}