﻿Main {
    width: 100%;
    height: 100%;
    // border: 1px solid red;
    // width: 320px;
    // height: 240px;
    // transform: scale(8);
    // image-rendering: pixelated;
    font-smooth: never;
    // font-size: 500%;

    // font-family: "Pixelify Sans";
}

.drift-score {
    position: absolute;
    top: 50px;
    left: 50px;
    // color: gray;

    // font-weight: bold;
    font-family: "Lilian";
    font-size: 80px;
    white-space: pre;
    // font-weight: bold;
    // font-style: italic;
    
    // text-stroke: 0.5em black;
    text-shadow: 5px 5px 0 rgba(0, 0, 0, 0.95);

    // flex-direction: column;
    
    gap: 20px;
    
    .stats {
        flex-direction: column;
        width: 600px;
    }

    &.active {
        .current {
            color: linear-gradient(90deg, orange, red );
        }
    }

    .current {
        // font-size: 40%;
        /* align-items: center;
        align-content: center;
        justify-content: center;
        gap: 50px;*/
        
        color: linear-gradient(90deg, lightgray, darkgray );
    }
    
    row {
        // font-size: 100%;
        // gap: 20px;
        justify-content: space-between;        
        column:first-child {
            flex-grow: 1;
        }
    }
    
    // text-stroke: 5px black;
    
    .max {
        // font-size: 14px;
        // color: orange;
        color: linear-gradient(
                        90deg,
                        #6dc6e7,
                        #349cf1
        );
        // background-image: linear-gradient(90deg, red, orange );
        // mask-image: linear-gradient(90deg, red, orange );
        // mask-mode: alpha;
        overflow: hidden;
    }
    
    .total {
        // font-size: 100%;
        color: linear-gradient(90deg, yellow, darkorange );
    }
    
}

.drift-bonus {
    position: absolute;
    top: 320px;
    left: 50px;
    color: linear-gradient(90deg, yellow, darkorange );
    font-size: 60px;
    font-family: "Lilian";
    flex-direction: column;
    gap: 5px;
    text-shadow: 2px 2px 0 black;
}

.hub-stats {
    position: absolute;
    top: 50px;
    right: 50px;
    color: linear-gradient(90deg, skyblue, pink );
    font-size: 80px;
    font-family: "Lilian";
    // gap: 20px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    
    width: 700px;

    text-shadow: 5px 5px 0 rgba(0, 0, 0, 0.95);
    
    row {
        width: 100%;
        // gap: 20px;
        justify-content: space-between;
        column:first-child {
            flex-grow: 1;
        }
    }
}

.speedometer {
    position: absolute;
    bottom: -100px;
    right: 50px;
    color: yellow;
    font-size: 1.2em;
    // font-weight: bold;
    // font-family: Orbitron;
    font-style: italic;
    text-shadow: 2px 2px 0 black;
    gap: 20px;
    
    align-items: center;
    align-content: center;
    justify-content: center;
    
    // position: relative;
    
    width: 500px;
    height: 500px;
    // overflow: hidden;
    
    .dial {
        display: none;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        height: 100%;
        border-radius: 100%;
        background-color: rgba(0, 0, 0, 0.8);
        mask: conic-gradient(rgba(0, 0, 0, 0.8) 0%, transparent 50%, rgba(0, 0, 0, 0.8) 100%);
    }
    
    .numbers {
        position: absolute;
        font-family: "GrapeSoda";
        font-size: 40px;
        color: white;
        width: 100%;
        height: 100%;

        // border: 1px solid white;
        
        .number {
            position: absolute;
            flex-shrink: 0;
            transform: translate(-50%, -50%);
            
            // border: 1px solid white;
            // background-color: red;
            // width: 5px;
            // height: 5px;
            
            /*&.number-0 {
                top: 80%;
                left: 8%;
            }
            
            &.number-20 {
                top: 65%;
                left: 4%;
            }
            
            &.number-40 {
                top: 50%;
                left: 5%;
            }
            
            &.number-60 {
                top: 35%;
                left: 8%;
            }
            
            &.number-80 {
                top: 20%;
                left: 15%;
            }
            
            &.number-100 {
                top: 8%;
                left: 30%;
            }
            
            &.number-120 {
                top: 5%;
                left: 50%;
                transform: translate(-50%, 0);
            }
            
            &.number-240 {
                right: 10%;
                top: 80%;
            }*/
        }
    }
    
    .kmh {
        position: absolute;
        right: 50%;
        bottom: 20px;
        transform: translate(50%, 0);
        font-size: 40px;
    }

    .unit {
        font-size: 50px;
        margin-bottom: 15px;
    }
    
    .needle {
        position: absolute;
        width: 10px;
        height: 200px;
        background-color: red;
        transform-origin: 50% 100%;
        // transform: translateX(-50%) rotate(0deg);
        // transition: transform 0.1s;
        
        border-radius: 10px;
        // box-shadow: 4px 4px 0 black;
    }
    
    .needle-base {
        position: absolute;
        width: 40px;
        height: 40px;
        background-color: black;
        border-radius: 100%;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }
}

.loading {
    position: absolute;
    bottom: 50px;
    left: 50px;
    color: white;
    font-size: 120px;
    font-weight: bold;
    font-family: Arial;
    font-style: italic;
}

.help {
    color: white;
    flex-direction: column;
    position: absolute;
    top: 50px;
    left: 50px;
    font-size: 20px;
    font-family: Arial;
    text-shadow: 1px 1px 0 black;
}

.timer {
    /** base size sprite sheet 1920x64 */
    width: 128px;
    height: 128px;
    overflow: hidden;
    // border-radius: 100%;
    // background: conic-gradient(white 80%, red 20%);
    background-image: url("materials/ui/timer.png");
    background-size: 3840px 128px;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    // background-position: center;
    // opacity: 1;
    
    transition: none;
    animation: none;
    
    // margin-bottom: 10px;

    /*&:outro {
        opacity: 0;
    }

    &:intro {
        opacity: 0;
    }*/
}

.message {
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    color: white;
    font-size: 80px;
    font-family: Roboto;
    font-weight: bold;
    
    text-shadow: 2px 2px 0 black;
    
    // width: 800px;
    // margin-left: -400px;
    
    align-items: center;
    justify-content: center;
    
    flex-direction: column;
    
    gap: 5px;
    
    small {
        font-size: 40px;
    }
    
    section.gamemode {
        font-size: 40px;
    }
    
    section.description {
        font-size: 25px;
        font-weight: normal;
    }
    
    section.instructions {
        font-size: 25px;
        font-weight: normal;
    }
    
    section.round {
        font-size: 60px;
    }
    
}

.popup-box {
    position: absolute;
    bottom: 50px;
    left: 50px;
    color: white;
    font-size: 40px;
    // font-family: Roboto;
    gap: 15px;
    // align-items: center;
    // justify-content: center;
    flex-direction: column;
    
    // width: 1200px;
    min-width: 600px;
    max-width: 1200px;
    height: 700px;
    // padding: 20px;
    // border-radius: 10px;
    // background-color: rgba(0, 0, 0, 0.8);
    // backdrop-filter: blur(5px);

    flex-shrink: 0;
    
    transition: transform 0.1s;
    
    align-content: flex-end;
    justify-content: flex-end;
    
    &:outro {
        // opacity: 0;
        transform: translateY(100%);
    }
    
    &:intro {
        // opacity: 0;
        transform: translateY(100%);
    }
    
    h1 {
        font-family: "Lilian";
        font-size: 80px;
        font-weight: bold;
        // flex-shrink: 0;
        // flex-grow: 1;
    }
    
    .popup-box-contents {
        font-smooth: never;
        flex-direction: column;
        // gap: 10px;
        font-family: "Tecmo Bowl";
        font-size: 30px;
        // background-color: rgba(79, 125, 224, 0.8);
        background-image: linear-gradient(90deg, #4f7de0, #1f3a73);
        padding: 20px;
        border: 5px white solid;
        text-shadow: 0 2px 0 rgba(0, 0, 0, 0.4);
        gap: 15px;

        flex-grow: 0;
        flex-shrink: 0;

       /* * {
            flex-shrink: 0;
        }*/
        
        h2 {
            color: yellow;
        }

        .ranks {
            flex-direction: row;
            justify-content: space-between;
            gap: 50px;
            .rank {
                flex-direction: column;
                &.active {
                    color: yellow;
                    text-stroke: 5px black;
                    animation: pulse 1s infinite;
                }
            }
        }
    }
    
    strong {
        font-weight: bold;
    }
    
    em {
        font-style: italic;
    }
    
    small {
        font-size: 30px;
    }
    
    /*.challenge-name {
        font-style: italic;
    }*/
    
    .input-key {
        margin: 0 10px;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }
    
    .challenge-error {
        color: #e44949;
        font-size: 30px;
        font-style: italic;
    }
}

.steering {
    width: 600px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    .dot {
        width: 20px;
        height: 20px;
        background-color: red;
        border-radius: 100%;
        position: absolute;
        top: 0;
        left: 0;
        // transform: translate(0, -50%);
    }
}

.throttle {
    width: 600px;
    height: 20px;
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    .bar {
        width: 100%;
        height: 100%;
        background-color: red;
        border-radius: 10px;
    }
}

@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}