/* =================================
   RANKINGS API COMPLETE STYLES
   Sistema Completo de Rankings
   ================================= */

/* Container principal */
.ranking-content {
    background: linear-gradient(135deg, rgba(43, 24, 16, 0.8), rgba(58, 42, 26, 0.8));
    border: 2px solid rgba(201, 169, 97, 0.3);
    border-radius: 12px;
    padding: 30px;
    min-height: 600px;
}

/* Header do Ranking */
.ranking-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #c9a961;
}

.ranking-header h3 {
    color: #f4e4c1;
    font-size: 1.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ranking-header h3 i {
    color: #c9a961;
}

.ranking-header i {
    font-size: 1.5rem;
}

/* SUB-TABS */
.ranking-subtabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.ranking-subtab {
    background: rgba(0, 0, 0, 0.4);
    border: 2px solid rgba(201, 169, 97, 0.3);
    color: #f4e4c1;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.ranking-subtab:hover {
    background: rgba(201, 169, 97, 0.2);
    border-color: #c9a961;
    transform: translateY(-2px);
}

.ranking-subtab.active {
    background: linear-gradient(135deg, #c9a961, #b8935a);
    border-color: #c9a961;
    color: #1a1a1a;
    box-shadow: 0 4px 15px rgba(201, 169, 97, 0.5);
    font-weight: 700;
}

.ranking-subtab i {
    font-size: 1rem;
}

/* FILTROS */
.ranking-filters {
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.ranking-filters label {
    color: #f4e4c1;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
}

.ranking-filters select {
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(201, 169, 97, 0.4);
    color: #f4e4c1;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ranking-filters select:hover,
.ranking-filters select:focus {
    border-color: #c9a961;
    background: rgba(0, 0, 0, 0.8);
    outline: none;
}

.ranking-filters select option {
    background: #1a1a1a;
    color: #f4e4c1;
}

/* STATS INFO */
.ranking-stats {
    background: rgba(201, 169, 97, 0.1);
    border: 1px solid rgba(201, 169, 97, 0.3);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.ranking-stats p {
    margin: 0;
    color: var(--color-parchment);
    font-size: 1.05rem;
}

.ranking-stats strong {
    color: var(--color-gold);
}

/* Loading State */
.ranking-loading {
    text-align: center;
    padding: 80px 20px;
    color: var(--color-parchment);
}

.ranking-loading i {
    font-size: 3rem;
    color: var(--color-gold);
    margin-bottom: 20px;
    animation: spin 1s linear infinite;
}

.ranking-loading p {
    font-size: 1.2rem;
    color: var(--color-parchment);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.ranking-error {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-parchment);
}

.ranking-error i {
    font-size: 4rem;
    color: #ff6b6b;
    margin-bottom: 20px;
}

.ranking-error h3 {
    color: var(--color-gold);
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.ranking-error p {
    color: var(--color-parchment);
    margin-bottom: 25px;
}

.btn-retry {
    background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
    color: var(--color-dark);
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(201, 169, 97, 0.4);
}

/* EVENT WINNER CARD */
.event-winner {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.15), rgba(201, 169, 97, 0.05));
    border: 3px solid var(--color-gold);
    border-radius: 15px;
    padding: 50px;
    text-align: center;
    max-width: 600px;
    margin: 30px auto;
}

.winner-crown {
    font-size: 5rem;
    color: var(--color-gold);
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.winner-title {
    color: var(--color-gold);
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.winner-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-parchment);
    margin-bottom: 25px;
    text-shadow: 0 0 20px rgba(201, 169, 97, 0.5);
}

.winner-description {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    font-style: italic;
    margin-bottom: 20px;
}

.winner-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-item .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-gold);
}

/* Table Wrapper */
.ranking-table-wrapper {
    overflow-x: auto;
    margin-bottom: 20px;
}

/* Ranking Table */
.ranking-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    overflow: hidden;
}

.ranking-table thead {
    background: linear-gradient(135deg, rgba(201, 169, 97, 0.3), rgba(201, 169, 97, 0.2));
}

.ranking-table th {
    color: #f4e4c1;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 15px 12px;
    text-align: left;
    font-size: 0.95rem;
    border-bottom: 2px solid #c9a961;
}

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

.ranking-table tbody tr:hover {
    background: rgba(201, 169, 97, 0.2);
    transform: scale(1.01);
}

.ranking-table td {
    padding: 15px 12px;
    color: #f4e4c1;
    border-bottom: 1px solid rgba(201, 169, 97, 0.15);
}

/* Column Sizes */
.rank-col {
    width: 80px;
    text-align: center;
}

.name-col {
    min-width: 150px;
}

.level-col {
    width: 100px;
    text-align: center;
}

.class-col {
    width: 130px;
}

.clan-col {
    min-width: 150px;
}

.stat-col {
    width: 90px;
    text-align: center;
}

/* Rank Styling */
.rank-number {
    font-weight: 700;
    font-size: 1.1rem;
    color: #f4e4c1;
}

.rank-icon {
    font-size: 1.2rem;
    margin-right: 5px;
}

/* Nome do jogador */
.name-col strong {
    color: #ffffff;
    font-size: 1.05rem;
}

.rank-icon-gold {
    color: #FFD700;
    filter: drop-shadow(0 0 5px #FFD700);
}

.rank-icon-silver {
    color: #C0C0C0;
    filter: drop-shadow(0 0 5px #C0C0C0);
}

.rank-icon-bronze {
    color: #CD7F32;
    filter: drop-shadow(0 0 5px #CD7F32);
}

/* Row Highlighting */
.rank-first {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05)) !important;
}

.rank-first:hover {
    background: linear-gradient(90deg, rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.1)) !important;
}

.rank-second {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.15), rgba(192, 192, 192, 0.05)) !important;
}

.rank-second:hover {
    background: linear-gradient(90deg, rgba(192, 192, 192, 0.25), rgba(192, 192, 192, 0.1)) !important;
}

.rank-third {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.15), rgba(205, 127, 50, 0.05)) !important;
}

.rank-third:hover {
    background: linear-gradient(90deg, rgba(205, 127, 50, 0.25), rgba(205, 127, 50, 0.1)) !important;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-level {
    background: linear-gradient(135deg, #c9a961, #b8935a);
    color: #1a1a1a;
    box-shadow: 0 2px 10px rgba(201, 169, 97, 0.5);
    font-weight: 800;
}

.badge-class {
    background: rgba(201, 169, 97, 0.25);
    color: #f4e4c1;
    border: 2px solid #c9a961;
    font-weight: 700;
}

/* Stats Values */
.stat-value {
    font-weight: 700;
    font-size: 1.05rem;
}

.stat-bp {
    color: #4ade80;
}

.stat-dp {
    color: #f87171;
}

.stat-kda {
    color: var(--color-gold);
}

.stat-points {
    color: #c084fc;
}

/* No Clan Text */
.no-clan {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-size: 0.9rem;
}

/* No Data */
.no-data {
    text-align: center;
    padding: 60px 20px !important;
    color: var(--color-parchment);
    font-size: 1.1rem;
}

.no-data i {
    display: block;
    font-size: 2.5rem;
    color: var(--color-gold);
    margin-bottom: 15px;
}

/* Footer */
.ranking-footer {
    text-align: center;
    padding-top: 15px;
    border-top: 1px solid rgba(201, 169, 97, 0.2);
}

.ranking-footer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ranking-content {
        padding: 20px;
    }

    .ranking-header h3 {
        font-size: 1.4rem;
    }

    .ranking-subtabs {
        gap: 8px;
    }

    .ranking-subtab {
        padding: 8px 15px;
        font-size: 0.85rem;
    }

    .ranking-filters {
        flex-direction: column;
        gap: 15px;
    }

    .ranking-filters label {
        width: 100%;
        justify-content: space-between;
    }

    .ranking-filters select {
        flex: 1;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 10px 8px;
        font-size: 0.85rem;
    }

    .rank-col {
        width: 60px;
    }

    .level-col,
    .stat-col {
        width: 70px;
    }

    .class-col,
    .clan-col {
        min-width: 100px;
    }

    .rank-icon {
        font-size: 1rem;
    }

    .badge {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .event-winner {
        padding: 30px 20px;
    }

    .winner-crown {
        font-size: 3.5rem;
    }

    .winner-title {
        font-size: 1.3rem;
    }

    .winner-name {
        font-size: 1.8rem;
    }

    .winner-stats {
        flex-direction: column;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    /* Esconder algumas colunas em mobile */
    .clan-col {
        display: none;
    }

    .ranking-table th,
    .ranking-table td {
        padding: 8px 6px;
        font-size: 0.8rem;
    }

    .ranking-subtab i {
        display: none;
    }
}
