/* Impostazioni Generali */
body {
    font-family: Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    transition: background-color 1s ease, color 1s ease;
}

#quiz-container {
    max-width: 400px;
    padding: 20px;
    border: 2px solid #333;
    background: #1e1e1e;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin: 0 auto; /* Mantiene il centramento del contenitore */
    transition: background 1s ease;
}

#quiz-container h1,
#quiz-container p,
#quiz-container button {
    text-align: center;
    display: block;
    margin: 0 auto;
}

/* Stato Blu (Pre-attacco) */
body.blue-mode {
    background-color: #001f3f;
    color: #e0e0e0;
}

#quiz-container.blue-mode {
    background-color: #002a5c;
    border-color: #00509e;
}

h1 {
    font-size: 28px;
    font-weight: bold;
    color: #007bff;
    text-align: center;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #007bff;
    margin-bottom: 30px; /* Più spazio sotto il titolo */
}

h1.red-mode {
    color: #ff3e3e;
    border-bottom: 2px solid #ff3e3e; /* Cambia colore del bordo inferiore */
}

button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px 24px;
    margin: 10px 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    background-color: #0056b3;
    box-shadow: 0 6px 12px rgba(0, 86, 179, 0.3);
    transform: translateY(-2px);
}

/* Stato Rosso (Durante l'attacco) */
body.red-mode {
    background-color: #3f0000;
    color: #ffcccc;
}

#quiz-container.red-mode {
    background-color: #5c0000;
    border-color: #ff3e3e;
}

h1.red-mode {
    color: #ff3e3e;
}

button.red-mode {
    background-color: #ff3e3e;
}

button.red-mode:hover {
    background-color: #b30000;
}

/* Barra di Progresso */
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #333;
    border-radius: 4px;
    margin-top: 20px;
    overflow: hidden;
    position: relative;
    margin-bottom: 20px; /* Spazio tra la progress bar e il messaggio */

}

.progress-bar.progress-active::before {
    content: "";
    position: absolute;
    width: 0;
    height: 100%;
    background-color: #f44336;
    animation: load 5s linear forwards;
}

@keyframes load {
    from { width: 0; }
    to { width: 100%; }
}

/* Logo */
.logo {
    width: 200px;
    margin: 0 auto;
    display: block;
}

/* Messaggio di Riscatto */
#ransom-message {
    color: #ff3e3e;
    font-size: 20px;
    font-weight: bold;
    margin-top: 20px; /* Spazio tra la barra di avanzamento e il messaggio */
    margin-bottom: 20px !important; /* Spazio tra il messaggio e il pulsante Risolvi Ora */
    animation: flicker 1s infinite alternate;
    text-align: center;
}

#attack-message, #ransom-message {
    margin-bottom: 15px;
}

#attack-section {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centra gli elementi */
    gap: 20px; /* Spazio tra gli elementi all'interno */
}


@keyframes flicker {
    0% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Effetto di Tremolio */
#quiz-container.shake {
    animation: shake 0.5s;
    animation-iteration-count: 10;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-10px); }
    40%, 80% { transform: translateX(10px); }
}

/* Stile delle Finestre Popup */
.alert-box {
    display: none;
    background-color: #2b2b2b;
    color: #ff3e3e;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
    margin-top: 10px;
    font-size: 14px;
}

#question-section .question-number {
    font-size: 18px;
    color: #fff;
    margin: 0;
    text-align: center;
}

#question-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #031f3f; /* Colore di sfondo aggiornato */
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto 40px auto; /* Margine inferiore maggiore per spazio */
}

#question-section .question-text {
    font-size: 20px;
    color: #ffffff; /* Testo bianco */
    font-weight: bold; /* Grassetto solo per il testo della domanda */
    text-align: center;
    padding: 15px;
    width: 100%;
    border-bottom: 2px solid #007bff; /* Separatore blu per la domanda */
    margin-bottom: 20px; /* Spazio tra domanda e risposte */
}

#question-section p {
    font-size: 18px;
    color: #333;
    text-align: center;
    margin: 0;
    padding: 15px 0;
}

#question-section button {
    width: 90%;
    max-width: 300px;
    margin: 10px auto; /* Spaziatura uniforme per i pulsanti */
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
    transition: background-color 0.3s, transform 0.2s;
}

#question-section button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

#question-section p + button {
    margin-top: 20px; /* Spazio tra domanda e i pulsanti delle risposte */
}

#question-selection {
    background-color: #00509e; /* Colore di sfondo aggiornato */
    padding: 20px;
    border-radius: 8px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#question-selection button {
    width: 90%;
    max-width: 300px;
    margin: 10px auto; /* Spaziatura uniforme per i pulsanti */
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
    transition: background-color 0.3s, transform 0.2s;
}

#question-selection button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}
/* Popup di Protezione */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.popup-content {
    background: #000;
    padding: 20px;
    text-align: center;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.popup h2 {
    color: #f44336;
    margin-bottom: 20px;
}

.popup-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Pulsante Risolvi Ora */
#resolve-button {
    background-color: #28a745;
    color: #fff;
    padding: 12px 60px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.2);
    margin-top: 40px; !important; /* Margine separatore tra bottone e elemento precedente */
    transition: background-color 0.3s, transform 0.2s;
}

#resolve-button:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

/* Pulsante Scopri di più nel Popup */
.popup-content button {
    background-color: #007bff;
    color: #fff;
    border: none;
    padding: 10px 20px;
    margin-top: 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.popup-content button:hover {
    background-color: #0056b3;
}

#alert-container {
    margin-top: 20px;
}

/* Stile per il titolo durante il messaggio di avvertimento */
.warning-message {
    font-size: 24px;
    font-weight: bold;
    color: #ff3e3e;
    text-align: center;
    margin: 0;
    padding: 15px;
    border-bottom: none; /* Rimuove la riga sotto */
}

/* Modalità rossa per il question-section senza sfondo */
.red-mode #question-section {
    background-color: transparent !important; /* Rimuove il background */
}

/* Effetto di Glitch Intenso */
.glitch-intense {
    animation: glitch-intense 0.1s infinite;
    color: #ff3e3e;
    position: relative;
}

@keyframes glitch-intense {
    0% {
        clip-path: inset(0 0 20% 0);
        transform: translate(0, 0);
    }
    10% {
        clip-path: inset(20% 0 10% 0);
        transform: translate(-5px, 5px) skew(5deg);
    }
    20% {
        clip-path: inset(10% 0 30% 0);
        transform: translate(5px, -5px) skew(-5deg);
    }
    30% {
        clip-path: inset(30% 0 0 0);
        transform: translate(-5px, 5px) skew(5deg);
    }
    40% {
        clip-path: inset(0 0 40% 0);
        transform: translate(5px, -5px) skew(-5deg);
    }
    50% {
        clip-path: inset(0 0 10% 0);
        transform: translate(-5px, 5px) skew(5deg);
    }
    60% {
        clip-path: inset(40% 0 0 0);
        transform: translate(5px, -5px) skew(-5deg);
    }
    70% {
        clip-path: inset(0 0 20% 0);
        transform: translate(-5px, 5px) skew(5deg);
    }
    80% {
        clip-path: inset(30% 0 10% 0);
        transform: translate(5px, -5px) skew(-5deg);
    }
    90% {
        clip-path: inset(10% 0 0 0);
        transform: translate(-5px, 5px) skew(5deg);
    }
    100% {
        clip-path: inset(0 0 40% 0);
        transform: translate(0, 0);
    }
}

/* Effetto di Glitch Intensivo per il Testo */
.glitch-text {
    color: #ff3e3e;
    font-weight: bold;
    font-size: 2em;
    animation: glitch-text 0.1s infinite alternate;
}

@keyframes glitch-text {
    0% { opacity: 1; transform: translate(0, 0) skew(0deg); }
    20% { opacity: 0; transform: translate(-5px, 5px) skew(-5deg); }
    40% { opacity: 1; transform: translate(5px, -5px) skew(5deg); }
    60% { opacity: 0; transform: translate(-5px, -5px) skew(-5deg); }
    80% { opacity: 1; transform: translate(5px, 5px) skew(5deg); }
    100% { opacity: 0; transform: translate(0, 0) skew(0deg); }
}

/* Schermata Nera Intermittente */
.blackout {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    opacity: 0;
    z-index: 9999;
    animation: blackout 0.1s infinite alternate;
}

@keyframes blackout {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.8; }
}

/* Distorsione di Linee e Blocchi */
.glitch-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(
        0deg,
        rgba(255, 255, 255, 0.1),
        rgba(255, 255, 255, 0.1) 2px,
        transparent 2px,
        transparent 4px
    );
    z-index: 1000;
    opacity: 0;
    animation: glitch-lines 0.1s infinite alternate;
}

@keyframes glitch-lines {
    0%, 100% { opacity: 0; }
    50% { opacity: 0.3; }
}



