/* ==================== RANKING PAGE ==================== */
.ranking-header {
    text-align: center;
    padding: 60px 24px 40px;
}

.ranking-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 3rem;
    margin-bottom: 12px;
}

.ranking-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.ranking-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px 60px;
}

/* Ranking Cards */
.ranking-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all var(--transition-normal);
    animation: eventAppear 0.5s ease forwards;
    opacity: 0;
}

.ranking-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
    box-shadow: var(--shadow-glow);
}

.ranking-card.rank-gold {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.08), var(--bg-card));
    border-color: rgba(255, 215, 0, 0.3);
}

.ranking-card.rank-gold:hover {
    border-color: rgba(255, 215, 0, 0.6);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.15);
}

.ranking-card.rank-silver {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.08), var(--bg-card));
    border-color: rgba(192, 192, 192, 0.3);
}

.ranking-card.rank-bronze {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.08), var(--bg-card));
    border-color: rgba(205, 127, 50, 0.3);
}

.rank-position {
    min-width: 40px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
}

.rank-gold .rank-position { color: #ffd700; font-size: 1.4rem; }
.rank-silver .rank-position { color: #c0c0c0; font-size: 1.3rem; }
.rank-bronze .rank-position { color: #cd7f32; font-size: 1.2rem; }

.rank-position span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.rank-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    flex-shrink: 0;
    transition: transform var(--transition-normal);
}

.ranking-card:hover .rank-avatar {
    transform: scale(1.1);
}

.rank-info {
    flex: 1;
    min-width: 0;
}

.rank-name {
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-nick {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.rank-stats {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 120px;
}

.rank-record {
    display: flex;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
}

.rank-record .win { color: var(--accent-green); }
.rank-record .loss { color: var(--accent-red); }
.rank-record .draw { color: var(--accent-orange); }

.rank-winrate {
    display: flex;
    align-items: center;
    gap: 8px;
}

.winrate-bar {
    flex: 1;
    height: 4px;
    background: var(--bg-glass-light);
    border-radius: 2px;
    overflow: hidden;
}

.winrate-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 2px;
    transition: width 1s ease;
}

.rank-winrate span {
    font-size: 0.75rem;
    color: var(--text-muted);
    min-width: 30px;
}

.rank-points {
    text-align: center;
    min-width: 60px;
}

.points-value {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-secondary);
}

.points-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rank-badges {
    display: flex;
    gap: 4px;
}

.badge-emoji {
    font-size: 1rem;
}

/* ==================== TOP PLAYERS (HOME) ==================== */
.section-top-players {
    max-width: 1400px;
    margin: 0 24px 60px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 40px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.section-top-players::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, rgba(255, 215, 0, 0.05), transparent 70%);
}

.top-players-content {
    position: relative;
}

.top-players-icon {
    font-size: 3rem;
    color: #ffd700;
    margin-bottom: 16px;
    display: block;
    text-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.top-players-content h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.top-players-content > p {
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.top-players-podium {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 32px;
    min-height: 200px;
}

.podium-player {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.podium-player:hover {
    transform: translateY(-8px);
}

.podium-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
    border: 3px solid transparent;
    transition: all var(--transition-normal);
    position: relative;
}

.podium-player.first .podium-avatar {
    width: 80px;
    height: 80px;
    font-size: 1.4rem;
    border-color: #ffd700;
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.podium-player.second .podium-avatar {
    border-color: #c0c0c0;
    box-shadow: 0 0 20px rgba(192, 192, 192, 0.2);
}

.podium-player.third .podium-avatar {
    border-color: #cd7f32;
    box-shadow: 0 0 20px rgba(205, 127, 50, 0.2);
}

.podium-crown {
    position: absolute;
    top: -18px;
    font-size: 1.4rem;
    animation: float 3s ease-in-out infinite;
}

.podium-player.first .podium-crown { color: #ffd700; }

.podium-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.podium-nick {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.podium-points {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: var(--accent-secondary);
}

.podium-base {
    width: 100px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: white;
    margin-top: 8px;
}

.podium-player.first .podium-base {
    height: 80px;
    background: linear-gradient(180deg, rgba(255, 215, 0, 0.3), rgba(255, 215, 0, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-bottom: none;
}

.podium-player.second .podium-base {
    height: 60px;
    background: linear-gradient(180deg, rgba(192, 192, 192, 0.2), rgba(192, 192, 192, 0.05));
    border: 1px solid rgba(192, 192, 192, 0.2);
    border-bottom: none;
}

.podium-player.third .podium-base {
    height: 45px;
    background: linear-gradient(180deg, rgba(205, 127, 50, 0.2), rgba(205, 127, 50, 0.05));
    border: 1px solid rgba(205, 127, 50, 0.2);
    border-bottom: none;
}

/* ==================== PROFILE MODAL ==================== */
.profile-detail {
    max-width: 500px;
}

.profile-detail-body {
    padding: 32px;
}

.profile-header-section {
    text-align: center;
    margin-bottom: 28px;
}

.profile-avatar-large {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.8rem;
    color: white;
    margin: 0 auto 16px;
    box-shadow: var(--shadow-glow);
}

.profile-header-section h2 {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.profile-nick {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.profile-format {
    color: var(--accent-secondary);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.profile-badges {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.badge-emoji-lg {
    font-size: 1.5rem;
}

.profile-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.profile-stat {
    text-align: center;
    padding: 14px 8px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
}

.profile-stat-value {
    display: block;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.profile-stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.profile-events-section {
    margin-bottom: 20px;
}

.profile-events-section h3 {
    font-size: 0.95rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-events-section h3 i {
    color: var(--accent-secondary);
}

.profile-events-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-event-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: var(--bg-secondary);
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-light);
    font-size: 0.85rem;
}

.profile-event-name {
    flex: 1;
    font-weight: 500;
}

.profile-event-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.profile-member-since {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.profile-member-since i {
    color: var(--accent-secondary);
}

/* Player Avatars in Event Detail */
.event-detail-players {
    margin-bottom: 24px;
}

.event-detail-players h3 {
    font-size: 1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.event-detail-players h3 i {
    color: var(--accent-secondary);
}

.player-avatars {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.player-avatar-mini {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.65rem;
    color: white;
    border: 2px solid var(--bg-card);
    transition: transform var(--transition-fast);
}

.player-avatar-mini:hover {
    transform: scale(1.15);
    z-index: 5;
}

.player-avatar-mini.more {
    background: var(--bg-glass-light);
    border: 2px dashed var(--border-color);
    color: var(--text-muted);
    font-size: 0.7rem;
}

@media (max-width: 768px) {
    .ranking-card {
        flex-wrap: wrap;
        gap: 10px;
    }

    .rank-stats {
        min-width: unset;
        order: 5;
        width: 100%;
    }

    .rank-points {
        min-width: unset;
    }

    .rank-badges {
        display: none;
    }

    .top-players-podium {
        gap: 12px;
    }

    .podium-base {
        width: 70px;
    }

    .ranking-header h1 {
        font-size: 2.2rem;
    }

    .profile-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .section-top-players {
        margin-left: 16px;
        margin-right: 16px;
    }
}
