/* ========================================
   RANKINGS PAGE STYLES
======================================== */

/* Tab Navigation */
.ranking-tabs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.rank-tab-btn {
    background: linear-gradient(to bottom, #4a3020 0%, #2a1810 100%);
    border: 1px solid #7B1300;
    border-radius: 5px;
    color: #cdb78b;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    padding: 10px 20px;
    flex: 1;
    text-align: center;
    transition: all 0.2s ease;
}

.rank-tab-btn:hover {
    background: linear-gradient(to bottom, #5a4030 0%, #3a2820 100%);
    color: #F2E69F;
}

.rank-tab-btn.active {
    background: linear-gradient(to bottom, #7B1300 0%, #5a0d00 100%);
    color: #F2E69F;
}

/* Tab Panels */
.rank-tab-panel {
    display: none;
}

.rank-tab-panel.active {
    display: block;
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(123, 19, 0, 0.2);
}

.filter-bar h3 {
    color: #7B1300;
    font-size: 14px;
    margin: 0;
}

.filters {
    display: flex;
    gap: 10px;
}

.filter-select {
    background: linear-gradient(to bottom, #e8dcc0 0%, #d4c4a0 100%);
    border: 1px solid #997c47;
    border-radius: 4px;
    color: #4a1e00;
    cursor: pointer;
    font-size: 11px;
    padding: 6px 10px;
}

.filter-select:focus {
    outline: none;
    border-color: #7B1300;
}

/* Ranking Table */
.ranking-table-container {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.ranking-table th {
    background: linear-gradient(to bottom, #5a3d2b 0%, #3a2518 100%);
    color: #F2E69F;
    font-weight: bold;
    padding: 10px 8px;
    text-align: left;
    border: 1px solid #7B1300;
    position: sticky;
    top: 0;
    z-index: 1;
}

.ranking-table td {
    background: rgba(232, 220, 192, 0.5);
    border: 1px solid rgba(123, 19, 0, 0.2);
    color: #4a1e00;
    padding: 8px;
}

.ranking-table tr:nth-child(even) td {
    background: rgba(205, 183, 139, 0.3);
}

.ranking-table tr:hover td {
    background: rgba(205, 183, 139, 0.5);
}

/* Top 3 special styling */
.ranking-table tr.rank-1 td {
    background: linear-gradient(to right, rgba(255, 215, 0, 0.3) 0%, rgba(255, 215, 0, 0.1) 100%);
}

.ranking-table tr.rank-2 td {
    background: linear-gradient(to right, rgba(192, 192, 192, 0.3) 0%, rgba(192, 192, 192, 0.1) 100%);
}

.ranking-table tr.rank-3 td {
    background: linear-gradient(to right, rgba(205, 127, 50, 0.3) 0%, rgba(205, 127, 50, 0.1) 100%);
}

/* Column widths */
.col-rank {
    width: 40px;
    text-align: center;
}

.col-empire {
    width: 50px;
    text-align: center;
}

.col-name {
    min-width: 100px;
}

.col-class {
    width: 70px;
}

.col-level {
    width: 60px;
    text-align: center;
}

.col-guild {
    min-width: 80px;
}

.col-leader {
    min-width: 80px;
}

.col-members {
    width: 50px;
    text-align: center;
}

.col-points {
    width: 60px;
    text-align: center;
}

/* Rank number styling */
.rank-number {
    display: inline-block;
    font-weight: bold;
    color: #7B1300;
}

.rank-1 .rank-number {
    color: #FFD700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
}

.rank-2 .rank-number {
    color: #C0C0C0;
}

.rank-3 .rank-number {
    color: #CD7F32;
}

/* Empire icon */
.empire-badge {
    font-size: 14px;
}

/* Player name */
.player-name {
    font-weight: bold;
    color: #7B1300;
}

/* Class badge */
.class-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 9px;
    font-weight: bold;
}

.class-warrior {
    background: #8B4513;
    color: #fff;
}

.class-ninja {
    background: #2E2E2E;
    color: #fff;
}

.class-sura {
    background: #4B0082;
    color: #fff;
}

.class-shaman {
    background: #228B22;
    color: #fff;
}

/* Level */
.level-value {
    font-weight: bold;
    color: #7B1300;
}

/* Guild name */
.guild-name {
    color: #4a1e00;
}

.no-guild {
    color: #999;
    font-style: italic;
}

/* Ranking Footer */
.ranking-footer {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(123, 19, 0, 0.2);
    text-align: right;
    font-size: 11px;
    color: #4a1e00;
}

/* Empire Stats in sidebar */
.empire-stats {
    padding: 10px 0;
}

.empire-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    margin-bottom: 5px;
    background: rgba(232, 220, 192, 0.3);
    border-radius: 4px;
}

.empire-icon {
    font-size: 16px;
}

.empire-name {
    flex: 1;
    color: #4a1e00;
    font-size: 11px;
}

.empire-count {
    font-weight: bold;
    color: #7B1300;
    font-size: 12px;
}

/* Loading state */
.loading-row td {
    text-align: center;
    color: #7B1300;
    padding: 30px;
}

/* No data state */
.no-data {
    text-align: center;
    padding: 30px;
    color: #7B1300;
}