@import url('https://fonts.googleapis.com/css2?family=Baloo+Tammudu+2:wght@400;500&display=swap');
:root {
    --bg-color: #31343a;
    --text-color: #999999;
    --mq-active:false;
}

html {
    scroll-behavior: smooth;
    font-size: 100%;
}

@media only screen and (max-device-width: 500px) {
    :root {
        --mq-active:true;
    }
    html {
        scroll-behavior: smooth;
        font-size: 150%;
    }
    body {
        overscroll-behavior-y: contain;
    }
}


body {
    background-color: var(--bg-color);

    text-align: center;

    padding-bottom: 30px;
}

#canvas {
    z-index: 1;
}

h1, h2, h3, p {
    color: var(--text-color);
    font-family: 'Baloo Tammudu 2', cursive;
    
    margin: 0px;
}

h1 {
    width: fit-content;
    margin: 40px auto -30px auto;
    font-size: 5.2em;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);

    cursor: pointer;
}

h2 {
    font-size: 2rem;
    filter: opacity(0.9);

    margin-bottom: -10px;
}

h1 ~ input {
    transform: translate(0px, 9px);
    max-width: 80%;

    color: var(--text-color);
    font-family: 'Baloo Tammudu 2', cursive;
    font-size: 2.5rem;
    height: 4.5rem;
    font-weight: 500;
    text-align: center;

    background-color: transparent;
    outline: none;

    padding-top: 20px;
    border: 1px solid var(--text-color);
    border-radius: 3rem;

}
h1 ~ input:hover {
    transition: 0.5s;
    background-color: rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.non-empty-input {
    border: none;
}

#canvas {
    width: max-content;
    margin: 10px auto;
    position:relative;
}

#menu {
    width: 80%;
    max-width: 300px;
    margin: 10px auto;

    display: flex;
    flex-direction: column;
}

#menu > input{
    height: 3rem;
    margin-bottom: 1rem;
    box-shadow: 1px 1px 5px 3px rgba(0, 0, 0, 0.1),
        inset 1px 1px 5px 3px rgba(0, 0, 0, 0.1);
    color: var(--text-color);
    font-family: 'Baloo Tammudu 2', cursive;
    font-size: 1.5rem;
    text-align: center;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);

    background-color: transparent;
    outline: none;

    padding-top: 1rem;
    border: 1px solid var(--text-color);
    border-radius: 2rem;
}

#menu > input:disabled {
    border: none;
    box-shadow: none;
}

@media only screen and (max-device-width: 500px) {
    #menu {
        max-width: 80%;
    }
    
    #menu > input {
        height: 5rem;
        width: 100%;
        font-size: 3rem;
        padding-top: 1.5rem;
        border-radius: 2.5rem;
    }

    #new-option-btn {
        font-size: 10rem;
    }
}

#new-option-btn {
    font-size: 2.5rem;
    color: var(--text-color);
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
    background-color: transparent;
    border: none;
}

@media only screen and (max-device-width: 500px) {
#new-option-btn {
    font-size: 5rem;
}
}

#new-option-btn:enabled:hover {
    transition: 0.4s;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.6);
    transform: scale(1.1);
    animation: pulse 1s linear infinite;
}

#new-option-btn:disabled {
    filter: opacity(0.4);
}

@keyframes pulse {
    0% {transform: scale(1.1);}
    25% {transform: scale(1.2);}
    75% {transform: scale(1);}
    100%{transform: scale(1.1);}
}

#new-option-btn:active {
    transition: 0.2s;
    animation: none;
    transform: scale(0.9);
    filter: opacity(0.6);
}

#winner {
    position: absolute;
    background-color: var(--text-color);
    box-shadow: 1px 1px 9px 5px rgba(0, 0, 0, 0.4);

    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);

    width: calc(500px * 0.92);
    height: calc(500px * 0.92);
    border-radius: 250px;

    z-index: 100;

    color: var(--bg-color);
    font-family: 'Baloo Tammudu 2', cursive;
    font-size: 3rem;
    font-weight: 500;
    text-align: center;
    line-height: 470px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

@media only screen and (max-device-width: 500px) {
    #winner {
        width: calc(800px * 0.92);
        height: calc(800px * 0.92);
        font-size: 5rem;
        border-radius: 400px;
        line-height: 780px;
    }
}

.appear {
    animation: come-up 0.5s ease-in-out;
}

@keyframes come-up{
    from {transform: translate(-50%, -50%) scale(0);}
    to {transform: translate(-50%, -50%) scale(1);}
}

.disappear {
    animation: disappear 0.5s forwards;
}

@keyframes disappear {
    from {transform: translate(-50%, -50%) scale(1);}
    to {transform: translate(-50%, -50%) scale(0);}
}

input:disabled {
    border: none;
}

#num-clients {
    position: absolute;
    top: 10%;
    right: 10%;

    color: var(--text-color);
    font-size: 2.5rem;

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;

    width: fit-content;
    height: fit-content;
}

#num-clients > p {
    transform: translate(0.5rem, -1rem);
}

@media only screen and (max-device-width: 500px) {
    #num-clients {
        position: fixed;
        right: 10%;
        top: initial;
        bottom: 2%;

        font-size: 4rem;
    }
}
