@font-face {
    font-family: "pixeboy";
    src: url(pixeboy.ttf) format("truetype");
}

@keyframes blink {
    0% {
        opacity: 0;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0;
    }
}

@keyframes ellipsis {
    to {
        width: .7em;
    }
}

body,
html {
    margin: 0;
    padding: 0;
    height: 100%;
}

html {
    font-family: "pixeboy", sans-serif;
    background: black;
    color: white;
}

#game {
    height: 100%;
    display: flex;
}

.screen {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.screen .title {
    font-size: 4em;
}

.idle-screen .press-to-start {
    font-size: 1.5em;
    padding-top: .5em;
    color: rgba(255, 255, 255, 0.644);
}

.loading-screen .title::after {
    overflow: hidden;
    display: inline-block;
    vertical-align: bottom;
    animation: ellipsis steps(4, end) 1400ms infinite;
    content: "...";
    /* ascii code for the ellipsis character */
    width: 0px;
}

.loading-screen .title {
    flex: 1;
    display: flex;
    align-items: center;
}

.loading-screen #usb-btn {
    color: #d8cd00;
    cursor: pointer;
    padding: 16px;
    font-size: 1.2em;
}

.playing-screen #score {
    font-size: 12em;
}

.playing-screen #clock {
    padding-top: 1em;
    font-size: 3em;
}

.playing-screen .streak {
    padding-top: 3em;
    font-size: 2em;
}

.loading-screen,
.idle-screen,
.starting-screen,
.playing-screen,
.end-screen {
    display: none;
}

#game.game--loading .loading-screen {
    display: flex;
}

#game.game--idle .idle-screen {
    display: flex;
}

#game.game--starting .starting-screen {
    display: flex;
}

#game.game--playing .playing-screen {
    display: flex;
}

#game.game--end .end-screen {
    display: flex;
}

.main {
    flex: 1;
}

.scoreboard {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    border-right: solid 4px white;
}

.scoreboard .title {
    font-size: 4em;
}

.scoreboard .scores {
    margin: auto;
    flex: 1;
    font-size: 1.8em;
    height: 0;
    overflow: auto;
}

.scoreboard .scores::-webkit-scrollbar {
    display: none;
}

.scoreboard table {
    border-spacing: 16px 0;
}

.scoreboard table thead {
    height: 65px;
    position: sticky;
    top: 0;
    background: linear-gradient(black 0%, black 51%, rgba(0, 0, 0, 0) 100%);
}

.scoreboard table tbody {
    overflow: auto;
}

#game.game--starting .scoreboard,
#game.game--playing .scoreboard {
    display: none;
}

#end-text {
    font-size: 4em;
}

.end-score {
    font-size: 6em;
}

#end-place {
    font-size: 8em;
}

#name-input {
    all: unset;
    font-size: 12em;
    letter-spacing: .2em;
    overflow: hidden;
    padding-left: .3em;
    caret-color: transparent;
    width: 2.1em;
    background: repeating-linear-gradient(90deg, white .1ch, white 1.08ch, transparent 0, transparent 1.52ch) 0 100%/4ch 0.05em no-repeat;
    background-position: center 94%;
}

.enter-initials {
    font-size: 1.5em;
    padding-top: 2em;
}

.highlight {
    color: #fff400;
}

.blink {
    animation: blink 1s forwards infinite;
}