* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    /* display: flex; */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    background-color: #F9FAFE;
    overflow: hidden;
}

body, header {
    overflow: hidden;
}

header {
    position: relative;
    /* or 'fixed', depending on your design */
    top: 0;
    left: 0;
    width: 100%;
    height: 5vh;
    padding: 10px;
    background-color: white;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 50px
}

#profileIcon, #helpIcon {
    display: block;
    cursor: pointer;
    font-size: 40px;
    color: black;
}

#profileIcon:hover, #helpIcon:hover {
    font-size: 42px;
}

/* Adjust padding for mobile screens */
@media screen and (max-width: 767px) {
    #profileIcon, #helpIcon {
        font-size: 32px;
    }

    #profileIcon:hover, #helpIcon:hover {
        font-size: 34px;
    }
}

.header-title {
    font-size: 18px;
    color: black;
}

#playerProfile {
    display: none;
    position: absolute;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: white;
    padding: 20px;
    border: 1px solid #ccc;
    z-index: 10000;
}

#playerProfile button {
    align-self: center;
    margin-top: 20px;
}

#helpContainer {
    display: none;
    position: absolute;
    top: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 2%;
    text-align: center;
    width: 100%;
    height: 80vh;
    background-color: #F9FAFE;
    padding: 20px;
    /* border: 1px solid #ccc; */
    z-index: 10000;
}

/* Help Styles */

.info-container {
    padding-inline: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 95%;
    max-width: 700px;
    line-height: 1.5;
    text-align: left;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    height: 100%;
    overflow-y: scroll;
}

.info-text {
    font-size: 1.3em;
    margin-bottom: 20px;
}

.info-title {
    font-size: 2.1em;
    font-weight: bold;
    margin-bottom: 10px;
}

/* Adjust padding for mobile screens */
@media screen and (max-width: 767px) {
    .info-text {
        font-size: 1em;
    }

    .info-title {
        font-size: 1.7em;
    }
}

.info-image {
    max-width: calc(min(100%, 650px));
    height: auto;
    /* margin-bottom: 20px; */
}

.nav-arrow {
    font-size: 3em;
    color: #333;
    cursor: pointer;
    user-select: none;
}

.left-arrow {
    margin-right: 20px;
}

.right-arrow {
    margin-left: 20px;
}

.nav-arrow.disabled {
    color: #ccc;
    cursor: default;
}

.indicators-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.indicator {
    width: 12px;
    height: 12px;
    background-color: #ccc;
    border-radius: 50%;
    margin: 0 5px;
}

.indicator.active {
    background-color: #333;
}

.info-container ul {
    list-style-type: disc;
    margin-left: 20px;
    text-align: left;
}

.info-container h3 {
    font-size: 1.2em;
    margin-top: 13px;
    margin-bottom: 5px;
}

#exercise-intro, #actual-exercise {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 2%;
    text-align: center;
    width: 90%;
    max-width: 300px;
}


main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* flex-grow: 1; */
    width: 100%;
    height: 93vh;
    background-color: #F9FAFE;
    overflow: hidden;
}

button {
    background-color: transparent;
    border: 2px solid black;
    border-radius: 15px;
    transition: background-color 0.3s;
    padding: 0.5em 0.75em;
    /* Padding relative to font size */
    font-size: 1.2rem;
    /* Base font size */
}

/* Medium screen size adjustments (e.g., tablets) */
@media (min-width: 600px) {
    button {
        font-size: 1.3rem;
        /* Increase font size */
        padding: 0.75em 1.5em;
        /* Increase padding */
    }
}

/* Large screen size adjustments (e.g., desktops) */
@media (min-width: 1024px) {
    button {
        font-size: 1.5rem;
        /* Further increase font size */
        padding: 1em 2em;
        /* Further increase padding */
        max-width: 300px;
        /* Set a maximum width */
    }
}

button:hover {
    background-color: black;
    color: white;
}

button:disabled {
    opacity: 20%;
}

.form {
    display: flex;
    min-width: 300px;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.form input, .form select {
    padding: 10px;
    margin: 5px 0;
    font-size: 16px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

#title-image {
    /* width: 100%; */
    max-width: 50%;
    filter: grayscale(.85);
    opacity: 0%;
    margin-top: -50px;
    animation: fade 2s 0s 1 ease-in forwards;
}

@keyframes fade {
    0% {
        opacity: 0%;
        transform: scale(90%);
    }

    50% {
        opacity: 5%;
        transform: scale(92%)
    }

    100% {
        opacity: 100%;
        transform: scale(110%);

    }
}

#game-title {
    position: relative;
    /* -webkit-text-stroke: 3px black; */
    font-family: "Nerko One", cursive;
    /* font-family: "Poppins", sans-serif; */
    font-size: 2rem;
    color: transparent;
}

#game-title::before {
    content: attr(data-fill-text);
    position: absolute;
    width: 0%;
    height: 100%;
    color: black;
    -webkit-text-stroke: 0px transparent;
    overflow: hidden;
    /* transition: width 1.8s cubic-bezier(0.165,0.84,0.44,1); */
    animation: fill-color 1s 0.5s 1 forwards;
}

@keyframes fill-color {
    from {
        width: 0%;
    }

    to {
        /* font-size: 15px; */
        width: 100%;
    }
}

#auth-container, #buttons-container, #title-container {
    display: flex;
    flex-direction: column;
    /* Stack items vertically */
    align-items: center;
    /* Center align buttons horizontally */
    justify-content: center;
    /* Center align buttons vertically within the container */
    gap: 10px;
    /* Adds space between buttons */
}

#buttons-container p {
    font-size: 12px;
    opacity: 0;
    margin-top: 5px;
    animation: v-fade 1.5s 1.5s 1 forwards;

}

#auth-container {
    margin-top: 100px;
}

#buttons-container {
    width: 60%;
    overflow: hidden;
}

#signInButton, #registerButton, .gameButton {
    font-family: "Poppins", sans-serif;
    min-width: 100%;
    border: 2px solid black;
    border-radius: 10px;
    transform: translateX(-200%);
    color: black;
    background-color: transparent;
    cursor: pointer;
    text-align: center;
    animation: slidein 1.5s 0.5s 1 forwards;
    transition: background-color 0.3s;
}

#version-number {
    opacity: 0;
    animation: v-fade 1.5s 1.5s 1 forwards;
}

@keyframes v-fade {
    0% {
        opacity: 0%;
    }

    100% {
        opacity: 100%;
    }
}

#signInButton:hover, #registerButton:hover, .gameButton:hover {
    background-color: black;
    color: white;
}

@keyframes slidein {
    from {
        opacity: 0%;
        transform: translateX(-200%);
    }

    to {
        opacity: 100%;
        transform: translateX(0%);
    }
}

#login-form,
#registration-form,
#welcome-message {
    display: none;
    text-align: center;
}

#player-details-message {
    display: flex;
    flex-direction: column;
    font-family: 'Nerko One', cursive;
}

#registrationSuccessPopup {
    position: fixed;
    width: 40%;
    top: 50%;
    left: 30%;
    transform: translate(0%, -50%);
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    text-align: center;
    z-index: 1000;
}

@media (max-width: 600px) {
    #registrationSuccessPopup {
        position: fixed;
        width: 70%;
        top: 50%;
        left: 15%;
        transform: translate(0%, -50%);
    }
}

#registrationSuccessPopup p {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #4CAF50;
    border-radius: 20px;
    color: white;
    margin-bottom: 20px;
    border: none;
    cursor: pointer;
}

#registrationSuccessPopup button {
    margin-top: 10px;
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    margin-top: 20px;
    border: none;
    cursor: pointer;
}

#registrationSuccessPopup button:hover {
    background-color: #45a049;
}

#tree-view-container {
    position: absolute;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

#tree-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
    border-bottom: 2px solid white;
    z-index: 10;
}

#tree-toggle-container button {
    margin: 7px;
    /* padding: 10px; */
    border: 1px solid white;
    border-radius: 15px;
    cursor: pointer;
}

.tree-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex;
    justify-content: flex-start;
}

/* leaderboard.css */
#leaderboard-container {
    width: 100%;
    max-width: 400px;
    height: 375px;
    /* background-color: #fff; */
    border-radius: 10px;
    /* box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); */
    overflow: hidden;
    z-index: 1000;
    margin-bottom: 30px;
    /* font-family: Arial, sans-serif; */
}

/* Leaderboard header */
.leaderboard-header {
    position: relative;
    padding: 15px;
    /* background-color: #4CAF50;
    background-image: linear-gradient(to right,black, rgba(0, 0, 0, 0.21));
    background-color: rgb(61, 94, 105); */
    background-color: transparent;
    color: black;
    text-align: center;
}

.date-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5%;
    align-self: center;
    width: 100%;
    margin: 0;
    font-size: larger;
}

#today-button, #this-week-button, #all-time-button {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 10px 15px;
    border-radius: 45px;
    /* width: 40%; */
    color: black;
    border: none;
}

#today-button.selected, #this-week-button.selected, #all-time-button.selected {
    background-color: white;
}

/* Close button */
.close-button {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

/* Close button hover effect */
.close-button:hover {
    color: #ccc;
}

/* Leaderboard content */
.leaderboard-content {
    width: 100%;
    height: 300px;
    overflow-y: auto;
    /* padding-inline: 2%; */
    background-color: #F9FAFE;
    text-align: left;
    margin-top: 20px;
}

/* Leaderboard list */
.leaderboard-content ol {
    list-style: none;
}

/* Leaderboard item */
.leaderboard-item {
    display: flex;
    justify-content: space-between;
    padding: 17px 30px;
    border-bottom: 1px solid #f0f0f0;
    background-color: white;
    border-radius: 35px;
    margin-bottom: 5px;
    min-width: 100%;
}

/* .leaderboard-item:nth-child(even) { */
/* background-color: #f2eaea3f; */
/* } */

.player-name {
    font-weight: bold;
}

.player-points {
    color: #888;
}

@media screen and (max-width: 480px) {
    #leaderboard-div {
        width: 100%;
    }

    .close-button {
        font-size: 20px;
    }
}