@font-face {
    font-family: 'Anton';
    src: url('font/Anton-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Teko';
    src: url('font/Teko-VariableFont_wght.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'JetBrains Mono';
    src: url('font/JetBrainsMono-VariableFont_wght.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

body {
    margin: 0;
    color: #111;
    background-image: url('img/bg-static.svg');
    background-size: cover;
    overflow: hidden;
}

#header {
    & .player-name {
        position: absolute;
        top: 0;

        font-family: 'Anton', Arial, sans-serif;
        font-weight: 400;
        font-size: 50px;
        line-height: 72px;
        letter-spacing: 0;
        text-transform: uppercase;

        &.left {
            left: 325px;
        }
        &.right {
            right: 325px;
        }
    }

    & .player-picture {
        position: absolute;
        width: 63px;
        height: 63px;
        object-fit: cover;
        border-radius: 50%;
        top: 35px;

        &.left {
            left: 242px;
            transform: translate(-50%, -50%);
        }

        &.right {
            right: 242px;
            transform: translate(50%, -50%);
        }
    }

    & .player-info {
        position: absolute;
        height: 32px;
        top: 72px;

        font-family: 'Teko', Arial, sans-serif;
        font-weight: 400;
        font-size: 32px;
        line-height: 35px;
        letter-spacing: 0;

        &.left {
            left: 242px;
            transform: translateX(-65%);
        }
        &.right {
            right: 242px;
            transform: translateX(65%);
        }

        & .player-seed {
            display: inline-block;
            height: 32px;
            border-radius: 16px;
            background: #F05C00;
            box-shadow: 0 2px 8px #0002;
            padding: 0 16px;
        }
        & .player-rank {
            display: inline-block;
            height: 32px;
            border-radius: 16px;
            background: #FEBF00;
            box-shadow: 0 2px 8px #0002;
            padding: 0 16px;
        }
    }
}

#livescore {
    font-family: 'JetBrains Mono', Arial, sans-serif;
    letter-spacing: -2px;

    & .left,
    & .right {
        position: absolute;
        height: 100px;
        top: 760px;
        display: inline-block;

        align-content: center;

        background: #FEBF00;
        box-shadow: 4px 4px 18px rgba(0, 0, 0, 0.5),
                    inset 0 2px 4px rgba(242, 153, 0, 0.75),
                    inset 0 3px 4px rgba(255, 255, 255, 0.4),
                    inset -2px 4px 6px rgba(255, 255, 255, 0.6),
                    inset 0 -4px 4px #F29900;

        transition: left 1s cubic-bezier(0.4, 0, 0.2, 1),
                    right 1s cubic-bezier(0.4, 0, 0.2, 1),
                    height 1s cubic-bezier(0.4, 0, 0.2, 1),
                    padding 1s cubic-bezier(0.4, 0, 0.2, 1),
                    clip-path 1s cubic-bezier(0.4, 0, 0.2, 1),
                    transform 1s cubic-bezier(0.4, 0, 0.2, 1);

        & .points {
            font-weight: 400;
            font-size: 24px;
            transition: font-size 1s cubic-bezier(0.4, 0, 0.2, 1);
        }
        & .accuracy {
            font-weight: 800;
            font-size: 44px;
            transition: font-size 1s cubic-bezier(0.4, 0, 0.2, 1);
        }

        &.winning {
            height: 125px;

            & .points {
                font-size: 30px;
            }
            & .accuracy {
                font-size: 55px;
            }
        }
    }
    & .left {
        left: -400px;
        right: 50vw;
        height: 100px;
        padding-right: 70px;
        text-align: right;

        transform: translate(20px, -50%);
        clip-path: polygon(0 0, 100% 0, calc(100% - 60px) 100%, 0 100%);

        &.winning {
            padding-right: 88px;
            transform: translate(25px, -50%);
            clip-path: polygon(0 0, 100% 0, calc(100% - 75px) 100%, 0 100%);
        }
    }
    & .right {
        left: 50vw;
        right: -400px;
        height: 100px;
        padding-left: 70px;

        transform: translate(-20px, -50%);
        clip-path: polygon(60px 0, 100% 0, 100% 100%, 0 100%);

        &.winning {
            padding-left: 88px;
            transform: translate(-25px, -50%);
            clip-path: polygon(75px 0, 100% 0, 100% 100%, 0 100%);
        }
    }
}

#bottom-left {
    font-family: 'Teko', Arial, sans-serif;
    font-weight: 400;
    letter-spacing: 0;

    & #song-name-container {
        position: absolute;
        top: 878px;
        left: 26px;
        width: 633px;
        max-width: 633px;
        height: 70px;
        max-height: 67px;
        overflow: hidden;

        font-weight: 600;
        font-size: 60px;
        line-height: 67px;

        & #song-name-container-inner {
            width: fit-content;
            display: flex;
            white-space: nowrap;

            & .song-name {
                white-space: nowrap;
                margin-right: 150px;
            }
        }

        &.scrolling > * {
            animation: slideText 30s linear infinite;
        }
    }

    & #artist-name {
        position: absolute;
        top: 943px;
        left: 26px;

        font-size: 37px;
        line-height: 41px;
    }

    & #charter-name {
        position: absolute;
        top: 992px;
        left: 26px;

        font-size: 32px;
        line-height: 41px;
    }

    & #song-info {
        position: absolute;
        top: 1025px;
        left: 26px;

        font-size: 32px;
        line-height: 41px;
    }
}

#bottom-right {
    position: absolute;
    top: 989px;
    left: 856px;

    font-family: 'Teko', Arial, sans-serif;
    letter-spacing: 0;

    & #tournament-round {
        font-weight: 600;
        font-size: 60px;
    }

    & #match {
        margin-left: 15px;
        font-weight: 400;
        font-size: 45px;
    }
}

@keyframes slideText {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}
