/* css reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.87);
    background-color: #000000;
    font-family: "Jersey 10", sans-serif;
    font-size: 2rem;
    text-align: center;
}

#app {
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

input {
    display: block;
    padding: 5px;
    font-size: 25px;
    font-family: "Jersey 10", sans-serif;
    border: 3px solid #000;
    margin-bottom: 15px;
}

input:focus-visible {
    outline: none;
    border-color: #FFC20C;
}

input.success {
    border-color: #79e679;
}

input.error {
    border-color: #8b0303;
}

#profile-wrapper {
    display: none;
    width: 100vw;
    height: 100vh;
    background-color: #181818;
    position: absolute;
    top: 0;
    left: 0;
}

button {
    font-family: "Jersey 10", sans-serif;
    font-size: 1.5rem;
    background-color: #FFC20C;
    border: none;
    padding: 5px;
    cursor: pointer;
}

button:hover {
    background-color: #FFB000;
}

.nav {
    background-color: #028af8;
    width: 100%;
    height: 50px;
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 20px;
}

.nav>img {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
}

.nav>button {
    margin-left: auto;
    margin-right: 20px;
}

.nav>span {
    margin-left: 20px;
}

h1 {
    font-size: 3rem;
}

.profile-content {
    width: 90%;
    max-width: 900px;
    margin: 10px auto;
    display: flex;
    background-color: #222;
    border: 2px solid #444;
    border-radius: 20px;
    padding: 20px;
    gap: 20px;
}

#profileImg {
    width: 150px;
    height: 150px;
    border-radius: 100px;
    object-fit: cover; 
    border: 2px solid #028af8;
}

#uploadImg {
    background-color: #028af8;
}

#uploadImg:hover {
    background-color: #3ca7ff;
}

#player-stats {
    margin-left: auto;
}

.player-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid #444;
}

.label {
    text-align: left;
    flex: 1;
}

.value {
    text-align: right;
    width: 50px;
    color: #ffda69;
}

h2 {
    font-size: 2.2rem;
    color: #ffda69;
}

.profile-bottom {
    width: 90%;
    max-width: 900px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.profile-bottom > div {
    background-color: #222;
    border: 2px solid #444;
    border-radius: 20px;
    padding: 20px;
}

.achievements {
    width: 40%;
}

.leaderboard {
    width: 60%;
}

.achievement-card {
    background: #333;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    font-size: 20px;
}

.progress-container {
    width: 100%;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    margin: 5px 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: #4caf50;
    transition: width 0.3s ease-in-out;
}

.leaderboard-entry {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.player-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #333;
    padding: 15px;
    margin: 5px;
    border-radius: 5px;
    text-align: left;
    min-width: 200px;
    flex: 1;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}

.player-card p {
    font-size: 12px;
    margin: 5px;
    white-space: nowrap;
}

.player-card p {
    font-size: 25px;
    margin: 5px 0;
}

.leaderboard {
    max-width: 100%;
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #ccc;
    padding: 10px;
}

.leaderboard::-webkit-scrollbar {
    width: 8px; /* Sets a thin scrollbar */
}

.leaderboard::-webkit-scrollbar-track {
    background: #f3f3f3; /* Light background for scrollbar track */
    border-radius: 5px;
}

.leaderboard::-webkit-scrollbar-thumb {
    background: #888; /* Grey scrollbar handle */
    border-radius: 5px;
}

.leaderboard::-webkit-scrollbar-thumb:hover {
    background: #555; /* Darker when hovered */
}
