@font-face{
    font-family:"Futura";
    font-style:normal;
    font-weight:400;
    src:url(fonts/futura-Medium.woff) format("woff");
}

html, body {
    overflow: hidden;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: black;
    font-family: monospace;
}

button {
    font-family: monospace;
}

h1 {
    font-family: "Futura", monospace;
    font-size: 8vh;
    margin: 0;
    user-select: none;
}

p {
    font-size: 3vh;
    margin: 0;
    user-select: none;
}

label {
    font-size: 2vh;
    color: #ddd;
    margin: 0;
    vertical-align: top;
    user-select: none;
}

#mapRender {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    touch-action: none;
    image-rendering: pixelated;
}

#gameInfo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    display: none;
}

#trackName {
    position: absolute;
    top: 3vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4vw;
    color: white;
    text-shadow: 0.2vw 0.2vw rgba(128,128,128,0.7);
}

#countdown {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 8vw;
    color: #6df;
    text-shadow: 0.3vw 0.3vw rgba(0,0,0,0.5);
}

#skipIntroText {
    position: absolute;
    bottom: 30px;
    right: 30px;
    text-align: right;
    color: #222;
    font-weight: bold;
}

#kartSpeedText {
    position: absolute;
    bottom: 20px;
    right: 20px;
    font-size: 4vw;
    color: white;
    text-shadow: 0.2vw 0.2vw rgba(128,128,128,0.7);
}

#menuDiv {
    position: absolute;
    top: 30px;
    left: 30px;
    z-index: 2;
    transition: left cubic-bezier(.15,.67,.53,1.02) 1s;
    display: none;
}

.mainButton {
    width: 600px;
    height: 45px;
    background-image: url("img/menuBar.png");
    background-color: transparent;
    border: none;
    font-size: 3vh;
    color: #222;
    margin: 0;
    padding-left: 2vh;
    padding-right: 2vh;
    margin-top: 2vh;
    text-align: left;
    cursor: pointer;
}

.mainButton:hover {
    background-image: url("img/menuBar2.png");
}

.playButton {
    border: 0.3vh solid #444;
    font-size: 3vh;
    margin: 0;
    padding-left: 2vh;
    padding-right: 2vh;
    margin-top: 2vh;
    cursor: pointer;
}

#campaignDiv {
    position: absolute;
    top: 0;
    left: 100vw;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    z-index: 2;
    transition: left cubic-bezier(.15,.67,.53,1.02) 1s;
}

.cupDiv {
    position: relative;
    display: flex;
    justify-content: left;
    margin: 1vw;
    width: auto;
    background-color: rgba(0,0,0,0.2);
}

.cupInfoDiv {
    display: inline-block;
    width: 35vw;
    height: 10vw;
    margin-top: 0.5vw;
    margin-bottom: 0.5vw;
    margin-right: 0.5vw;
}

.cupTitle {
    font-size: 2vw;
    font-weight: bold;
    color: white;
    text-align: left;
    margin-left: 1vw;
}

.trackIcon {
    display: inline-block;
    margin-top: 0.5vw;
    margin-bottom: 0.5vw;
    margin-right: 0.5vw;
    width: 15vw;
    height: 10vw;
    background-image: url("img/trackIcons/hidden.png");
    background-size: 100%;
    image-rendering: pixelated;
}

.padlockIcon {
    display: inline-block;
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
}

#settingsDiv {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    height: 80vh;
    width: 80vh;
    background-color: rgba(20, 20, 20, 0.7);
    overflow-y: auto;
    z-index: 2;
    padding: 1vh;
    box-sizing: border-box;
    display: none;
}

.settingsButton {
    border: 0.3vh solid #444;
    font-size: 1.5vh;
    margin: 0;
    padding-left: 2vh;
    padding-right: 2vh;
    margin-bottom: 0.8vh;
    cursor: pointer;
}

.settingsHeading {
    font-size: 1.8vh;
    color: #ddd;
    margin: 0 0 1vh 0;
    font-family: monospace;
}

.keybindRow {
    display: flex;
    align-items: center;
    gap: 1vh;
    margin-bottom: 0.8vh;
    font-family: monospace;
    font-size: 1.5vh;
    color: #ddd;
}

.keybindLabel {
    width: 12vh;
    text-align: left;
}

.keybindKey {
    width: 8vh;
    text-align: center;
    border: 0.3vh solid #555;
    background: rgba(0,0,0,0.3);
    padding: 0.3vh 0;
    color: #6df;
    font-weight: bold;
}

.keybindRow .settingsButton {
    margin-bottom: 0;
}

#loadingCover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: black;
    z-index: 3;
    display: block;
    opacity: 1;
    transition: opacity 1s;
}

#cutsceneDialogueDiv {
    position: absolute;
    bottom: 3vw;
    left: 3vw;
    width: 94vw;
    height: 35vh;
    box-sizing: border-box;
    border: 0.5vw solid #999;
    border-radius: 3vw;
    padding-left: 1.5vw;
    padding-right: 1.5vw;
    padding-top: 1vw;
    background-color: rgba(64,64,64,0.6);
    color: white;
    z-index: 2;
    display: none;
    opacity: 0;
    transition: opacity 0.5s;
}

#cutsceneDialogueName {
    font-size: 2.5vw;
    margin-bottom: 1vw;
    font-family: monospace;
    font-weight: bold;
    user-select: none;
}

#cutsceneDialogue {
    font-size: 2vw;
    font-family: monospace;
    user-select: none;
}

#cutsceneTitleText {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3vw;
    font-family: monospace;
    text-align: center;
    color: white;
    z-index: 2;
    display: none;
    white-space: nowrap;
}

#titleImage {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: auto;
    z-index: 2;
    display: none;
}

#postRaceDiv {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50vw;
    min-width: 360px;
    background-color: rgba(0, 0, 0, 0.88);
    border: 0.3vh solid #444;
    color: white;
    z-index: 4;
    display: none;
    opacity: 0;
    transition: opacity 0.5s;
    text-align: center;
    padding: 4vh 3vw;
    box-sizing: border-box;
}

#postRacePlacement {
    font-size: 10vh;
    margin-bottom: 1vh;
}

.placementGold { color: #fd0; text-shadow: 0 0 2vh rgba(255, 220, 0, 0.5); }
.placementSilver { color: #ccc; text-shadow: 0 0 2vh rgba(200, 200, 200, 0.4); }
.placementBronze { color: #c84; text-shadow: 0 0 2vh rgba(200, 140, 60, 0.4); }

#postRacePoints {
    font-size: 4vh;
    margin-bottom: 0.5vh;
    color: #adf;
}

#postRaceCoins {
    font-size: 4vh;
    margin-bottom: 2vh;
    color: #fd0;
}

#postRaceTimes {
    border-top: 0.2vh solid #444;
    padding-top: 1.5vh;
    margin-bottom: 2vh;
}

#postRaceTimes p {
    font-size: 2.5vh;
    color: #ddd;
    margin-bottom: 0.5vh;
}

#postRaceTimes .bestLapText {
    color: #af8;
}

.cupLockOverlay {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 2vw;
    font-family: monospace;
    font-weight: bold;
    z-index: 1;
    pointer-events: none;
}

.cupIcon {
    display: inline-block;
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    vertical-align: center;
}

.cupBeatenBadge {
    display: none;
    color: gold;
    font-size: 1.4vw;
    margin-left: 0.5vw;
    font-weight: bold;
}

.extremeButton {
    display: none;
    color: #f60;
    border-color: #f60;
    background-color: #555;
    margin-left: 0.5vw;
}

#garageDiv {
    position: absolute;
    top: 0;
    left: 100vw;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    z-index: 2;
    transition: left cubic-bezier(.15,.67,.53,1.02) 1s;
    box-sizing: border-box;
}

#garageCoinDisplay {
    font-size: 5vh;
    color: #fd0;
    margin: 1vw;
    margin-bottom: 0;
}

#garageGrid {
    display: flex;
    flex-wrap: wrap;
    padding: 0.5vw;
}

.garageKartCard {
    width: 18vw;
    min-width: 160px;
    background-color: rgba(0, 0, 0, 0.4);
    border: 0.2vh solid #444;
    margin: 0.5vw;
    padding: 1vw;
    box-sizing: border-box;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.garageKartCard.selectedCard {
    border-color: #6df;
}

.garageKartName {
    font-size: 2.4vh;
    font-weight: bold;
    margin-bottom: 0.8vh;
    text-align: center;
    font-family: monospace;
}

.garageKartSprite {
    width: 128px;
    height: 128px;
    image-rendering: pixelated;
    object-fit: none;
    object-position: 0 0;
    margin-bottom: 0.8vh;
}

.garageStatBar {
    width: 100%;
    margin-bottom: 0.4vh;
}

.garageStatLabel {
    font-size: 1.4vh;
    color: #aaa;
    margin-bottom: 0.2vh;
    font-family: monospace;
}

.garageStatTrack {
    width: 100%;
    height: 1.2vh;
    background-color: #333;
    box-sizing: border-box;
}

.garageStatFill {
    height: 100%;
    background-color: #6df;
}

.garageKartAction {
    margin-top: 1vh;
    font-size: 1.8vh;
}

#cupResultsDiv {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 55vw;
    min-width: 400px;
    background-color: rgba(0, 0, 0, 0.88);
    border: 0.3vh solid #444;
    color: white;
    z-index: 4;
    display: none;
    text-align: center;
    padding: 4vh 3vw;
    box-sizing: border-box;
}

#cupResultsTitle {
    font-size: 5vh;
    margin-bottom: 1vh;
}

#cupResultsWinMsg {
    font-size: 3.5vh;
    margin-bottom: 1.5vh;
}

#cupResultsPoints {
    font-size: 2.5vh;
    color: #adf;
    margin-bottom: 2vh;
}

#cupResultsStandings {
    border-top: 0.2vh solid #444;
    border-bottom: 0.2vh solid #444;
    padding: 1vh 0;
    margin-bottom: 2vh;
}

#cupResultsStandings p {
    font-size: 2.5vh;
    margin-bottom: 0.4vh;
}

#cupResultsUnlock {
    color: gold;
    font-size: 2.5vh;
    margin-bottom: 2vh;
}

#timeTrialDiv {
    position: absolute;
    top: 0;
    left: 100vw;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    z-index: 2;
    transition: left cubic-bezier(.15,.67,.53,1.02) 1s;
    box-sizing: border-box;
}

#timeTrialGrid {
    display: flex;
    flex-wrap: wrap;
    padding: 1vw;
    gap: 0.5vw;
}

.ttTrackCard {
    position: relative;
    width: calc(25% - 0.75vw);
    min-width: 180px;
    background-color: rgba(0, 0, 0, 0.4);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.ttTrackIcon {
    width: 100%;
    aspect-ratio: 3 / 2;
    background-image: url("img/trackIcons/hidden.png");
    background-size: 100%;
    image-rendering: pixelated;
    display: block;
    flex-shrink: 0;
}

.ttTrackName {
    font-size: 1.6vh;
    font-weight: bold;
    color: white;
    font-family: monospace;
    padding: 0.4vw 0.5vw 0.2vw;
    white-space: pre-line;
}

.ttTrackTime {
    font-size: 1.4vh;
    color: #ccc;
    font-family: monospace;
    padding: 0 0.5vw;
    margin-bottom: 0.1vw;
}

.ttPlayButton {
    width: calc(100% - 1vw);
    margin: 0.3vw 0.5vw 0.5vw;
    box-sizing: border-box;
    font-size: 1.8vh;
    padding: 0.4vh;
    margin-top: 0.2vw;
}

.ttTrackCardLock {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.78);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #777;
    font-size: 1.6vh;
    font-family: monospace;
    font-weight: bold;
    text-align: center;
    z-index: 1;
    pointer-events: none;
}

#pauseDiv, #ttPauseDiv {
    background-color: rgba(20, 20, 20, 0.5);
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    padding: 2vh;
    padding-top: 0.5vh;
}

#postRacePBSection {
    display: none;
    border-top: 0.2vh solid #444;
    padding-top: 1.5vh;
    margin-bottom: 2vh;
}

#postRacePBSection p {
    font-size: 2.5vh;
    color: #adf;
    margin-bottom: 0.5vh;
}

.newPBText {
    color: #af8 !important;
}

#postRaceRetryButton {
    display: none;
}

#tutorialOverlayDiv {
    position: absolute;
    top: 5vh;
    right: 5vh;
    background-color: rgba(20, 20, 20, 0.85);
    color: white;
    z-index: 3;
    display: none;
    opacity: 0;
    transition: opacity 0.5s;
    text-align: center;
    padding: 2vh 3vw;
    box-sizing: border-box;
    min-width: 300px;
}

#tutorialOverlayTitle {
    font-size: 3vh;
    font-weight: bold;
    color: #6df;
    margin-bottom: 1.5vh;
}

#tutorialOverlayContent p {
    font-size: 2.2vh;
    margin-bottom: 0.8vh;
    color: #ddd;
}

.tutKey {
    display: inline-block;
    background-color: #333;
    border: 0.2vh solid #777;
    color: #6df;
    padding: 0 0.5vh;
    font-family: monospace;
    font-weight: bold;
}