/* Reset */
body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #000000; /* Nero Totale */
    color: #FFFFFF; /* Scritte Bianche */
    font-family: "Times New Roman", Times, serif;
    overflow: hidden;
}

/* Layout Centrale Assoluto */
#start-screen, #quiz-container, #thank-you-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    height: 100vh;
    width: 100vw;
    padding: 2rem;
    box-sizing: border-box;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 1s ease-in-out, visibility 1s;
}

/* Stati di visibilità */
.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Inizializzazione */
#quiz-container, #thank-you-screen {
    opacity: 0;
    visibility: hidden;
}

/* Tipografia Intro */
.intro-text p {
    margin-bottom: 2rem;
    font-size: 1.4rem;
    letter-spacing: 0.5px;
}

#start-button {
    cursor: pointer;
    font-style: italic;
    opacity: 0.6;
    transition: opacity 0.3s;
    margin-top: 3rem;
    border-bottom: 1px solid transparent;
}
#start-button:hover {
    opacity: 1;
    border-bottom: 1px solid #fff;
}

/* Tipografia Quiz */
.intro-quiz {
    font-style: italic;
    margin-bottom: 3rem;
    opacity: 0.7;
    font-size: 1rem;
}

#main-form {
    width: 100%;
    max-width: 650px;
}

/* Singola Domanda */
.question-block {
    display: none; /* Nascosto di base */
    opacity: 0;
    transition: opacity 0.8s ease;
}

.question-block.active {
    display: block;
    opacity: 1;
    animation: fadeIn 1s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Input Fields */
label {
    display: block;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    line-height: 1.4;
}

input[type="text"], textarea {
    background: transparent;
    border: none;
    border-bottom: 1px solid #555;
    color: #fff;
    font-family: "Times New Roman", Times, serif;
    font-size: 1.1rem;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

textarea {
    min-height: 80px;
    resize: none;
}

input[type="text"]:focus, textarea:focus {
    outline: none;
    border-bottom: 1px solid #fff;
}

/* Radio Buttons personalizzati */
.radio-options {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.radio-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    opacity: 0.8;
    transition: opacity 0.3s;
}
.radio-label:hover {
    opacity: 1;
}

input[type="radio"] {
    appearance: none;
    width: 15px;
    height: 15px;
    border: 1px solid #fff;
    border-radius: 50%;
    margin-right: 10px;
    display: grid;
    place-content: center;
}
input[type="radio"]::before {
    content: "";
    width: 9px;
    height: 9px;
    border-radius: 50%;
    transform: scale(0);
    transition: 0.2s transform ease-in-out;
    background-color: #fff;
}
input[type="radio"]:checked::before {
    transform: scale(1);
}

/* Bottoni Navigazione */
.next-btn, .submit-btn {
    margin-top: 3rem;
    background: transparent;
    border: 1px solid #fff;
    color: #fff;
    padding: 10px 30px;
    font-family: inherit;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.next-btn:hover, .submit-btn:hover {
    background: #fff;
    color: #000;
}