.rally-crowd-leaderboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Tab Navigation */
.rally-crowd-tab-nav {
    position: sticky;
    top: 32px;
    z-index: 10;
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}
.rally-crowd-tab-nav a {
    flex: 1;
    text-align: center;
    padding: 10px;
    background: #e0e0e0;
    color: #333;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.rally-crowd-tab-nav a:hover {
    background: #d0d0d0;
}
.rally-crowd-tab-nav a.active {
    background: #0073aa;
    color: #fff;
}

/* Filter Container */
.filter-container {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    align-items: center;
}
.rally-crowd-leaderboard-filter select,
.rally-crowd-leaderboard-filter input[type="text"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: border-color 0.3s ease;
}
.rally-crowd-leaderboard-filter select:focus,
.rally-crowd-leaderboard-filter input[type="text"]:focus {
    border-color: #0073aa;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}
.rally-crowd-filter-button,
.rally-crowd-clear-button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.rally-crowd-filter-button {
    background-color: #0073aa !important;
    color: #fff;
}

button {
    background-color: #0073aa !important;
    color: #fff;
}

.rally-crowd-filter-button:hover {
    background-color: #005d82;
}
.rally-crowd-clear-button {
    background-color: #e63946;
    color: #fff;
}
.rally-crowd-clear-button:hover {
    background-color: #d62828;
}

/* Monthly Prize Info - Aligned with Dashboard Styling */
.rally-crowd-monthly-prize-info {
    padding: 20px;
    background: linear-gradient(135deg, #00c4b4, #007bff);
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    animation: glow 3s infinite alternate;
    margin-bottom: 20px;
}
.rally-crowd-monthly-callout {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}
.rally-crowd-monthly-desc {
    margin: 0 0 15px;
    font-size: 14px;
    color: #666;
}
.rally-crowd-monthly-points {
    margin: 0 0 10px;
    font-size: 18px;
    color: #e63946;
    font-weight: 600;
}
.rally-crowd-monthly-image {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
}
.rally-crowd-monthly-thumbnail {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}
.rally-crowd-monthly-card:hover .rally-crowd-monthly-thumbnail {
    transform: scale(1.1);
}
.rally-crowd-monthly-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ddd, #bbb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    font-size: 12px;
    text-transform: uppercase;
}
.rally-crowd-prize-claimed {
    text-align: center;
    font-size: 16px;
    color: #fff;
    background: linear-gradient(90deg, #ff7e5f, #feb47b);
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}
.rally-crowd-no-monthly-prize {
    text-align: center;
    font-style: italic;
    color: #666;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Leaderboard Table */
.rally-crowd-leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.rally-crowd-leaderboard-table th,
.rally-crowd-leaderboard-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}
.rally-crowd-leaderboard-table th {
    background: #0073aa; /* Solid blue instead of gradient */
    color: #fff;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.rally-crowd-leaderboard-table tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}
.rally-crowd-leaderboard-table tbody tr:hover {
    background-color: #e5e7eb;
}

/* Top 5 Highlighting */
.rally-crowd-leaderboard-table .top-1 {
    background: linear-gradient(135deg, #ffd700, #f1c40f);
    color: #333;
    font-weight: 600;
}
.rally-crowd-leaderboard-table .top-2 {
    background: linear-gradient(135deg, #c0c0c0, #a9a9a9);
    color: #333;
    font-weight: 600;
}
.rally-crowd-leaderboard-table .top-3 {
    background: linear-gradient(135deg, #cd7f32, #b87333);
    color: #333;
    font-weight: 600;
}
.rally-crowd-leaderboard-table .top-4 {
    background: linear-gradient(135deg, #b0c4de, #a9b7d1);
    color: #333;
    font-weight: 600;
}
.rally-crowd-leaderboard-table .top-5 {
    background: linear-gradient(135deg, #b0c4de, #a9b7d1);
    color: #333;
    font-weight: 600;
}
.rank-icon {
    color: #fff;
    font-size: 18px;
    vertical-align: middle;
    margin-right: 5px;
}
.rank-number {
    font-size: 18px;
    font-weight: 700;
}
.rally-crowd-leaderboard-table .top-1 .rank-icon,
.rally-crowd-leaderboard-table .top-2 .rank-icon,
.rally-crowd-leaderboard-table .top-3 .rank-icon,
.rally-crowd-leaderboard-table .top-4 .rank-icon,
.rally-crowd-leaderboard-table .top-5 .rank-icon {
    color: #333;
}
.rally-crowd-leaderboard-table .top-1,
.rally-crowd-leaderboard-table .top-2,
.rally-crowd-leaderboard-table .top-3,
.rally-crowd-leaderboard-table .top-4,
.rally-crowd-leaderboard-table .top-5 {
    color: #333;
}

/* Flashier User Names */
.rally-crowd-user-name {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(90deg, #0073aa, #00aaff);
    -webkit-background-clip: text;
    background-clip: text;
    color: #fff;
    text-shadow: 0px 0px 4px rgba(255,255,255, 0.8);
    padding: 2px 5px;
    display: inline-block;
}

/* Badges Earned Column */
.rally-crowd-user-badges {
    display: inline-block;
}
.rally-crowd-badge-thumbnail {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 3px;
    margin-right: 3px;
    vertical-align: middle;
}

/* Pagination */
.rally-crowd-leaderboard-pagination {
    margin-top: 20px;
    text-align: center;
}
.rally-crowd-leaderboard-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 5px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #0073aa;
    text-decoration: none;
    transition: background-color 0.3s ease;
}
.rally-crowd-leaderboard-pagination .page-numbers:hover {
    background-color: #e5e7eb;
}
.rally-crowd-leaderboard-pagination .current {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* No Users Message */
.no-users {
    text-align: center;
    font-style: italic;
    color: #666;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Animations */
@keyframes glow {
    0% { box-shadow: 0 0 10px #ffcc00; }
    100% { box-shadow: 0 0 20px #ff6600; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .rally-crowd-leaderboard-table th,
    .rally-crowd-leaderboard-table td {
        padding: 10px;
        font-size: 14px;
    }
    .filter-container {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: wrap;
    }
    .rally-crowd-leaderboard-filter select,
    .rally-crowd-leaderboard-filter input[type="text"],
    .rally-crowd-filter-button,
    .rally-crowd-clear-button {
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 10px;
    }
    .rally-crowd-leaderboard-table th,
    .rally-crowd-leaderboard-table td {
        display: block;
        text-align: right;
        position: relative;
        padding-left: 50%;
    }
    .rally-crowd-leaderboard-table th:before,
    .rally-crowd-leaderboard-table td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        font-weight: bold;
        text-align: left;
    }
    .rally-crowd-leaderboard-table thead {
        display: none;
    }
    .rally-crowd-leaderboard-table tbody tr {
        margin-bottom: 10px;
        display: block;
        border-bottom: 2px solid #ddd;
    }
    .rally-crowd-user-name {
        font-size: 16px; /* Slightly reduced for mobile readability */
    }
    .rally-crowd-user-badges {
        display: none; /* Hide badges on mobile to save space */
    }
    td[data-label="Badges Earned"] {
        display: none;
    }

    }
    .rally-crowd-tab-nav {
        position: static;
        transform: none;
        margin-top: 10px;
        flex-direction: column;
    }
    .rally-crowd-tab-nav a {
        width: 100%;
        text-align: center;
    }
    .rally-crowd-monthly-prize-info {
        padding: 15px;
    }
    .rally-crowd-monthly-grid {
        display: grid;
        grid-template-columns: minmax(300px, 500px); /* Set a fixed width range for the card */
        justify-content: center; /* Center the grid item */
        gap: 20px;
        margin-bottom: 20px;
    }
}