@import url(https://fonts.bunny.net/css?family=annie-use-your-telescope:400);

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    font-family: 'Annie Use Your Telescope', handwriting;
}

body {
    max-width: 800px;
    margin: auto;
}

canvas {
    display: block;
    width: 95%;
    border: 2px solid black;
    margin: auto;
}

.switch-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 20rem;
    margin: auto;
}

.switch {
    position: relative;
    display: inline-blocK;
    width: 3.5rem;
    height: 2rem;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: hsl(var(--hue, 210), 60%, 50%);
    -webkit-transition: .4s;
    transition: .4s;
    border-radius: 2rem;
}

.toggle-slider::before {
    position: absolute;
    content: "";
    height: 1.6rem;
    width: 1.6rem;
    top: 0.2rem;
    left: 0.2rem;
    border-radius: 50%;
    background-color: white;
    -webkit-transition: .4s;
    transition: .4s;

}

input:focus+.toggle-slider::before {
    box-shadow: 0 0 5px #2196F3;
}

input:checked+.toggle-slider::before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}

.range-container,
.settings-container {
    width: 95%;
    margin: 0.5rem auto;
    text-align: center;
    font-size: 1.5rem;
}

.settings-container {
    display: flex;
    flex-wrap: wrap;
}

.settings-container {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
}

.settings-container input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 0.2rem;
    background-color: #C6C6C6;
    pointer-events: none;
}

.range-slider {
    position: relative;
    left: -2px;
    min-height: 1rem;
    margin: 1rem 0;
    text-align: left;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: all;
    width: 1rem;
    height: 1rem;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #C6C6C6;
    cursor: pointer;
}

input[type=range]::-moz-range-thumb {
    appearance: none;
    pointer-events: all;
    width: 1rem;
    height: 1rem;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #C6C6C6;
    cursor: pointer;
}

.range-container input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 0.5rem;
    width: 100%;
    position: absolute;
    background-color: #C6C6C6;
    pointer-events: none;
}

.range-slider input:first-of-type {
    height: 0;
    margin-top: 0.4rem;
    z-index: 1;
}

.hue {
    background: linear-gradient(90deg,
            hsl(0, 100%, 50%),
            hsl(30, 100%, 50%),
            hsl(60, 100%, 50%),
            hsl(90, 100%, 50%),
            hsl(120, 100%, 50%),
            hsl(150, 100%, 50%),
            hsl(180, 100%, 50%),
            hsl(210, 100%, 50%),
            hsl(240, 100%, 50%),
            hsl(270, 100%, 50%),
            hsl(300, 100%, 50%),
            hsl(330, 100%, 50%),
            hsl(360, 100%, 50%));
}

.saturation {
    background: linear-gradient(90deg,
            hsl(var(--hue, 210), 0%, 50%),
            hsl(var(--hue, 210), 100%, 50%));
}

.lightness {
    background: linear-gradient(90deg,
            hsl(210, 100%, 0%),
            hsl(210, 100%, 100%));
}

@media (max-width: 480px) {
    .range-slider {
        width: 90%;
        left: 15px; /*there's probably a better way*/
    }
}