
/* ---------------------------- Fonts -------------------------------*/
@import url('https://fonts.googleapis.com/css2?family=Boogaloo&family=Google+Sans:ital,opsz,wght@0,17..18,400..700;1,17..18,400..700&display=swap');




/* Enkel CSS-reset */
html {
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
    text-decoration: none;
}

body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul {
    margin: 0;
    padding: 0;
}

img {
    width: 100%;
}

/* Färg Palet */
:root {
    --blickishhh: #444444;
    --bluishhh: #134287;
    --backgroundishhh: #EEEEEE;
}


/* ------------------- Container And Constents ------------------------*/

body {
    background-color: white;
    font-family: "Google Sans", sans-serif;
    /* display: flex;
    align-items: center; */
}

.container {
    background-color: rgb(255, 255, 255);

    max-width: 64rem;
    width: 100%;

    margin: auto;
    padding: 0 2rem;
}

h1,
h2 {
    font-family: "Boogaloo", sans-serif;
    font-weight: 400;
    font-style: normal;
}

h1 {
    font-size: 5rem;
}

h2 {
    font-size: 3rem;
    padding-bottom: 1.5rem;
}

h3 {
    font-size: 1.3rem;
}

p {
    font-size: 1.2rem;
}

a {
    font-size: 1.35rem;
}


/* ------------------- Navigation Bar ------------------------*/

#navbar {
    background-color: white;
    box-shadow: 0px 0px 3px 0px var(--blickishhh);
    font-family: calibri;
    position: fixed;
    top: 0;
    width: 100%;
    display: block;
    transition: top 0.3s;

    /* Att den ritas längst fram, andra eliment har z-index = 0 */
    z-index: 1;
}

#navbar .navdiv {
    background-color: white;
    max-width: 60rem;
    width: 100%;
    margin: auto;

    display: flex;
}

#navbar .navdiv .logo_img {
    margin-top: 5px;
    width: 27px;
    height: 27px;

    margin-right: 3px;
}

#navbar .navdiv .logo a {
    font-size: 2rem;
    font-weight: 600;
    color: black;

    margin-right: 20px;
}

#navbar .navdiv ul {
    display: flex;
    list-style: none;

    margin-top: 10px;
    margin-left: auto;
}


#navbar .navdiv ul li a {
    color: black;
    font-size: 1.3rem;
    font-weight: bold;
    margin-right: 2.5rem;
    transition: 0.2s;

}

#navbar .navdiv ul li a:hover {
    font-size: 1.4rem;
    text-decoration: underline;
}



#navbar #nav_play_button.nav_play_disabled {
    color: grey;
}

#navbar #nav_play_button.nav_play_disabled:hover {
    color: grey;
    font-size: 1.3rem;
    text-decoration: none;
    cursor: not-allowed;
}



/* ------------------ Menu Button Looks & Animation ------------------------*/

.menu_btn {
    display: inline-block;
    cursor: pointer;

    margin-top: 5px;
}

.bar1,
.bar2,
.bar3 {
    width: 33px;
    height: 4.5px;
    background-color: #0c0c0c;
    margin: 4px 0;
    transition: 0.4s;
}

.menu_btn:hover .bar1,
.menu_btn:hover .bar2,
.menu_btn:hover .bar3 {
    background-color: #871b1b;
    width: 33px;
    margin-top: 3px;
    margin-bottom: 3px;
    height: 6px;
}


.change .bar1 {
    transform: translate(0, 9px) rotate(-45deg);
}

.change .bar2 {
    opacity: 0;
}

.change .bar3 {
    transform: translate(0, -9px) rotate(45deg);
}


/* ------------------------- Side Bar -------------------------------*/

.sidebar {
    height: 100%;
    width: 0;
    position: fixed;
    z-index: 2;
    top: 0;
    left: 0;
    background-color: var(--blickishhh);
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 60px;
}

.sidebar a {
    padding: 8px 8px 8px 32px;
    text-decoration: none;
    font-size: 1.5rem;
    color: #818181;
    display: block;
    transition: 0.3s;
}

.sidebar a:hover {
    color: #f1f1f1;
    font-size: 1.8rem;
}

.sidebar .closebtn {
    position: absolute;
    top: 0;
    right: 25px;
    font-size: 4rem;
    margin-left: 50px;
}

.sidebar .closebtn:hover {
    font-size: 4.3rem;
    color: f1f1f1;
}


#navbar {
    transition: top 0.3s, margin-left 0.5s, width 0.5s;
}

#main {
    transition: transform 0.5s;
    padding: 16px;
}



/* ------------------------------------------------
   RESPONSIVE NAV LINKS INSIDE SIDEBAR
------------------------------------------------ */

#sidebar_nav_links {
    margin-bottom: 1.5rem;
}

/* The navbar UL becomes a vertical list when moved
   into the sidebar */
#sidebar_nav_links #navbar_links {
    display: block;
    list-style: none;
    margin: 0;
    padding: 0 0 1.5rem 0;

    border-bottom: 1px solid #666;
}

#sidebar_nav_links #navbar_links li {
    display: block;
}

#sidebar_nav_links #navbar_links li a {
    display: block;
    padding: 10px 32px;

    color: #d0d0d0;
    font-size: 1.5rem;
    font-weight: bold;

    margin: 0;
}

#sidebar_nav_links #navbar_links li a:hover {
    color: white;
    font-size: 1.7rem;
    text-decoration: underline;
}


/* Keep disabled Play appearance inside sidebar too */
#sidebar_nav_links #nav_play_button.nav_play_disabled {
    color: #777;
    cursor: not-allowed;
}

#sidebar_nav_links #nav_play_button.nav_play_disabled:hover {
    color: #777;
    font-size: 1.5rem;
    text-decoration: none;
}





@media screen and (max-height: 450px) {
    .sidenav {
        padding-top: 15px;
    }

    .sidenav a {
        font-size: 18px;
    }
}





/* No animations while restoring sidebar after page change */

body.restoring_sidebar .sidebar,
body.restoring_sidebar #navbar,
body.restoring_sidebar #main,
body.restoring_sidebar .bar1,
body.restoring_sidebar .bar2,
body.restoring_sidebar .bar3 {
    transition: none !important;
}





/* ------------------- Home Section -------------------------------- */


.hero_section {
    margin-top: 7rem;
    text-align: center;
}


#slogan {
    color: var(--blickishhh);
    margin-top: 2rem;
    size: 50%;
}




.hit_rate_section {
    margin-top: 5rem;
    text-align: center;
}

.hit_rate {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
}

.hit_rate_box {
    background-color: white;
    text-align: center;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-style: solid solid solid solid;
    border-width: 2px;
    border-color: var(--blickishhh);
}

.hit_rate_box:hover {
    transform: translateY(-3px);
    transition: 0.3s;
}

.hit_rate_box h3 {
    padding-bottom: 0.7rem;
}

.hit_rate_number {
    color: black;
    font-family: "Boogaloo", sans-serif;
    font-size: 3rem;
}

















/*---------------------------------- Play Area ------------------------------------*/

.play_game_area {
    display: flex;
    flex-direction: column;
}



.play_button {
    display: inline-block;
    background-color: black;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1rem 0rem;
    border-radius: 0.4rem;
    width: 15rem;
    text-align: center;
    text-decoration: none;
    transition: 0.3s;

    border-style: solid;
    border-width: 2px;
    border-color: black;
    box-sizing: border-box;
}



/* ------------------------------------------------
   PLAY BUTTON STATE
------------------------------------------------ */

.play_button_disabled {
    opacity: 0.45;
    cursor: not-allowed;
    filter: grayscale(70%);
}


.play_button_ready {
    opacity: 1;
    cursor: pointer;
    filter: none;
}

.play_button_ready:hover {
    background-color: white;
    color: black;
    transform: translateY(-3px);

    border-style: solid;
    border-width: 2px;
    border-color: black;
}



.dropdown_number_of_questions {
    position: relative;
    display: inline-block;
    width: 15rem;
    margin-top: 0.4rem;
}


.dropdown_number_of_questions .dropdown_button {
    display: inline-block;
    background-color: white;
    color: black;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 1rem 0rem;
    border-radius: 0.4rem;
    width: 15rem;
    transition: 0.3s;

    border: 2px solid black;
    box-sizing: border-box;
}


.dropdown_number_of_questions .dropdown_content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    width: 15rem;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;

    border-style: solid;
    border-width: 0px 2px 2px 2px;
    border-color: black;

    box-sizing: border-box;
}


.dropdown_content a {
    color: black;
    font-size: 1.5rem;
    padding: 12px 16px;
    text-decoration: none;
    font-weight: 600;
    display: block;
    transition: 0.2s;
}


.dropdown_content a:hover {
    transform: translateX(10px);
}


.dropdown_content input {
    display: block;
    width: 100%;
    padding: 12px 16px;
    box-sizing: border-box;

    font-size: 1.5rem;
    font-family: inherit;
    font-weight: 600;

    border: none;
    border-top: 2px solid black;
    outline: none;
}


.dropdown_content input:focus {
    background-color: #f1f1f1;
}


.dropdown_number_of_questions:hover .dropdown_content {
    display: block;
}


.dropdown_number_of_questions:hover .dropdown_button {
    background-color: black;
    color: white;
    transform: translateY(-3px);

    border-radius: 0.4rem 0.4rem 0rem 0rem;
}

/* Force the dropdown closed after the user makes a choice */
.dropdown_number_of_questions.force_closed .dropdown_content {
    display: none !important;
}










/* ---------------------------- Game Settings Tabs ------------------------------- */

.game_section {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 3rem;
    align-items: top;
    padding-bottom: 5rem;

    margin-top: 7rem;
}

.game_settings {
    position: relative;
}

.tab_buttons {
    display: flex;
    position: relative;
}


/* Style tab links */
.tablink {
    position: relative;

    background-color: white;
    color: black;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 14px 16px;
    font-size: 17px;
    width: 9rem;

    border-style: solid solid none solid;
    border-width: 2px;
    border-color: black;
}


.tablink:hover {
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: underline;
}

/* Style the tab content (and add height:100% for full page content) */
.tabcontent {
    position: relative;

    color: black;
    display: none;

    padding: 2rem;

    border-style: solid;
    border-width: 2px;
    border-color: var(--blickishhh);

    height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
}

.tabcontent .tab_content_header {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* ---------------- Theme Categories ---------------- */

#search_themes,
#search_countries {
    width: 13rem;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    border-style: solid;
    border-width: 1px;
    border-color: black;
    font-size: 1rem;
}

#search_themes:hover,
#search_countries:hover {
    outline: none;
    box-shadow: 0 0 2px var(--bluishhh);
}


.theme_category,
.country_category {
    margin-top: 2rem;
    margin-bottom: 6rem;
}


/* Category title + All/None */

.category_header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 1rem;

    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--blickishhh);
}

.category_header h3 {
    margin: 0;
}


/* Category All/None button */

.category_all {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;

    padding: 0.4rem 0.7rem;

    border: 1px solid black;
    border-radius: 0.5rem;

    cursor: pointer;
    white-space: nowrap;

    transition: 0.3s;
}

.category_all:hover {
    background-color: black;
    color: white;
}


/* Theme options */

.theme_options,
.country_options {
    display: grid;

    grid-template-columns: 1fr 1fr 1fr;

    gap: 1rem;
}


.theme_options label,
.country_options label {
    padding: 0.4rem;

    border: 1px solid black;
    border-radius: 0.5rem;

    cursor: pointer;

    transition: 0.3s;
}


.theme_options label:hover,
.country_options label:hover {
    background-color: black;
    color: white;
}


/* Main All button */

#all_checkbox_label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;

    padding: 0.4rem 0.7rem;

    margin-bottom: 1rem;

    border: 1px solid black;
    border-radius: 0.5rem;

    cursor: pointer;

    transition: 0.3s;
}


#all_checkbox_label:hover {
    background-color: black;
    color: white;
}



/* ------------------- Footer -------------------------------- */

.footer_top {
    display: flex;
    justify-content: space-between;
    gap: 1.7rem;
    margin-top: 5rem;
}



.social_panel {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    display: flex;
    gap: 1.7rem;
}

.social_panel a {
    color: var(--blickishhh);
    transition: 0.3s;
}

.social_panel a:hover {
    transform: translateY(-15px);
    font-size: 2.5rem;
    color: rgb(255, 0, 0);
}

.footer_bottom {
    margin-top: 2rem;
    border-top: 1px solid var(--blickishhh);
    padding-top: 15px;
    text-align: center;
}

.footer_bottom p {
    color: gray;
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

#last_category {
    margin-bottom: 0rem;
}


/* ============================================================
   RESPONSIVE SYSTEM
============================================================ */

:root {
    --page-padding: clamp(0.9rem, 4vw, 2rem);
}


/* ============================================================
   GLOBAL SAFETY
============================================================ */

html {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    max-width: 100%;
    overflow-x: hidden;
}

* {
    min-width: 0;
}

img {
    max-width: 100%;
    height: auto;
}

button,
input {
    font: inherit;
}

button {
    touch-action: manipulation;
}

p,
h1,
h2,
h3,
a,
label {
    overflow-wrap: break-word;
}


/* ============================================================
   MAIN CONTAINER
============================================================ */

.container {
    width: 100%;
    max-width: 64rem;

    margin-left: auto;
    margin-right: auto;

    padding-left: var(--page-padding);
    padding-right: var(--page-padding);
}


/*
    IMPORTANT FOR THE SIDEBAR PUSH.

    JS will change both width and transform.

    When the sidebar is 250px:

    main width becomes:
    calc(100% - 250px)

    and then it moves:
    125px right.

    This centers it perfectly inside the remaining screen area.
*/

#main {
    width: 100%;

    transition:
        width 0.5s ease,
        transform 0.5s ease;

    will-change:
        width,
        transform;
}


/* ============================================================
   RESPONSIVE TYPOGRAPHY
============================================================ */

h1 {
    font-size: clamp(3rem, 8vw, 5rem);
    line-height: 1;
}

h2 {
    font-size: clamp(2.2rem, 6vw, 3rem);
    line-height: 1.05;
}

h3 {
    font-size: clamp(1.05rem, 2vw, 1.3rem);
}

p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.6;
}


/* ============================================================
   NAVBAR
============================================================ */

#navbar {
    width: 100%;
    margin-left: 0;

    z-index: 900;

    transition:
        top 0.3s ease,
        width 0.5s ease,
        margin-left 0.5s ease;
}


#navbar .navdiv {
    width: 100%;
    max-width: 60rem;

    min-height: 3.5rem;

    margin-left: auto;
    margin-right: auto;

    padding:
        0.45rem
        clamp(0.75rem, 3vw, 1.25rem);

    display: flex;
    align-items: center;

    gap: 0.45rem;
}


#navbar .navdiv .logo_img {
    width: 27px;
    height: 27px;

    margin: 0 3px 0 0;

    display: block;

    flex-shrink: 0;
}


#navbar .navdiv .logo {
    min-width: 0;
}


#navbar .navdiv .logo a {
    display: block;

    margin-right: 1rem;

    font-size:
        clamp(1.35rem, 3vw, 2rem);

    line-height: 1;

    white-space: nowrap;
}


#navbar .navdiv ul {
    display: flex;

    align-items: center;

    list-style: none;

    gap:
        clamp(1rem, 3vw, 2.5rem);

    margin-top: 0;
    margin-left: auto;
}


#navbar .navdiv ul li {
    flex-shrink: 0;
}


#navbar .navdiv ul li a {
    margin-right: 0;

    white-space: nowrap;

    font-size:
        clamp(1rem, 2vw, 1.3rem);
}


/*
    Don't increase font-size on hover.

    Your old hover changes the width of the item,
    which causes the navigation to move around.
*/

#navbar .navdiv ul li a:hover {
    font-size:
        clamp(1rem, 2vw, 1.3rem);

    text-decoration: underline;
}


/* ============================================================
   HAMBURGER BUTTON
============================================================ */

.menu_btn {
    width: 44px;
    height: 44px;

    flex:
        0 0 44px;

    padding: 6px;
    margin: 0;

    border: 0;
    outline: none;

    background: transparent;

    cursor: pointer;

    display: flex;

    flex-direction: column;

    justify-content: center;
    align-items: center;

    gap: 4px;
}


.bar1,
.bar2,
.bar3 {
    width: 30px;
    height: 4px;

    margin: 0;

    border-radius: 20px;

    background-color: #0c0c0c;

    transition:
        transform 0.3s ease,
        opacity 0.3s ease,
        background-color 0.2s ease;
}


@media (hover: hover) and (pointer: fine) {

    .menu_btn:hover .bar1,
    .menu_btn:hover .bar2,
    .menu_btn:hover .bar3 {
        width: 30px;
        height: 4px;

        margin: 0;

        background-color: #871b1b;
    }

}


.change .bar1 {
    transform:
        translateY(8px)
        rotate(-45deg);
}

.change .bar2 {
    opacity: 0;
}

.change .bar3 {
    transform:
        translateY(-8px)
        rotate(45deg);
}


/* ============================================================
   SIDEBAR
============================================================ */

.sidebar {
    height: 100vh;
    height: 100dvh;

    width: 0;

    max-width: 88vw;

    position: fixed;

    z-index: 1000;

    top: 0;
    left: 0;

    background-color:
        var(--blickishhh);

    overflow-x: hidden;
    overflow-y: auto;

    padding-top: 60px;

    transition:
        width 0.5s ease;
}


.sidebar a {
    padding:
        0.65rem
        2rem;

    font-size:
        clamp(1.15rem, 4vw, 1.5rem);

    line-height: 1.3;

    white-space: nowrap;

    color: #a7a7a7;
}


@media (hover: hover) and (pointer: fine) {

    .sidebar a:hover {
        color: #f1f1f1;

        /*
            Don't enlarge the font.
            It causes the entire sidebar to jump.
        */

        font-size:
            clamp(1.15rem, 4vw, 1.5rem);
    }

}


.sidebar .closebtn {
    position: absolute;

    top: 0;
    right: 1rem;

    margin: 0;
    padding: 0.15rem 0.5rem;

    width: auto;

    font-size: 4rem;

    line-height: 1;
}


.sidebar .closebtn:hover {
    font-size: 4rem;
    color: #f1f1f1;
}


/* ============================================================
   SIDEBAR BACKDROP
============================================================ */

.sidebar_backdrop {
    position: fixed;

    inset: 0;

    z-index: 950;

    background:
        rgba(0, 0, 0, 0.35);

    opacity: 0;

    visibility: hidden;

    pointer-events: none;

    transition:
        opacity 0.3s ease,
        visibility 0.3s ease;
}


/*
    Backdrop only appears when sidebar is in OVERLAY mode.

    Desktop push mode does not get a backdrop.
*/

body.sidebar-overlay-open
.sidebar_backdrop {
    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


/* ============================================================
   NAV LINKS INSIDE SIDEBAR
============================================================ */

#sidebar_nav_links {
    margin-bottom: 1rem;
}


#sidebar_nav_links #navbar_links {
    display: block;

    margin: 0;

    padding:
        0 0 1rem 0;

    list-style: none;

    border-bottom:
        1px solid #666;
}


#sidebar_nav_links #navbar_links li {
    display: block;
}


#sidebar_nav_links #navbar_links li a {
    display: block;

    margin: 0;

    padding:
        0.7rem
        2rem;

    color: #d0d0d0;

    font-weight: bold;
}


#sidebar_nav_links #nav_play_button.nav_play_disabled {
    color: #777;

    cursor: not-allowed;
}


#sidebar_nav_links #nav_play_button.nav_play_disabled:hover {
    color: #777;

    text-decoration: none;
}


/* ============================================================
   RESTORE WITHOUT ANIMATION
============================================================ */

body.restoring_sidebar .sidebar,
body.restoring_sidebar #navbar,
body.restoring_sidebar #main,
body.restoring_sidebar .bar1,
body.restoring_sidebar .bar2,
body.restoring_sidebar .bar3 {
    transition: none !important;
}


/* ============================================================
   HERO
============================================================ */

.hero_section {
    margin-top:
        clamp(5.5rem, 10vw, 7rem);

    text-align: center;
}


.home_intro {
    max-width: 52rem;

    margin-left: auto;
    margin-right: auto;
}


#changing_intro {
    margin-top: 1rem;
}


#slogan {
    margin-top:
        clamp(1.2rem, 4vw, 2rem);

    /*
        Delete your old:
        size: 50%;

        It isn't a valid CSS property.
    */
}


/* ============================================================
   HIT RATE
============================================================ */

.hit_rate_section {
    margin-top:
        clamp(3.5rem, 8vw, 5rem);
}


.hit_rate {
    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(10rem, 1fr)
        );

    gap:
        clamp(0.7rem, 2vw, 1rem);
}


.hit_rate_box {
    min-width: 0;

    padding:
        clamp(1rem, 4vw, 1.5rem);
}


.hit_rate_number {
    font-size:
        clamp(2.4rem, 7vw, 3rem);
}


/* ============================================================
   GAME SECTION
============================================================ */

.game_section {
    display: grid;

    grid-template-columns:
        minmax(13rem, 15rem)
        minmax(0, 1fr);

    gap:
        clamp(1.5rem, 5vw, 3rem);

    align-items: start;

    padding-bottom:
        clamp(3rem, 8vw, 5rem);

    margin-top:
        clamp(4rem, 9vw, 7rem);
}


/*
    Your old:

    align-items: top;

    isn't valid CSS.

    The correct value is:
    align-items: start;
*/


.game_settings {
    width: 100%;

    min-width: 0;
}


/* ============================================================
   PLAY CONTROLS
============================================================ */

.play_game_area {
    display: flex;

    flex-direction: column;

    width: 100%;
}


.play_button,
.dropdown_number_of_questions,
.dropdown_number_of_questions .dropdown_button {
    width: 100%;
}


.play_button {
    max-width: 15rem;
}


.dropdown_number_of_questions {
    max-width: 15rem;
}


.dropdown_number_of_questions .dropdown_button {
    max-width: 15rem;
}


.dropdown_number_of_questions .dropdown_content {
    width: 100%;

    max-height:
        min(27rem, 65vh);

    overflow-y: auto;

    z-index: 30;
}


/* ============================================================
   CLICKABLE DROPDOWN SUPPORT
============================================================ */

.dropdown_number_of_questions.open
.dropdown_content {
    display: block;
}


/*
    Phones don't have true hover.

    Click JS will control the dropdown instead.
*/

@media (hover: none) {

    .dropdown_number_of_questions:hover
    .dropdown_content {
        display: none;
    }


    .dropdown_number_of_questions.open
    .dropdown_content {
        display: block;
    }


    .dropdown_number_of_questions:hover
    .dropdown_button {
        background-color: white;

        color: black;

        transform: none;

        border-radius: 0.4rem;
    }

}


/* ============================================================
   TABS
============================================================ */

.tab_buttons {
    width: 100%;

    display: flex;
}


.tablink {
    width: auto;

    flex:
        0 1 9rem;

    min-height: 3rem;
}


.tabcontent {
    width: 100%;

    height:
        clamp(
            23rem,
            60vh,
            31.25rem
        );

    padding:
        clamp(1rem, 4vw, 2rem);

    overflow-y: auto;
    overflow-x: hidden;
}


#search_themes,
#search_countries {
    width:
        min(100%, 18rem);

    min-height: 2.7rem;
}


/* ============================================================
   CATEGORY HEADERS
============================================================ */

.category_header {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto;

    gap:
        clamp(0.5rem, 2vw, 1rem);

    align-items: center;
}


.category_header h3 {
    line-height: 1.25;
}


.category_all,
#all_checkbox_label {
    min-height: 2.5rem;

    flex-shrink: 0;
}


/* ============================================================
   THEMES + COUNTRIES
============================================================ */

.theme_options,
.country_options {
    display: grid;

    grid-template-columns:
        repeat(
            3,
            minmax(0, 1fr)
        );

    gap:
        clamp(0.55rem, 2vw, 1rem);
}


.theme_options label,
.country_options label {
    min-height: 2.8rem;

    min-width: 0;

    padding: 0.55rem;

    display: flex;

    align-items: flex-start;

    gap: 0.4rem;

    line-height: 1.3;

    overflow-wrap: anywhere;
}


.theme_options input,
.country_options input {
    flex-shrink: 0;

    margin-top: 0.15rem;
}


.theme_category,
.country_category {
    margin-top:
        clamp(1.5rem, 4vw, 2rem);

    margin-bottom:
        clamp(3rem, 8vw, 5rem);
}


/* ============================================================
   SPECIAL STATE:
   SIDEBAR PUSH ON A SMALLER DESKTOP
============================================================ */

/*
    Example:
    1100px screen
    - 250px sidebar
    - about 850px usable area

    We reduce the option grid to 2 columns so labels don't
    become unnaturally narrow.
*/

body.sidebar-tight-push
.theme_options,

body.sidebar-tight-push
.country_options {
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
}


body.sidebar-tight-push
.game_section {
    gap: 1.5rem;

    grid-template-columns:
        minmax(12rem, 14rem)
        minmax(0, 1fr);
}


/* ============================================================
   FOOTER
============================================================ */

.footer_top {
    position: relative;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        auto
        minmax(0, 1fr);

    align-items: center;

    gap:
        clamp(1rem, 4vw, 2rem);

    margin-top:
        clamp(3rem, 8vw, 5rem);
}


.footer_top .footer_name:last-child {
    text-align: right;
}


/*
    Your absolute positioning was fragile.

    Social icons now naturally occupy the center grid column.
*/

.social_panel {
    position: static;

    left: auto;

    transform: none;

    display: flex;

    align-items: center;
    justify-content: center;

    gap:
        clamp(0.8rem, 4vw, 1.7rem);
}


.social_panel a {
    width: 44px;
    height: 44px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    color:
        var(--blickishhh);

    font-size: 1.45rem;
}


@media (hover: hover) and (pointer: fine) {

    .social_panel a:hover {
        transform:
            translateY(-5px);

        font-size: 1.55rem;
    }

}


/* ============================================================
   ≤ 900px
   GAME SETTINGS STACK
============================================================ */

@media (max-width: 900px) {

    .game_section {
        grid-template-columns: 1fr;

        gap: 1.5rem;
    }


    /*
        On tablets, Play and Questions can fit next to each other.
    */

    .play_game_area {
        display: grid;

        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );

        gap: 0.6rem;
    }


    .play_button,
    .dropdown_number_of_questions,
    .dropdown_number_of_questions .dropdown_button {
        max-width: none;
    }

}


/* ============================================================
   ≤ 800px
   TWO OPTION COLUMNS
============================================================ */

@media (max-width: 800px) {

    .theme_options,
    .country_options {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }

}


/* ============================================================
   ≤ 650px
   NAV LINKS MOVE TO SIDEBAR
============================================================ */

@media (max-width: 650px) {

    /*
        JS physically moves navbar_links into sidebar.

        This is just a fallback in case JS hasn't executed yet.
    */

    #navbar .navdiv > #navbar_links {
        display: none;
    }


    .menu_btn {
        margin-left: auto;
    }


    .footer_top {
        grid-template-columns: 1fr;

        text-align: center;
    }


    .footer_top .footer_name:last-child {
        text-align: center;
    }


    .social_panel {
        order: 2;
    }


    .footer_top .footer_name:last-child {
        order: 3;
    }

}


/* ============================================================
   ≤ 560px
   PHONE
============================================================ */

@media (max-width: 560px) {

    .play_game_area {
        grid-template-columns: 1fr;
    }


    .tablink {
        flex:
            1 1 50%;

        width: 50%;
    }


    .theme_options,
    .country_options {
        grid-template-columns: 1fr;
    }


    .tabcontent {
        padding:
            clamp(
                0.75rem,
                4vw,
                1.2rem
            );
    }

}


/* ============================================================
   ≤ 420px
   SMALL PHONE
============================================================ */

@media (max-width: 420px) {

    :root {
        --page-padding: 0.85rem;
    }


    #navbar .navdiv {
        padding-left: 0.7rem;
        padding-right: 0.7rem;
    }


    #navbar .navdiv .logo_img {
        width: 24px;
        height: 24px;
    }


    #navbar .navdiv .logo a {
        font-size:
            clamp(
                1.15rem,
                6vw,
                1.45rem
            );

        margin-right: 0.25rem;
    }


    .menu_btn {
        width: 42px;
        height: 42px;

        flex-basis: 42px;
    }


    .hero_section {
        margin-top: 5.25rem;
    }


    .category_header {
        align-items: start;
    }


    .category_all {
        padding:
            0.35rem
            0.5rem;
    }

}


/* ============================================================
   VERY SMALL PHONES
============================================================ */

@media (max-width: 340px) {

    #navbar .navdiv {
        gap: 0.2rem;
    }


    #navbar .navdiv .logo a {
        font-size: 1.1rem;
    }


    .bar1,
    .bar2,
    .bar3 {
        width: 27px;
    }


    .tablink {
        padding:
            0.65rem
            0.4rem;

        font-size: 0.95rem;
    }


    .category_header {
        gap: 0.3rem;
    }


    .category_all {
        font-size: 0.88rem;
    }

}


/* ============================================================
   SHORT LANDSCAPE PHONE
============================================================ */

@media
(max-height: 500px)
and
(orientation: landscape) {

    .sidebar {
        padding-top: 3rem;
    }


    .tabcontent {
        height: 70vh;

        min-height: 15rem;
    }

}


/* ============================================================
   KEYBOARD ACCESSIBILITY
============================================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline:
        3px solid
        var(--bluishhh);

    outline-offset: 2px;
}


/* ============================================================
   REDUCED MOTION
============================================================ */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        transition-duration:
            0.01ms !important;

        animation-duration:
            0.01ms !important;

        animation-iteration-count:
            1 !important;
    }

}