/* Leaderboard Styles - Consistent with Game Theme */

/* Leaderboard Controls */
.leaderboard-controls {
    background: rgba(20, 20, 40, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(147, 112, 219, 0.3);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 25px rgba(147, 112, 219, 0.2);
}

.leaderboard-controls form {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    width: 100%;
}

.leaderboard-sorting {
    display: flex;
    align-items: center;
    gap: 8px;
}

.leaderboard-sorting label {
    color: #fff;
    font-size: 0.95rem;
    opacity: 0.9;
}

.leaderboard-search {
    flex: 1;
    min-width: 200px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(147, 112, 219, 0.3);
    border-radius: 10px;
    padding: 0.7rem 1rem;
    color: #fff;
    transition: all 0.3s ease;
}

.leaderboard-search:focus {
    outline: none;
    border-color: #9370db;
    box-shadow: 0 0 15px rgba(147, 112, 219, 0.4);
}

.leaderboard-select {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(147, 112, 219, 0.3);
    color: #fff;
    padding: 0.7rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.leaderboard-select:hover {
    border-color: #9370db;
    box-shadow: 0 0 10px rgba(147, 112, 219, 0.3);
}

.leaderboard-select option {
    background: #2f2f2f;
    color: #fff;
}

.leaderboard-submit {
    padding: 0.7rem 1.5rem;
    background: linear-gradient(45deg, #9370db, #ff80ff);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.leaderboard-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(147, 112, 219, 0.5);
}

/* Leaderboard Table Wrapper */
.leaderboard-table-wrapper {
    background: rgba(20, 20, 40, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    border: 1px solid rgba(147, 112, 219, 0.3);
    padding: 2rem;
    box-shadow: 0 0 25px rgba(147, 112, 219, 0.2);
    overflow-x: auto;
}

/* Leaderboard Table */
.leaderboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.leaderboard-table th {
    padding: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #9370db;
    border-bottom: 2px solid rgba(147, 112, 219, 0.5);
    font-weight: 600;
    text-align: left;
}

.leaderboard-table tbody tr {
    background: rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.leaderboard-table tbody tr:hover {
    background: rgba(147, 112, 219, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(147, 112, 219, 0.2);
}

.leaderboard-table td {
    padding: 1rem;
    color: #fff;
}

/* Rank Cell */
.rank-cell {
    font-weight: bold;
    font-size: 1.2rem;
    text-align: center;
}

.top-rank {
    font-size: 1.8rem;
    display: inline-block;
}

/* Avatar */
.player-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid #9370db;
    object-fit: cover;
    transition: all 0.3s ease;
}

.player-avatar:hover {
    border-color: #ff80ff;
    box-shadow: 0 0 15px rgba(147, 112, 219, 0.5);
}

/* Player Name */
.player-name {
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.player-name:hover {
    text-shadow: 0 0 10px currentColor;
}

.player-name::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: currentColor;
    transition: width 0.3s ease;
}

.player-name:hover::after {
    width: 100%;
}

/* Score and Money Cells */
.score-cell,
.money-cell,
.stat-cell {
    color: #ffd700;
    font-weight: bold;
    font-size: 1.05rem;
}

.stat-cell {
    color: #ff80ff;
}

/* Rank Name */
.rank-name {
    font-weight: 600;
}

/* Faction Cell */
.faction-cell {
    color: #9370db;
    font-weight: 500;
}

/* Pagination */
.leaderboard-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
 }

.leaderboard-page-list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.leaderboard-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 46px;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 229, 255, 0.28);
    background: linear-gradient(180deg, rgba(18, 26, 52, 0.95), rgba(8, 12, 26, 0.98));
    box-shadow: 0 0 0 1px rgba(147, 112, 219, 0.14), 0 0 18px rgba(0, 229, 255, 0.12);
    color: #dffaff;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.leaderboard-page-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 0, 255, 0.45);
    box-shadow: 0 0 0 1px rgba(255, 0, 255, 0.2), 0 0 22px rgba(255, 0, 255, 0.2), 0 0 28px rgba(0, 229, 255, 0.16);
    color: #ffffff;
}

.leaderboard-page-btn.is-active {
    border-color: rgba(255, 215, 0, 0.5);
    background: linear-gradient(135deg, rgba(147, 112, 219, 0.95), rgba(255, 0, 255, 0.9));
    box-shadow: 0 0 0 1px rgba(255, 215, 0, 0.24), 0 0 24px rgba(147, 112, 219, 0.45);
    color: #fff7d6;
}

.leaderboard-page-btn.is-disabled {
    opacity: 0.4;
    pointer-events: none;
    box-shadow: none;
}

.leaderboard-page-arrow {
    gap: 0.45rem;
    padding-inline: 1rem;
}

.leaderboard-page-ellipsis {
    color: rgba(223, 250, 255, 0.7);
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0 0.15rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .leaderboard-controls form {
        flex-direction: column;
        align-items: stretch;
    }

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

    .leaderboard-search,
    .leaderboard-select,
    .leaderboard-submit {
        width: 100%;
    }

    .leaderboard-table {
        font-size: 0.9rem;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 0.7rem 0.5rem;
    }

    .player-avatar {
        width: 35px;
        height: 35px;
    }

    .leaderboard-pagination {
        gap: 0.75rem;
    }

    .leaderboard-page-btn {
        min-width: 42px;
        min-height: 42px;
        padding: 0.65rem 0.85rem;
        font-size: 0.92rem;
    }

    .leaderboard-page-arrow {
        padding-inline: 0.85rem;
    }
}
