:root {
    --primary-dark: #333;
    --primary-light: #ededed;
    --secondary-light: #fefefe;
}

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

html {
    position: relative;
    min-height: 100%;
}

body {
    background: var(--primary-light);
    color: var(--primary-dark);
    font-family: 'Permanent Marker', sans-serif;
    line-height: 1.6;
    margin: 0 0 100px 0;
}

#background-video {
    width: 700vw;
    height: 150vh;
    object-fit: cover;
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    z-index: -1;
}

h1 {
    line-height: 1.2;
}

button,
input {
    width: 100%;
    border: none;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    cursor: pointer;
    outline: none;
}

header {
    padding: 1rem 0;
}

header>.title {
    text-align: center;
    font-size: 3rem;
}

main {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 100px;
    max-width: 1100px;
    margin: 0 auto;
}

.settings {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 30px;
    width: 200px;
}

button {
    padding: 10px 20px;
    border: 1px solid var(--primary-dark);
    border-radius: 5px;
}

button.active {
    background: var(--primary-dark);
    color: var(--primary-light);
}

button,
input[type='color'] {
    transition: transform 0.1s ease-in-out;
}

button:hover,
input[type='color']:hover {
    transform: scale(1.05);
}

input[type='color']:active {
    transition: transform 0.05s ease-in-out;
    transform: scale(1);
}

input[type='color'] {
    -webkit-appearance: none;
    width: 80px;
    height: 80px;
    border: none;
}

input[type='color']::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type='color']::-webkit-color-swatch {
    border: none;
    border-radius: 50px;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.size-value {
    margin-bottom: -20px;
    font-size: 20px;
}

input[type='range'] {
    -webkit-appearance: none;
    background-color: var(--primary-light);
}

input[type='range']::-webkit-slider-runnable-track {
    height: 10px;
    border: 1px solid var(--primary-dark);
    border-radius: 25px;
    background: var(--secondary-light);
}

input[type='range']::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 25px;
    margin-top: -8px;
    background: var(--primary-dark);
}

.grid {
    display: grid;
    width: 500px;
    height: 500px;
    background-color: var(--secondary-light);
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
}

.grid-element {
    user-select: none;
}

footer {
    position: absolute;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    font-family: sans-serif;
    padding-bottom:1rem;
    cursor:pointer;
}

.fa-github {
    color: var(--primary-dark);
    font-size: 24px;
    transition: transform 0.3s ease-in-out;
}

.fa-github:hover {
    transform: rotate(360deg) scale(1.2);
}

@media (max-width: 1200px) {
    main {
        gap: 5rem;
    }
}

@media (max-width: 850px) {
    header {
        padding: 2rem 0 0 0;
    }
    main {
        gap: 3rem;
        padding: 3rem;
    }
    .settings {
        width: 150px;
        gap: 1rem;
    }
    .size-value {
        margin: 0 0 -0.5rem 0;
    }
    .grid {
        width: 400px;
        height: 25rem;
    }
}

@media (max-width: 650px) {
    .title {
        font-size: 5rem;
    }
    main {
        flex-direction: column-reverse;
    }
    .grid {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 375) {
    .title {
        font-size: 2rem;
    }
    main {
        display: flex;
        flex-direction: column-reverse;
    }
    .grid {
        width: 300px;
        height: 300px;
    }
}
