@import url('https://fonts.googleapis.com/css?family=Poppins:400,700,900');
*{
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}
body {
    font-family: 'Poppins', sans-serif;
    display: flex;
    
}


header{
    position: fixed;
    top: 0;
    z-index: 2;
    width: 100%;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
   padding: 3%;
   background-color: rgb(246,246,246);
}
.logo img{
    width: 40%;
    }
    nav{
        border-radius: 5px;
        /* transform: translateX(-150px); */
        display: flex;
        gap: 50px;
    }
    .serch {
        position: relative;
        width: 300px; 
    }
    .serch input[type="search"] {
        width: 100%;
        padding: 10px 40px 10px 10px; 
        font-size: 1rem;
        border: 1px solid #ccc;
        border-radius: 7px;
    }
    .serch .fa-magnifying-glass {
        position: absolute;
        top: 50%;
        right: 10px; 
        transform: translateY(-50%);
        color: #aaa;
    }
        
     /* media querry for header   */
     @media screen and (max-width:768px) {
        nav{
            position: absolute;
            top: 50px;
            right: 0;
            height: 60vh;
            background-color:  rgb(21, 90, 3);
            display: flex;
            opacity: 0.9;
            flex-direction: column;
            width: 100%;
            transition: 1s ease-in-out;
            transform: translateX(-100%);
            justify-content: center;
           text-align: center;
    
        }
        nav a{
            color: white;
            font-size: 1.5rem;
        }
    
        .menu{
            display: flex;
            
        }
        
        nav.hidden{
            transform: translateX(0);
        }
        .log button{
            width: 80px;
            height: 40px;
        }
        .btn button{
            width: 100px;
            height: 40px;
        }
        .serch{
            transform: translateX(-50px);
        }
        .icon{
            display: flex;
            gap: 5px;
        }
    }
    @media screen and (max-width:470px) {
        .logo img{
            width: 50%;
            }
            .log button{
                width: 80px;
                height: 40px;
            }
            .btn button{
                width: 100px;
                height: 40px;
            }
    }

    aside {
        margin-top: 100px;
         width: 200px;
         padding: 20px;
         background-color: white;
         }
         .item a { 
            display: block; 
            margin-bottom: 10px; 
            text-decoration: none; 
            color: #333; 
        }
        aside :hover  {
            color: rgb(4, 82, 4);
        }
        
    .cont{
        display: flex;
        justify-content: center;
        align-items: center;
    }
    .active-link {
        color: rgb(5, 91, 5) !important; 
        font-weight: bold; 
    }    
    
    main { flex-grow: 1; 
        padding: 20px; }

        
/* Leaderboard Section */
#leaderboard {
    
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Leaderboard Section */
#leaderboard {
    
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

#leaderboard h2 {
    
    text-align: center;
    font-size: 1.8rem;
    background-color: green; /* Green background */
    color: white; /* White text */
    padding: 10px; /* Spacing */
    margin-bottom: 20px;
    font-weight: bold;
    border-radius: 5px; /* Rounded corners */
}

/* Card Styling */
.card {
    
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background-color: white;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Rank Number */
.rank {
    font-size: 1.8rem;
    font-weight: bold;
    color: #3949ab;
    flex-shrink: 0;
}

/* Profile Picture */
.profile-pic {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ddd;
}

/* User Details */
.details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex: 1;
}

.username {
    font-size: 1rem;
    font-weight: bold;
    color: #333;
}

.points {
    font-size: 0.9rem;
    color: #555;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    #leaderboard {
        padding: 10px; /* Reduced padding */
    }

    #leaderboard h2 {
        font-size: 1.5rem; /* Smaller font size */
        padding: 8px; /* Reduced padding */
    }

    .card {
        flex-direction: column; /* Stack items vertically */
        align-items: center; /* Center-align for better presentation */
        text-align: center; /* Center text */
    }

    .rank {
        font-size: 1.5rem; /* Smaller font size for rank */
    }

    .profile-pic {
        width: 40px; /* Smaller profile picture */
        height: 40px;
    }

    .username {
        font-size: 0.9rem; /* Smaller username font */
    }

    .points {
        font-size: 0.8rem; /* Smaller points font */
    }
}



