:root {
    --outer-check-width: 40px;
    --outer-check-height: 20px;
    --inner-check-padding: 3px;
    --border-radius: 0.5;
    --transition-duration: 400ms;
    --expand-duration: calc(var(--transition-duration) / 2);

    --inner-check-height: calc(var(--outer-check-height) - (var(--inner-check-padding) * 2));
    --inner-check-width: var(--inner-check-height);
    --inner-check-width-expanded: calc(var(--outer-check-width) - (var(--inner-check-padding) * 2));
    --inner-check-left-unchecked: var(--inner-check-padding);
    --inner-check-left-checked: calc(var(--outer-check-width) - var(--inner-check-width) - var(--inner-check-padding));
    --inner-check-border-radius: calc(var(--inner-check-height) * var(--border-radius));
    --outer-check-border-radius: calc(var(--outer-check-height) * var(--border-radius));

    --inner-check-color-checked: hsl(0, 0%, 0%);
    --inner-check-color-checked-hover: hsl(0, 0%, 0%);
    --inner-check-color-unchecked: hsl(0, 0%, 0%);
    --inner-check-color-unchecked-hover: hsl(0, 0%, 0%);
    --outer-check-color-unchecked: hsl(0, 0%, 52%);
    --outer-check-color-unchecked-hover: hsl(210, 4%, 80%);

    --outer-check-color-checked: #606fd2;
    --outer-check-color-checked-hover: hsl(232, 56%, 70%);

    --page-text-color: hsl(0, 0%, 100%);
    --page-background-color: #141414;
    --help-section-background-color: hsl(0, 0%, 24%);

    --text-input-background-color: #282828;
    --text-input-text-color: hsl(0, 0%, 100%);
    --text-intput-hint-color: hsl(0, 0%, 75%);
    --text-input-border-size: 1px;
    --text-input-border-radius: var(--outer-check-border-radius);
    --text-input-width: 45%;
    --or-separator-width: 2%;
    --solo-input-width: calc((var(--text-input-width) * 2) + var(--or-separator-width));
}

:root.light {
    --inner-check-color-checked: hsl(0, 0%, 100%);
    --inner-check-color-checked-hover: hsl(0, 0%, 100%);
    --inner-check-color-unchecked: hsl(0, 0%, 100%);
    --inner-check-color-unchecked-hover: hsl(0, 0%, 100%);

    --outer-check-color-checked: hsl(232, 56%, 60%);
    --outer-check-color-checked-hover: hsl(232, 56%, 70%);
    --outer-check-color-unchecked: hsl(210, 4%, 88%);
    --outer-check-color-unchecked-hover: hsl(210, 4%, 80%);

    --page-text-color: hsl(0, 0%, 0%);
    --page-background-color: hsl(228, 100%, 87%);
    --help-section-background-color: hsl(0, 0%, 58%);

    --text-input-background-color: hsl(232, 56%, 70%);
    --text-input-text-color: hsl(0, 0%, 0%);
    --text-intput-hint-color: hsl(0, 0%, 85%);
    --text-input-border-radius: var(--outer-check-border-radius);
}

#lightModeToggle.light {
    filter: brightness(0) saturate(100%) invert(57%) sepia(3%) saturate(216%) hue-rotate(327deg) brightness(87%) contrast(89%);
}

#lightModeToggle {
    filter: invert(42%) sepia(93%) saturate(1352%) hue-rotate(25deg) brightness(119%) contrast(119%);
    position: absolute;
    top: 10px;
    left: 10px;
    cursor: pointer;
    width: 30px;
    height: 30px;
}

body {
    padding: 20px;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    height: fit-content;
    background-color: var(--page-background-color);
    color: var(--page-text-color);
}

.inputContainer {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: center;
}

#inputForm {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#permalink {
    width: fit-content;
}

.textInput {
    width: var(--text-input-width);
    height: 30px;
    max-width: var(--text-input-width);
    transition: width var(--transition-duration), height var(--transition-duration);
    border-radius: var(--outer-check-border-radius);
}

.or {
    width: var(--or-separator-width);
    text-align: center;
    transition: width var(--transition-duration), height var(--transition-duration);
    height: 30px;
    margin: 0;
    font-size: 16px;
}

.soloInput {
    width: var(--solo-input-width);
    max-width: var(--solo-input-width);
}

.hiddenInput {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 0;
}

#player{
    border-style: none;
}

.hiddenCheckbox {
    opacity: 0;
    transition: opacity var(--transition-duration);
}

input[type="text"] {
    background-color: var(--text-input-background-color);
    color: var(--text-input-text-color);
}

input[type="text"]::placeholder {
    color: var(--text-intput-hint-color);
    padding: 5px;
}

input[type="checkbox"] {
    margin-right: 5px;
}

input[type="submit"], button {
    background-color: var(--text-input-background-color);
    color: var(--page-text-color);
    border-radius: var(--inner-check-border-radius);
    border: var(--text-input-border-size) solid var(--outer-check-color-checked);
    width: var(--solo-input-width);
}

input[type="submit"]:hover, button:hover {
    background-color: var(--outer-check-color-checked);
    color: var(--page-text-color);
    border: var(--text-input-border-size) solid var(--outer-check-color-checked-hover);
    cursor: pointer;
}

label {
    margin-left: 5px;
    margin-right: 5px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

.collapsed {
    margin-top: 10px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.2s;
    outline: 2px solid transparent;
    background-color: var(--text-input-background-color);
    color: var(--page-text-color);
    border-radius: 5px;
    width: fit-content;
}

.expanded {
    margin-top: 10px;
    max-height: 1000px;
    overflow: hidden;
    transition: all 0.2s;
    outline: 2px solid transparent;
    background-color: var(--text-input-background-color);
    color: var(--page-text-color);
    border-radius: 5px;
    width: fit-content;
}


/*transition all but left*/
.niceCheckbox, .niceCheckbox::before, .niceCheckbox::after {
    transition: all var(--transition-duration), left 0;
}

.niceCheckbox {
    appearance: none;
    background-color: var(--outer-check-color-unchecked);
    border-radius: var(--outer-check-border-radius);
    height: var(--outer-check-height);
    position: relative;
    width: var(--outer-check-width);
    min-width: var(--outer-check-width);
}

@keyframes expand {
    0% {
        width: var(--inner-check-width);
        left: var(--inner-check-left-unchecked);
        /*background: var(--inner-check-color-unchecked);*/
    }
    50% {
        width: var(--inner-check-width-expanded);
        left: var(--inner-check-left-unchecked);
        /*background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, var(--inner-check-color-checked) 100%);*/
    }
    100% {
        width: var(--inner-check-width);
        left: var(--inner-check-left-checked);
        /*background: var(--inner-check-color-checked);*/
    }
}

@keyframes expand-reversed {
    0% {
        width: var(--inner-check-width);
        left: var(--inner-check-left-checked);
        /*background: var(--inner-check-color-checked);*/
    }
    50% {
        width: var(--inner-check-width-expanded);
        left: var(--inner-check-left-unchecked);
        /*background: linear-gradient(90deg, var(--inner-check-color-unchecked) 0%, rgba(255, 255, 255, 0) 100%);*/
    }
    100% {
        width: var(--inner-check-width);
        left: var(--inner-check-left-unchecked);
        /*background: var(--inner-check-color-unchecked);*/
    }
}

.niceCheckbox::after {
    background-color: var(--inner-check-color-unchecked);
    border-radius: var(--inner-check-border-radius);
    content: "";
    position: absolute;
    height: var(--inner-check-height);
    left: var(--inner-check-left-unchecked);
    top: var(--inner-check-padding);
    width: var(--inner-check-width);
}

.niceCheckbox.mid::after {
    animation: expand var(--expand-duration);
}

.niceCheckbox.mid-reverse::after {
    animation: expand-reversed var(--expand-duration);
}


.niceCheckbox:checked::after {
    background-color: var(--inner-check-color-checked);
    left: var(--inner-check-left-checked);
}

.niceCheckbox:hover {
    background-color: var(--outer-check-color-unchecked-hover);
    transition-duration: 0s;
}

.niceCheckbox:checked:hover {
    background-color: var(--outer-check-color-checked-hover);
    transition-duration: 0s;
}

.niceCheckbox:checked {
    background-color: var(--outer-check-color-checked);
}
/*landscape specific*/
/*(the rest of the css is geared towards landscape by default but this is the stuff we want to NOT apply when in portrait)*/
@media (orientation: landscape) {
    .hiddenInput {
        width: 0;
    }
}

/*landscape specific*/

/*portrait specific*/
@media (orientation: portrait) {

    .inputContainer {
        flex-direction: column;
        align-items: center;
    }

    .textInput {
        width: var(--solo-input-width);
        max-width: var(--solo-input-width);
    }

    .or {
        width: var(--solo-input-width);
        text-align: center;
    }

    .hiddenInput {
        margin: 0;
        padding: 0;
        border: 0;
        font-size: 0;
        height: 0;
    }

    @media (max-device-width: 600px) {
    }

    @media (max-device-width: 500px) {

        :root {
            --font-size: 50px;
            --scale: 2;
        }


        @keyframes expand {
            0% {
                width: calc(var(--inner-check-width)*var(--scale));
                left: calc(var(--inner-check-left-unchecked)*var(--scale));
                /*background: var(--inner-check-color-unchecked);*/
            }
            50% {
                width: calc(var(--inner-check-width-expanded)*var(--scale));
                left: calc(var(--inner-check-left-unchecked)*var(--scale));
                /*background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, var(--inner-check-color-checked) 100%);*/
            }
            100% {
                width: calc(var(--inner-check-width)*var(--scale));
                left: calc(var(--inner-check-left-checked)*var(--scale));
                /*background: var(--inner-check-color-checked);*/
            }
        }

        @keyframes expand-reversed {
            0% {
                width: calc(var(--inner-check-width)*var(--scale));
                left: calc(var(--inner-check-left-checked)*var(--scale));
                /*background: var(--inner-check-color-checked);*/
            }
            50% {
                width: calc(var(--inner-check-width-expanded)*var(--scale));
                left: calc(var(--inner-check-left-unchecked)*var(--scale));
                /*background: linear-gradient(90deg, var(--inner-check-color-unchecked) 0%, rgba(255, 255, 255, 0) 100%);*/
            }
            100% {
                width: calc(var(--inner-check-width)*var(--scale));
                left: calc(var(--inner-check-left-unchecked)*var(--scale));
                /*background: var(--inner-check-color-unchecked);*/
            }
        }

        #lightModeToggle{
            width: 50px;
            height: 50px;
        }

        h1 {
            font-size: calc(var(--font-size)*1.3);
        }

        p, a {
            font-size: calc(var(--font-size)/1.5);
        }

        .textInput {
            height: 150px;
            border-radius: 50px;
            font-size: var(--font-size);
            flex-direction: column;
        }

        input[type="submit"], button{
            height: 150px;
            border-radius: 50px;
            font-size: var(--font-size);
        }

        .niceCheckbox {
            appearance: none;
            background-color: var(--outer-check-color-unchecked);
            border-radius: var(--outer-check-border-radius);
            height: calc(var(--outer-check-height)*var(--scale));
            position: relative;
            width: calc(var(--outer-check-width)*var(--scale));
            min-width: calc(var(--outer-check-width)*var(--scale));
        }

        .niceCheckbox::after {
            background-color: var(--inner-check-color-unchecked);
            border-radius: var(--inner-check-border-radius);
            content: "";
            position: absolute;
            height: calc(var(--inner-check-height)*var(--scale));
            left: calc(var(--inner-check-left-unchecked)*var(--scale));
            top: calc(var(--inner-check-padding)*var(--scale));
            width: calc(var(--inner-check-width)*var(--scale));
        }

        .niceCheckbox:checked::after {
            background-color: var(--inner-check-color-checked);
            left: calc(var(--inner-check-left-checked)*var(--scale));
        }

        .or {
            height: 70px;
            font-size: var(--font-size);
        }

        .hiddenInput {
            margin: 0;
            padding: 0;
            border: 0;
            font-size: 0;
            height: 0;
        }

        label {
            font-size: var(--font-size);
        }

        @media (max-device-width: 400px) {
        }
    }
}

/*portrait specific*/
