/* Specific overrides/additions for rankings */
.rank-filters {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

.rank-header {
    text-align: center;
    margin-bottom: 35px;
}

.rank-table-container {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
    overflow-x: auto;
}

table.rank-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.rank-table th {
    text-align: left;
    padding: 20px;
    border-bottom: 3px solid #eee;
    color: var(--text-muted);
    font-size: 1.1rem;
    /* Increased from 0.9rem */
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rank-table td {
    padding: 20px;
    border-bottom: 1px solid #f5f5f5;
    font-weight: 500;
    font-size: 1.2rem;
    /* Increased for better readability */
}

.rank-pos {
    font-weight: 800;
    color: var(--primary);
    width: 60px;
    text-align: center;
    font-size: 1.2rem;
}

.rank-1 {
    color: #f1c40f;
    font-size: 1.6rem;
    text-shadow: 0 2px 0 rgba(0, 0, 0, 0.1);
}

.rank-2 {
    color: #95a5a6;
    font-size: 1.5rem;
}

.rank-3 {
    color: #cd7f32;
    font-size: 1.4rem;
}

.rank-user {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rank-avatar {
    width: 55px;
    /* Increased from 30px/40px overrides */
    height: 55px;
    min-width: 55px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    /* Increased icon size */
    border: 1px solid rgba(0, 0, 0, 0.1);
}

body.dark-mode .rank-avatar {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.1);
}

.rank-stat-highlight {
    font-weight: 800;
    color: var(--secondary);
    font-size: 1.3rem;
}

/* User's own rank bar */
.user-rank-footer {
    position: sticky;
    bottom: 25px;
    background: var(--primary);
    color: white;
    padding: 18px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 10px 25px rgba(52, 152, 219, 0.4);
    max-width: 700px;
    margin: 0 auto;
    transform: translateY(150%);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
}

.user-rank-footer.visible {
    transform: translateY(0);
}

/* Dark mode overrides */
body.dark-mode .rank-table-container {
    background: #2c3e50;
}

body.dark-mode .rank-table th {
    color: #bdc3c7;
    border-bottom-color: #34495e;
}

body.dark-mode .rank-table td {
    border-bottom-color: #34495e;
    color: #ecf0f1;
}

body.dark-mode .user-rank-footer {
    background: #34495e;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

select {
    padding: 12px 20px;
    border-radius: 12px;
    border: 2px solid #eee;
    font-family: inherit;
    font-weight: 600;
    color: var(--text-color);
    cursor: pointer;
    font-size: 1rem;
    transition: border-color 0.2s;
}

select:hover {
    border-color: var(--primary);
}

body.dark-mode select {
    background: #34495e;
    border-color: #2c3e50;
    color: white;
}

/* Enhancements */
.rank-header .section-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.rank-table tbody tr:nth-child(even) {
    background-color: rgba(0, 0, 0, 0.05);
    /* Increased from 0.02 */
}

body.dark-mode .rank-table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.06);
    /* Increased from 0.03 */
}