body {
    font-family: 'Inter', sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    margin: 0;
    background-color: #f5f7fa;
    position: relative;
    overscroll-behavior-y: contain;
    touch-action: none;
}

.form-container {
    width: 80%;
    max-width: 450px;
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    touch-action: pan-y;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e7ff;
    border-radius: 5px;
    margin-bottom: 20px;
}

.progress {
    height: 100%;
    width: 0;
    background-color: #0070f3;
    transition: width 0.4s ease;
    border-radius: 5px;
}

.question {
    display: none;
    flex-direction: column;
    animation: slideIn 0.6s ease-in-out forwards;
    margin-bottom: 20px;
}

.question.active {
    display: flex;
}

label {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 5px;
    font-weight: 600;
}

input, textarea {
    padding: 12px;
    margin-top: 5px;
    margin-bottom: 15px;
    font-size: 1rem;
    border: none;
    border-bottom: 2px solid #e0e7ff;
    outline: none;
    transition: border-color 0.3s;
    font-family: unset;
    resize:vertical; 
    max-height:350px; 
    

}

input:focus, textarea:focus {
    border-bottom-color: #0070f3;
    background-color: #fdfeff;
}

/* Stile per il placeholder */
input::placeholder,
textarea::placeholder {
    color: #c7c7c7;
    opacity: 1;
}

.error-message {
    color: #d32f2f;
    font-size: 0.9rem;
    margin-top: -10px;
    margin-bottom: 10px;
    display: none;
}

.big-next {
    background-color: #0070f3;
    color: white;
    padding: 12px;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    margin-top: 15px;
    transition: background-color 0.3s;
}

.big-next:hover {
    background-color: #005bb5;
}

/* Stili per i bottoni ancorati */
.nav-button.anchored {
    position: fixed;
    background-color: #0070f3;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.3s, opacity 0.3s;
    z-index: 1000;
}



.nav-button.anchored.bottom-next {
    bottom: 20px;
    right: 20px;
}

.nav-button.anchored:hover {
    background-color: #005bb5;
}

.nav-button.anchored:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.big-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.big-next:disabled:hover {
    background-color: #0070f3;
}

.top-back {
    bottom: 70px;
    right: 20px;
}

.bottom-next {
    bottom: 20px;
    right: 20px;
}

span.enter-hint {
    font-size: 0.9rem;
    color: #a0a0a0;
    margin-top: 10px;
}

.confirmation-message {
    text-align: center;
    color: #0070f3;
    font-size: 1.2rem;
    margin-top: 20px;
}

.confirmation-message i {
    font-size: 3rem;
    color: #28a745; /* Verde per successo */
    margin-bottom: 10px;
}

.confirmation-message p {
    font-size: 1.1rem;
    color: #333;
}

.confirmation-message .fa-exclamation-circle {
    color: #d32f2f; /* Rosso per errore */
}

.multiple-choice {
    display: flex;
    flex-direction: column;
}

.option {
    font-size: 1rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    border: 1px solid #0070f3;
    border-radius: 8px;
    padding: 10px;
    background-color: #f0f4ff;
    transition: background-color 0.3s, color 0.3s;
    cursor: pointer;
}

.option:hover {
    background-color: #c3d1ff;
}

.option input[type="radio"] {
    display: none;
}

.option.selected {
    background-color: #ccd7fb;
    color: #1b67c1;
}

.line-break-hint {
    display: block;
    font-size: 0.75rem;
    color: #a0a0a0;
    margin-top: 2px;
    margin-bottom: 10px;
}

@keyframes slideIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}