/* Rankings Page Styles - Compact Oldzen Style */

.rankings-container {
    max-width: 1800px;
    margin: 40px auto;
    padding: 0 2rem 2rem 2rem;
}

/* Header */
.rankings-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 0;
    background: transparent;
    border: none;
}

.rankings-header h2 {
    font-family: 'Cinzel Decorative', serif;
    font-size: 4rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(120, 150, 180, 0.8), 3px 3px 6px rgba(0, 0, 0, 0.8);
    margin: 0 0 1rem 0;
    letter-spacing: 3px;
}

.rankings-header h2 i {
    display: none;
}

.rankings-header p {
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    text-shadow: 0 0 15px rgba(120, 150, 180, 0.5), 2px 2px 4px rgba(0, 0, 0, 0.8);
    line-height: 1.6;
    font-weight: 300;
}

/* Filters */
.rankings-filters {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(10, 15, 25, 0.9);
    border: 2px solid rgba(120, 150, 180, 0.5);
    border-radius: 10px;
    backdrop-filter: blur(15px);
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 100;
}

.filter-select {
    min-width: 250px;
    padding: 0.8rem 1rem;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid rgba(120, 150, 180, 0.4);
    border-radius: 8px;
    color: #ffffff;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select:hover {
    border-color: #7896b4;
    background: rgba(0, 0, 0, 0.9);
}

.filter-select:focus {
    outline: none;
    border-color: #7896b4;
    box-shadow: 0 0 15px rgba(120, 150, 180, 0.5);
}

.filter-select option {
    background: #0a0f19;
    color: #ffffff;
    padding: 0.5rem;
}

.search-wrapper-ranking {
    position: relative;
    min-width: 300px;
    flex: 1;
    max-width: 400px;
    z-index: 9999;
}

.search-input-ranking {
    width: 100%;
    text-transform: none;
    letter-spacing: normal;
}

.search-input-ranking::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-input-ranking:focus {
    border-radius: 8px 8px 0 0;
}

.search-suggestions-ranking {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 15, 25, 0.98);
    border: 2px solid rgba(120, 150, 180, 0.5);
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    z-index: 9999;
    margin-top: -2px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.suggestion-item-ranking {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-bottom: 1px solid rgba(120, 150, 180, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
}

.suggestion-item-ranking:last-child {
    border-bottom: none;
}

.suggestion-item-ranking:hover {
    background: rgba(120, 150, 180, 0.2);
}

.suggestion-outfit-ranking {
    width: 50px;
    height: 50px;
    border: 2px solid #7896b4;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.suggestion-outfit-ranking img {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.suggestion-info-ranking {
    flex: 1;
}

.suggestion-name-ranking {
    color: #b8d0e8;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.3rem;
}

.suggestion-details-ranking {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.no-suggestions-ranking {
    padding: 1.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

.search-suggestions-ranking::-webkit-scrollbar {
    width: 8px;
}

.search-suggestions-ranking::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 0 0 8px 0;
}

.search-suggestions-ranking::-webkit-scrollbar-thumb {
    background: rgba(120, 150, 180, 0.5);
    border-radius: 4px;
}

.search-suggestions-ranking::-webkit-scrollbar-thumb:hover {
    background: rgba(120, 150, 180, 0.7);
}

/* Rankings Table */
.rankings-table-container {
    background: rgba(10, 15, 25, 0.9);
    border: 2px solid rgba(120, 150, 180, 0.5);
    border-radius: 10px;
    backdrop-filter: blur(15px);
    overflow-x: visible;
}

.rankings-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.rankings-table thead {
    background: linear-gradient(135deg, #8ba5c4 0%, #7896b4 100%);
}

.rankings-table th {
    padding: 1rem 0.5rem;
    color: #0a0f19;
    font-weight: 700;
    text-align: center;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-right: 1px solid rgba(10, 15, 25, 0.2);
}

.rankings-table th:last-child {
    border-right: none;
}

.rankings-table th.sortable {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    user-select: none;
}

.rankings-table th.sortable:hover {
    background: rgba(0, 0, 0, 0.15);
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.rankings-table th.sortable::after {
    content: "⇅";
    margin-left: 5px;
    opacity: 0.6;
    font-size: 0.9rem;
}

.ranking-row {
    background: rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    cursor: pointer;
}

.ranking-row:nth-child(even) {
    background: rgba(0, 0, 0, 0.25);
}

.ranking-row:hover {
    background: rgba(120, 150, 180, 0.2);
    transform: scale(1.002);
}

.ranking-row td {
    padding: 0.6rem 0.5rem;
    color: #ffffff;
    border-bottom: 1px solid rgba(120, 150, 180, 0.15);
    border-right: 1px solid rgba(120, 150, 180, 0.1);
    font-size: 0.9rem;
    text-align: center;
}

.ranking-row td:last-child {
    border-right: none;
}

/* Rank Column */
.rank-col {
    text-align: center;
    font-weight: 700;
    color: #ffffff;
    width: 60px;
    font-size: 1rem;
}

/* Player Column */
.player-col {
    width: 250px;
    text-align: left !important;
}

.player-cell {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-left: 0.5rem;
}

.player-outfit {
    width: 64px;
    height: 40px;
    border: 2px solid #7896b4;
    border-radius: 6px;
    background: #0a0a0a;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.player-outfit img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

.player-name {
    font-weight: 700;
    font-size: 1rem;
    color: #fbbf24;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.5);
}

/* Vocation Column */
.vocation-col {
    text-align: center;
    width: 120px;
}

.vocation-text {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Level Column */
.level-col {
    text-align: center;
    font-weight: 700;
    color: #4CAF50;
    font-size: 1rem;
    width: 70px;
}

/* Experience Column */
.exp-col {
    text-align: center;
    font-weight: 600;
    color: #9C27B0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    width: 120px;
}

/* Skill Columns */
.skill-col {
    text-align: center;
    font-weight: 600;
    color: #7896b4;
    font-size: 0.95rem;
    width: 70px;
}

/* No Data */
.no-data {
    text-align: center;
    padding: 2rem !important;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .rankings-container {
        max-width: 100%;
        width: 98%;
    }
    
    .rankings-table th,
    .rankings-table td {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .rankings-container {
        margin: 20px auto;
        padding: 0 1rem 1rem 1rem;
    }

    .rankings-header h2 {
        font-size: 2rem;
        letter-spacing: 1px;
    }

    .rankings-header p {
        font-size: 0.9rem;
    }

    .rankings-filters {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        padding: 0.75rem;
        gap: 0.6rem;
        align-items: stretch;
    }

    .filter-select {
        min-width: unset !important;
        width: 100% !important;
        font-size: 0.85rem;
        padding: 0.65rem;
        flex: none !important;
    }

    .search-wrapper-ranking {
        min-width: unset !important;
        width: 100% !important;
        max-width: unset !important;
        flex: none !important;
    }

    .search-input-ranking {
        width: 100%;
        font-size: 0.85rem;
        padding: 0.65rem;
    }

    .rankings-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .rankings-table {
        min-width: 650px;
    }

    .rankings-table th,
    .rankings-table td {
        padding: 0.5rem 0.3rem;
        font-size: 0.7rem;
    }

    .player-outfit {
        width: 30px;
        height: 30px;
    }

    .player-outfit img {
        max-width: 26px;
        max-height: 26px;
    }

    .player-name {
        font-size: 0.8rem;
    }

    .vocation-text {
        font-size: 0.7rem;
    }

    .level-col {
        font-size: 0.85rem;
    }

    .rank-col span {
        font-size: 0.85rem;
    }

    .skill-col {
        font-size: 0.7rem;
    }

    .exp-col {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .rankings-container {
        margin: 10px auto;
        padding: 0 0.75rem 0.75rem 0.75rem;
    }

    .rankings-header h2 {
        font-size: 1.5rem;
        letter-spacing: 0.5px;
    }

    .rankings-header p {
        font-size: 0.8rem;
    }

    .rankings-filters {
        padding: 0.6rem;
        gap: 0.5rem;
    }

    .filter-select {
        font-size: 0.8rem;
        padding: 0.6rem;
    }

    .search-input-ranking {
        font-size: 0.8rem;
        padding: 0.6rem;
    }

    .rankings-table {
        min-width: 600px;
    }

    .rankings-table th,
    .rankings-table td {
        padding: 0.4rem 0.25rem;
        font-size: 0.65rem;
    }

    .player-outfit {
        width: 26px;
        height: 26px;
    }

    .player-outfit img {
        max-width: 22px;
        max-height: 22px;
    }

    .player-name {
        font-size: 0.7rem;
    }

    .vocation-text {
        font-size: 0.65rem;
    }

    .level-col {
        font-size: 0.75rem;
    }

    .rank-col span {
        font-size: 0.75rem;
    }

    .skill-col {
        font-size: 0.65rem;
    }

    .exp-col {
        font-size: 0.65rem;
    }
}

@media (max-width: 400px) {
    .rankings-container {
        margin: 5px auto;
        padding: 0 0.5rem 0.5rem 0.5rem;
    }

    .rankings-header h2 {
        font-size: 1.3rem;
        letter-spacing: 0.5px;
    }

    .rankings-header p {
        font-size: 0.75rem;
    }

    .rankings-filters {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
        padding: 0.5rem;
        gap: 0.5rem;
        align-items: stretch !important;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 1.5rem !important;
    }

    .filter-select {
        min-width: unset !important;
        width: 100% !important;
        font-size: 0.75rem;
        padding: 0.5rem;
        flex: none !important;
    }

    .search-wrapper-ranking {
        min-width: unset !important;
        width: 100% !important;
        max-width: unset !important;
        flex: none !important;
    }

    .search-input-ranking {
        width: 100% !important;
        font-size: 0.75rem;
        padding: 0.5rem;
    }

    .rankings-table-section {
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .rankings-table {
        min-width: 450px;
        font-size: 0.65rem;
    }

    .rankings-table th,
    .rankings-table td {
        padding: 0.4rem 0.25rem;
        font-size: 0.65rem;
        vertical-align: middle;
    }

    .rankings-table th {
        white-space: nowrap;
        font-size: 0.7rem;
        font-weight: 700;
    }

    .player-outfit {
        width: 28px;
        height: 28px;
    }

    .player-outfit img {
        max-width: 24px;
        max-height: 24px;
    }

    .player-cell {
        gap: 0.4rem;
    }

    .player-name {
        font-size: 0.7rem;
        font-weight: 600;
    }

    .vocation-text {
        font-size: 0.65rem;
    }

    .level-col {
        font-size: 0.75rem;
        font-weight: 700;
        color: #FFD700;
    }

    .rank-col span {
        font-size: 0.75rem;
        font-weight: 700;
    }

    .skill-col {
        font-size: 0.65rem;
    }

    .exp-col {
        font-size: 0.65rem;
    }
}
