@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');
html , body{
    height: 100%;
    margin: 0;
    padding: 0;
    /* overflow: hidden; blocca lo scroll globale */
    position: fixed; /* evita scorrimenti involontari */


}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    min-height: -webkit-fill-available;
    height: 100dvh;
    margin: 0;
    width: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.page-wrapper {
    margin: 0 12px;
    max-width: 1000px;
    width: 100%;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-container {
    /* position: static; */
    height: calc(100dvh - 127px); /*lascia spazio per il footer (regola se serve)*/
    width: 100%;
    box-sizing: border-box;
    /* overflow-y: auto; */
    flex:1;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* justify-content: center; oppure 'space-between' se vuoi spaziatura verticale */
    padding: 0;
    /* padding-bottom: 127px; */
    flex: 1;
} 

/* Footer fisso in fondo */
.quiz-footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-evenly;
    align-items: center;
    z-index: 50;
    flex-wrap: wrap;
    flex:1;
    max-height: 130px;;
    box-sizing: border-box;
    background: transparent; /* nessun colore di sfondo */
}

.content {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: stretch;
    min-height: 100vh;
    height: 100dvh;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0;
}

.title {
    width: 100%;
    text-align: center;
}

.medico-svg {
    display: block;
    /* margin: 0 auto; */
    max-width: 220px;
    width: 100%;
    height: auto;
    position: relative;
}
.medico-img {
    width: auto;
    max-width: 220px;
    height: 45vh;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.username-form{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 30vh;
    min-height: 120px;
    width: 100%;
    /* gap: 16px; */
}

.background-monochrome {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgb(255, 255, 255); /* Cambia questo colore come preferisci */
    z-index: -1;
}
.background-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;;
}
.background-svg svg {
    position: absolute;
    top: 50%;
    left: 50%;
    /* transform: translate(-50%, -50%);
    min-width: 100%;*/
    min-height: 100%; 
}

@media (min-aspect-ratio: 1/1) {
    .background-svg svg {
        transform: translate(-50%, -50%) rotate(90deg);
    }
}

h1 {
    text-align: center;
    width: 100%;
}



.footer-h2 {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 10vh;
    min-height: 60px;
    position: absolute;
    bottom: 0;
    left: 0;
}

.footer-h2 h2 {
    margin: 0;
    padding: 0;
    text-align: center;
}

.footer-h2 img {
    max-width: 40px;
    height: auto;
    display: block;
    margin: 0 auto;
}



form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.question-text,
.sliders-container,
.multiple-choice-container,
.question-paper,
.progress-bar {
    max-width: 100%;
    box-sizing: border-box;
}

.question-text {
    line-height: 1.1;
    font-size: 19px;
    border-radius: 0 0 30px 30px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    font-weight: normal;
    padding: 15px;
    margin: 0;
    text-align: left;
    word-break: break-word;
    transition: padding 0.3s ease;
    max-width: 700px;
    
}

input[type="text"] {
    max-width: 250px;
    width: 100%; 
    padding: 10px;
    margin: 10px auto;
    border: 0;
    border-radius: 25px;
    font-family: 'Roboto', sans-serif;
    font-weight: light;
    font-size: 20px;
    
    display: block; /* Assicura che ogni elemento occupi una nuova riga */
    background-color: #FBCFC8;
}

input[type="text"] {
    outline: none; /* Rimuove il contorno quando l'input è selezionato */
    transition: border-color 0.3s ease;
}

/* input[type="text"]:focus {
    border-color: #e19302f1; Cambia il colore del bordo quando l'input è selezionato
} */

button {
    display: block;
    border: none;
    max-width: 200px;
    width: 100%;
    padding: 10px;
    margin: 10px auto;
    border-radius: 25px;
    background-color: #e19302f1; /* Colore arancione */
    color: white;
    font-family: 'Roboto', sans-serif;
    font-size: large;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.submit-btn{
    height: 46px;
}
/* button:hover {
    background-color: #FF8C00; /* Arancione più scuro per l'effetto hover */
*/

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

th {
    background-color: #f2f2f2;
}

input[type="range"] {
    width: 100%;
    margin: 10px 0;
}

.draggable {
    padding: 15px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    cursor: move;
    margin: 5px 0;
    touch-action: none;
    user-select: none;
}

.draggable:active {
    background-color: #e0e0e0;
}

.draggable.dragging {
    opacity: 0.5;
}
.progress-bar {
    position: relative;
    align-content: center;
    width: 100%;
    margin-bottom: 10px;
    max-width: 600px;
    /* margin: 32px auto 10px auto; centra orizzontalmente */
    background-color: #f0f0f0;
    border-radius: 30px;
    z-index: 10;
    box-sizing: border-box;
    /* top: 32px;  <-- puoi rimuovere o regolare se non serve */
}

.progress-bar-fill {
    display: block;
    height: 7px;
    background-color: #4CAF50;
    border-radius: 30px;
    transition: width 0.5s ease-in-out;
}

@media (max-width: 600px) {
    /* body {
        padding: 10px;
    } */

    /* Slider verticale per dispositivi mobili */
    /* input[type="range"] {
        /* -webkit-appearance: slider-vertical; */
        /* width: 50px;
        height: 150px; /* Reduced height for better fit */
        /* margin: 0 auto 10px;
        writing-mode: bt-lr; */ 
    

    #percentageOutput {
        display: block;
        text-align: center;
        margin-bottom: 10px;
    }

    .percentageSlider {
        /* -webkit-appearance: slider-vertical; */
        width: 20px;
        height: 150px;
        margin: 0 auto 10px;
        writing-mode: bt-lr;
    }

    .percentageOutput {
        display: block;
        text-align: center;
        margin-bottom: 5px;
    }

    




    
    
}



.sliders-container {
    display: flex;
    flex-direction: row;
    justify-content: space-evenly;
    align-items: flex-end;
    /* gap: 40px; */
    width: 100%;
    height: 100%;
}

.slider-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    /* width: 100px; */
    min-width: 80px;
    position: relative;
    /* padding: 0 0 16px 0; */
    height: 100%;
    margin: 0;
}

.slider-value {
    text-align: center;
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 0.2em;
    position: static;
    z-index: 2;
}

.slider-content {
    position: fixed;
    width: 60px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;

    /* margin-top:30px */
}

.slider-track {
    position: absolute;
    top: 0;
    width: 60px;
    box-shadow: inset 4px 4px 21px rgba(0, 0, 0, 0.21);
    height: 100%;
    background: #a8f47e;
    border-radius: 32px;
    z-index: 1;
}

.slider-fill {
    position: absolute;
    bottom: 0;
    align-self: center;
    width: 60px;
    height: 50%;
    background: #4CAF50;
    /* border-radius: 0 0 32px 32px; */
    border-radius: 32px 32px;
    z-index: 2;
    height: 0;
}
.slider-text{
    margin: 20px 0 20px 0; 
    font-size:22px;
}


#feedbackOverlay > div:first-child {
    padding-bottom: 80px; /* Spazio per il bottone */
}

.slider-handle {
    position: absolute;
    cursor: pointer;
    width: 40px;
    height: 40px;
    box-shadow: 0 0 0 5px #7ec242, 0 4px 16px rgba(0,0,0,0.4); /* bordo verde + ombra */
    /* background-image: url('/media/pollice.svg'); */
    background: #455564; /* colore cerchio centrale */
    /* background-size: 100%; */
    background-repeat: no-repeat;
    background-position: center;
    border: 10px solid #fff; /* bordo bianco */
    border-radius: 50%;
    z-index: 3;
    /* bottom:-30px */
}

.slider-content {
    grid-row: 1;
    grid-column: 1;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    align-items: center;
    /* min-height: 260px; */
    height: 100%;
}
.slider-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    height: 100%;
    max-height: 100%;
}

.percentage {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}
.leaderboard-bg {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    z-index: 3;
    overflow: hidden; /* Prevent scrolling on the main container */
}

.leaderboard-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    width: 100%;
    overflow-y: auto; /* Enable scrolling for the content */
    padding-bottom: 80px; /* Add padding to account for the user score row */
}

.podium {
    display: flex;
    flex-direction: row;
    align-items: center;
    width: 100%;
    min-height: 230px;
    justify-content: space-evenly;
    z-index: 3;
    gap: 10px;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    flex-shrink: 0;
    background-image: url('../media/podium.svg');
    background-size: 151%;
    background-position: center;
    background-repeat: no-repeat;
}
.podium-item {
    width: 115px;
    height: 115px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    position: relative;

}
.ffirst {
    /* Il gradino più alto */
    margin-bottom: 40px; /* più alto */
    z-index: 3;
}

.ssecond {
    /* Gradino medio */
    margin-bottom: -10px; /* medio */
    z-index: 2;
}

.tthird {
    /* Gradino più basso */
    margin-bottom: -30px; /* più basso */
    z-index: 1;
}
.pos{
    font-size: 32px;
    font-weight: bold;
    color: #fff;
}

.pos-item{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #BDBDBD;
    box-shadow: 0 4px 4px rgba(0,0,0,0.18);
}
.pos-item .pos{
    font-size: 20px;
}
.leaderboard-list {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 10px;
    z-index: 2;
    gap: 12px;
    overflow-y: auto;
    flex: 1;
    padding: 0 15px;
    box-sizing: border-box;
}
.score-row {
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px; /* Riduci il padding orizzontale */
    background: #ffffff;
    border-radius: 50px;
    box-shadow: inset 0px 3px 3px 1px rgba(0, 0, 0, 0.25);
    min-height: 62px;
    font-size: 1.08em;
    transition: box-shadow 0.2s;
    width: calc(100% - 20px); /* Sottrai il doppio del padding orizzontale */
    max-width: 630px; /* Riduci la larghezza massima */
    margin: 0 auto;
    box-sizing: border-box; /* Includi padding e bordo nella larghezza */
}


.user-score-row {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 350px;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    background-color: #E1251B;
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -2px 8px rgba(60, 60, 120, 0.06);
    margin: 0;
    min-height: 80px;
    font-size: 1.08em;
    z-index: 200;
    transition: box-shadow 0.2s;
}
.score-row.current-user {
    background-color: #E1251B;
    color: white;
}

.score-row.current-user .pos,
.score-row.current-user .username,
.score-row.current-user .score {
    color: white !important;
}

/* .slider-handle {
    width: 50px;
    height: 50px;
    position: absolute;
    left: -5px;
    top: 100%;
    transform: translateY(-100%);
    background-image: url('/media/pollice.svg');
    cursor: grab;
    z-index: 1;
} */

.slider-value {
    font-weight: bold;
}
.slider-value.correct {
    margin-left: 40px;
}

.user-answer-line {
    position: absolute;
    left: 0;
    width: 120%;
    height: 2px;
    background: rgb(127,127,127);
    z-index: 2;
}
.slider-value.user {
    position: absolute;
    left: 120%; /* accanto alla linea, a destra */
    transform: translateY(50%);
    font-size: 1.5em;
    padding: 2px 6px;
    border-radius: 4px;
    z-index: 3;
}

/* svg {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 200px;
} */

#waveContainer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;

}
.wave {
    opacity: 0.3;
}

.slider-content{
    display: flex;
    flex-direction: column;
    position: relative;
    align-items: center;
    /* min-height: 300px; */
}

.mc-option {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 25px;
    height: 67px;
    width: 363px;
    border-radius: 136px;
    background: #eff7f8f3;
    color: #000000;
    font-style: normal;
    box-shadow: inset 0px 3px 3px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    outline: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 20;
}

.choice-text-wrapper {
    flex-grow: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    max-width: 300px;
    /* padding-right: 15px; Spazio per l'icona */
}

.choice-text {
    text-align: left;
    font-size: 17px;
}

.icon-mc {
    flex-shrink: 0;
    
}
/* 
.mc-option.selected,
.mc-option:active {
    background: #4CAF50;
    color: #fff;
    box-shadow: 0 4px 16px rgba(76,175,80,0.18);
    border-color: #388e3c;
} */

/* .mc-option.selected {
    color: #fff !important;
} */

.multiple-choice-container {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    flex:1;
    justify-content: space-evenly;
    /* margin: 30px 0 20px 0; */
    /* gap: 12px;
    height: ; */
}

.item-order{
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #EFF7F8;
    padding: 8px;
    margin: 18px 0;
    border-radius: 136px;
    box-shadow: inset 0px 4px 4px rgba(0, 0, 0, 0.25);
    position: relative;
}

.item-order span {
    flex: 1;
    text-align: center;
    padding: 0 10px;
}

.arrow-btn {
    background: #00B5D2;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: cubic-bezier(0.075, 0.82, 0.165, 1);
}

.username{
    font-size: 16px;
    
}

.score-row .username{
    font-weight: bold;
    font-size: 20px;
}

.feedback-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    flex: 1;
    max-width: 800px;
    height: calc(100dvh - 127px);
    box-sizing: border-box;
    margin-top: 10px;
    /* padding: 30px 24px; */
    /* overflow-y: auto; Allow scrolling if content exceeds container height */
}

.feedback_icon {
    max-width: 100px;
    width: 100%;
    height: auto;
    object-fit: contain;
    /* margin-bottom: 20px; */
}

.feedback_title {
    font-size: 2em;
    text-align: left;
    /* margin-bottom: 15px; */
    word-wrap: break-word;
}

.feedback_text {
    font-size: calc(14px + 1dvw); /* Font size responsive */
    text-align: left;
    line-height: normal;
    /* margin-bottom: 20px; */
    word-wrap: break-word;
}

.feedback_graph {
        /* flex: 1; */
        display: flex;
        justify-content: center;
        align-items: center;
        max-width: 100%;
        /* max-height: calc(100vh - 300px); Adjust this value based on your needs */
        overflow: hidden;
}

/* Media query for smaller screens */
@media (max-height: 600px) {
    .feedback-container {
        padding: 15px 12px;
    }

    .feedback_icon {
        max-width: 60px;
        margin-bottom: 10px;
    }

    .feedback_title {
        font-size: 1.2em;
        margin-bottom: 10px;
    }

    .feedback_text {
        font-size: 0.9em;
        margin-bottom: 15px;
    }

    /* .feedback_graph {
        max-height: 50vh;
    } */
}
.restart-button-container {
    position: fixed;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
}

.restart-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #EC6412; /* Usa lo stesso colore del bottone "Start the Checkup" */
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 19px;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.restart-button:hover {
    background-color: #a3480f; /* Colore più scuro per l'effetto hover */
}

/* Assicurati che ci sia spazio sufficiente per il bottone */
.content {
    margin-bottom: 80px; /* Aggiunge spazio sotto il contenuto per il bottone */
}