* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
}

*:focus {
    outline: none;
}

body {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgb(54, 104, 141);
    height: 100vh;
}

.container {
    display: flex;
    align-content: center;
    justify-content: center;
}

/* =============================
   Quiz Starting Categories
   ============================= */
.quiz-wrapper {
    height: 42rem;
    width: 42rem;
    border-radius: 2rem;
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px #111;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.quiz-image {
    width: 26rem;
}

.start-text {
    font-size: 1.5rem;
    line-height: 2rem;
    color: #fff;
    text-align: center;
    margin: 2rem 0 2.25rem 0;
    width: 24rem;
}

.category-btns {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.movies-btn,
.sports-btn,
.cartoons-btn,
.music-btn {
    font-size: 1.25rem;
    text-transform: uppercase;
    border-radius: 0.35rem;
    border-style: none;
    padding: 0.5rem 0;
    width: 12.5rem;
    background: rgb(243, 205, 5);
}

.movies-btn:hover,
.sports-btn:hover,
.cartoons-btn:hover,
.music-btn:hover {
    background: #fff;
    color: #000;
    cursor: pointer;
}

.movies-btn:focus,
.sports-btn:focus,
.cartoons-btn:focus,
.music-btn:focus {
    background: #fff;
    color: #000;
}

/* =============================
   Quiz Questions
   ============================= */
.questions-wrapper {
    height: 42rem;
    width: 42rem;
    border-radius: 2rem;
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 20px #111;
    display: flex;
    flex-direction: column;
    padding-top: 6.5rem;
    align-items: center;
}

.question-count-text {
    font-size: 1.5rem;
    color: #fff;
}

.question-frame {
    height: 15rem;
    width: 25.75rem;
    background: rgb(243, 205, 5);
    border-style: none;
    border-radius: 0.35rem;
    margin: 2rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.question-text {
    font-size: 1.5rem;
    color: #333;
    text-align: center;
    padding: 1rem;
}

/* Answer buttons */
.answer-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

/* Answera text */
.answer-text {
    font-size: 1.125rem;
}

.btn {
    font-size: 1rem;
    text-transform: none;
    border-style: none;
    border-radius: 0.35rem;
    padding: 0.5rem 0;
    width: 12.5rem;
    color: #333;
    background: #fff;
    display: flex;
    align-items: center;
    padding-left: 0.5rem;
}

.btn:hover {
    border-style: none;
    background: rgb(243, 205, 5);
    cursor: pointer;
}

.btn:focus {
    background: rgb(243, 205, 5);
}

/* Right and wrong answer button colors */
.btn.correct {
    border-style: none;
    background: yellowgreen;
    color: #000;
}

.btn.wrong {
    border-style: none;
    background: firebrick;
    color: #fff;
}

/* Next button */
.next-btn, .restart-btn {
    font-size: 1rem;
    text-align: center;
    text-transform: uppercase;
    border-style: none;
    border-radius: 0.35rem;
    padding: 0.25rem 0;
    width: 6rem;
    margin-top: 1.5rem;
    color: #000;
    background: #fff;
}

.next-btn:hover,
.restart-btn:hover {
    background: rgb(243, 205, 5);
    color: #000;
    border-style: none;
    cursor: pointer;
}

.hide {
    display: none;
}

/* =================================================
   Media queries for mobile devices (640px and down)
   ================================================= */
@media only screen and (max-width: 640px) {
    body {
        background: #7396af;
    }

    .quiz-wrapper, .questions-wrapper {
        margin: 0;
        padding: 0;
        width: 20rem;
        border: none;
        box-shadow: none;
    }

    /* Quiz starting categories */
    .quiz-wrapper {
        background: none;
        box-shadow: none;
        display: flex;
        justify-content: center;
        align-items: center;
        height: 100%;
    }

    .quiz-image {
        width: 15rem;
    }
    
    .start-text {
        font-size: 1.15rem;
        line-height: 1.5rem;
        margin: 1.125rem 0 1.25rem 0;
        width: 11rem;
    }

    .category-btns {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
    
    .movies-btn,
    .sports-btn,
    .cartoons-btn,
    .music-btn {
        font-size: 1.125rem;
        padding: 0.125rem 0;
        width: 12rem;
    }
    
    /* Quiz questions */
    .questions-wrapper {
        background: none;
        box-shadow: none;
        height: 28.5rem;
    }

    .question-count-text {
        font-size: 1.125rem;
    }

    .question-frame {
        height: 9rem;
        width: 18rem;
        border-style: none;
        padding: 1.5rem 0.75rem;
    }
    
    .question-text {
        font-size: 1.15rem;
        line-height: 1.5rem;
        width: 29rem;
        padding: 0.5rem;
    }
    
    /* Answer buttons */
    .answer-grid {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }
    
    /* Answera text */
    .btn {
        font-size: 1rem;
        text-transform: none;
        border-style: none;
        padding: 0.25rem 0;
        width: 14rem;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Next button */
    .next-btn, .restart-btn {
        font-size: 1rem;
        text-align: center;
        text-transform: uppercase;
        border-style: none;
        border-radius: 0.35rem;
        padding: 0.25rem 0;
        width: 6rem;
        margin-top: 1.75rem;
        color: #000;
        background: #fff;
    }
}