@font-face {
    font-family: 'Blocky';
    src: url(../assets/fonts/kimberley/kimberley.otf);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    font-family: 'Blocky', sans-serif;
    letter-spacing: 1px;
}

:root {
    --light-color: rgb(163, 196, 212);
    --light-color-transparent: rgba(163, 196, 212, .5);
    --gradient-color-1: #00223e;
    --gradient-color-2: #005181;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--light-color-transparent);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: var(--light-color);
}

body {
    background: url(../assets/images/bg.jpg) no-repeat;
    background-position: center;
    background-size: cover;
    background-attachment: fixed;
    color: white;
    height: 100vh;
    overflow: hidden;

    /* For Firefox */
    scrollbar-width: thin;
    scrollbar-color: var(--light-color) transparent;
}

a {
    color: var(--light-color-transparent);
    text-decoration: underline;
    transition: color .2s ease-in-out;
    text-align: center;
}

a:hover {
    color: var(--light-color);
}

ol, ul {
    margin-left: 2.1em;
    position: relative;
}

ol {
    list-style-type: none;
}

ol li {
    counter-increment: list +1;
    position: relative;
    font-size: 1em;
    line-height: 1.5em;
}

ol li:before {
    content: counter(list)'.';
    position: absolute;
    top: 0;
    left: -2.1em;
}

input[type="range"] {
    -webkit-appearance: none; 
    appearance: none;
    width: 100%;
    height: 16px;
    border-radius: 8px;
    margin: 8px 0;
    background-color: var(--light-color-transparent);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--light-color);
    border: 2px var(--light-color) solid;
    box-shadow:
        0px 0px 8px var(--light-color),
        inset 0px 0px 4px rgba(0,0,0,.5);
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #333;
    cursor: pointer;
    margin-top: -8px;
}

input[type="range"]::-ms-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #333;
    cursor: pointer;
    margin-top: -8px;
}

::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
	color: var(--light-color-transparent);
	opacity: 1; /* Firefox */
}

:-ms-input-placeholder { /* Internet Explorer 10-11 */
	color: var(--light-color-transparent);
}

::-ms-input-placeholder { /* Microsoft Edge */
	color: var(--light-color-transparent);
}

.container {
    width: 100%;
    height: calc(100vh / 21 * 20);
    padding: 16px calc((100vw - 1200px) / 2);
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 4fr 16fr;
    gap: 16px;
    overflow: hidden;
    overflow-y: auto;
}

.header, .footer, .full, .sidebar, .content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.header, .full { grid-column: 1 / 4; }
.sidebar-left { grid-column: 1 / 2; }
.content { grid-column: 2 / 3; }
.sidebar-right { grid-column: 3 / 4; }

.header, .footer {
    text-align: center;
}

.logo {
    color: white;
    font-size: 16px;
    transition: transform .2s ease;
}

.logo h1 {
    font-size: 4em;
    line-height: 1em;
}

.logo h3 {
    font-size: 2em;
    line-height: 1em;
}

.logo .small {
    font-size: .5em;
    font-weight: normal;
    letter-spacing: 0px;
    font-family: 'Poppins';
}

.sidebar {
    justify-content: flex-start;
    gap: 16px;
    padding: 16px;
}

.sidebar .box {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    height: auto;
    position: relative;
    border-radius: 16px;
    padding: 16px;
    margin-top: 2em;
    font-size: 16px;
}

.sidebar .box-name {
    position: absolute;
    top: -2em;
    left: 0;
    width: 100%;
    text-align: center;
    text-transform: uppercase;
    font-weight: bold;
}

.content {
    gap: 16px;
    text-align: center;
}

.content .options {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 16px;
}

.content .options button {
    min-width: 5em;
    height: 3em;
    font-size: 24px;
}

.footer {
    --gradient-color: rgba(0,0,0,.5);
    position: fixed;
    bottom: 0;
    height: calc(100vh / 21);
    width: 100%;
    z-index: 1;
}

.footer::before {
    content: '';
    z-index: -1;
    width: 100%;
    height: 200%;
    position: absolute;
    bottom: 0;
    left: 0;
    background: linear-gradient(transparent 0%, var(--gradient-color) 100%);
}

.footer .info {
    display: flex;
    flex-direction: row;
    text-shadow: 0 0 4px var(--light-color);
}

.footer .info > div:not(:last-child)::after {
    content: '|';
    margin: 0 .2em;
}

.popup-container, .settings-container, .howtoplay-container {
    position: fixed;
    top: -100vh;
    left: 0;
    padding-top: 100vh;
    width: 100%;
    height: 200vh;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: brightness(50%) blur(16px);
    opacity: 1;
    z-index: 2;
    transition: 
        opacity 1s ease,
        top 1s ease;
}

.popup-hidden, .settings-hidden, .howtoplay-hidden {
    opacity: 0;
    top: 0;
}

.popup, .settings, .howtoplay {
    width: 50vmin;
    min-width: 400px;
    background-color: transparent;
    color: white;
    padding: 24px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.howtoplay-container .close-btn,
.popup-container .close-btn,
.settings-container .close-btn {
    aspect-ratio: 1/1;
    font-size: 16px;
    width: 2em;
    height: 2em;
    position: absolute;
    right: 16px;
    top: calc(50% + 16px);
    z-index: auto;
}

.popup h1 {
    text-align: center;
}

.popup .options {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
    gap: 16px;
}

.popup .options > .btn {
    width: 150px;
    height: 100px;
    font-size: 24px;
    margin: 0;
}

.popup .options input[type="radio"] {
    display: none;
}

.popup .options input[type="radio"]:checked + .btn {
    box-shadow: 
        0 0 1em 0em var(--light-color),
        inset 0 .125em .5em 0 var(--light-color);
}

.popup .start-btn {
    width: 100%;
    height: 36px;
}

.popup button {
    text-transform: uppercase;
    font-size: 24px;
}

.popup .mode {
    text-transform: uppercase;
}

.howtoplay {
    height: 80%;
    overflow-y: auto;
    position: relative;
    width: 80vmin;
}

.howtoplay h1,
.howtoplay h2,
.howtoplay h3 {
    text-align: center;
}

.howtoplay h1 {
    font-size: 48px;
}

.howtoplay h2 {
    font-size: 32px;
}

.howtoplay h3 {
    font-size: 24px;
}

.settings h1 {
    text-align: center;
}

.full .canvas {
    --light-size: 1vmin;
    aspect-ratio: 1/1;
    height: 100vw;
    transform: scale(.8);
    border: 0;
    box-shadow: 0 0 var(--light-size) 0 var(--light-color);
    position: relative;
    overflow: hidden;
}

.canvas > * {
    height: 100%;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.summary {
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
    font-size: 4vmin;
    text-align: center;
    top: -100%;
    padding-top: 100%;
    height: 200%;
    opacity: 1;
    transition:
        opacity 1s ease-in-out,
        top 1s ease-in-out;
}

.summary.hide {
    opacity: 0;
    top: 0;
}

.summary :last-child {
    position: absolute;
    bottom: 16px;
    width: 100%;
    text-align: center;
}

.menu, .full {
    opacity: 1;
    transition: 1s opacity ease-in-out;
}

.menu.menu-hidden, .full.full-hidden {
    opacity: 0;
}

@media (min-aspect-ratio: 7/10) {
    .full .canvas {
        height: 100%;
    }
}

.hidden {
    display: none;
}

.box {
    border: 2px var(--light-color) solid;
    box-shadow: 
        0px 0px 8px 0px var(--light-color),
        inset 0px 0px 8px 0px var(--light-color),
        0px 0px 100px -20px var(--light-color-transparent),
        inset 0px 0px 40px -20px var(--light-color-transparent);
}

.updates {
    width: 100%;
    max-height: 30vh;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.updates ul {
    margin-left: 1.5em;
}

.updates li {
    font-size: 12px;
}

.updates h1 {
    font-size: 16px;
}

.sidebar .info.hide > *:not(.box-name, p:first-of-type, .btn) {
    display: none;
}

.sidebar .info p,
.sidebar .info li {
    font-size: 16px;
}

.sidebar .info h1 {
    font-size: 28px;
}

.sidebar .info h2 {
    font-size: 20px;
}

.sidebar .info h1,
.sidebar .info h2 {
    text-align: center;
}

.sidebar .info li:not(:last-child),
.sidebar .info li > *:not(:last-child) {
    margin-bottom: 8px;
}

.input {
    letter-spacing: 1px;
    font-size: 20px;
    height: 2em;
    border-radius: 1em;
    padding: 0 1em;
    border: 2px var(--light-color-transparent) solid;
    box-shadow: 
        0 0 .5em -.125em var(--light-color-transparent),
        inset 0 -.5em .5em -.5em var(--light-color-transparent);
    background-color: transparent;
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: .6em;
    width: 100%;
    margin: 0 auto;
    color: white;
    transition: 
        box-shadow .2s ease-in-out;
}

.input:hover,
.input:focus {
    box-shadow: 
        0 0 1em 0em var(--light-color-transparent),
        inset 0 0 .5em 0 var(--light-color-transparent);
    /* box-shadow: 
        0 0 1em 0em var(--light-color-transparent),
        inset 0 .125em .5em 0 var(--light-color-transparent); */
}

.input[type="text"]::selection {
    background-color: white;
    color: black;
}

.btn {
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    font-size: 18px;
    height: 3em;
    border-radius: 1em;
    padding: 0 1em;
    border: 2px var(--light-color) solid;
    box-shadow: 
        0 0 .5em -.125em var(--light-color),
        inset 0 -.5em .5em -.5em var(--light-color);
    background-color: transparent;
    text-align: center;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: .6em;
    width: fit-content;
    margin: 0 auto;
    transition: 
        box-shadow .2s ease-in-out;
}

.btn:disabled {
    filter: grayscale(100%) brightness(60%);
    cursor: not-allowed;
}

.btn:not(.btn-center) > *:not(span) {
    height: 50%;
}

.btn.btn-center {
    justify-content: center;
}

.btn:hover:not(:disabled),
.btn.btn-focus:focus:not(:disabled) {
    box-shadow: 
        0 0 1em 0em var(--light-color),
        inset 0 .125em .5em 0 var(--light-color);
}

.buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.buttons .btn {
    margin: 0;
}

.animated {
    animation: rotating-animation;
    animation-duration: 3s;
    animation-timing-function: cubic-bezier(0.5, 0.2, 0.5, 0.8);
    animation-iteration-count: infinite;
    animation-direction: alternate-reverse;
    animation-play-state: running;
}

@keyframes rotating-animation {
    0% { transform: rotate(-8deg); }
    50% { transform: rotate(0deg) scale(1.2); }
    100% { transform: rotate(4deg); }
}

@media (max-width: 560px) {
    .full .canvas {
        transform: scale(.9);
    }
}

@media (max-height: 800px) {
    .container {
        grid-template-rows: 4fr 12fr;
        height: calc(100vh / 17 * 16);
    }

    .footer {
        height: calc(100vh / 17);
    }
}

@media (max-width: 800px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-rows: 160px repeat(3, min-content);
        /* height: auto; */
    }

    .container > *:not(.popup-container, .settings-container, .howtoplay-container) {
        grid-column: auto;
        width: 100%;
        margin: 0 auto;
    }

    .full {
        grid-row: 2 / 6;
    }

    .header { order: 1; }
    .full, .content { order: 2; }
    .sidebar-left { order: 3; }
    .sidebar-right { order: 4; }
}