body {
    font-family: "PT Sans", sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
    padding: 20px;
    box-sizing: border-box;
    flex-direction: column;
}

.quiz-container {
    width: 100%;
    max-width: 700px;
    padding: 20px;
    text-align: center;
}

.question-container {
    border-radius: 50px;
    padding: 40px;
    margin-bottom: 20px;
    width: 100%;
    box-sizing: border-box;
    border: #9747FF 2px solid;
}

.question h3 {
    margin: 0 0 40px 0;
    color: #9747FF;
    font-size: 32px;
    line-height: 40px;
    font-weight: normal;
}

.answers button {
    display: block;
    width: 100%;
    padding: 25px;
    margin-bottom: 10px;
    background: #9747FF;
    color: #fff;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 24px;
    line-height: 30px;
}

.answers button:hover {
    background: #EFAEFF;
    color: #fff;
}

.answers button.selected {
    background: #EFAEFF;
    color: #fff;
}

.button-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

#back, #submit {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 24px;
    background: #9747FF;
    color: #fff;
}

#back {
    margin-bottom: 20px;
}

#back:hover, #submit:hover {
    background: #727eff;
}

#results-container {
    margin-top: 20px;
    background: #BDC3FF;
    border-radius: 50px;
    padding: 20px;
    display: none;
    box-sizing: border-box;
}

#results-container.visible {
    display: block;
}

.hidden {
    display: none;
}

#results {
    text-align: center;
    font-size: 36px;
    font-weight: bold;
    color: #9747FF;
    line-height: 42px;
}

#detailed-results {
    text-align: center;
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

#detailed-results img {
    max-width: 50%;
    height: auto;
    border-radius: 20px;
    margin-top: 10px;
    animation: rotate 5s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@media only screen and (max-width: 576px) {
    .quiz-container, .question-container, #back, #submit {
        width: calc(100% - 40px);
        margin-left: auto;
        margin-right: auto;
    }

    .question h3 {
        font-size: 22px;
        line-height: 30px;
    }

    .answers button {
        font-size: 18px;
        line-height: 26px;
        padding: 15px;
    }

    #detailed-results {
        font-size: 16px;
    }
}

@media only screen and (max-width: 768px) {
    .quiz-container, .question-container, #back, #submit {
        width: calc(100% - 40px);
        margin-left: auto;
        margin-right: auto;
        padding: 20px;
    }

    .question h3 {
        font-size: 26px;
        line-height: 34px;
    }

    .answers button {
        font-size: 20px;
        line-height: 28px;
        padding: 20px;
    }

    #detailed-results {
        font-size: 20px;
    }

    .text-header.lingo-header {
        font-size: 64px;
    }
}