:root {
    --bg: #003C25;
    --em: #70A288;
    --hl: #971919;
    --tx: #FFFFFF;
    --t2: #e3e396;
    --sh: #000000;
    --nav-height: 50px;
    --text-height: var(--nav-height);
    --speed: 1s;

    --ttt-size: calc(max(6vw,50px));
    --c4-size: calc(max(5vw,50px));
    --c4-cP: #54b033;
    --c4-cN: #b03a33;
}

.righteous-regular {
    font-family: "Righteous", sans-serif;
    font-weight: 400;
    font-style: normal;
}

.vt323-regular {
    font-family: "VT323", monospace;
    font-weight: 400;
    font-style: normal;
    font-variant-ligatures: none;
    font-stretch: normal;
    font-optical-sizing: auto;
}

html{
    height: 100%;
    width: 100%;
    max-height: 100%;
    max-width: 100%;
    min-height: 100%;
    min-width: 100%;
}
body{
    height: 100%;
    width: 100%;
    max-height: 100%;
    max-width: 100%;
    min-height: 100%;
    min-width: 100%;

    background-color: var(--bg);
    color: var(--tx);
    text-shadow: 4px 4px 3px var(--sh);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.animate, .animate *{
    transition:         all var(--speed) ease-in-out;
    -moz-transition:    all var(--speed) ease-in-out;
    -webkit-transition: all var(--speed) ease-in-out;
    -o-transition:      all var(--speed) ease-in-out;
}

.welcome{
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    text-align: center;
    justify-content: center;

    padding: 2rem 6rem;
    @media (orientation: portrait) {
        padding: initial;
    }


    --text-height: calc(min(14vw, 12rem));

    h1{
        flex-shrink: 1;
        height: var(--text-height);
        line-height: var(--text-height);
        font-size: var(--text-height);
    }
    p{
        flex-shrink: 1;
        height: calc(var(--text-height)*0.31);
        line-height: calc(var(--text-height)*0.31);
        font-size: calc(var(--text-height)*0.31);
    }
    .spacer{
        flex: 0;
    }
    .points{
        align-self: center;
        align-items: center;
        display: flex;
        visibility: hidden;
        opacity: 0;
        max-height: 0;

        .closed { display: none; }
        .lcd{
            font-size: calc(var(--text-height)* 0.5);
            line-height: calc(var(--text-height)* 0.5);
            border-radius: 6px;
            margin-left: 0.3rem;
        }
    }
    &.closed{
        position: sticky;
        top: 0;
        margin:  0 !important;
        padding: 0 10px !important;

        --text-height: var(--nav-height) !important;
        .spacer{ flex: auto; }
        .points{
            visibility: visible;
            opacity: 1;
            margin-left: auto;
            max-height: unset;
        }
    }
}

.scores{
    display: flex;
    max-height: 100%;
    flex: 1;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    text-align: center;
    justify-content: center;
    align-content: center;

    padding: 2rem;
    @media (orientation: portrait) {
        margin:  initial;
        padding: initial;
    }

    .score{
        border-radius: 25px;
        background-color: var(--em);
        margin: 40px;
        padding: 40px 60px;
        box-shadow: 4px 4px 3px var(--sh);
        @media (orientation: portrait) {
            margin: 10px;
            padding: 10px 20px;
        }
    }

    .btn{
        color: var(--tx);
        border: none;
        background-color: var(--hl);
        box-shadow: 4px 4px 3px var(--sh);
        margin-top: 0.8rem;
        &:hover{  color: var(--t2); filter: brightness(75%); border: none; }
        &:active{ color: var(--t2); background-color: var(--hl); border: none; }
    }

    &.closed{
        visibility: hidden;
        opacity: 0;
        max-height: 0;
        margin:0;
        padding: 0;
        transform: translateX(100%);
    }
}

.steps{
    height: 100%;
    min-height: 100%;
    position: relative;
    overflow: hidden;

    .arrow {
        position: absolute;
        display: flex;
        top: 0;
        bottom: 0;
        margin: auto;
        height: 4rem;
        background-color: white;
        border: none;
        width: 2rem;
        font-size: 3rem;
        padding: 0;
        cursor: pointer;
        opacity: 0.5;
        transition: opacity 100ms;
        font-family: initial;
        line-height: initial;

        &:hover, &:focus {
            opacity: 1;
        }
        &#prev{
            left: 0;
            padding-left: 0.25rem;
            border-radius: 0 2rem 2rem 0;
        }
        &#next {
            right: 0;
            padding-left: 0.75rem;
            border-radius: 2rem 0 0 2rem;
        }
    }

    .wrapper{
        height: 100%;
        min-height: 100%;
        width: 100%;
        display: flex;
        margin: 0;
        padding: 0;
        overflow: hidden;
        scroll-behavior: smooth;
        scrollbar-width: none;
        -ms-overflow-style: none;
        &::-webkit-scrollbar {
            width: 0;
            height: 0;
        }
        .slide {
            width: 100%;
            height: 100%;
            flex: 1 0 100%;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-content: center;
            align-items: center;
        }
    }
}

.game{
    text-align: center;
    flex: 1;
    overflow: hidden;

    &.closed{
        visibility: hidden;
        opacity: 0;
        height: 0!important;
        min-height: 0!important;
        max-height: 0!important;
        /*transform: translateY(calc(100vh));*/
    }

    .slide{
        font-size: 8vw;
        line-height: 8vw;
        div .btn{
            background-color: #F7F8F7;
            width: calc(max(4vw, 48px));
            height: calc(max(4vw, 48px));
            font-size: calc(max(2vw, 1.25rem));
            line-height: calc(max(2vw, 1.25rem));
            border-radius: calc(max(0.6vw, 0.5rem));
            padding: 0;
        }
        #colorN{
            background-color: var(--c4-cN);
            border-color: var(--c4-cN);
        }
        #colorP{
            background-color: var(--c4-cP);
            border-color: var(--c4-cP);
        }
    }

    #gameTTT{
        .board {
            margin: 0 auto;
            box-shadow: 1px 1px 1px 1px #000503;
            background-color: #F7F8F7;
            color: #003C25;
            td {
                cursor: pointer;
                border: 2px solid #000503;
                width: var(--ttt-size);
                height: var(--ttt-size);
                margin: 0 auto;
                font-size: calc(0.5*var(--ttt-size));
                line-height: calc(0.5*var(--ttt-size));
                &.empty:hover { background-color: #71AA94; }
                &.score { background-color: #bfde91; }
            }
        }
        .lcd{
            font-size: calc(0.4*var(--ttt-size));
            line-height: calc(0.4*var(--ttt-size));
            padding: 0 0.8vw;
            margin: 15px auto;
        }
        .btn{
            font-size: calc(0.2*var(--ttt-size));
            line-height: calc(0.2*var(--ttt-size));
            color: var(--tx);
            background-color: var(--hl);
            box-shadow: 4px 4px 3px var(--sh);
            margin-top: 0.8rem;
            &:hover{  color: var(--t2); filter: brightness(75%); border: none; }
            &:active{ color: var(--t2); background-color: var(--hl); border: none; }
        }
    }

    #gameC4{
        .board {
            margin: 0 auto;
            box-shadow: 1px 1px 1px 1px #000503;
            background-color: #F7F8F7;
            color: #003C25;
            border-radius: calc(0.5*var(--c4-size));
            border-collapse: separate;
            border-spacing: calc(0.1* var(--c4-size));
            overflow: hidden;
            z-index: 1;

            td, th {
                cursor: pointer;
                position: relative;
            }

            td {
                border: 2px solid #000503;
                border-radius: calc(0.5*var(--c4-size));
                width: var(--c4-size);
                height: var(--c4-size);
                margin: 0 auto;
                font-size: calc(0.5*var(--c4-size));
                line-height: calc(0.5*var(--c4-size));
                background-color: var(--bg);
                box-shadow: inset 4px 4px 20px #000503;
                &.P{
                    background-color: var(--c4-cP);
                }
                &.N{
                    background-color: var(--c4-cN);
                }
                &.empty:hover {
                    border: 2px solid #cd3030;
                }
                &:hover::after {
                    background-color: #ff8686;
                    content: '\00a0';
                    height: 10000px;
                    left: -12%;
                    position: absolute;
                    top: -5000px;
                    width: 124%;
                    z-index: -1;
                }

                &.score {
                    border: 2px solid #f3ff00;
                    box-shadow: 0 0 30px #ecff00;
                }
            }
        }
        .lcd{
            font-size: calc(0.4*var(--c4-size));
            line-height: calc(0.4*var(--c4-size));
            padding: 0 0.8vw;
            margin: 15px auto;
        }
        .btn{
            font-size: calc(0.2*var(--c4-size));
            line-height: calc(0.2*var(--c4-size));
            color: var(--tx);
            background-color: var(--hl);
            box-shadow: 4px 4px 3px var(--sh);
            margin-top: 0.8rem;
            &:hover{  color: var(--t2); filter: brightness(75%); border: none; }
            &:active{ color: var(--t2); background-color: var(--hl); border: none; }
        }
    }
}

.lcd{
    background-color: rgb(0,64,0);
    text-align:center;
    line-height: 50px;
    font-size:32pt;
    border-top: 3px solid #000000ee;
    border-left: 3px solid #000000ee;
    border-bottom: 1px solid #cfcfcf33;
    border-right: 1px solid #cfcfcf33;
    border-radius: 10px;
    box-shadow: 0px 0px 50px #000000ee inset;
    text-shadow: 0px 0px 20px #ffff00cc;
    color: #00ff77cc;
}
.notrans, .notrans *{
    -webkit-transition: none !important;
    -moz-transition: none !important;
    -ms-transition: none !important;
    -o-transition: none !important;
    transition: none !important;
}
.svgShadow{
    filter: drop-shadow(4px 4px 3px var(--sh));
}