:root {
    --dot-size: 1px;
    --anim-duration: 0.5s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #fefae0;
}

.main-container {
    max-width: 480px;
    overflow: hidden;
    height: 100dvh;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.noise-container {
    width: 100%;
    aspect-ratio: 1/1;
}


.noise-canvas circle {
    transition-property: all;
    animation-name: circle-anim;
    animation-timing-function: ease-in-out;
    animation-duration: var(--anim-duration);
    animation-delay: calc(var(--radius) * 1s);
    animation-iteration-count: infinite;
}

@keyframes circle-anim {
    50% {
        r: calc(var(--radius) * var(--dot-size))
    }
}

.edit-btn {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background-color: #fefae0;
    border: none;
    padding: 0.2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-container {
    position: fixed;
    top: 0.5rem;
    right: -15rem;
    height: fit-content;
    width: 14rem;
    background-color: #fefae0;
    border: 2px solid #2d3250;
    z-index: 1000;
    padding: 0.4rem;
}

.form-container .form {
    z-index: 1000;
    max-height: 49dvh;
    overflow-y: scroll;
    width: 100%;
    display: flex;
    gap: 0.3rem;
    flex-direction: column;
    align-items: start;
    justify-content: space-between;
}

.form-container .form div {
    width: 100%;
}

.form-container.slide-in {
    animation: slideIn 0.5s linear 1 forwards;
}

.form-container.slide-out {
    animation: slideOut 0.5s linear 1 forwards;
}

.form-container .form div.switch {
    position: relative;
    display: block;
    width: 2.5rem;
    height: 1.5rem;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #a9a694;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 1rem;
    width: 1rem;
    left: 4px;
    bottom: 4px;
    background-color: #fefae0;
    -webkit-transition: .4s;
    transition: .4s;
}

input:checked+.slider {
    background-color: #2d3250;
}

input:focus+.slider {
    box-shadow: 0 0 1px #2d3250;
}

input:checked+.slider:before {
    transform: translateX(1rem);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
}

input[type="range"]::-webkit-slider-runnable-track {
    background-color: #000000;
    border-radius: 0.5rem;
    height: 0.2rem;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    margin-top: -8px;
    background-color: #2d3250;
    border: 1px solid #000000;
    height: 1.1rem;
    width: 1.1rem;
    border-radius: 50%;
}

input[type="range"]::-moz-range-track {
    background-color: #040506;
    border-radius: 0.5rem;
    height: 0.2rem;
}

input[type="range"]::-moz-range-thumb {
    border: none;
    border-radius: 0;
    background-color: #2d3250;
    border: 1px solid #000000;
    height: 1.1rem;
    width: 1.1rem;
    border-radius: 50%;
}

input[type="range"]:focus::-moz-range-thumb {
    border: 1px solid #2d3250;
    outline: 2px solid #2d3250;
    /* outline-offset: 0.125rem; */
}

@keyframes slideIn {
    from {
        right: -15rem;
    }

    to {
        right: 0.5rem;
    }
}

@keyframes slideOut {
    from {
        right: 0.5rem;
    }

    to {
        right: -15rem;
    }
}