/* Style the leaderboard period buttons */
.leaderboard-period-buttons {
    margin: 20px 0;
    text-align: center;
    font-family: 'Roboto', sans-serif;
}

.leaderboard-period-buttons a {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 5px;
    color: #0e5c4b;
    background-color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
    border: 2px solid #0e5c4b;
}

.leaderboard-period-buttons a:hover {
    background-color: #e4f5f2;
    color: #0e5c4b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.leaderboard-period-buttons a.active {
    background-color: #0e5c4b;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid #0e5c4b;
}

/* Wrapper for the table to apply border and rounded corners */
.table-wrapper {
    border: 1px solid #0e5c4b;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-width: 100%;
}

/* Style for the H2 Title */
h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    color: #0e5c4b;
    margin-bottom: 20px;
}

/* Style for the Leaderboard Table */
.generaltable {
    width: 100%;
    border-collapse: collapse;
}

/* Header row styling */
.generaltable thead tr {
    background-color: #0e5c4b !important;
    color: white;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
}

/* Bold white font for column headers */
.generaltable thead th {
    color: white;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
}

/* First row (top-ranked entry) styling */
.generaltable tbody tr:first-child {
    background-color: #0e5c4b;
    font-weight: bold;
}

/* First row specific cell styling to ensure text remains visible */


/* Table cells */
.generaltable td,
.generaltable th {
    padding: 12px;
}

/* Alternating row background for readability */
.generaltable tbody tr:nth-child(odd) {
    background-color: #f4f4f4d6 !important;
}

.generaltable tbody tr:nth-child(even) {
    background-color: #f4f4f4d6 !important;
}

/* Optional: Adds a hover effect to rows */
.generaltable tbody tr:hover {
    background-color: #d8f0eb;
}

/* Profile picture adjustments */
.generaltable td img {
    border-radius: 50%;
    margin-right: 10px;
    width: 40px;
    height: 40px;
}

.generaltable thead tr th {
    background-color: #0e5c4b !important;
    font-weight: bold;
}

.generaltable tbody tr td {
    background: #f4f4f4d6;
}


/* General styling for the dashboard */
.user-dashboard {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 12px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}

.leftpanel {
    display: flex;
  justify-content: space-between;
  align-items: center;
     gap: 16px;
}

/* Profile picture styling */
.profile-picture {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: none;
    flex-shrink: 0;
}

/* User details */
.user-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
}

.user-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.user-points {
    font-size: 14px;
    color: #666;
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    /* margin-left: 10px; */
}

/* Badge and level styling */
.level-badge {
    width: 30px; /* Set a fixed width for the badge to ensure it doesn't overpower the layout */
    height: auto; /* Maintain aspect ratio */
    margin-left: 0px; /* Space between points and badge */
}

.level-name {
    font-size: 12px; /* Smaller font for the level name next to the badge */
    color: #555;
    /* margin-left: 3px; */ /* Small gap between badge and level name */
}

/* Animation for number changes */
.user-points.updated {
    animation: pointsChange 0.6s ease;
}

/* Keyframes for scaling and fading effect */
@keyframes pointsChange {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
    .user-dashboard {
        width: 90%;
        max-width: 350px;
        max-height: 60px;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        padding: 15px;
        border-radius: 16px;
        box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
        z-index: 1;
    }

    .profile-picture {
        width: 25px;
        height: 25px;
    }

    .user-name {
        font-size: 16px;
    }

    .user-points {
        font-size: 14px;
    }
}

.level-info {
    display: flex;
    align-items: center;
    /* gap: 10px; */
}

.level-badge {
    width: 25px;
    height: 25px;  
    flex-shrink: 0;
}

.level-name {
    /* margin-left: 5px; */
    font-size: 14px;
    color: #333;
}

.progress-bar {
    flex-grow: 1;
    background-color: #ddd;
    border-radius: 2px;
    height: 4px;
    margin-left: 5px;  
    width: 80px;  
}

.progress {
    background-color: #0e5c4b;
    width: 50%;  
    height: 100%;
    border-radius: 2px;
}


/* Style the leaderboard period buttons */
.leaderboard-period-buttons {
    margin: 20px 0;
    text-align: center;
    font-family: 'Roboto', sans-serif;
}

.leaderboard-period-buttons a {
    display: inline-block;
    padding: 10px 20px;
    margin: 0 5px;
    color: #0e5c4b;
    background-color: white;
    text-decoration: none;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s, transform 0.2s;
    border: 2px solid #0e5c4b;
}

.leaderboard-period-buttons a:hover {
    background-color: #e4f5f2;
    color: #0e5c4b;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.leaderboard-period-buttons a.active {
    background-color: #0e5c4b;
    color: white;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid #0e5c4b;
}

/* Wrapper for the table to apply border and rounded corners */
.table-wrapper {
    border: 1px solid #0e5c4b;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    max-width: 100%;
}

/* Style for the H2 Title */
h2 {
    font-family: 'Roboto', sans-serif;
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    color: #0e5c4b;
    margin-bottom: 20px;
}

/* Style for the Leaderboard Table */
.generaltable {
    width: 100%;
    border-collapse: collapse;
}

/* Header row styling */
.generaltable thead tr {
    background-color: #0e5c4b !important;
    color: white;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
}

/* Bold white font for column headers */
.generaltable thead th {
    color: white;
    font-weight: bold;
    font-family: 'Roboto', sans-serif;
}

/* First row (top-ranked entry) styling */
.generaltable tbody tr:first-child {
    background-color: #0e5c4b;
    font-weight: bold;
}

/* First row specific cell styling to ensure text remains visible */


/* Table cells */
.generaltable td,
.generaltable th {
    padding: 12px;
}

/* Alternating row background for readability */
.generaltable tbody tr:nth-child(odd) {
    background-color: #f4f4f4d6 !important;
}

.generaltable tbody tr:nth-child(even) {
    background-color: #f4f4f4d6 !important;
}

/* Optional: Adds a hover effect to rows */
.generaltable tbody tr:hover {
    background-color: #d8f0eb;
}

/* Profile picture adjustments */
.generaltable td img {
    border-radius: 50%;
    margin-right: 10px;
    width: 40px;
    height: 40px;
}

.generaltable thead tr th {
    background-color: #0e5c4b !important;
    font-weight: bold;
}

.generaltable tbody tr td {
    background: #f4f4f4d6;
}


/* General styling for the dashboard */
.user-dashboard {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 350px;
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 12px;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-direction: row;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
}



/* Profile picture styling */
.profile-picture {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    flex-shrink: 0;
}

/* User details */
.user-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: 'Roboto', sans-serif;
}

.user-name {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.user-points {
    font-size: 14px;
    color: #666;
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
    /* margin-left: 10px; */
}

/* Badge and level styling */
.level-badge {
    width: 30px; /* Set a fixed width for the badge to ensure it doesn't overpower the layout */
    height: auto; /* Maintain aspect ratio */
    margin-left: 0px; /* Space between points and badge */
}

.level-name {
    font-size: 12px; /* Smaller font for the level name next to the badge */
    color: #555;
    /* margin-left: 3px; */ /* Small gap between badge and level name */
}

/* Animation for number changes */
.user-points.updated {
    animation: pointsChange 0.6s ease;
}

/* Keyframes for scaling and fading effect */
@keyframes pointsChange {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive adjustments for mobile devices */
@media (max-width: 768px) {
    .user-dashboard {
        width: 90%;
        max-width: 350px;
        max-height: 60px;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        padding: 15px;
        border-radius: 16px;
        box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
        z-index: 1;
    }

    .profile-picture {
        width: 25px;
        height: 25px;
    }

    .user-name {
        font-size: 16px;
    }

    .user-points {
        font-size: 14px;
    }
}

.level-info {
    display: flex;
    align-items: center;
    /* gap: 10px; */
}

.level-badge {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.level-name {
    /* margin-left: 5px; */
    font-size: 14px;
    color: #727272;
    margin-bottom: -5px;
}

.progress-bar {
    flex-grow: 1;
    background-color: #ddd;
    border-radius: 2px;
    height: 4px;
    margin-left: 5px;  
    width: 80px;  
}

.progress {
    background-color: #0e5c4b;
    width: 50%;  
    height: 100%;
    border-radius: 2px;
}


/* General positioning and styling for the notification container */
.notification-container {
    position: fixed; /* Fixed position to keep it relative to the viewport */
    bottom: 91px; /* Position it 20px from the top of the viewport */
    right: 20px; /* Align right like the dashboard */
    width: 350px; /* Same width as the dashboard */
    z-index: 1050; /* Higher z-index to ensure it's above other content */
     /* Optional: to match dashboard styling */
    /* border: 1px solid #ccc; */
    /* border-radius: 12px; */ /* Rounded corners like the dashboard */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1); /* Shadow for depth */
    padding: 0px; /* Padding inside the container */
    /* margin-bottom: 10px; */ /* Space between notifications and dashboard */
    overflow: hidden; /* Keeps the child elements contained inside the border radius */
}

/* Styling for individual notifications within the container */
.notification {
    background-color: #f9f9f9;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 10px;
    /* margin-bottom: 5px; */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    width: 100%; /* Take full width of the container */
    text-align: center;
}

/* Transition for the notification container to slide down */
.notification-container {
    transition: to0.5s ease-in-out;
}

/* Additional responsive adjustments if needed */
@media (max-width: 768px) {
    .notification-container, .user-dashboard {
        /* right: 10px; */ /* Adjust right spacing on smaller screens */
        /* left: 10px; */ /* Centering the container on smaller screens */
        /* width: calc(100% - 20px); */ /* Full width minus padding for small screens */
        /* transform: translateX(-50%); */
        /* top: 10px; */ /* Closer to the top on smaller screens */
    }
}

