:root {
    font-family: "Google Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
    font-size: 2.4vh;

    --primary: #1d61dd;
    --secondary: #073377;
    --correct: #2abd4b;
    --white: #efefef;
    --white2: #d1d1d1;
    --bg1: #000000;

    touch-action: manipulation;
}

body {
    color: var(--white);
    background-color: var(--bg1);

    background-image: radial-gradient(rgba(255, 255, 255, 0.06) 3px, transparent 0);
    background-size: 1.2em 1.2em;
    background-position: -0.3em 0;
}

button,
a,
div,
select {
    -webkit-tap-highlight-color: transparent;
}

.main {
    width: 100%;
    height: 100%;
    margin: 50px auto;
    text-align: center;
}

p {
   font-size: 0.85em;
   width: 95%;
   margin: auto;
   color: var(--white2);
}

.home-logo {
    width: 8.5em;

    margin-top: -20px;
    margin-bottom: 0;
}

h1 {
    font-weight: 800;
}

.title-name {
    margin: 8px 0 6px 0;
}


.start-area {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 4.5em;
    margin-inline: auto;
}


.play-btn {
    font-size: 2em;
    font-weight: 800;
    text-shadow: 0 0 0.5em var(--secondary);

    padding: 5px 0;
    width: 75%;

    border: 0.06em solid rgba(255, 255, 255, 0.4);
    border-radius: 1em;

    color: var(--white);
    background-color: var(--primary);

    box-shadow: 0 0 1em var(--secondary);

    transition: 100ms;
}

.play-btn:hover {
    background-color: var(--secondary);
    cursor: pointer;
}


.blurred-div {
    background-color: rgba(0, 0, 0, 0.25);
    border: 0.12em solid rgba(255, 255, 255, 0.08);

    width: 60%;
    padding: 0.3em 0;
    margin: auto;

    margin-bottom: 3em;

    border-radius: 1.5em;
    box-shadow: 0 0 1.2em black;
    backdrop-filter: blur(2px);
}

.diff-btn {
    font-size: 1.2em;
    font-weight: 600;
    color: var(--bg1);
    background-color: var(--white);
    text-decoration: none;

    display: block;
    padding: 0.15em 1em;
    margin: auto;
    width: 6em;
    margin-block: 0.5em;

    border-radius: 0.5em;
    border: 0.04em solid var(--white);

    transition: 150ms;
}

.diff-btn:hover {
    background-color: var(--white2);
    border-radius: 0.6em;
    cursor: pointer;
}

.diff-btn-selected {
    color: var(--white);
    text-shadow: 0 0 .5em var(--bg1);
    background-color: var(--secondary);

    width: 8em;

    border-radius: 1em;
    border: 0.08em solid var(--primary);
    box-shadow: 0 0 1.5em var(--secondary);

}

.diff-btn-selected:hover {
    background-color: var(--primary);
}




.game-navbar {
    background-color: var(--secondary);
    border: 0.12em solid var(--primary);

    display: flex;
    flex-direction: row;
    justify-content: space-around;

    max-width: 500px;
    width: 93%;
    padding: 0.5em 0em 0.5em 0.7em;
    margin: auto;

    margin-top: -1.35em;

    border-radius: 10em;
    box-shadow: 0 0 1.2em black;
    backdrop-filter: blur(2px);
}

.nav-element-info {
    font-size: 1.5em;
    width: 100%;
    color: var(--white);
    font-weight: 800;
}

.nav-element-header {
    font-size: 0.8em;
    width: 100%;
    color: var(--white2);
    font-weight: 500;
    font-style: italic;
}


.home-btn {
    width: 2.5em;
    padding: 0.1em 0;

    text-decoration: none;
    color: white;
    font-weight: bold;
    font-size: 1.75rem;
    cursor: pointer;

    background: var(--primary);
    box-shadow: 0 0 0.6em var(--primary);
    border-radius: 2em;

    transition: 300ms;
}
.home-btn:hover {
    color: var(--secondary);
    background: var(--white);
    box-shadow: 0 0 0.4em var(--white);
}

.home-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-icon {
    width: 0.75em;
}


.location-container {
    width: 93%;
    height: auto;
    padding-bottom: 100%;
    overflow: hidden;
    margin: auto;
    position: absolute;

    right: 0;
    left: 0;
    top: 50%;
    transform: translateY(-60%);

    border-radius: 1.75em;
    z-index: -1;

    box-shadow: 0 0 3em rgba(0, 0, 0, 0.5);
}

.location-image {
    position: absolute;
    left: -1000%;
    right: -1000%;
    top: -1000%;
    bottom: -1000%;
    margin: auto;
    max-width: 100%;
}


.map-container {
    display: flex;
    flex-direction: column;

    position: fixed;
    bottom: 0;
    left: 0;
    max-width: 100%;
    height: 20vh;

    box-shadow: 0 0 2em rgba(0, 0, 0, 0.25);
    border-radius: 2em 2em 0 0;
    overflow: hidden;

    z-index: 10;
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.1);
}

.map-container.expanded {
    height: 75vh;
    z-index: 100;
}
.map-container.expanded .guess-button {
    display: block;
}

.map-container.guessed {
    border: 0.3em solid var(--correct);
    box-shadow: 0 0 2em var(--correct);
}
.map-container.guessed .guess-button {
    background-color: var(--correct);
    box-shadow: 0 0 1em var(--correct);
}


.map-image {
    width: 100%;
    height: auto;
    display: block;
    pointer-events: none;
}

.image-container {
    position: relative;
    width: 100%;
}

.map-wrapper {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
}
.map-wrapper:hover {
    cursor: crosshair;
}

.map-pin {
    position: absolute;
    width: 16px; height: 16px;
    background-color: var(--primary);
    border: 2px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    z-index: 2;
}

.actual-pin {
    position: absolute;
    width: 18px;
    height: 18px;
    background-color: var(--correct);
    border: 2px solid white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    display: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    z-index: 2;
}

.distance-line {
    position: absolute;
    height: 0px;
    background-color: white;
    border-top: 5px dashed black;
    transform-origin: 0 50%;
    display: none;
    z-index: 1;
    pointer-events: none;
}


.handle-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 30;

    border-radius: 2em 2em 0 0;

    cursor: pointer;
    background: linear-gradient(to bottom, rgba(0,0,0,0.25) 0%, transparent 100%);
    backdrop-filter: blur(3px);

    transition: height 0.1s;
}
.map-container.expanded .handle-container {
    height: 1.8em;
    backdrop-filter: blur(0px);
}

.chevron {
    margin: auto;
    width: 1.2em;
    height: 1.2em;
    border-right: 6px solid #fff;
    border-bottom: 6px solid #fff;
    border-radius: 2px;

    transform: translateY(25%) rotate(-135deg);
    transition: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}
.map-container.expanded .chevron {
    width: 0.8em;
    height: 0.8em;
    transform: translateY(-25%) rotate(45deg);
}

.chevron-container {
    width: 5em;
    padding: 0.2em;
    background-color: rgba(0, 0, 0, 0.25);

    border-radius: 2em;
}
.map-container.expanded .chevron-container {
    width: 4em;
    padding: 0.08em;
    background-color: rgba(0, 0, 0, 0.15);
}


.floor-selector {
    position: absolute;
    top: 1.7em;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4em;
    padding: 0.3em 1.5em;
    background: rgba(30, 30, 30, 0.2);
    backdrop-filter: blur(3px);

    border: 0.1em solid rgba(0, 0, 0, 0.1);
    border-radius: 2em;

    z-index: 20;
}

.floor-btn {
    width: 2em;
    height: 2em;

    border: 2px solid transparent;
    border-radius: 0.6em;

    background: #333;
    color: white;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.floor-btn.active {
    background: var(--primary);
    box-shadow: 0 0 0.6em var(--primary);
    border-radius: 2em;
    z-index: 21;
}
.floor-btn.hover {
    background: #111;
}

.correct-floor {
    background: var(--correct) !important;
    box-shadow: 0 0 0.6em var(--correct) !important;
}



.guess-points-cointainer {
    display: none;

    font-size: 2em;
    font-weight: 500;
    color: var(--bg1);
    background-color: rgba(0, 0, 0, 0.05);

    position: absolute;
    bottom: 1.3em;
    left: 0;
    width: 100%;
    text-align: center;
    z-index: 10;

    outline: 0.1em solid rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(3px);
}

.guess-points {
    font-size: 2em;
    font-weight: 800;
    color: var(--correct);
    text-shadow: 0 0 1.6em var(--correct);
}


.guess-button {
    display: none;
    width: 100%;
    height: 1.7em;
    margin: auto;

    cursor: pointer;
    text-transform: uppercase;

    font-size: 2em;
    font-weight: 800;
    text-shadow: 0 0 0.5em var(--secondary);
    border: 0 solid rgba(255, 255, 255, 0.4);

    color: var(--white);
    background-color: var(--primary);
    box-shadow: 0 0 1em var(--secondary);
    z-index: 20;

    transition: 100ms;
}
.guess-button:hover {
    background-color: var(--secondary);
    cursor: pointer;
}
.guess-button:disabled {
    background-color: #333;
    -moz-box-shadow: none;
	box-shadow: none;
    text-shadow: 0 0 0.5em var(--bg1);

    cursor: not-allowed;
}



.stats-container {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    gap: 0.5em;

    background-color: rgba(0, 0, 0, 0.25);
    border: 0.12em solid rgba(255, 255, 255, 0.08);

    width: 70%;
    max-width: 300px;
    padding: 1em 0;
    margin: auto;

    margin-bottom: 3em;

    border-radius: 1.5em;
    box-shadow: 0 0 1.2em black;
    backdrop-filter: blur(2px);
}

.score-highlight {
    font-size: 2.25em;
    text-shadow: 0 0 1em var(--primary);
}

.save-score-form {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    gap: 1em;

    position: absolute;
    left: 0;
    right: 0;
    bottom: 4.5em;
    margin-inline: auto;
}

.name-input {
    font-family: "Google Sans", sans-serif;
    font-size: 1.25em;
    font-weight: 500;

    width: 8em;
    max-width: 60%;
    padding: 0.3em 1em;

    color: var(--white);
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(2px);

    border-radius: 0.8em;
    border: 0.1em solid rgba(255, 255, 255, 0.1);
}



.leaderboard-bar {
    position: sticky;
    top: 1.5em;

    width: 75%;
    max-width: 550px;
    margin: auto;
    padding: 0.6em 1.8em;

    color: var(--white);
    background-color: rgba(255, 255, 255, 0.07);
    backdrop-filter: blur(3px);

    border-radius: 2em;
    border: 0.15em solid rgba(255, 255, 255, 0.1);

    z-index: 15;
}

.leaderboard-title {
    margin: 0;
}

.filter-group {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    gap: 0.5em;
}

.filter-button {
    font-size: 0.85em;
    font-weight: 800;
    color: var(--bg1);
    background-color: var(--white);
    text-decoration: none;

    display: block;
    padding: 0.15em 1em;
    margin: auto;
    width: 6em;
    margin-block: 0.5em;

    border-radius: 0.5em;
    border: 0.04em solid var(--white);

    transition: 300ms;
}
.filter-button:hover {
    background-color: var(--white2);
}
.filter-button.active {
    color: var(--white);
    background-color: var(--primary);
    border: 0.04em solid var(--primary);
    box-shadow: 0 0 1.2em var(--primary);
    border-radius: 2em;
    z-index: 10;
}


.leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5em;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1em;
    overflow: hidden;

    color: var(--white);
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(4px);
}


.leaderboard-table th, .leaderboard-table td {
    font-size: 0.8rem;
    padding: 13px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

    max-width: 150px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.leaderboard-table th {
    background: rgba(0, 0, 0, 0.3);
    color: #aaa;
    text-transform: uppercase;
    text-align: center;
    font-size: 0.7rem;
}

.rank-1 {
    background: rgba(255, 215, 0, 0.1);
    font-size: 1.1rem;
}





@media (min-width: 768px) {
    :root {
        font-size: 18px;
    }
    body {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        min-height: 100vh;
        margin: 0;
    }

    .start-area {
        position: static;
        margin-top: 3em;
        width: 100%;
        max-width: 400px;
    }

    .home-logo {
        width: 15em;
        margin-top: 0;
    }

    p {
        width: auto;
        max-width: 600px;
        font-size: 1.2em;
    }
}
