::-webkit-scrollbar{width:12px;background-color:rgba(0,0,0,0);}
::-webkit-scrollbar-track{-webkit-box-shadow:inset 0 0 8px rgba(0,0,0,1);border-radius:6px;}
::-webkit-scrollbar-thumb{-webkit-box-shadow:inset 0 0 8px rgba(0,0,0,1);background:rgba(41,164,198,0.7);border-radius:6px;}

:root {
    --main-margin: 0.4rem;
}

* {
    box-sizing: border-box;
}

body, html {
    overflow-x: clip;
}

html {
    font-family: Times, Garamond, serif;
    font-size: 62.5%;
}

img {
    display: block;
    max-width: 100%;
}

#logo {
    position: absolute;
    bottom: 0;
}

/* img:not(#logo) {
    pointer-events: none!important;
} */

body {
    margin: 0;
}

.section-1 {
    background-color: #29a4c6;
    min-height: 1.2rem;
}

.section-2 {
    background-color: #29a4c6;
    min-height: 5rem;
}

.section-2 .side {
    display: flex;
    height: 5.3rem;
    padding-bottom: 0.2rem;
    position: relative;
}

.section-2 .main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 0.8rem;
    padding-left: 0.96rem;
    padding-bottom: 0.36rem;
    background-color: #7acbe2;
    height: 5.3rem;
    border-color: #007c9e;
    border-width: 0.1rem 0.1rem 0rem 0.1rem;
    border-style: solid;
}

.section-2 img {
    align-self: center;
}

.selector {
    max-width: 30rem;
    width: 0;
    flex-grow: 1;
}

.select-wrapper {
    display: flex;
    flex-grow: 1;
    width: 0;
}

.nav {
    color: white;
    text-decoration: none;
    font-family: sans-serif;
    font-weight: bold;
    font-size: 1.6rem;
    word-break: break-word;
    text-align: center;
}

a.nav {
    padding: 0.4em 0.3em;
}

a.nav:hover {
    background-color: #b3dbea;
}

.head {
    font-weight: bold;
    text-decoration: underline;
}

.section-3 {
    margin-bottom: 1rem;
}

.section-3 .side-content {
    padding: 1rem 0.6rem 0.6rem 0.6rem;
}

.section-3 .main {
    border-color: #a3dfef;
    border-width: 0rem 0.1rem 0.1rem 0.1rem;
    border-style: solid;
    /*Viewport: Max 98.6rem,  Min 49.3rem*/
    /*Padding:  Max 7rem, Min 0.3rem*/
    padding-left: clamp(0.3rem, -6.4rem + 13.590263691683571vw, 7rem);
    padding-right: clamp(0.3rem, -6.4rem + 13.590263691683571vw, 7rem);
    padding-top: 2.4rem;
}

.section-4 {
    min-height: 0.3rem;
}

.middle {
    margin: 0 auto;
    display: flex;
    max-width: 98.6rem;
    width: calc(100% - var(--main-margin)*2);
    /* overflow: hidden; */
    word-wrap: break-word;
}

.main {
    max-width: 81rem;
    width: 100%;
    font-size: 1.3rem;
}

.side {
    font-size: 1.6rem;
    width: min(17.6rem, 100%);
    min-width: 17.6rem;
}

.section-header {
    font-size: 2.4rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.section-header > a, .note > a {
    text-decoration: none;
    color: black;
}

.section-header > a:hover, .note > a:hover  {
    text-decoration: underline;
}

.game-tile-img-wrapper::after, .thumb::after {
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: calc(50% - 10%);
    right: 5%;
    width: calc(100% - 10%);
    height: 20%;
    border-radius: 4px;
    line-height: 100%;
}

.unsupported::after, .broken::after {
    content: "\26a0";
    background-color: red;
    opacity: 0.8;
    color: white;
}

.lag::after {
    content: "\26a0";
    background-color: rgb(255, 202, 8);
    opacity: 0.5;
    color: rgb(0, 0, 0);
}

.glitch::after {
    content: "\26a0";
    background-color: rgb(255, 202, 8);
    opacity: 0.5;
    color: rgb(0, 0, 0);
}

.section-4 .main {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.section-4 .partners {
    display: flex;
    gap: 3rem;
    margin-bottom: 1rem;
    align-items: center;
}

.powered-by {
    font-family: sans-serif;
    font-weight: 700;
    color: #437b9a;
}

.cheerpj, .ruffle, .freej2me {
    height: 2.5rem;
    width: auto;
    filter: drop-shadow(2px 2px 3px black) opacity(0.7) grayscale(0.1);
}

.freej2me {
    height: 4rem;
}

.copy {
    color: #587a97;
    font-family: sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
}

.error{
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 10rem;
    height: 60vh;
    font-family: monospace;
    font-weight: bold;
    font-size: xx-large;
}

@media (width <= 451px) {
    .select-wrapper {
        display: none;
    }

    .nav-wrapper {
        display: flex;
        justify-content: space-evenly;
        align-items: center;
        width: 100%;
        flex-wrap: wrap;
    }

    a.nav {
        padding: 0;
    }

    .section-2 .main {
        height: fit-content;
        padding: 0.5rem;
    }

    .middle {
        flex-direction: column;
        align-items: center;
    }

    .section-3 .middle {
        border-width: 0rem 0.1rem 0.1rem 0.1rem;
		border-color: #a3dfef;
		border-style: solid;
		margin: 0 0.4rem;
    }
}

@media (width <= 330px) {
    .middle {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .side {
        min-width: 0;
    }
}

@media (width <= 160px) {
    .nav:not(.all) {
        display: none;
    }
}