.QuizContainer {
    display: none;
    height: 100dvh;
    width: 100dvw;
    background: linear-gradient(#FFFFFF, #B3EDF9, var(--blue));
    overflow: hidden;
}
.QuizContainer.active {
    display: block;
}

.QuizFinlitLogo {
    position: absolute;
    left: 25px;
    height: 25dvh;
}
.ProgressBarContainer {
    position: absolute;
    top: 0;
    right: 5dvw;
    width: 35dvw;
    height: 15dvh;
    border-radius: 0 0 calc(1vw + 1vh) calc(1vw + 1vh);
    background-color: #8adffd;
}
.ProgressBarTrack {
    position: absolute;
    top: 50%;
    left: 15%;
    width: 70%;
    height: 20%;
    background-color: var(--white);
    border-radius: 50vw;
    transform: translateY(-50%);
}
.ProgressBarFill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 5%;
    min-width: 5%;
    background-color: var(--purple);
    border-radius: 50vw;
    transition: width 0.3s ease-in-out;
}
.ProgressBarFill img {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 300%;
    right: -10px;
}
.ProgressBarText {
    position: absolute;
    top: 85%;
    left: 20%;
    transform: translate(-50%, -50%);
    font-family: sans-serif;
    font-size: clamp(0.2rem, 2.25vw, 1.5rem);
    color: black;
    text-align: left;
}

.AnimalIconContainer {
    position: absolute;
    top: 15dvh;
    left: 37.5dvw;
    width: 25dvw;
    height: 25dvh;
    aspect-ratio: 1/1;
    overflow: visible;
    z-index: 1;
}
.QuizAnimalBackground {
    position: absolute;
    height: 150%;
    width: 150%;
    left: -25%;
    top: -25%;
    object-fit: fill;
}
.QuizAnimalIcon {
    position: absolute;
    height: 100%;
    width: 100%;
    object-fit: fill;
}

.QuestionsContainer {
    position: absolute;
    bottom: 0;
    left: 5dvw;
    width: 90dvw;
    height: 70dvh;
    border-radius: 40px 40px 0 0;
    background-color: #f3ffffd2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.QuestionText {
    font-size: clamp(1rem, 2vw, 3rem);
    text-align: center;
    color: #000000;
    width: 80%;
    height: 30%;
    min-height: 3lh;
    margin-top: 17dvh;
}
.QuestionSlider {
    width: 80%;
}

.InputContainer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    height: 60%;
}
.AnswerButtons {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;

    width: 85%;
    margin-top: 5%;
    margin-left: auto;
    margin-right: auto;
}
.AnswerButton {
    flex: 1;              /* equal width for every button */
    border: none;
    color: black;
    border-radius: 30px;
    padding: 10px 20px;
    font-size: clamp(0.75rem, 1.5vw, 1.4rem);
    cursor: pointer;
    text-align: center;
    display: flex;         /* since these are divs, not buttons */
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    margin: 0 4px;          /* optional spacing between buttons */
}
.AnswerButton:hover {
    background-color: none;
}
.AnswerButton:focus {
    outline: none;
    background-color: none;
}
.AnswerButton.active {
    background-color: #9ee5ff;
    font-weight: bold;
}
.AnswerButton.active:hover {
    color: black;
}
img {
    user-select: none;
    pointer-events: none;
}
.buttonNewLine {
    display: none;
}

input[type="range"] {
    -webkit-appearance: none; /* Hides default styling in WebKit browsers */
    appearance: none;

    width: 70%;
    height: 30px;
    border: 2px black solid;

    border-radius: 20px;
    box-sizing: border-box;

    /* The dynamic fill color relies on this CSS variable updated by JS */
    background: linear-gradient(to right, var(--purple) 0%, var(--purple) var(--progress, 50%), var(--white) var(--progress, 50%), var(--white) 100%);
}
/* Target Chrome, Safari, Opera, and Edge */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    height: 100px;
    aspect-ratio: 1/2;
    background-image: url('/src/assets/Desktop Asset/SVG/Slider_button_selected.svg');
    background-position: center 25px;
    background-size: contain;     /* Forces image to scale perfectly inside the width/height */
    background-repeat: no-repeat; /* Prevents repeating patterns */
    cursor: pointer;
    background-color: transparent;
    border: 0px;
    box-shadow: none;
}
input[type="range"]:active::-webkit-slider-thumb {
    cursor: grabbing;
    background-image: url('/src/assets/Desktop Asset/SVG/Slider_button.svg');
}

/* Target Firefox */
input[type="range"]::-moz-range-thumb {
    -moz-appearance: none;
    appearance: none;
    height: 100px;
    aspect-ratio: 1/2;
    background-image: url('/src/assets/Desktop Asset/SVG/Slider_button_selected.svg');
    background-position: center 25px;
    background-size: contain;     /* Forces image to scale perfectly inside the width/height */
    background-repeat: no-repeat; /* Prevents repeating patterns */
    cursor: pointer;
    border: 0px;
    min-width: 55px;
    background-color: transparent;
    border: 0px;
    box-shadow: none;
}
input[type="range"]:active::-moz-range-thumb {
    cursor: grabbing;
    background-image: url('/src/assets/Desktop Asset/SVG/Slider_button.svg');
}

.bottomBubbleContainer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none; /* Prevents the bubbles from blocking clicks on other elements */
}
.bottomBubbles {
    width: 100%;
    background-size: cover;
    position: absolute;
    left: 0;
    bottom: 0;
}

#backBtn, #nextBtn {
    all: unset;
    width: 10dvw;
    height: 10dvh;
    aspect-ratio: 1/1;
    position: absolute;
    top: min(calc(50% - 5dvw), calc(50% - 5dvh));
    cursor: pointer !important;
    visibility: visible;
    transition: all 0.3s ease-in-out;
}
#backBtn:hover, #nextBtn:hover {
    width: 11dvw;
    height: 11dvh;
    top: min(calc(50% - 5.5dvw), calc(50% - 5.5dvh));
}
#backBtn.active, #nextBtn.active {
    visibility: visible;
}
#backBtn {
    left: -4dvw;
}
#nextBtn {
    right: -4dvw;
}

@media (hover: hover) {
    .AnswerButton:hover {
        background-color: var(--purple);
        color: white;
    }
}

@media (max-width: 1600px) {
    .buttonNewLine {
        display: block;
    }
}
@media (max-height: 400px) {
    .AnimalIconContainer {
        position: absolute;
        top: 12.5dvh;
        height: 15dvh;
    }
    .QuizFinlitLogo {
        left: 25px;
        height: 17.5dvh;
    }
    .QuestionsContainer {
        height: 80dvh;
    }
    .bottomBubbles {
        width: 110%;
        left: -5%;
    }
    .QuestionText {
        font-size: clamp(0.75rem, 2vh, 3rem);
    }
    .AnswerButton {
        font-size: clamp(0.75rem, 1.25vh, 1.4rem);
    }
    .ProgressBarText {
        font-size: clamp(0.65rem, 1.3vh, 1.5rem);
    }
}

@media (orientation: portrait) {
    .QuizFinlitLogo {
        left: 25px;
        height: 15dvh;
    }
    .ProgressBarContainer {
        width: 45dvw;
        height: 12.5dvh;
    }
    .ProgressBarTrack {
        left: 15%;
        width: 70%;
    }
    .ProgressBarFill img {
        right: -25px;
    }
    .QuestionText {
        font-size: clamp(0.9rem, 2.5vw, 3rem);
        text-align: center;
        align-content: center;
        color: #000000;
        height: 25%;
        width: 80%;
        margin-top: 15%;
    }
    .InputContainer {
        flex-direction: row;
        width: 60%;
        height: auto;
        margin-bottom: 5%;
    }
    .AnswerButtons {
        flex-direction: column-reverse;
        gap: 15px;
        width: 100%;
        height: 90%;
        margin-top: 0%;
    }
    .buttonNewLine {
        display: none;
    }
    input[type="range"] {
        padding: 0;
        writing-mode: vertical-lr;
        width: 30px;
        height: 40dvh;
        transform: rotate(180deg);
        margin: none;
        background: linear-gradient(to bottom, var(--purple) 0%, var(--purple) var(--progress, 50%), var(--white) var(--progress, 50%), var(--white) 100%);
    }
    input[type="range"]::-webkit-slider-thumb {
        transform: rotate(180deg);
        width: 55px;
        height: auto;
        aspect-ratio: 1/1;
        background-position: center center;
        background-image: url('/src/assets/Desktop Asset/PNG/Slider_button.png');
        /* background-image: url('/src/assets/Desktop Asset/SVG/Slider_button_selected.svg'); */
        background-color: transparent;
        border: 0px;
        box-shadow: none;
    }
    input[type="range"]:active::-webkit-slider-thumb {
        transform: rotate(180deg);
    }
    /* Target Firefox */
    input[type="range"]::-moz-range-thumb {
        transform: rotate(180deg);
        width: 55px;
        height: auto;
        aspect-ratio: 1/1;
        background-position: center center;
        background-image: url('/src/assets/Desktop Asset/PNG/Slider_button.png');
        background-color: transparent;
        border: 0px;
        box-shadow: none;
    }
    input[type="range"]:active::-moz-range-thumb {
        transform: rotate(180deg);
    }
}
