/* Leaderboard Page - Modern Compact Design */

.leaderboard-page {
    height: 100vh;
}

.leaderboard-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 80px 24px 0;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
    padding-bottom: 72px;
}

/* Fixed Header Section */
.leaderboard-fixed-header {
    flex-shrink: 0;
    background: transparent;
    padding-bottom: 16px;
    position: relative;
    z-index: 100; /* Above rankings scroll wrapper so dropdowns appear on top */
}

/* Compact Header */
.leaderboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.leaderboard-title {
    font-size: 1.6rem;
    color: #FF9500;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
    text-shadow: 0 0 20px rgba(255, 149, 0, 0.2);
}

.leaderboard-title-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.leaderboard-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.api-limit-note {
    font-size: 0.9rem;
    color: #9fb4d1;
    line-height: 1.2;
}

.last-refresh {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: rgba(159, 180, 209, 0.8);
    background: rgba(255, 149, 0, 0.1);
    border: 1px solid rgba(255, 149, 0, 0.2);
    padding: 4px 10px;
    border-radius: 12px;
}

.refresh-icon {
    font-size: 0.7rem;
    opacity: 0.8;
}

.refresh-text {
    font-size: 0.7rem;
    letter-spacing: 0.2px;
}

.refresh-text span {
    color: #FF9500;
    font-weight: 600;
}

.refresh-separator {
    opacity: 0.5;
    margin: 0 2px;
}

/* Season Info */
.season-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
}

.season-badge {
    background: linear-gradient(135deg, #FF9500 0%, #FF7700 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

.season-end {
    color: rgba(176, 196, 222, 0.7);
}

.season-countdown {
    color: #FFD700;
    font-weight: 500;
    background: rgba(255, 215, 0, 0.1);
    padding: 4px 10px;
    border-radius: 6px;
}

/* Unified Filter Bar */
.filter-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: nowrap;
}

.content-selector {
    display: flex;
    gap: 3px;
    background: rgba(255, 255, 255, 0.03);
    padding: 4px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.content-btn {
    background: transparent;
    border: none;
    color: rgba(176, 196, 222, 0.7);
    padding: 6px 10px;
    font-size: 0.8rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-weight: 500;
}

.content-btn:hover {
    background: rgba(255, 149, 0, 0.1);
    color: rgba(255, 200, 140, 0.95);
}

.content-btn.active {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.2) 0%, rgba(255, 119, 0, 0.12) 100%);
    color: #FF9500;
    box-shadow: 0 2px 8px rgba(255, 149, 0, 0.15);
}

.filter-right {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

/* Custom Dropdown Styles */
.filter-right .custom-dropdown {
    position: relative;
    display: inline-block;
    min-width: 160px;
}

.filter-right .custom-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(20, 25, 38, 0.95) 0%, rgba(25, 32, 48, 0.9) 100%);
    border: 1px solid rgba(255, 149, 0, 0.2);
    border-radius: 10px;
    color: #fff;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    white-space: nowrap;
}

.filter-right .custom-dropdown-toggle .dropdown-label {
    font-size: 0.85rem;
    font-weight: 500;
}

.filter-right .custom-dropdown-toggle:hover {
    border-color: rgba(255, 149, 0, 0.5);
    background: linear-gradient(135deg, rgba(25, 30, 45, 0.98) 0%, rgba(30, 38, 55, 0.95) 100%);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.15);
}

.filter-right .custom-dropdown.open .custom-dropdown-toggle {
    border-color: #FF9500;
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.15), 0 4px 12px rgba(255, 149, 0, 0.2);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.filter-right .custom-dropdown-arrow {
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(255, 149, 0, 0.7);
    transition: transform 0.2s ease;
}

.filter-right .custom-dropdown.open .custom-dropdown-arrow {
    transform: rotate(180deg);
}

.filter-right .custom-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(20, 25, 38, 0.98);
    border: 1px solid rgba(255, 149, 0, 0.4);
    border-top: none;
    border-radius: 0 0 10px 10px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: all 0.2s ease;
    z-index: 1000;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    pointer-events: none; /* Prevent clicks when closed */
}

.filter-right .custom-dropdown.open .custom-dropdown-menu {
    max-height: 280px;
    overflow-y: auto;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto; /* Enable clicks when open */
}

.filter-right .custom-dropdown-item {
    padding: 11px 16px;
    color: rgba(200, 220, 245, 0.85);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-right .custom-dropdown-item:hover {
    background: rgba(255, 149, 0, 0.15);
    color: #FFD700;
}

.filter-right .custom-dropdown-item.selected {
    background: rgba(255, 149, 0, 0.2);
    color: #FF9500;
    font-weight: 500;
}

.filter-right .custom-dropdown-item:last-child {
    border-radius: 0 0 9px 9px;
}

/* Dropdown Group Headers */
.filter-right .dropdown-group-header {
    padding: 10px 16px 6px;
    color: rgba(255, 149, 0, 0.85);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    user-select: none;
    transition: background 0.15s ease;
}

.filter-right .dropdown-group-header:hover {
    background: rgba(255, 149, 0, 0.1);
}

.filter-right .dropdown-group-header .group-icon {
    margin-right: 6px;
}

.filter-right .dropdown-group-header .group-toggle {
    font-size: 0.65rem;
    opacity: 0.6;
    transition: transform 0.2s ease;
}

.filter-right .dropdown-group-header.collapsed .group-toggle {
    transform: rotate(-90deg);
}

.filter-right .dropdown-group-content {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.filter-right .dropdown-group-content.collapsed {
    max-height: 0 !important;
}

.filter-right .dropdown-group-header:first-child {
    border-radius: 0;
}

/* Server Dropdown Search */
.filter-right .dropdown-search-wrapper {
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.25);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    position: sticky;
    top: 0;
    z-index: 10;
}

.filter-right .dropdown-search {
    width: 100%;
    padding: 8px 12px;
    font-size: 0.8rem;
    background: rgba(22, 27, 34, 0.9);
    border: 1px solid rgba(255, 149, 0, 0.25);
    border-radius: 6px;
    color: #dce7ff;
    outline: none;
    transition: border-color 0.15s ease;
}

.filter-right .dropdown-search:focus {
    border-color: rgba(255, 149, 0, 0.5);
}

.filter-right .dropdown-search::placeholder {
    color: rgba(200, 220, 245, 0.4);
}

.filter-right .dropdown-items-container {
    overflow-y: auto;
    max-height: 380px;
    scrollbar-gutter: stable;
}

/* Custom scrollbar for dropdown items container */
.filter-right .dropdown-items-container::-webkit-scrollbar {
    width: 6px;
}

.filter-right .dropdown-items-container::-webkit-scrollbar-track {
    background: transparent;
}

.filter-right .dropdown-items-container::-webkit-scrollbar-thumb {
    background: rgba(255, 149, 0, 0.3);
    border-radius: 3px;
}

.filter-right .dropdown-items-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 149, 0, 0.5);
}

.filter-right .dropdown-no-results {
    padding: 16px;
    text-align: center;
    color: rgba(200, 220, 245, 0.5);
    font-size: 0.85rem;
}

/* Server dropdown wider menu - no scroll on outer, only on items container */
.filter-right .server-dropdown .custom-dropdown-menu {
    min-width: 200px;
    max-height: none;
    overflow: visible;
}

.filter-right .server-dropdown.open .custom-dropdown-menu {
    max-height: 450px;
    overflow: hidden;
}

/* All Servers option styling */
.filter-right .all-servers-option {
    font-weight: 500;
}

.filter-right .all-servers-option.selected {
    /* Uses default selected styling */
}

/* Dropdown divider */
.filter-right .dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 4px 0;
}

/* Region Dropdown Styles - matches server/class dropdown styling */
.filter-right .leaderboard-region-dropdown {
    min-width: 140px;
}

.filter-right .leaderboard-region-dropdown .custom-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-right .leaderboard-region-dropdown .region-flag {
    font-size: 1rem;
    line-height: 1;
}

/* Use same styling as server dropdown items */
.filter-right .leaderboard-region-dropdown .dropdown-item {
    padding: 11px 16px;
    color: rgba(200, 220, 245, 0.85);
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

.filter-right .leaderboard-region-dropdown .dropdown-item:hover {
    background: rgba(255, 149, 0, 0.15);
    color: #FFD700;
}

.filter-right .leaderboard-region-dropdown .dropdown-item.active {
    background: rgba(255, 149, 0, 0.2);
    color: #FF9500;
    font-weight: 500;
}

.filter-right .leaderboard-region-dropdown .dropdown-item .region-flag {
    font-size: 1rem;
}

.filter-right .leaderboard-region-dropdown .dropdown-item .region-name {
    font-weight: 500;
}

/* All Regions option styling */
.filter-right .leaderboard-region-dropdown .dropdown-item[data-region="all"] {
    font-weight: 500;
}

/* Scrollbar for dropdown menu */
.filter-right .custom-dropdown-menu::-webkit-scrollbar {
    width: 5px;
}

.filter-right .custom-dropdown-menu::-webkit-scrollbar-track {
    background: transparent;
}

.filter-right .custom-dropdown-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 149, 0, 0.3);
    border-radius: 3px;
}

.filter-right .custom-dropdown-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 149, 0, 0.5);
}

.search-compact {
    position: relative;
}

.search-compact::before {
    content: '🔍';
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
}

.search-compact input {
    background: linear-gradient(135deg, rgba(20, 25, 38, 0.95) 0%, rgba(25, 32, 48, 0.9) 100%);
    border: 1px solid rgba(255, 149, 0, 0.2);
    color: #fff;
    padding: 12px 16px 12px 38px;
    border-radius: 10px;
    font-size: 0.85rem;
    width: 180px;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.search-compact input:hover {
    border-color: rgba(255, 149, 0, 0.5);
    box-shadow: 0 4px 12px rgba(255, 149, 0, 0.15);
}

.search-compact input:focus {
    outline: none;
    border-color: #FF9500;
    width: 220px;
    box-shadow: 0 0 0 3px rgba(255, 149, 0, 0.15), 0 4px 12px rgba(255, 149, 0, 0.2);
}

.search-compact input::placeholder {
    color: rgba(176, 196, 222, 0.4);
}

/* Scrollable Rankings Container */
.rankings-scroll-wrapper {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0 -20px;
    padding: 0 20px;
    position: relative;
    z-index: 1; /* Below the fixed header so dropdowns appear above */
}

/* Custom scrollbar for rankings */
.rankings-scroll-wrapper::-webkit-scrollbar {
    width: 6px;
}

.rankings-scroll-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 149, 0, 0.05);
    border-radius: 3px;
}

.rankings-scroll-wrapper::-webkit-scrollbar-thumb {
    background: rgba(255, 149, 0, 0.25);
    border-radius: 3px;
}

.rankings-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 149, 0, 0.4);
}

/* Rankings List - Row-based layout */
.rankings-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 200px;
    padding-bottom: 20px;
    position: relative;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

/* Fluent UI-style Shimmer Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Pulse animation for loading state */
@keyframes loadingPulse {
    0%, 100% {
        opacity: 0.6;
        filter: blur(6px);
    }
    50% {
        opacity: 0.75;
        filter: blur(5px);
    }
}

/* Individual row blur states */
.player-row {
    transition: filter 0.35s ease, opacity 0.35s ease;
}

/* Blurred state for rows awaiting real data - with pulse animation */
.player-row.blurred {
    filter: blur(6px);
    opacity: 0.6;
    pointer-events: none;
    animation: loadingPulse 1.8s ease-in-out infinite;
}

/* Staggered pulse animation start for visual interest */
.player-row.blurred.reveal-delay-1 { animation-delay: 0ms; }
.player-row.blurred.reveal-delay-2 { animation-delay: 80ms; }
.player-row.blurred.reveal-delay-3 { animation-delay: 160ms; }
.player-row.blurred.reveal-delay-4 { animation-delay: 240ms; }
.player-row.blurred.reveal-delay-5 { animation-delay: 320ms; }
.player-row.blurred.reveal-delay-6 { animation-delay: 400ms; }
.player-row.blurred.reveal-delay-7 { animation-delay: 480ms; }
.player-row.blurred.reveal-delay-8 { animation-delay: 560ms; }
.player-row.blurred.reveal-delay-9 { animation-delay: 640ms; }
.player-row.blurred.reveal-delay-10 { animation-delay: 720ms; }

/* Revealed state - smooth unblur */
.player-row.revealed {
    filter: blur(0);
    opacity: 1;
    animation: none;
}

/* Infinite scroll: fade-in for newly loaded rows */
.player-row.scroll-fade-in {
    opacity: 0;
    transform: translateY(10px);
}

.player-row.scroll-revealed {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.25s ease-out, transform 0.25s ease-out;
}

/* Staggered reveal delays */
.player-row.reveal-delay-1 { transition-delay: 0ms; }
.player-row.reveal-delay-2 { transition-delay: 25ms; }
.player-row.reveal-delay-3 { transition-delay: 50ms; }
.player-row.reveal-delay-4 { transition-delay: 75ms; }
.player-row.reveal-delay-5 { transition-delay: 100ms; }
.player-row.reveal-delay-6 { transition-delay: 125ms; }
.player-row.reveal-delay-7 { transition-delay: 150ms; }
.player-row.reveal-delay-8 { transition-delay: 175ms; }
.player-row.reveal-delay-9 { transition-delay: 200ms; }
.player-row.reveal-delay-10 { transition-delay: 225ms; }

/* Skeleton loading container */
#rankingsContent.loading-skeleton {
    pointer-events: none;
}

/* Skeleton row placeholder */
.skeleton-row {
    background: linear-gradient(135deg, rgba(22, 28, 42, 0.7) 0%, rgba(28, 35, 50, 0.5) 100%);
    border: 1px solid rgba(255, 149, 0, 0.08);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.skeleton-row::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 149, 0, 0.04) 20%,
        rgba(255, 149, 0, 0.08) 50%,
        rgba(255, 149, 0, 0.04) 80%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-rank {
    width: 40px;
    height: 20px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    flex-shrink: 0;
}

.skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.skeleton-name {
    height: 16px;
    width: 140px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
}

.skeleton-details {
    height: 12px;
    width: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.skeleton-score {
    width: 80px;
    height: 24px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    margin-left: auto;
}

/* Fixed Pagination Footer */
.leaderboard-fixed-footer {
    flex-shrink: 0;
    background: transparent;
    padding: 20px 0 24px;
    margin: 0 -20px;
    padding-left: 20px;
    padding-right: 20px;
}

/* Rankings Header Row */
.rankings-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 16px;
    margin-bottom: 8px;
    background: transparent;
    border-bottom: 1px solid rgba(255, 149, 0, 0.15);
}

.rankings-header .header-cell {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(176, 196, 222, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rankings-header .header-rank {
    width: 48px;
    min-width: 48px;
    text-align: center;
}

.rankings-header .header-avatar {
    width: 44px;
    min-width: 44px;
}

.rankings-header .header-player {
    flex: 1;
    min-width: 0;
    max-width: 240px;
}

.rankings-header .header-stats {
    width: 280px;
    min-width: 280px;
    text-align: center;
    display: flex;
    justify-content: center;
}

.rankings-header .header-score {
    width: 120px;
    min-width: 120px;
    text-align: right;
    padding-right: 12px;
}

.rankings-header .header-grade-icon {
    width: 40px;
    min-width: 40px;
    text-align: center;
    margin-left: auto;
}

.rankings-header .header-grade-text {
    width: 100px;
    min-width: 100px;
    text-align: center;
}

.rankings-header .header-change {
    width: 50px;
    min-width: 50px;
    text-align: center;
    flex-shrink: 0;
}

/* Player Row */
.player-row {
    background: linear-gradient(135deg, rgba(22, 28, 42, 0.7) 0%, rgba(28, 35, 50, 0.5) 100%);
    border: 1px solid rgba(255, 149, 0, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.player-avatar img {
    background: #0d1117;
}

.player-row:hover {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.1) 0%, rgba(255, 119, 0, 0.05) 100%);
    border-color: rgba(255, 149, 0, 0.35);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2), 0 2px 4px rgba(255, 149, 0, 0.1);
}

/* Top 3 special styling */
.player-row.rank-1 {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 180, 0, 0.05) 100%);
    border-color: rgba(255, 215, 0, 0.4);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.1);
}

.player-row.rank-1:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 4px 16px rgba(255, 215, 0, 0.2);
}

.player-row.rank-2 {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.12) 0%, rgba(150, 150, 150, 0.04) 100%);
    border-color: rgba(192, 192, 192, 0.35);
}

.player-row.rank-2:hover {
    border-color: rgba(192, 192, 192, 0.55);
    box-shadow: 0 4px 16px rgba(192, 192, 192, 0.15);
}

.player-row.rank-3 {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.12) 0%, rgba(180, 100, 30, 0.04) 100%);
    border-color: rgba(205, 127, 50, 0.35);
}

.player-row.rank-3:hover {
    border-color: rgba(205, 127, 50, 0.55);
    box-shadow: 0 4px 16px rgba(205, 127, 50, 0.15);
}

.player-row .player-rank {
    width: 48px;
    min-width: 48px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: rgba(176, 196, 222, 0.85);
    background: rgba(15, 20, 30, 0.5);
    border: 1px solid rgba(100, 120, 150, 0.2);
    border-radius: 6px;
    letter-spacing: 0;
    line-height: 1;
}

.player-row.rank-1 .player-rank { 
    color: #ffd700; 
    text-shadow: 0 0 12px rgba(255, 215, 0, 0.5); 
    font-size: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 180, 0, 0.08) 100%);
    border-color: rgba(255, 215, 0, 0.4);
}
.player-row.rank-2 .player-rank { 
    color: #e8e8e8; 
    text-shadow: 0 0 10px rgba(192, 192, 192, 0.4); 
    font-size: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.12) 0%, rgba(150, 150, 150, 0.06) 100%);
    border-color: rgba(192, 192, 192, 0.35);
}
.player-row.rank-3 .player-rank { 
    color: #e8a050; 
    text-shadow: 0 0 10px rgba(205, 127, 50, 0.4); 
    font-size: 1rem;
    font-weight: 800;
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.12) 0%, rgba(180, 100, 30, 0.06) 100%);
    border-color: rgba(205, 127, 50, 0.35);
}

.player-row .player-avatar {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(20, 26, 40, 0.9) 0%, rgba(26, 34, 51, 0.8) 100%);
    border: 2px solid rgba(255, 149, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.player-row.rank-1 .player-avatar {
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.player-row.rank-2 .player-avatar {
    border-color: rgba(192, 192, 192, 0.5);
    box-shadow: 0 2px 8px rgba(192, 192, 192, 0.15);
}

.player-row.rank-3 .player-avatar {
    border-color: rgba(205, 127, 50, 0.5);
    box-shadow: 0 2px 8px rgba(205, 127, 50, 0.15);
}

.player-row .player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fallback class icon inside avatar */
.player-row .player-avatar .class-icon-fallback {
    width: 28px;
    height: 28px;
    object-fit: contain;
    opacity: 0.8;
}

.player-row .player-info {
    flex: 1;
    min-width: 0;
    max-width: 240px;
}

.player-row .player-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-row .player-details {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: rgba(176, 196, 222, 0.7);
    margin-top: 3px;
}

.player-row .player-class {
    color: rgba(255, 149, 0, 0.8);
    font-weight: 500;
}

.player-row .player-guild {
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    min-width: 60px;
}

.player-row .player-score-section {
    width: 120px;
    min-width: 120px;
    text-align: right;
    flex-shrink: 0;
    padding-right: 12px;
}

.player-row .player-score {
    font-weight: 700;
    color: #FF9500;
    font-size: 0.95rem;
}

/* Grade icon column */
.player-row .player-grade-icon-column {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    flex-shrink: 0;
    text-align: center;
    margin-left: auto;
}

.player-row .player-grade-icon-column img {
    width: 32px;
    height: 32px;
}

.player-row .player-grade-icon-placeholder {
    width: 40px;
    min-width: 40px;
    flex-shrink: 0;
    margin-left: auto;
}

/* Grade text column */
.player-row .player-grade-text-column {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    min-width: 100px;
    flex-shrink: 0;
    font-size: 0.78rem;
    color: #8b9dc3;
    font-weight: 600;
    text-align: center;
}

.player-row .player-grade-text-placeholder {
    width: 100px;
    min-width: 100px;
    flex-shrink: 0;
}

/* Legacy grade column (keep for compatibility) */
.player-row .player-grade-column {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 80px;
    min-width: 80px;
    flex-shrink: 0;
}

.player-row .player-grade-column img {
    width: 28px;
    height: 28px;
}

.player-row .player-grade-column .player-grade-text {
    font-size: 0.8rem;
    color: #8b9dc3;
    font-weight: 500;
}

.player-row .player-grade-column-placeholder {
    width: 80px;
    min-width: 80px;
    flex-shrink: 0;
}

/* Legacy grade inside score section (keep for compatibility) */
.player-row .player-grade {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 2px;
}

.player-row .player-grade img {
    width: 28px;
    height: 28px;
}

.player-row .player-grade-text {
    font-size: 0.8rem;
    color: #8b9dc3;
    font-weight: 500;
}

/* Change column container for proper alignment with header */
.player-row .player-change-column {
    width: 50px;
    min-width: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.player-row .player-change {
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 4px;
    text-align: center;
}

/* Empty placeholder for consistent layout when no rank change */
.player-row .player-change-placeholder {
    width: 50px;
    min-width: 50px;
}

/* Inline Extra Stats for Row Layout */
.extra-stats-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 280px;
    min-width: 280px;
    font-size: 0.8rem;
    flex-shrink: 0;
    justify-content: center;
}

/* KDA Stats - Improved */
.kda-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.kda-stats .kda-value {
    font-weight: 700;
    padding: 4px 0;
    border-radius: 5px;
    font-size: 0.8rem;
    width: 70px;
    min-width: 70px;
    text-align: center;
    letter-spacing: -0.3px;
}

.kda-stats .kda-value.high {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.kda-stats .kda-value.medium {
    color: #eab308;
    background: rgba(234, 179, 8, 0.15);
}

.kda-stats .kda-value.low {
    color: #8b9dc3;
    background: rgba(176, 196, 222, 0.08);
}

.kda-stats .kda-details {
    display: flex;
    align-items: center;
    gap: 2px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.kda-stats .kda-details .k,
.kda-stats .kda-details .a,
.kda-stats .kda-details .d {
    padding: 2px 4px;
    border-radius: 3px;
    min-width: 18px;
    text-align: center;
}

.kda-stats .kda-details .k {
    color: #22c55e !important;
    background: rgba(34, 197, 94, 0.12);
}

.kda-stats .kda-details .a {
    color: #8b9dc3 !important;
    background: rgba(139, 157, 195, 0.1);
}

.kda-stats .kda-details .d {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.12);
}

.kda-stats .kda-separator {
    color: rgba(100, 116, 139, 0.5);
    font-size: 0.65rem;
}

/* Arena Stats Inline */
.arena-stats-inline .winrate-badge {
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
}

.arena-stats-inline .winrate-badge.high {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.arena-stats-inline .winrate-badge.medium {
    color: #eab308;
    background: rgba(234, 179, 8, 0.15);
}

.arena-stats-inline .winrate-badge.low {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.arena-stats-inline .wl-record {
    color: #6b7280;
    font-size: 0.75rem;
}

/* Nightmare Stats Inline */
.nightmare-stats-inline {
    justify-content: flex-start;
}

.nightmare-stats-inline .clear-badge {
    color: #f59e0b;
    font-weight: 600;
    background: rgba(245, 158, 11, 0.15);
    padding: 3px 8px;
    border-radius: 4px;
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    flex-shrink: 0;
    text-align: center;
    box-sizing: border-box;
}

.nightmare-stats-inline .boss-text {
    color: #8b9dc3;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Transcendence Stats Inline */
.transcendence-stats-inline .dungeon-badge {
    color: #8b5cf6;
    font-weight: 500;
    background: rgba(139, 92, 246, 0.15);
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 4px;
}

/* Hide old card-based styles (keep for backwards compat) */
.rankings-grid {
    display: none;
}

.player-card {
    display: none;
}

.player-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
    color: #8b9dc3;
    background: rgba(50, 60, 80, 0.5);
    border-radius: 6px;
    flex-shrink: 0;
}

.player-card.rank-1 .player-rank { color: #ffd700; background: rgba(255, 215, 0, 0.2); }
.player-card.rank-2 .player-rank { color: #c0c0c0; background: rgba(192, 192, 192, 0.2); }
.player-card.rank-3 .player-rank { color: #cd7f32; background: rgba(205, 127, 50, 0.2); }

.player-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #1a2233;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    border: 1px solid rgba(255, 149, 0, 0.2);
}

.player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.player-info {
    flex: 1;
    min-width: 0;
}

.player-name {
    font-weight: 600;
    color: #fff;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-details {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: #8b9dc3;
    margin-top: 1px;
}

.player-class {
    display: flex;
    align-items: center;
    gap: 4px;
}

.player-class img {
    width: 16px;
    height: 16px;
}

.player-guild {
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100px;
}

/* Server name in player details (All Servers mode) */
.player-server {
    color: rgba(100, 180, 255, 0.85);
    font-size: 0.72rem;
    background: rgba(100, 150, 255, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
    white-space: nowrap;
    min-width: 55px;
    text-align: center;
}

/* Region flag in player details (All Regions mode) */
.player-region {
    font-size: 0.85rem;
    margin-right: 4px;
}

.player-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
}

.player-score {
    font-weight: 600;
    color: #FF9500;
    font-size: 0.85rem;
}

.player-grade {
    display: flex;
    align-items: center;
    gap: 4px;
}

.player-grade img {
    width: 18px;
    height: 18px;
}

.player-grade-text {
    font-size: 0.75rem;
    color: #8b9dc3;
}

.player-change {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 4px;
    width: 50px;
    min-width: 50px;
    text-align: center;
}

.player-change.up {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.player-change.down {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.player-change.same {
    color: #8b9dc3;
}

/* Extra Stats - Content-specific stats display */
.extra-stats {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 6px;
    margin-top: 6px;
    border-top: 1px solid rgba(255, 149, 0, 0.1);
    font-size: 0.72rem;
}

/* Abyss KDA Stats */
.abyss-stats {
    justify-content: space-between;
}

.abyss-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 3px;
    color: #8b9dc3;
}

.abyss-stats .stat-icon {
    font-size: 0.65rem;
    opacity: 0.7;
}

.abyss-stats .kills {
    color: #22c55e !important;
}

.abyss-stats .assists {
    color: #8b9dc3;
}

.abyss-stats .deaths {
    color: #ef4444 !important;
}

.abyss-stats .stat-kda {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.2) 0%, rgba(255, 119, 0, 0.2) 100%);
    color: #FFD700;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.7rem;
}

/* Arena Win/Loss Stats */
.arena-stats {
    justify-content: space-between;
}

.arena-stats .winrate {
    font-weight: 700;
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.arena-stats .winrate.high {
    color: #22c55e;
    background: rgba(34, 197, 94, 0.15);
}

.arena-stats .winrate.medium {
    color: #eab308;
    background: rgba(234, 179, 8, 0.15);
}

.arena-stats .winrate.low {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
}

.arena-stats .win-loss {
    display: flex;
    gap: 6px;
}

.arena-stats .wins {
    color: #22c55e;
}

.arena-stats .losses {
    color: #ef4444;
}

.arena-stats .total-games {
    color: #6b7280;
    font-size: 0.7rem;
    margin-left: auto;
}

/* Nightmare Stats */
.nightmare-stats {
    justify-content: space-between;
}

.nightmare-stats .clear-level {
    color: #f59e0b;
    font-weight: 600;
    background: rgba(245, 158, 11, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

.nightmare-stats .boss-name {
    color: #8b9dc3;
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

/* Transcendence Stats */
.transcendence-stats {
    gap: 8px;
    justify-content: space-between;
}

.transcendence-stats .dungeon-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.transcendence-stats .dungeon-name {
    color: #8b9dc3;
    font-size: 0.7rem;
}

.transcendence-stats .dungeon-level {
    color: #8b5cf6;
    font-weight: 600;
    background: rgba(139, 92, 246, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
}

/* Empty and Loading States */
.empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: #8b9dc3;
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-text {
    font-size: 1.1rem;
}

.loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

/* Pagination - Stable Layout */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 0;
    padding: 8px 0;
}

.page-numbers {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 280px;
    justify-content: center;
}

.page-btn {
    background: linear-gradient(135deg, rgba(20, 25, 38, 0.95) 0%, rgba(28, 35, 52, 0.9) 100%);
    border: 1px solid rgba(255, 149, 0, 0.12);
    color: rgba(200, 215, 235, 0.85);
    padding: 8px 0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    width: 38px;
    height: 38px;
    text-align: center;
    flex-shrink: 0;
}

.page-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.12) 0%, rgba(255, 119, 0, 0.08) 100%);
    border-color: rgba(255, 149, 0, 0.4);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 6px rgba(255, 149, 0, 0.15);
}

.page-btn.active {
    background: linear-gradient(135deg, #FF9500 0%, #FF7700 100%);
    border-color: rgba(255, 200, 100, 0.3);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(255, 149, 0, 0.35), 0 2px 4px rgba(255, 149, 0, 0.25);
}

.page-btn.nav-btn {
    font-weight: 600;
    width: auto;
    padding: 8px 14px;
    background: linear-gradient(135deg, rgba(25, 32, 48, 0.98) 0%, rgba(32, 40, 58, 0.95) 100%);
    border-color: rgba(255, 149, 0, 0.2);
}

.page-btn.nav-btn:hover:not(.disabled) {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.15) 0%, rgba(255, 119, 0, 0.1) 100%);
    border-color: rgba(255, 149, 0, 0.5);
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

.page-ellipsis {
    color: rgba(176, 196, 222, 0.5);
    width: 38px;
    text-align: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.page-info {
    color: rgba(176, 196, 222, 0.6);
    font-size: 0.8rem;
    margin-left: 12px;
    white-space: nowrap;
}

/* Tablet Responsive */
@media (max-width: 1024px) {
    .leaderboard-container {
        padding: 70px 16px 0;
    }
    
    .player-row .extra-stats-inline {
        gap: 8px;
    }
    
    .stat-inline-item {
        font-size: 0.75rem;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .leaderboard-container {
        padding: 55px 8px 0;
        height: calc(100vh - 50px);
    }

    .leaderboard-fixed-header {
        padding-bottom: 8px;
    }
    
    .leaderboard-header {
        margin-bottom: 10px;
    }
    
    .leaderboard-title {
        font-size: 1.3rem;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .content-selector {
        justify-content: center;
        flex-wrap: wrap;
    }

    .content-btn {
        padding: 5px 8px;
        font-size: 0.8rem;
    }

    .filter-right {
        justify-content: center;
        flex-wrap: wrap;
    }

    .filter-right .custom-dropdown {
        min-width: 120px;
    }
    
    .filter-right .custom-dropdown-toggle {
        padding: 8px 12px;
        font-size: 0.8rem;
    }

    .search-compact input {
        width: 120px;
    }

    .search-compact input:focus {
        width: 140px;
    }

    /* Rankings header alignment for mobile */
    .rankings-header {
        padding: 6px 8px;
        gap: 8px;
    }

    .rankings-header .header-rank {
        width: 32px;
        min-width: 32px;
    }

    .rankings-header .header-avatar {
        width: 36px;
        min-width: 36px;
    }

    .rankings-header .header-player {
        flex: 1;
        min-width: 0;
        max-width: none;
    }

    /* Hide stats, grade, change columns in header on mobile */
    .rankings-header .header-stats,
    .rankings-header .header-grade-icon,
    .rankings-header .header-grade-text,
    .rankings-header .header-change {
        display: none;
    }

    .rankings-header .header-score {
        width: 70px;
        min-width: 70px;
        padding-right: 0;
    }

    .player-row {
        padding: 8px;
        gap: 8px;
    }

    .player-row .player-rank {
        width: 32px;
        min-width: 32px;
        font-size: 0.8rem;
    }

    .player-row .player-avatar {
        width: 36px;
        height: 36px;
    }

    .player-row .player-info {
        flex: 1;
        min-width: 0;
        max-width: none;
    }

    .player-row .player-name {
        font-size: 0.9rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Hide guild name on mobile to save space */
    .player-row .player-guild {
        display: none;
    }

    .player-row .player-details {
        margin-top: 2px;
    }

    .player-row .player-class {
        font-size: 0.75rem;
    }

    /* Hide extra columns on mobile */
    .extra-stats-inline,
    .player-row .player-grade-icon-column,
    .player-row .player-grade-icon-placeholder,
    .player-row .player-grade-text-column,
    .player-row .player-grade-text-placeholder,
    .player-row .player-change-column,
    .player-row .player-change-placeholder {
        display: none !important;
    }

    .player-row .player-score-section {
        width: 70px;
        min-width: 70px;
        padding-right: 0;
    }

    .player-row .player-score {
        font-size: 0.85rem;
    }

    .leaderboard-fixed-footer {
        padding: 8px 8px;
    }

    .pagination {
        gap: 4px;
    }

    .page-numbers {
        min-width: auto;
        gap: 2px;
    }

    .page-btn {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
        padding: 6px 0;
    }

    .page-btn.nav-btn {
        padding: 6px 10px;
    }

    .page-ellipsis {
        width: 24px;
    }

    .page-info {
        display: none;
    }
}

/* Small phone */
@media (max-width: 480px) {
    .leaderboard-container {
        padding: 50px 6px 0;
        height: calc(100vh - 46px);
    }
    
    .leaderboard-header {
        padding: 6px 0;
    }
    
    .leaderboard-title {
        font-size: 1.1rem;
    }
    
    .filter-bar {
        gap: 6px;
    }
    
    .content-selector {
        gap: 4px;
    }
    
    .content-btn {
        padding: 4px 6px;
        font-size: 0.7rem;
    }
    
    .filter-right .custom-dropdown {
        min-width: 100px;
    }
    
    .filter-right .custom-dropdown-toggle {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    
    .search-compact input {
        width: 100px;
        font-size: 0.8rem;
    }

    /* Rankings header alignment for small phones */
    .rankings-header {
        padding: 5px 6px;
        gap: 6px;
    }

    .rankings-header .header-rank {
        width: 28px;
        min-width: 28px;
    }

    .rankings-header .header-avatar {
        width: 32px;
        min-width: 32px;
    }

    .rankings-header .header-score {
        width: 60px;
        min-width: 60px;
    }
    
    .player-row {
        padding: 6px;
        gap: 6px;
    }
    
    .player-row .player-rank {
        min-width: 28px;
        width: 28px;
        font-size: 0.75rem;
    }
    
    .player-row .player-avatar {
        width: 32px;
        height: 32px;
    }
    
    .player-row .player-info {
        flex: 1;
        min-width: 0;
    }
    
    .player-row .player-name {
        font-size: 0.85rem;
    }
    
    .player-row .player-class {
        font-size: 0.7rem;
    }
    
    .player-row .player-server {
        font-size: 0.65rem;
    }
    
    .player-row .player-score-section {
        min-width: 60px;
        width: 60px;
    }
    
    .player-row .player-score {
        font-size: 0.8rem;
    }
    
    .player-row .player-score-label {
        font-size: 0.6rem;
    }
    
    .leaderboard-fixed-footer {
        padding: 6px;
    }
    
    .page-btn {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }
    
    .page-btn.nav-btn {
        padding: 4px 8px;
        font-size: 0.7rem;
    }
}

/* Very small phones (iPhone SE, etc.) */
@media (max-width: 380px) {
    .leaderboard-container {
        padding: 48px 4px 0;
    }
    
    .leaderboard-title {
        font-size: 1rem;
    }
    
    .api-limit-note {
        font-size: 0.75rem;
    }
    
    .content-selector {
        width: 100%;
        justify-content: center;
    }
    
    .content-btn {
        padding: 4px 5px;
        font-size: 0.65rem;
        flex: 1;
        text-align: center;
    }
    
    .filter-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .filter-right .custom-dropdown {
        min-width: 0;
        flex: 1;
    }
    
    .filter-right .custom-dropdown-toggle {
        padding: 6px 8px;
        font-size: 0.7rem;
    }
    
    .search-compact input {
        width: 100%;
        font-size: 0.75rem;
        padding: 8px 12px 8px 32px;
    }
    
    .search-compact::before {
        left: 10px;
        font-size: 0.7rem;
    }

    /* Rankings header alignment for very small phones */
    .rankings-header {
        padding: 4px;
        gap: 5px;
    }

    .rankings-header .header-rank {
        width: 24px;
        min-width: 24px;
        font-size: 0.6rem;
    }

    .rankings-header .header-avatar {
        width: 28px;
        min-width: 28px;
    }

    .rankings-header .header-player {
        font-size: 0.6rem;
    }

    .rankings-header .header-score {
        width: 50px;
        min-width: 50px;
        font-size: 0.6rem;
    }
    
    .player-row {
        padding: 5px;
        gap: 5px;
        border-radius: 8px;
    }
    
    .player-row .player-rank {
        min-width: 24px;
        width: 24px;
        font-size: 0.7rem;
    }
    
    .player-row .player-avatar {
        width: 28px;
        height: 28px;
    }
    
    .player-row .player-info {
        flex: 1;
        min-width: 0;
    }
    
    .player-row .player-name {
        font-size: 0.8rem;
    }
    
    .player-row .player-class {
        font-size: 0.65rem;
    }
    
    .player-row .player-server {
        font-size: 0.6rem;
    }
    
    .player-row .player-score-section {
        min-width: 50px;
        width: 50px;
    }
    
    .player-row .player-score {
        font-size: 0.75rem;
    }
    
    .player-row .player-score-label {
        font-size: 0.55rem;
    }
    
    .page-numbers {
        gap: 1px;
    }
    
    .page-btn {
        width: 24px;
        height: 24px;
        font-size: 0.65rem;
    }
    
    .page-btn.nav-btn {
        padding: 3px 6px;
        font-size: 0.65rem;
    }
    
    .page-ellipsis {
        width: 20px;
        font-size: 0.8rem;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .leaderboard-container {
        padding-top: 50px;
    }
    
    .leaderboard-fixed-header {
        padding-bottom: 6px;
    }
    
    .leaderboard-header {
        margin-bottom: 6px;
    }
    
    .filter-bar {
        margin-bottom: 6px;
    }
    
    .player-row {
        padding: 6px 10px;
    }
    
    .rankings-list {
        gap: 4px;
    }
}
