:root {
    --doc-height: 100%;
    --doc-width: 100%;
}

html {
    width: 100vw;
    width: var(--doc-width);
    height: 100vh;
    height: var(--doc-height);
    font-family: 'Ubuntu', sans-serif;
}

body {
    width: 100%;
    width: var(--doc-width);
    height: 100%;
    height: var(--doc-height);
    margin: 0;
    overflow: hidden;
    background-color: #2A2A2A;
    position: relative;
}

.wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: relative;
}

.settings-wrapper {
    width: 25%;
    height: 100%;
    padding: 93px 33px 33px 33px;
    background-color: #3A3A3A;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    box-sizing: border-box;
    position: absolute;
    left: -25%;
    transition: left 0.35s;
    overflow: hidden;
}

.active.settings-wrapper {
    left: 0;
}


.settings-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    overflow: scroll;
}

.settings {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
}

.range-slider-container {
    width: 100%;
    height: 25px;
}

.settings-label {
    color: #ABC;
    font-size: 1.2vh;
    font-weight: 500;
    text-transform: uppercase;
    margin: 25px auto 5px 0;
}

.settings-label:first-child {
    margin-top: 0;
}

input[type="text"].settings-controller {
    width: 100%;
    height: 40px;
    background-color: transparent;
    border: 2px solid #777777;
    border-radius: 5px;
    box-sizing: border-box;
    color: #FFF;
    padding-left: 10px;
    font-family: 'Ubuntu', sans-serif;
}

input[type="range"].settings-controller {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 25px;
    background: #777777;
    outline: none;
    border-radius: 5px;
}

input[type="range"].settings-controller::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 25px;
    height: 25px;
    background: #FFCCDD;
    cursor: pointer;
}

input[type="range"].settings-controller::-moz-range-thumb {
    width: 25px;
    height: 25px;
    background: #FFCCDD;
    cursor: pointer;
}

.color-selector-wrapper {
    width: 100%;
    height: 80px;
    display: grid;
    grid-template-rows: 1fr;
}

.color-selector-wrapper#grid-color-wrapper {
    grid-template-columns: repeat(3, 1fr);
}

.color-selector-wrapper#snake-color-wrapper {
    grid-template-columns: repeat(2, 1fr);
}

.color-selector-background {
    width: 90%;
    height: 100%;
    border: 2px solid #777777;
    border-radius: 5px;
    padding: 0;
    box-sizing: border-box;
    margin: auto;
    background-color: transparent;
    position: relative;
}

.color-selector-background-label {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    margin: 0;
    opacity: 0;
    transition: opacity 0.1s;
    font-size: 1vh;
}

input[type="color"].settings-controller {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    padding: 0;
    box-sizing: border-box;
    margin: auto;
    opacity: 1;
    transition: opacity 0.1s;
    z-index: 1;
    cursor: pointer;
}

input[type="color"].settings-controller:hover {
    opacity: 0;
}

input[type="color"].settings-controller::-moz-color-swatch {
    border: none;
}

input[type="color"].settings-controller::-webkit-color-swatch-wrapper {
    padding: 0;
    border-radius: 0;
    border: none;
}

input[type="color"].settings-controller::-webkit-color-swatch {
    border: none;
}

.color-selector-background:first-child {
    margin-left: 0;
}

.color-selector-background:last-child {
    margin-right: 0;
}

.settings-button {
    width: 100%;
    height: 50px;
    background-color: transparent;
    border: 2px solid #777777;
    border-radius: 5px;
    box-sizing: border-box;
    outline: none;
    color: #FFF;
    font-family: 'Ubuntu', sans-serif;
    cursor: pointer;
    margin: 15px 0 0 0;
}

.settings-label.button-group-label {
    margin: 50px 0 0 0;
}

.settings-label#config-file-label {
    margin: 50px 0 0 0;
}

.settings-button#reset-settings {
    background-color: #FF9B9B;
    font-weight: bold;
    color: #3A3A3A;
    text-transform: uppercase;
    margin: 50px 0 0 0;
    transition: color 0.25s, background-color 0.25s;
}

.settings-button#reset-settings:hover {
    color: #000;
    background-color: #FF6868;
}

.settings-button#reset-highscore {
    background-color: #FF9B9B;
    font-weight: bold;
    color: #3A3A3A;
    text-transform: uppercase;
    margin: 15px 0 0 0;
    transition: color 0.25s, background-color 0.25s;
}

.settings-button#reset-highscore:hover {
    color: #000;
    background-color: #FF6868;
}

.settings-button.config-button {
    background-color: #2A2A2A;
    color: #AAA;
    margin: 15px 0 0 0;
    transition: color 0.25s, background-color 0.25s;
}

.settings-button.config-button:hover {
    color: #FFF;
    background-color: #444;
}

.main-container {
    width: 100%;
    height: 100%;
    padding: 50px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    left: 0;
    transition: width 0.35s, left 0.35s;
}

.active.main-container {
    width: 75%;
    left: 25%;
}

.title-wrapper {
    width: 100%;
    height: 12%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.title-container {
    width: 100%;
    height: 70%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
}

.title-image {
    width: auto;
    height: 60%;
}

.title {
    margin: 0 5px 0 15px;
    font-family: 'Snake', sans-serif;
    color: white;
    font-size: 4em;
}

.high-score-container {
    width: 100%;
    height: 30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.high-score {
    font-weight: bold;
    font-size: 2.5vh;
    color: #FFF;
    font-family: 'Snake', sans-serif;
    margin: 0;
}

.game-container {
    width: 100%;
    height: 88%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.student {
    font-size: 1.1vh;
    color: #AAA;
    margin: 0;
    text-transform: uppercase;
}

/* Default Game Grid Settings */
.grid {
    height: calc((100vh - 100px) * 0.85);
    width: calc((100vh - 100px) * 0.85);
    box-sizing: border-box;
    border: 25px solid transparent;
    display: grid;
    grid-auto-flow: row;
    grid-gap: 0;
}

.grid-cell {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Error Formatting */
.error-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
}

.active.error-wrapper {
    opacity: 1;
    pointer-events: all;
}

.error-container {
    padding: 30px 60px;
    box-sizing: border-box;
    border: 10px solid #FF474C;
    background-color: #FFADB0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.error-title {
    font-size: 3.5vh;
    font-weight: 800;
    margin: 0 0 10px 0;
    text-transform: uppercase;
    color: #610000;
}

.error-message {
    margin: 0 0 10px 0;
}

.error-config {
    margin: 5px 0 0 0;
}

.error-reload {
    padding: 20px 30px;
    box-sizing: border-box;
    border: none;
    font-family: 'Ubuntu', sans-serif;
    font-size: 1.5vh;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #000;
    color: #FFF;
    outline: none;
    margin: 60px 30px 0 30px;
    cursor: pointer;
    transition: transform 0.25s, background-color 0.25s;
}

.error-reload:hover {
    transform: scale(1.1);
    background-color: #2A2A2A;
}

.error-reload:focus {
    transform: scale(1.1);
    background-color: #2A2A2A;
}

.confirmation-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    margin: 60px 0 0 0;
}

.confirmation-yes-button {
    width: 120px;
    padding: 20px 30px;
    box-sizing: border-box;
    border: 2px solid #000;
    border-radius: 5px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 1.5vh;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #000;
    color: #FFF;
    outline: none;
    margin: 0 12px 0 0;
    cursor: pointer;
    transition: transform 0.25s, background-color 0.25s;
}

.confirmation-yes-button:hover {
    transform: scale(1.1);
    background-color: #2A2A2A;
}

.confirmation-yes-button:focus {
    transform: scale(1.1);
    background-color: #2A2A2A;
}

.confirmation-no-button {
    width: 120px;
    padding: 20px 30px;
    box-sizing: border-box;
    border: 2px solid #777777;
    border-radius: 5px;
    font-family: 'Ubuntu', sans-serif;
    font-size: 1.5vh;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #FF9B9B;
    color: #3A3A3A;
    outline: none;
    margin: 0 0 0 12px;
    cursor: pointer;
    transition: transform 0.25s, background-color 0.25s, color 0.25s;
}

.confirmation-no-button:hover {
    transform: scale(1.1);
    color: #000;
    background-color: #FF6868;
}

.confirmation-no-button:focus {
    transform: scale(1.1);
    color: #000;
    background-color: #FF6868;
}

.death-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
}

.active.death-wrapper {
    opacity: 1;
    pointer-events: all;
}

.death-container {
    padding: 50px 75px;
    box-sizing: border-box;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 10px solid #FFF;
}

.death-title {
    color: #FFF;
    font-size: 4vh;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0 0 5px 0;
}

.death-message {
    color: #FFF;
    font-size: 2vh;
    text-transform: uppercase;
    margin: 0;
}

.death-retry {
    padding: 15px 30px;
    box-sizing: border-box;
    border: 2px solid #FFF;
    font-family: 'Ubuntu', sans-serif;
    font-size: 1.5vh;
    font-weight: bold;
    text-transform: uppercase;
    background-color: #ACDF87;
    outline: none;
    margin: 30px 0 0 0;
    cursor: pointer;
    transition: transform 0.25s, background-color 0.25s;
}

.death-retry:hover {
    transform: scale(1.1);
    background-color: #68BB59;
}

.death-retry:focus {
    transform: scale(1.1);
    background-color: #68BB59;
}

.pause-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
}

.active.pause-wrapper {
    opacity: 1;
    pointer-events: all;
}

.pause-container {
    padding: 50px 75px;
    box-sizing: border-box;
    background-color: #000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border: 10px solid #FFF;
}

.pause-title {
    color: #FFF;
    font-size: 4vh;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0 0 5px 0;
}

.pause-message {
    color: #FFF;
    font-size: 2vh;
    text-transform: uppercase;
    margin: 0;
}

/* The Fancy CSS for Settings Menu Icon */
svg {
    height: 100px;
    position: absolute;
    width: 100px;
}

.menu-icon {
    height: 100px;
    width: 100px;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 5;
    transform: scale(0.6);
}

.menu-icon-svg {
    filter: url(#menu);
}

.x {
    transform: scale(0);
    transition: transform 400ms;
}

.line {
    fill: none;
    stroke: white;
    stroke-width: 6px;
    stroke-linecap: round;
    stroke-linejoin: round;
    transform-origin: 50%;
    transition: stroke-dasharray 500ms 200ms, stroke-dashoffset 500ms 200ms, transform 500ms 200ms;
}

.x .line {
    stroke-width: 5.5px;
}

.menu-icon .line1 {
    stroke-dasharray: 21 185.62753295898438;
    transition-delay: 0ms;
}

.menu-icon .line2 {
    stroke-dasharray: 21 178.6514129638672;
    transition-delay: 30ms;
}

.menu-icon .line3 {
    stroke-dasharray: 21 197.92425537109375;
    transition-delay: 60ms;
}

.menu-icon .line4 {
    stroke-dasharray: 21 190.6597137451172;
    transition-delay: 90ms;
}

.menu-icon .line5 {
    stroke-dasharray: 21 208.52874755859375;
    transition-delay: 120ms;
}

.menu-icon .line6 {
    stroke-dasharray: 21 186.59703063964844;
    transition-delay: 150ms;
}

.active.menu-icon .line1 {
    stroke-dasharray: 5 185.62753295898438;
    stroke-dashoffset: -141px;
}

.active.menu-icon .line2 {
    stroke-dasharray: 5 178.6514129638672;
    stroke-dashoffset: -137px;
}

.active.menu-icon .line3 {
    stroke-dasharray: 5 197.92425537109375;
    stroke-dashoffset: -176px;
}

.active.menu-icon .line4 {
    stroke-dasharray: 5 190.6597137451172;
    stroke-dashoffset: -159px;
}

.active.menu-icon .line5 {
    stroke-dasharray: 5 208.52874755859375;
    stroke-dashoffset: -139px;
}

.active.menu-icon .line6 {
    stroke-dasharray: 5 186.59703063964844;
    stroke-dashoffset: -176px;
}

.active.menu-icon .x {
    transform: scale(1);
    transition: transform 400ms 250ms;
}

/* Preloader */
.preloader {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    position: absolute;
    background: radial-gradient(#313131, #000);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
}

.active.preloader {
    opacity: 1;
    pointer-events: all;
}

.preloader-container {
    width: 150px;
    height: 150px;
    border-radius: 100%;
    background: linear-gradient(165deg, rgba(0, 0, 0, 1) 0%, rgb(35, 35, 35) 40%, rgb(85, 85, 85) 98%, rgb(245, 245, 245) 100%);
    position: relative;
}

.loader {

}

.loader:before {
    position: absolute;
    content: '';
    width: 100%;
    height: 100%;
    border-radius: 100%;
    border-bottom: 0 solid #ffffff05;

    box-shadow:
            0 -10px 20px 20px #44444440 inset,
            0 -5px 15px 10px #44444450 inset,
            0 -2px 5px #44444480 inset,
            0 -3px 2px #444444BB inset,
            0 2px 0 #444444,
            0 2px 3px #444444,
            0 5px 5px #44444490,
            0 10px 15px #44444460,
            0 10px 20px 20px #44444440;
    filter: blur(3px);
    animation: 2s rotate linear infinite;
}

@keyframes rotate {
    100% {
        transform: rotate(360deg)
    }
}

.preloader-text {
    font-size: 1.65vh;
    margin: 30px 0 0 0;
    color: #BBB;
    animation: 2s glow linear infinite;
}

@keyframes glow {
    0% {
        color: #BBB;
    }
    50% {
        color: #888;
    }
    100% {
        color: #BBB;
    }
}

/* Default */
.noselect {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

::-webkit-scrollbar {
    display: none;
}