/* ============================================
   RANKING HOME MODULE STYLES
   List-based ranking design for home page
   Using blue/cyan color scheme from logo
   ============================================ */

/* Rankings Section */
section.rankings {
    width: 100%;
    padding: 4rem 0;
    position: relative;
    background: url('../img/1920_3.jpg') center center no-repeat;
    background-size: cover;
    background-attachment: fixed;
}

/* Rankings Tabs/Filter Buttons */
.rankings-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.rankings-tabs .tab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: rgba(10, 10, 15, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 0.5rem;
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rankings-tabs .tab-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.rankings-tabs .tab-btn:hover::before {
    left: 100%;
}

.rankings-tabs .tab-btn:hover {
    background: rgba(0, 212, 255, 0.15);
    border-color: rgba(0, 212, 255, 0.5);
    color: #00d4ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.rankings-tabs .tab-btn.active {
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.25) 0%, rgba(0, 153, 204, 0.25) 100%);
    border-color: rgba(0, 212, 255, 0.6);
    color: #00d4ff;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.rankings-tabs .tab-btn i,
.rankings-tabs .tab-btn .ranking-tab-icon {
    display: none;
}

/* Rankings Content Container */
.rankings-content {
    background: rgba(10, 10, 15, 0.4);
    border: 1px solid rgba(0, 212, 255, 0.3);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Ranking Table Container */
.ranking-table {
    overflow: hidden;
    width: 100%;
}

.rankings-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4ff 0%, #0099cc 100%);
}

/* Ranking Header */
.ranking-header {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 1fr 1fr 1fr;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, rgba(0, 212, 255, 0.2) 0%, rgba(0, 153, 204, 0.2) 100%);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 0.75rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: #00d4ff;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
}

/* Ranking Row */
.ranking-row {
    display: grid;
    grid-template-columns: 60px 1fr 1fr 1fr 1fr 1fr;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 15, 20, 0.6);
    border: 1px solid rgba(0, 212, 255, 0.2);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    align-items: center;
    position: relative;
    margin-bottom: 0.75rem;
}

.ranking-row:hover {
    background: rgba(0, 212, 255, 0.1);
    border-color: rgba(0, 212, 255, 0.5);
    transform: translateX(5px);
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
}

/* Character Avatar */
.character-avatar {
    position: relative;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: visible;
    transition: all 0.3s ease;
}

.character-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(0, 212, 255, 0.5);
    object-fit: cover;
    transition: all 0.3s ease;
}

.ranking-row:hover .character-avatar img {
    border-color: #00d4ff;
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.6);
    transform: scale(1.1);
}

/* Rank Badge */
.rank-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f0f14;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.rank-badge.rank-1 {
    background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.8);
    animation: pulseCyan 2s ease-in-out infinite;
}

.rank-badge.rank-2 {
    background: linear-gradient(135deg, #C0C0C0 0%, #A8A8A8 100%);
    box-shadow: 0 0 12px rgba(192, 192, 192, 0.6);
}

.rank-badge.rank-3 {
    background: linear-gradient(135deg, #CD7F32 0%, #B87333 100%);
    box-shadow: 0 0 12px rgba(205, 127, 50, 0.6);
}

@keyframes pulseGold {
    0%, 100% {
        box-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
    }
    50% {
        box-shadow: 0 0 25px rgba(255, 215, 0, 1);
    }
}

/* Column Styles */
.name-col {
    text-align: left;
}

.name-col .player-profile-link {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.name-col .player-profile-link:hover {
    color: #5ce1ff;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.6);
}

.level-col,
.masterlevel-col,
.resets-col,
.pklevel-col,
.pkkills-col,
.score-col {
    color: #e0e0e0;
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.guild-col {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9e9e9e;
    justify-content: center;
}

.guild-col .player-profile-link,
.master-col .player-profile-link {
    color: #00d4ff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.guild-col .player-profile-link:hover,
.master-col .player-profile-link:hover {
    color: #5ce1ff;
}

/* Online Dot */
.online-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: pulse 2s ease-in-out infinite;
    margin-left: 0.5rem;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    }
    50% {
        box-shadow: 0 0 15px rgba(34, 197, 94, 0.9);
    }
}

/* Guild Ranking Specific */
#rankingGuilds .ranking-header,
#rankingGuilds .ranking-row {
    grid-template-columns: 60px 1fr 1fr 1fr;
}

/* Killers Ranking Specific */
#rankingKillers .ranking-header,
#rankingKillers .ranking-row {
    grid-template-columns: 60px 1fr 1fr 1fr 1fr;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .ranking-header,
    .ranking-row {
        grid-template-columns: 50px 1fr 1fr 1fr 1fr 1fr;
        font-size: 0.85rem;
        gap: 0.5rem;
        padding: 0.875rem 1rem;
    }

    #rankingGuilds .ranking-header,
    #rankingGuilds .ranking-row {
        grid-template-columns: 50px 1fr 1fr 1fr;
    }

    #rankingKillers .ranking-header,
    #rankingKillers .ranking-row {
        grid-template-columns: 50px 1fr 1fr 1fr 1fr;
    }
}

@media (max-width: 768px) {
    section.rankings {
        padding: 3rem 0;
    }

    .rankings-content {
        padding: 1.5rem;
    }

    .ranking-header,
    .ranking-row {
        grid-template-columns: 45px 1.5fr 1fr 1fr 1fr 1fr;
        font-size: 0.8rem;
        gap: 0.4rem;
        padding: 0.75rem 0.875rem;
    }

    .character-avatar {
        width: 40px;
        height: 40px;
    }

    .rank-badge {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }

    #rankingGuilds .ranking-header,
    #rankingGuilds .ranking-row {
        grid-template-columns: 45px 1.5fr 1fr 1fr;
    }

    #rankingKillers .ranking-header,
    #rankingKillers .ranking-row {
        grid-template-columns: 45px 1.5fr 1fr 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .rankings-content {
        padding: 1rem;
    }

    .ranking-header {
        display: none;
    }

    .ranking-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
    }

    .avatar-col,
    .name-col,
    .level-col,
    .masterlevel-col,
    .resets-col,
    .guild-col,
    .master-col,
    .score-col,
    .pklevel-col,
    .pkkills-col {
        grid-column: 1;
    }

    .avatar-col {
        display: flex;
        justify-content: center;
    }

    .name-col,
    .level-col,
    .masterlevel-col,
    .resets-col,
    .guild-col,
    .master-col,
    .score-col,
    .pklevel-col,
    .pkkills-col {
        display: flex;
        justify-content: space-between;
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(0, 212, 255, 0.2);
    }

    .name-col::before { content: 'Personaje:'; color: #9e9e9e; font-weight: 600; }
    .level-col::before { content: 'Nivel:'; color: #9e9e9e; font-weight: 600; }
    .masterlevel-col::before { content: 'Master Level:'; color: #9e9e9e; font-weight: 600; }
    .resets-col::before { content: 'Resets:'; color: #9e9e9e; font-weight: 600; }
    .guild-col::before { content: 'Guild:'; color: #9e9e9e; font-weight: 600; }
    .master-col::before { content: 'Master:'; color: #9e9e9e; font-weight: 600; }
    .score-col::before { content: 'Puntos:'; color: #9e9e9e; font-weight: 600; }
    .pklevel-col::before { content: 'PK Level:'; color: #9e9e9e; font-weight: 600; }
    .pkkills-col::before { content: 'PK Kills:'; color: #9e9e9e; font-weight: 600; }
}
