/* Common Menu styles */

.menu-background {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    backdrop-filter: blur(7px);
    transition-duration: 0.15s;
}

.menu-centering {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.menu-container {
    background-color: #22222280;
    border: 2px solid color-mix(var(--primary), transparent 70%);
    border-radius: 4px;
    padding: 8px;
}

/* Title Screen */

.title-main-text {
    font-size: 120px;
    font-weight: 100;
    color: #fff;
    letter-spacing: 5px;

    margin-top: -110px;
    margin-bottom: 30px;
    transition-duration: 0.75s;
}

.title-main-text:hover {
    color: var(--primary);
    text-shadow: 0 0 2px #fff;
}

#title-new-course, #title-online, #title-profile, #title-sign-in {
    font-size: 24px;
    width: 220px;
}

.daily-leaderboard {
    margin: 8px 4px;
    height: 200px;
    display: flex;
    flex-direction: column;
}

.daily-leaderboard > *:nth-child(odd) {
    background-color: #32422240;
}

.profile-widget {
    position: absolute;
    top: 20px;
    right: 20px;
    min-width: 120px;

    padding: 3px;
    background-color: #404040;
    border-radius: 4px;
    box-shadow: 2px 2px 1px #151515;
}

#asset-loading {
    position: absolute;
    right: 4px;
    bottom: 4px;
    color: var(--primary);
    font-weight: 300;
    display: flex;
    flex-direction: column;
    align-items: end;
    text-align: end;
}

/* Profile Menu */

.profile-name-input[type="text"] {
    font-size: 30px;
    margin: 7px;
    width: unset;
    min-width: 0;
}

#profile-edit-button {
    font-size: 24px;
    line-height: 24px;
    min-width: 48px;
    height: 48px;
}

.profile-stats {
    display: grid;
    grid-template-columns: max-content 65px max-content 65px;
    justify-content: center;
    gap: 1px 10px;
    text-align: right;
    font-size: 14px;
    font-weight: 300;
}

.profile-stat {
    color: var(--primary);
    font-weight: 500;
    text-align: left;
}

#profile-compass-unlocked, #profile-control-unlocked, #profile-third-unlocked {
    font-size: 10px;
    line-height: 0;
}

/* Profile Avatar Menu */

.avatar-canvas, .avatar-canvas-grid {
    width: 100%;
    height: 100%;
    image-rendering: pixelated;
    border-radius: 8px;
}

.avatar-canvas-grid {
    position: absolute;
    left: 0;
    top: 0;
    pointer-events: none;
}

.avatar-icon {
    width: 32px;
    height: 32px;
    border-radius: 4px;
    background-color: #18181880;
    font-size: 22px;
    outline: 2px solid transparent;
    transition-duration: 0.15s;
}

.avatar-icon.selected {
    scale: 107%;
    outline: 2px solid var(--primary);
}

/* Event List Menu */

.event-list-page {
    font-size: 16px;
    width: 140px;
    flex-direction: unset;
    justify-content: end;
    align-items: center;
    gap: 10px;
}

#events-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 60vh;
    max-height: 500px;
    padding: 7px;
    overflow-y: auto;
}

.event-entry {
    padding: 3px 6px 3px 3px;
    background-color: #404040;
    border-radius: 4px;
    transition-duration: 0.15s;
}

.event-entry:hover {
    scale: 103%;
}

.event-name {
    font-size: 18px;
    font-weight: 500;
    text-align: left;
}

.event-finishes {
    font-size: 18px;
    font-weight: 300;
    width: 70px;
    text-align: center;
}

/* View Event Menu */

.event-details-title {
    color: var(--primary);
}

.event-details-description {
    color: var(--primary);
    font-size: 16px;
    font-weight: 300;
    width: 400px;
    min-height: 250px;
}

.event-details-note {
    display: inline-block;
    background-color: #404040;
    color: var(--primary);
    font-size: 15px;
    font-weight: 300;
    padding: 2px 6px;
    border-radius: 4px;
    box-shadow: 2px 2px 1px #151515;
}

.event-results {
    display: flex;
    flex-direction: column;

    width: 225px;
    max-height: 500px;
    overflow-y: scroll;
    border: 1px solid var(--primary);
    border-radius: 4px;
}

.event-results-title {
    background-color: #18181880;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 18px;
    border-radius: 2px;
    flex: 1;
    margin: 2px;
}

.event-results-title:hover:not(.disabled) {
    margin: 2px 4px;
}

.event-results-title.selected {
    background-color: var(--primary);
    color: #222;
    cursor: default;
}

.event-results-title.disabled {
    color: #aaa;
    background-image: linear-gradient(-45deg, #181818 20%, #333 20%, #333 35%, #181818 35%,  #18181880 65%, #333 65%, #333 80%, #181818 80%);
    cursor: default;
}

.event-result-entry {
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: space-between;
    white-space: initial;
    padding: 2px 8px;
    font-size: 12px;
}

.event-result-time {
    color: var(--primary);
    font-weight: 300;
    white-space: nowrap;
}

.event-results-entry:nth-child(odd) {
    background-color: #32422240;
}

.event-replay-button {
    font-size: 16px;
    margin: 4px;
    height: 32px;
    overflow: clip;
}

/* New Course Menu */

#course-scale, #course-interval {
    width: 60px;
}

#course-custom, #course-randomize {
    font-size: 14px;
    width: fit-content;
}

.course-preview-text {
    position: absolute;
    left: 0;
    top: 0;
    background-color: var(--primary);
    color: #000;
    padding: 0 5px;
    border-bottom-right-radius: 4px;
}

.course-preview, .course-preview-desc {
    width: 100%;
    border: 1px solid var(--primary);
    background-color: #18181880;
}

/* Drawing Menu */

#draw-map, #draw-desc {
    border: 1px solid var(--primary);
}

#draw-map, #replay-map {
    min-width: 400px;
    min-height: 400px;
    width: min(60vw, 80vh);
    height: min(60vw, 80vh);
    max-width: 800px;
    max-height: 800px;
}

#draw-tooltip {
    display: none;
    position: absolute;
    background-color: #181818d0;
    width: max-content;
    z-index: 10;
}

#draw-tooltip-header {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    padding-bottom: 3px;
    border-bottom: 1px solid #404040;
    margin-bottom: 3px
}

#draw-tooltip-content * {
    font-size: 12px;
}

/* Pause Menu */

.pause-container {
    position: fixed;
    left: 200px;
    bottom: 133px;
    display: flex;
    flex-direction: column;
}

.pause-text {
    line-height: 1.6;
    font-size: 24px;
}

/* Replay Menu */

.replay-entry-box {
    width: 16px;
    height: 16px;
    border: 2px solid white;
    transition-duration: 0.15s;
}

#player-time {
    width: 60px;
    font-size: 14px;
    color: var(--primary);
}

#player-track {
    position: relative;
    flex: 1;
    border: 1px solid var(--primary);
    height: 16px;
    border-radius: 4px;
}

.player-frame {
    width: 2px;
    height: 6px;
    position: absolute;
    pointer-events: none;
}

#player-pause-button {
    height: 24px;
    line-height: 0;
}

/* Finish Menu */

@keyframes text-pop-in {
    0%   { height: 0;    }
    20%  { height: 1.416em; }
    50%  { scale: 110%;  }
    100% { scale: 100%;  }
}


.xp-list {
    margin-top: -15px;
}

.xp-list-entry {
    font-size: 14px;
    font-weight: 300;
    text-align: left;
    overflow: hidden;
    animation: text-pop-in 0.75s forwards;
}
.xp-list-entry-key {
    width: 200px;
}

.xp-list-entry-value {
    color: var(--primary);
    font-weight: 600;
    width: 90px;
}

.results-grid {
    display: grid;
    grid-template-columns: max-content max-content;
    gap: 1px 20px;
    text-align: right;
    font-size: 16px;
    font-weight: 300;
}


.results-grid > *:nth-child(even) {
    color: var(--primary);
    font-weight: 600;
    text-align: left;
}