:root {
    font-family: 'Patrick Hand SC', sans-serif;
    font-weight: normal;
    font-size: 62.5%;
    --font-size-sm: clamp(1.28rem, 0.17vw + 1.21rem, 1.43rem);
    --font-size-base: clamp(1.6rem, 0.34vw + 1.46rem, 1.9rem);
    --font-size-md: clamp(2rem, 0.61vw + 1.76rem, 2.53rem);
    --font-size-lg: clamp(2.5rem, 1vw + 2.1rem, 3.38rem);
    --font-size-xl: clamp(3.13rem, 1.56vw + 2.5rem, 4.5rem);
    --font-size-xxl: clamp(3.91rem, 2.38vw + 2.96rem, 6rem);
    --font-size-xxxl: clamp(4.88rem, 3.54vw + 3.47rem, 8rem);
    --light-blue: #8ecae6;
    --blue: #219ebc;
    --dark-blue: #023047;
    --yellow: #ffb703;
    --orange: #fb8500;
    --border-radius: 5px;
    --nav-heigth: 80px;
    scroll-behavior: smooth;
}

.box {
    box-sizing: border-box;
}

#page-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 2fr));
    grid-template-rows: auto auto;
    gap: 1rem;
    width: 100%;
    max-height: 100vh;
}

body {
    height: 100%;
    max-width: 2500px;
    margin: 0px;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background-color: var(--light-blue);
    color: var(--dark-blue);
    font-size: var(--font-size-md);
    line-height: 1.3;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3 {
    margin: 0px 0px 10px;
    font-weight: 700;
    line-height: 1.1;
}

p {
    margin: 0;
}

.button {
    background-color: var(--yellow);
    border-radius: var(--border-radius);
    font-family: 'Patrick Hand SC';
    font-size: var(--font-size-md);
    text-align: center;
    border: solid;
    border-color: transparent;
    cursor: pointer;
}

.button:hover {
    border-color: var(--dark-blue);
    transition: 0.3s ease-in-out;
}

.page-header {
    grid-area: 1/1/2/-1;
    justify-self: center;
    position: relative;
    align-self: center;
    max-width: 100%;
    padding: 5rem;
}

.page-header h1 {
    display: flex;
    justify-content: center;
    justify-self: center;
    font-size: var(--font-size-xxl);
    align-items: center;
    margin: 0;
}

.page-container {
    display: grid;
    grid-area: 2/1/-1/-1;
    justify-self: center;
    align-self: center;
}

.quiz-filter-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    justify-self: center;
    max-width: 100%;
    padding: 0 2rem 0 2rem;
}

.quiz-guide-text {
    display: flex;
    text-align: center;
    max-width: 80%;
}

.quiz-filter {
    display: flex;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding: 2rem;
    justify-self: center;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    background-color: rgb(33, 158, 188, 0.5);
    border-radius: var(--border-radius);
}

.select {
    background-color: rgb(255, 183, 3, 0.9);
    border-radius: var(--border-radius);
    font-family: 'Patrick Hand SC';
    font-size: var(--font-size-base);
    text-align: center;
    border-style: none;
    padding: 0.2rem;
    margin: 2rem;
    cursor: pointer;
}

#category {
    max-width: 50%;
}

.quiz-info {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    justify-self: center;
    text-align: center;
    padding: 0 2rem 0 2rem;
    margin-bottom: 1rem;
    max-width: 80%;
    border: solid var(--blue);
    border-radius: 2rem;
}

#skip-quiz {
    position: absolute;
    top: 2rem;
    right: 2rem;
    font-size: var(--font-size-base);
}

.questions-container {
    display: flex;
    flex-direction: column;
    justify-self: center;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    max-width: 80%;
    background-color: rgb(251, 133, 0, 0.8);
    border-radius: 2rem;
}

.question {
    text-align: justify;
    font-size: var(--font-size-lg);
}

.answer-list {
    list-style: none;
    margin: 0;
    padding: 2rem;
    font-size: var(--font-size-md);
    cursor: pointer;
}

.answer {
    cursor: pointer;
}

.answer:hover {
    color: var(--blue);
    transition: 0.2s ease-in-out;
}

input[type='radio']:checked ~ .radio-btn-ans {
    padding: 0 0.5rem;
    border-radius: var(--border-radius);
    background-color: var(--yellow);
}

.quiz-buttons {
    display: flex;
    justify-content: center;
    padding-top: 2rem;
}

#prevq,
#nextq,
#check {
    background-color: var(--light-blue);
    border: solid var(--light-blue);
    color: var(--dark-blue);
    cursor: pointer;
    padding: 0.5rem;
    margin: 0.5rem;
}

#prevq:hover,
#nextq:hover,
#check:hover {
    border-color: var(--dark-blue);
    background-color: var(--light-blue);
    color: var(--dark-blue);
    transition: 0.3s ease-in-out;
}

#alert {
    padding: 1.5rem;
    font-size: var(--font-size-md);
    color: rgb(209, 0, 0);
}

.results {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    max-width: 100%;
    background-color: rgb(33, 158, 188, 0.5);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin: 3rem;
}

.result {
    padding: 2rem;
    font-size: var(--font-size-md);
}

.new-game {
    margin: 1rem;
}

@media screen and (max-width: 780px) {
    .page-header {
        display: flex;
        flex-direction: column;
        font-size: var(--font-size-sm);
        padding: 2rem;
    }
}

@media screen and (max-width: 680px) {
    #page-layout {
        display: flex;
        flex-direction: column;
    }

    h1 {
        text-align: center;
    }

    .page-header,
    .page-container,
    .quiz-filter {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 1rem;
        margin: 1rem;
    }

    .quiz-guide-text {
        padding-bottom: 2rem;
        align-self: center;
    }

    #skip-quiz {
        position: absolute;
        top: 8rem;
        right: auto;
        left: auto;
    }
}
@media screen and (max-width: 450px) {
    .page-header,
    .page-container {
        padding: 0;
        padding-top: 2rem;
        margin: 0;
    }

    .quiz-filter-container {
        font-size: var(--font-size-base);
        padding: 0;
        padding-top: 1rem;
    }

    .quiz-filter,
    .button {
        font-size: var(--font-size-base);
        margin: 0;
    }

    .results {
        margin: 1rem;
    }

    #skip-quiz {
        top: 6.5rem;
        font-size: var(--font-size-sm);
    }
}

@media screen and (max-width: 350px) {
    .page-header,
    .page-container {
        padding-top: 2rem;
        max-width: 100%;
    }

    .page-header h1 {
        font-size: var(--font-size-xl);
    }

    .quiz-filter-container,
    .quiz-filter,
    .button,
    .select {
        font-size: var(--font-size-sm);
    }

    .quiz-filter {
        padding: 1rem;
    }

    .select {
        margin: 1rem;
    }

    .answer:hover {
        color: var(--dark-blue);
    }

    .results {
        margin: 0;
        padding: 0;
    }

    .button {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    .result-buttons {
        display: flex;
        flex-direction: column;
        justify-self: center;
        align-items: center;
    }

    #skip-quiz {
        top: 4.5rem;
        font-size: var(--font-size-sm);
    }
}
