.navbar {
    padding: 15px 15px; 
}

.navbar img {
    height: 60px;
    filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(288deg) brightness(102%) contrast(102%);
}

.flexFinalScore {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
}

.moreGames {
    color: white;
    background-color: transparent;
    border: 3px solid white;
    padding: 8px 16px;
    text-align: center;
    cursor: pointer;
    display: inline-block;
    font-weight: bold;
    transition: all 0.3s ease;
}
.moreGames:hover {
    background-color: white;
    color: black;
}

#totalText {
    color: #fff;
    font-size: 8vw;
    display: inline;
    margin-left: 2vw;
}

#topText {
    text-align: center;
}

#outOfText {
    color: #fff;
    font-size: 2vh;
    display: inline;
}

#googleMapResult {
    width: 100vw;
    height: 100vh;
}

#resultsContainer {
    position: absolute;
    background-image: linear-gradient(to bottom, rgba(0,0,0,0.2) -80%, rgba(0,0,0,0.8)100%);
    width: 100vw;
    height: 100vh;
    opacity: 1;
    transition: opacity 0.25s, background-image 0.5s;
    z-index: 10;
}

#countdown {
    color: #fff;
    margin-top: -1.5vw;
    font-size: 1.3vw;
}

.finalscore {
    display: flex;
    height: 100vh;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

#centreText h1, #centreText p {
    position: relative;
}

#centreText {
    display: flex;
    flex-direction: column;
    align-items: center;
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
}

#bottomButtons {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transition: opacity 0.25s;
}

#buttonBox {
    width: fit-content;
    margin-top: 6vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#playAgainButton {
    color: white;
    width: 15vw;
    width: 160px;
    font-size: 30px;
    cursor: pointer;
}

#newGameButton {
    color: white;
    cursor: pointer;
    width: 165px;
    font-size: 30px;
    margin-left: 100px;
    margin-right: 100px;
}

#viewStatsButton {
    color: white;
    font-size: 30px;
    cursor: pointer;
}

#breakdownButton {
    color: #fff;
    font-size: 23px;
    padding-left: 15px;
    padding-bottom: 10px;
}

#share {
    color: #fff;
    font-size: 23px;
    padding-right: 15px;
    cursor: pointer;
}

#popup {
    color: #fff;
    display: none;
    position: absolute;
    bottom: 0;
    right: 0;
    margin-right: 10px;
    margin-bottom: 45px;
    background-color: rgba(0, 0, 0, 0.398);
    padding: 5px;
    border-radius: 10px;
    font-size: 13px;
}

#breakdownList {
    position: absolute;
    bottom: 0;
    left: 0;
    padding-bottom: 0.5vh;
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: none;
}

#exitBreakdownContainerDiv {
    position: absolute;
    bottom: 0;
    right: 0;
    padding-bottom: 0.5vh;
    opacity: 0;
    transition: opacity 0.35s;
    pointer-events: 'none';
}

#totalScoreBreakdown {
    background-color: rgba(0, 0, 0, 0.7);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
    width: 290px;
    justify-content: center;
    display: flex;
    align-items: center;
    height: 75px;
    border-radius: 10px;
    margin: 10px;
}

#totalScoreBreakdownTextWrap {
    display: flex;
    align-items: baseline;
}

#totalScoreBreakdownText {
    font-family: 'Poppins';
    color: white;
    font-size: 30px;
}

#totalScoreBreakdownSubtext {
    font-family: 'Poppins';
    color: white;
    font-size: 10px;
}

#exitBreakdownText {
    margin-left: 12px;
    margin-top: 3px;
    font-size: 20px;
}

.block {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 20px;
    margin: 10px;
    border-radius: 10px;
    text-align: left; /* Align text to the left */
    width: 290px;
    height: 75px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: space-between; /* Distribute space between items */
    align-items: center; /* Center items vertically */
    transition: all 0.3s ease;
}

.exitBlock {
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 20px;
    margin: 10px;
    border-radius: 10px;
    text-align: left; /* Align text to the left */
    width: 215px;
    height: 75px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: space-between; /* Distribute space between items */
    align-items: center; /* Center items vertically */
}

.blockNumber {
    padding-top: 5px;
    margin-right: 10px;
}

.totalScore {
    color: yellow;
}

.yearsOffText,
.scoreDash,
.kmOffText {
    font-size: 12px;
    color: #D3D3D3;
    display: inline;
}

.summaryImage {
    height: 50px;
    width: 70px;
    margin-top: 4px;
    margin-left: 10px;
    border-radius: 5px;
    object-fit: cover;
    object-position: center;
    align-self: right;
    margin-right: -7px;
}

.scoreBox {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    width: 250px;
}

.textWrap {
    display: flex;
    flex-direction: column;

    margin-top: 5px;
}

.inlineText {
    margin-top: 2px;
}

#statsPopup {
    position:absolute;
    top:50%;
    left:50%;
    transform:translate(-50%,-50%);
    width: 50vw;
    max-height: 1000px;
    transition: height 1s ease;
    z-index: 11;
    transition: opacity 0.25s;
    background-color: #10101B;
    border-radius: 20px;
    box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.5);
    padding-bottom: 10px;
    color: white;
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
}

#exitIcon {
    position: absolute;
    width: 35px;
    margin-top: 15px;
    margin-right: 15px;
    top: 0;
    right: 0;
    transition: transform 0.1s ease-in-out;
}

#exitIcon:hover {
    transform: scale(1.1);
    cursor: pointer;
}

#leaderboardToggle {
    text-align: center;
    display: none;
    width: 100%;
    justify-content: center;
    margin-bottom: 30px;
    margin-top: 20px;
}

#friendsToggle {
    color: white;
    padding-top: 2px;
    padding-bottom: 2px;
    padding-left: 40px;
    padding-right: 40px;
    border-radius: 100px 0 0 100px;
    border: 2px solid var(--accent);
    background-color: var(--accent);
    cursor: pointer;
}

#groupsToggle {
    color: white;
    padding-top: 2px;
    padding-bottom: 2px;
    padding-left: 40px;
    padding-right: 40px;
    border-radius: 0 100px 100px 0;
    border: 2px solid var(--accent);
    background-color: #10101B;
    cursor: pointer;
}

#friendLeaderboard {
    display: none;
    width: 100%;
}

#friendLeaderboardHeader {
    font-size: 30px;
    padding-left: 20px;
    padding-top: 10px;
}

#friendLeaderboardSubheader {
    color: #6c6c6c;
    font-size: 15px;
    padding-left: 20px;
    margin-top: -7px;
}

#addFriendsButton {
    text-align: left;
    cursor: pointer;
    color: #6c6c6c;
    font-size: 15px;
    padding-left: 20px;
}

#leaderboardContent {
    padding-top: 10px;
    width: 94%;
    text-align: center;
    margin: auto;
    display: none;
}

#loginPrompt {
    height: 50vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#loginPromptHeader {
    font-size: 25px;
}

#loginTextLarge {
    background-color: var(--accent);
    border-radius: 1000px;
    padding: 10px;
    font-size: 15px;
    padding-left: 35px;
    text-align: center;
    color: white;
    padding-right: 35px;
    margin-top: 20px;
}

#loginTextSmall {
    color: #6c6c6c;
    font-size: 10px;
    text-decoration: underline;
    margin-top: 20px;
}

#addFriendsPrompt {
    display: none;
    text-align: center;
    margin-top: 70px;
    margin-bottom: 70px;
}

#addFriendsSmallText {
    color: rgb(132, 131, 131);
    text-decoration: underline;
}



#myTable {
    border-collapse: collapse;
    width: 100%;
    margin-top: 20px;
}

#myTable th {
    border-bottom: 0.1px solid #8b8b8b; /* Add border below each row */
    text-align: left;
    font-size: 20px;
    padding-bottom: 5px;
}

#myTable td {
    border-bottom: 0.1px solid #8b8b8b;
    text-align: left;
    font-size: 15px;
    padding-left: 15px;
    padding-top: 20px;
    padding-bottom: 20px;
}

#myTable tbody tr:last-child td {
    border-bottom: none; /* Remove the border below the last row */
}

#myTable tbody tr:hover {
    background-color: var(--accent);
}

#previousPageButton {
    color: white;
    font-size: 15px;
}

#nextPageButton {
    color: white;
    font-size: 15px;
}


/* Share Popup Modal */
#sharePopup {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 65vw;
    max-width: 850px;
    z-index: 11;
    transition: opacity 0.25s;
    background-color: #10101B;
    border-radius: 20px;
    box-shadow: 20px 20px 20px rgba(0, 0, 0, 0.5);
    padding: 30px 40px 35px;
    color: white;
    opacity: 0;
    pointer-events: none;
}

.shareExitIcon {
    position: absolute;
    width: 35px;
    top: 15px;
    right: 15px;
    cursor: pointer;
    transition: transform 0.1s ease-in-out;
}

.shareExitIcon:hover {
    transform: scale(1.1);
}

#sharePopupHeader {
    font-size: 24px;
    margin-bottom: 15px;
    text-align: center;
}

#shareOptionsContainer {
    display: flex;
    gap: 25px;
    align-items: stretch;
}

.shareOption {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.shareOptionLabel {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 8px;
}

.sharePreview {
    background-color: #1a1a2e;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.5;
    width: 100%;
    box-sizing: border-box;
    white-space: pre-wrap;
    word-break: break-word;
    color: #e0e0e0;
    font-family: 'Poppins', sans-serif;
    min-height: 180px;
    margin: 0;
    flex: 1;
}

.shareCopyBtn {
    margin-top: 10px;
    padding: 6px 24px;
    background-color: #2a2a3e;
    border: 1px solid #444;
    border-radius: 100px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    transition: background-color 0.2s;
}

.shareCopyBtn:hover {
    background-color: #3a3a52;
}

#shareVoteSection {
    margin-top: 20px;
    text-align: center;
}

#shareVoteLabel {
    font-size: 14px;
    color: #aaa;
    margin-bottom: 8px;
}

#shareVoteButtons {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.shareVoteBtn {
    padding: 6px 20px;
    border: 2px solid var(--accent);
    border-radius: 100px;
    cursor: pointer;
    font-size: 13px;
    background-color: transparent;
    transition: background-color 0.2s;
}

.shareVoteBtn:hover {
    background-color: rgba(219, 80, 73, 0.2);
}

.shareVoteBtn.voted {
    background-color: var(--accent);
}

#shareFeedbackSection {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#shareFeedbackInput {
    flex: 1;
    padding: 8px 14px;
    border-radius: 100px;
    border: 1px solid #333;
    background-color: #1a1a2e;
    color: white;
    font-size: 13px;
    font-family: 'Poppins', sans-serif;
    outline: none;
}

#shareFeedbackInput::placeholder {
    color: #555;
}

#shareFeedbackSubmit {
    margin-top: 0;
    white-space: nowrap;
    background-color: var(--accent);
    border-color: var(--accent);
}

@media (max-width: 20em),
screen and (orientation: portrait) {
    #totalText {
        font-size: 10vw;
    }

    #countdown {
        font-size: 2.3vw;
        margin-top: 0vh;
    }

    #buttonBox {
        display: flex;
        flex-direction: column;
        margin-top: 0px;
    }

    #exitIcon {
        position: absolute;
        width: 10%;
    }

    #newGameButton, #playAgainButton, #viewStatsButton {
        font-size: 25px;
        margin-top: 20px;
        text-align: center;
    }

    #loginPromptHeader {
        font-size: 50px;
    }

    #loginTextLarge {
        font-size: 30px;
    }

    #loginTextSmall {
        font-size: 30px;
    }

    #statsPopup {
        width: 90vw;
    }

    #friendLeaderboardHeader {
        font-size: 50px;
    }

    #friendLeaderboardSubheader {
        font-size: 30px;
    }

    #makeBig {
        font-size: 25px;
    }

    #addFriendsSmallText {
        font-size: 20px;
    }

    #sharePopup {
        width: 90vw;
        padding: 20px 15px 25px;
    }

    #sharePopupHeader {
        font-size: 20px;
    }

    #shareOptionsContainer {
        flex-direction: column;
        gap: 15px;
    }

    .sharePreview {
        font-size: 11px;
        min-height: auto;
    }

    #shareFeedbackSection {
        flex-direction: column;
    }

    #shareFeedbackInput {
        width: 100%;
        box-sizing: border-box;
    }
}

#loaderContainer {
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    position: relative;
    animation: rotate 1s linear infinite;
    margin: 0 auto;
}

.loader::before {
    content: "";
    box-sizing: border-box;
    position: absolute;
    inset: 0px;
    border-radius: 50%;
    border: 5px solid #FFF;
    animation: prixClipFix 2s linear infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

@keyframes prixClipFix {
    0% { clip-path: polygon(50% 50%, 0 0, 0 0, 0 0, 0 0, 0 0); }
    25% { clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 0, 100% 0, 100% 0); }
    50% { clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 100% 100%, 100% 100%); }
    75% { clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 100%); }
    100% { clip-path: polygon(50% 50%, 0 0, 100% 0, 100% 100%, 0 100%, 0 0); }
}