/* ==========================================
   LEADERBOARD PAGE - NEON STYLE
   ========================================== */

body.page-leaderboard {
    background: linear-gradient(180deg, #061016, #0b1220 60%, #0a111b) !important;
    min-height: 100vh;
}

/* Page title */
.leaderboard-title {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 900;
    color: #16f1d3;
    text-shadow: 
        0 0 20px rgba(22, 241, 211, 0.8),
        0 0 40px rgba(22, 241, 211, 0.5);
    text-align: center;
    margin-bottom: 30px;
    letter-spacing: 2px;
}

/* Tab buttons */
.leaderboard-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.leaderboard-tab {
    padding: 12px 28px;
    background: rgba(22, 241, 211, 0.08);
    border: 2px solid #16f1d3;
    color: #16f1d3;
    font-weight: 700;
    font-size: 16px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(22, 241, 211, 0.2);
}

.leaderboard-tab:hover {
    background: rgba(22, 241, 211, 0.15);
    box-shadow: 0 0 25px rgba(22, 241, 211, 0.4);
    color: #fff;
    transform: translateY(-2px);
}

.leaderboard-tab.active {
    background: linear-gradient(135deg, rgba(22, 241, 211, 0.25) 0%, rgba(13, 207, 184, 0.2) 100%);
    box-shadow: 
        0 0 30px rgba(22, 241, 211, 0.6),
        inset 0 0 20px rgba(22, 241, 211, 0.1);
    color: #fff;
}

/* Filter input */
.leaderboard-filter {
    background: rgba(22, 241, 211, 0.08) !important;
    border: 2px solid #16f1d3 !important;
    color: #fff !important;
    font-weight: 600 !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    box-shadow: 0 0 15px rgba(22, 241, 211, 0.2);
    transition: all 0.3s ease;
}

.leaderboard-filter:focus {
    background: rgba(22, 241, 211, 0.12) !important;
    box-shadow: 0 0 25px rgba(22, 241, 211, 0.4) !important;
    outline: none !important;
}

/* Month picker */
.leaderboard-month-form {
    position: relative;
}

.leaderboard-month-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px !important;
    min-width: auto;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
}

.leaderboard-month-trigger svg {
    transition: transform .3s ease;
}

.month-open .leaderboard-month-trigger svg {
    transform: rotate(180deg);
}

.leaderboard-month-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 280px;
    border: 2px solid rgba(22, 241, 211, 0.5);
    background: rgba(5, 15, 22, 0.95);
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease;
    z-index: 5;
}

.leaderboard-month-dropdown.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.month-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #16f1d3;
    font-weight: 700;
    margin-bottom: 12px;
}

.month-nav {
    background: rgba(22, 241, 211, 0.12);
    border: 1px solid rgba(22, 241, 211, 0.4);
    color: #16f1d3;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: box-shadow .2s ease, background .2s ease;
}

.month-nav:hover {
    background: rgba(22, 241, 211, 0.2);
    box-shadow: 0 0 12px rgba(22, 241, 211, 0.5);
}

.month-year-label {
    font-size: 18px;
    letter-spacing: 1px;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.month-option {
    border: 1px solid rgba(22, 241, 211, 0.4);
    background: rgba(22, 241, 211, 0.08);
    border-radius: 10px;
    color: #e6f1fb;
    padding: 10px 0;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s ease;
}

.month-option:hover,
.month-option.active {
    background: rgba(22, 241, 211, 0.2);
    color: #051522;
    box-shadow: 0 0 12px rgba(22, 241, 211, 0.4);
}

.month-dropdown-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.month-dropdown-footer button {
    flex: 1;
    border: 1px solid rgba(22, 241, 211, 0.4);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(22, 241, 211, 0.08);
    color: #16f1d3;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease;
}

.month-dropdown-footer button:hover {
    background: rgba(22, 241, 211, 0.2);
    box-shadow: 0 0 12px rgba(22, 241, 211, 0.4);
}

/* Year picker */
.leaderboard-year-form {
    position: relative;
}

.leaderboard-year-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px !important;
    min-width: auto;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
}

.leaderboard-year-trigger svg {
    transition: transform .3s ease;
}

.year-open .leaderboard-year-trigger svg {
    transform: rotate(180deg);
}

.leaderboard-year-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 200px;
    border: 2px solid rgba(22, 241, 211, 0.5);
    background: rgba(5, 15, 22, 0.95);
    border-radius: 14px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.5);
    padding: 16px;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity .2s ease, transform .2s ease;
    z-index: 5;
}

.leaderboard-year-dropdown.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.year-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}

.year-option {
    border: 1px solid rgba(22, 241, 211, 0.3);
    border-radius: 8px;
    padding: 10px 8px;
    background: rgba(22, 241, 211, 0.06);
    color: #e6f1fb;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.year-option:hover {
    background: rgba(22, 241, 211, 0.15);
    border-color: rgba(22, 241, 211, 0.6);
}

.year-option.active {
    background: rgba(22, 241, 211, 0.25);
    border-color: #16f1d3;
    color: #16f1d3;
    box-shadow: 0 0 12px rgba(22, 241, 211, 0.4);
}

.year-dropdown-footer {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.year-dropdown-footer button {
    flex: 1;
    border: 1px solid rgba(22, 241, 211, 0.4);
    border-radius: 10px;
    padding: 10px 12px;
    background: rgba(22, 241, 211, 0.08);
    color: #16f1d3;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s ease, box-shadow .2s ease;
}

.year-dropdown-footer button:hover {
    background: rgba(22, 241, 211, 0.2);
    box-shadow: 0 0 12px rgba(22, 241, 211, 0.4);
}

/* No data message */
.no-data-message {
    color: rgba(22, 241, 211, 0.6);
}

/* Table container */
.leaderboard-table-container {
    background: rgba(10, 15, 25, 0.6);
    border: 2px solid rgba(22, 241, 211, 0.3);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(22, 241, 211, 0.15);
    backdrop-filter: blur(10px);
}

/* Table styling */
.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.leaderboard-table thead th {
    background: linear-gradient(135deg, rgba(22, 241, 211, 0.15) 0%, rgba(13, 207, 184, 0.1) 100%);
    color: #16f1d3;
    font-weight: 800;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px 12px;
    border: none;
    text-shadow: 0 0 10px rgba(22, 241, 211, 0.5);
    text-align: center;
}

.leaderboard-table thead th:first-child {
    border-radius: 10px 0 0 10px;
}

.leaderboard-table thead th:last-child {
    border-radius: 0 10px 10px 0;
}

.leaderboard-table tbody tr {
    background: rgba(15, 25, 35, 0.8);
    transition: all 0.3s ease;
}

.leaderboard-table tbody tr:nth-child(even) {
    background: rgba(20, 30, 40, 0.8);
}

.leaderboard-table tbody tr:hover {
    background: linear-gradient(90deg, rgba(22, 241, 211, 0.12) 0%, rgba(13, 207, 184, 0.08) 100%);
    box-shadow: 0 0 20px rgba(22, 241, 211, 0.2);
    transform: translateX(5px);
}

.leaderboard-table tbody td {
    padding: 18px 12px;
    color: #fff;
    font-weight: 500;
    border: none;
    text-align: center;
}

.leaderboard-table tbody td:first-child {
    border-radius: 10px 0 0 10px;
}

.leaderboard-table tbody td:last-child {
    border-radius: 0 10px 10px 0;
}

/* Keep player name column (2nd column) left-aligned */
.leaderboard-table tbody td:nth-child(2),
.leaderboard-table thead th:nth-child(2) {
    text-align: left;
}

/* Rank badges */
.rank-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-weight: 900;
    font-size: 18px;
    color: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.rank-1 {
    background: linear-gradient(135deg, #ffd700, #ffb700);
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.6);
}

.rank-2 {
    background: linear-gradient(135deg, #c0c0c0, #a9a9a9);
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.6);
}

.rank-3 {
    background: linear-gradient(135deg, #cd7f32, #a46a29);
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.6);
}

/* Username styling */
.leaderboard-username {
    color: #fff;
    font-weight: 700;
    font-size: 16px;
}

/* Stats columns */
.stat-value {
    font-weight: 700;
    color: rgba(22, 241, 211, 0.9);
    text-shadow: 0 0 8px rgba(22, 241, 211, 0.4);
}

.stat-wins {
    color: #16f1d3;
    font-weight: 800;
}

.stat-points {
    color: #16f1d3;
    font-weight: 900;
    font-size: 18px;
    text-shadow: 0 0 10px rgba(22, 241, 211, 0.6);
}

/* Win rate badge */
.win-rate-badge {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(22, 241, 211, 0.15);
    border: 1px solid rgba(22, 241, 211, 0.4);
    border-radius: 20px;
    color: #16f1d3;
    font-weight: 700;
    font-size: 14px;
}

/* Pagination */
.leaderboard-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.leaderboard-pagination a,
.leaderboard-pagination span {
    padding: 10px 16px;
    background: rgba(22, 241, 211, 0.08);
    border: 2px solid #16f1d3;
    color: #16f1d3;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.leaderboard-pagination a:hover {
    background: rgba(22, 241, 211, 0.15);
    box-shadow: 0 0 20px rgba(22, 241, 211, 0.4);
    color: #fff;
}

.leaderboard-pagination .active {
    background: linear-gradient(135deg, rgba(22, 241, 211, 0.25) 0%, rgba(13, 207, 184, 0.2) 100%);
    box-shadow: 0 0 25px rgba(22, 241, 211, 0.5);
    color: #fff;
}

/* ==========================================
   STAT BADGES - NEON STYLE
   ========================================== */
/* Responsive */
@media (max-width: 768px) {
    .leaderboard-table {
        font-size: 14px;
    }
    
    .leaderboard-table thead th,
    .leaderboard-table tbody td {
        padding: 12px 8px;
    }
    
    .rank-badge {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
}

@media (max-width: 576px) {
    .leaderboard-month-form {
        width: 100%;
    }

    .leaderboard-month-trigger {
        width: 100%;
        justify-content: space-between;
    }

    .leaderboard-month-dropdown {
        width: 100%;
        left: 0;
        right: auto;
    }
}
