@font-face {
    font-family: "glacialIndifferenceFont";
    src:url("fonts/GLACIAL-INDIFFERENCE.REGULAR.OTF")
}


:root {
    --background : #242424;
    background-color: var(--background);
    color: white;
    font-family: "glacialIndifferenceFont";
    --small-font: 20px;
    --semi-font: 40px;
    --large-font: 80px;
    --huge-font: 120px;
    --margin: 10px;
    --legend-transition-length: 0.5s;
    --light-gray: #afafaf;
    --dark-gray: #494949;
    overflow: hidden;
}
@media screen and (max-width: 1050px){
    :root{
        --large-font: 6vw;
        --huge-font: 10vw;
        --margin: auto;
    }
}

*::selection{
    background-color: var(--light-gray);
    color: var(--background)
}

.counter{ 
    display: fixed;
    /* The input makes the field longer than we can see, we don't want that to influence the centering as it will look skewed, therefore we margin the div to offset the added length */
    margin-left: 2em;
    top: 0;
    font-size: var(--semi-font);
    text-align: center;
    min-width: 100vw;
    position: absolute;
    z-index: -1;
}

.counter input{
    background-color: var(--background);
    color: white;
    font-size: var(--semi-font);
    width: 4em;
    outline: none;
    border: 0px;
    text-decoration: underline gray;
}

.counter input:hover, .counter input:focus{
    text-decoration: underline var(--light-gray);
}

.amountSelect{
    float: left;
    z-index: 5;
    position: absolute;
    width: 15vw;
}

.amountSelect li{
    user-select: none;
    font-size: var(--small-font);
    list-style-type: none;
    transition: font-size 1s;
}

.amountSelect li:hover{
    font-size: var(--semi-font);
    cursor: pointer;
}

.icons{
    float: right;
}

.icons img{
    height: 2em;
    cursor: pointer;
    margin-left: 1em;
}

.center {
    display: flex;
    place-items: center;
    min-height: 92vh;
    min-width: 100vw;
    justify-content: center;
    position: absolute;
    z-index: -2;
}

.row{
    user-select: none;
    display: flex;
    min-width:fit-content;
    text-align: center;
}

binary-element{
    display: inline;
    width: 7em;
    margin: var(--margin);
    cursor: pointer;
}

.bit{
    --h: 1.2em;
    color: white;
    grid-row: 1;
    font-size: var(--huge-font);
    line-height: var(--h);
    margin-bottom: 24px;
    height: var(--h);
    overflow: hidden;
    transition: .3s;
    display: block;
}

.bitDisplay{
    transform: translateY(calc(var(--_t) * -1));
    transition: .3s;
}

.bitDisplay::after{
    content: "1";
    display: block;
    overflow: hidden;
}

.animate{
    --_t : var(--h)
}

.legendNumber{
    font-size: var(--large-font);
    color: var(--dark-gray);
    grid-row: 2;
    text-align: center;
    transition: color var(--legend-transition-length);
}

@keyframes throw-shadow{
    from{text-shadow: none;}
    to{text-shadow: 0 0 20px var(--light-gray)}
}

@keyframes fade-out-shadow{
    from{text-shadow: 0 0 20px var(--light-gray)}
    to{text-shadow: none;}
}

.legendNumberToggled{
    color: var(--light-gray);
    animation: throw-shadow var(--legend-transition-length) ease-out;
    text-shadow: 0px 0px 20px var(--light-gray);
}

.legendNumberUntoggled{
    color: var(--dark-gray);
    animation: fade-out-shadow var(--legend-transition-length) ease-in;
    text-shadow: none;  
}

@media screen and (max-width: 600px){
    .icons{
        display: none;
    }

    .counter, .counter input{
        font-size: var(--small-font);
    }

    binary-element{
        /* margin: 0; */
        width: 2.5em;
    }
}
