/* Leaderboard Specifikus Stílusok */

/* Tab navigáció */
.leaderboard-tabs {
    background: var(--gray-100);
    border-radius: var(--border-radius);
    padding: 8px;
}

.leaderboard-tabs .nav-link {
    color: var(--dark-color) !important;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 12px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    background: white;
    margin: 0 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.leaderboard-tabs .nav-link:hover {
    color: var(--primary-color) !important;
    background: var(--light-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(54, 142, 172, 0.15);
}

.leaderboard-tabs .nav-link.active {
    color: white !important;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: var(--primary-color);
    box-shadow: 0 4px 16px rgba(54, 142, 172, 0.3);
    transform: translateY(-1px);
}

.leaderboard-tabs .nav-link i.fa-info-circle {
    font-size: 0.85rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.leaderboard-tabs .nav-link:hover i.fa-info-circle,
.leaderboard-tabs .nav-link.active i.fa-info-circle {
    opacity: 1;
}

/* Aktív tab extra kiemelés */
.leaderboard-tabs .nav-link.active {
    position: relative;
    z-index: 10;
}

/* Tab container stílus javítása */
.leaderboard-tabs .nav-pills {
    --bs-nav-pills-link-active-color: white;
    --bs-nav-pills-link-active-bg: transparent;
}

@media (max-width: 768px) {
    .leaderboard-tabs {
        padding: 4px;
    }
    
    .leaderboard-tabs .nav-link {
        padding: 8px 12px;
        font-size: 0.9rem;
        margin: 0 2px;
        border-width: 1px;
    }
    
    .leaderboard-tabs .nav-link i.me-2 {
        display: none; /* Ikonok elrejtése mobilon */
    }
    
    .leaderboard-tabs .nav-link i.fa-info-circle {
        margin-left: 4px !important;
    }
}

/* Modern, látványos toplista stílusok */
.leaderboard-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: #fff;
    padding: 3rem 0 2rem 0;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.leaderboard-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-shadow: 0 2px 12px rgba(0,0,0,0.1);
    margin-bottom: 0.5rem;
    letter-spacing: -0.025em;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.trophy-animated {
    animation: trophyPulse 1.5s infinite alternate;
    font-size: 2.2rem;
    color: #ffd700;
    filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.3));
}

@keyframes trophyPulse {
    0% { 
        transform: scale(1); 
        filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.3)); 
    }
    100% { 
        transform: scale(1.12); 
        filter: drop-shadow(0 4px 16px rgba(255, 215, 0, 0.5)); 
    }
}

/* Podium stílusok - amikor szükséges */
.podium-row {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 24px;
    margin-bottom: 2rem;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
}

.podium-card {
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem;
    min-width: 160px;
    max-width: 200px;
    position: relative;
    transition: all 0.2s ease;
    border: 3px solid transparent;
}

.podium-card.rank-1 {
    background: linear-gradient(135deg, #fffbe6 60%, #ffe082 100%);
    border-color: #ffd700;
    z-index: 3;
    transform: scale(1.08);
    box-shadow: var(--shadow-xl);
}

.podium-card.rank-2 {
    background: linear-gradient(135deg, #f8fafd 60%, #b0bec5 100%);
    border-color: #b0bec5;
    z-index: 2;
}

.podium-card.rank-3 {
    background: linear-gradient(135deg, #fff8f0 60%, #ffb74d 100%);
    border-color: #ffb74d;
    z-index: 1;
}

.podium-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: var(--shadow);
    margin-bottom: 10px;
    object-fit: cover;
    background: var(--gray-100);
    position: relative;
    transition: box-shadow 0.2s ease;
}

.podium-card.rank-1 .podium-avatar {
    border-color: #ffd700;
    box-shadow: 0 0 0 4px #fffbe6, var(--shadow);
}

.podium-card.rank-2 .podium-avatar {
    border-color: #b0bec5;
    box-shadow: 0 0 0 4px #f8fafd, var(--shadow);
}

.podium-card.rank-3 .podium-avatar {
    border-color: #ffb74d;
    box-shadow: 0 0 0 4px #fff8f0, var(--shadow);
}

.podium-rank {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 6px;
}

.podium-card.rank-1 .podium-rank { color: #ffd700; }
.podium-card.rank-2 .podium-rank { color: #b0bec5; }
.podium-card.rank-3 .podium-rank { color: #ffb74d; }

.podium-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 2px;
    text-align: center;
    word-break: break-word;
}

.podium-points {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    background: var(--gray-100);
    border-radius: var(--border-radius);
    padding: 4px 16px;
    margin-bottom: 4px;
    display: inline-block;
    box-shadow: var(--shadow);
}

.podium-stats {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-bottom: 0;
    text-align: center;
}

/* Progress bar a következő helyezéshez */
.progress-to-next {
    width: 100%;
    height: 7px;
    background: var(--gray-200);
    border-radius: 4px;
    margin: 8px 0 0 0;
    overflow: hidden;
}

.progress-to-next-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Lista többi része */
.leaderboard-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 0;
}

.leaderboard-item {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    background: white;
    font-size: 1rem;
    min-height: 56px;
    gap: 12px;
    position: relative;
}

.leaderboard-item:last-child {
    border-bottom: none;
}

.leaderboard-item:hover {
    background: var(--gray-100);
    box-shadow: var(--shadow);
    z-index: 2;
}

.rank {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    border-radius: 50%;
    margin-right: 12px;
    flex-shrink: 0;
    font-size: 1.1rem;
    background: var(--gray-200);
    color: var(--gray-600);
    border: 2px solid var(--gray-300);
    box-shadow: var(--shadow);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: var(--shadow);
    background: var(--gray-100);
    transition: box-shadow 0.2s ease;
}

.leaderboard-item:hover .user-avatar {
    box-shadow: var(--shadow-lg);
}

.user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark-color);
    margin-bottom: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-stats {
    color: var(--gray-600);
    font-size: 0.88rem;
    margin-top: 2px;
}

.user-points {
    text-align: right;
    font-weight: 700;
    font-size: 1.08rem;
    color: white;
    margin-left: 12px;
    flex-shrink: 0;
    min-width: 64px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: var(--border-radius);
    padding: 6px 16px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-points small {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 400;
}

.your-rank {
    background: linear-gradient(90deg, #e3f2fd 60%, #bbdefb 100%);
    border: 2px solid var(--info-color);
    font-weight: 700;
    box-shadow: var(--shadow-lg);
    animation: yourRankPulse 1.5s infinite alternate;
}

@keyframes yourRankPulse {
    0% { box-shadow: var(--shadow-lg); }
    100% { box-shadow: var(--shadow-xl); }
}

.empty-leaderboard {
    text-align: center;
    padding: 40px 10px;
    color: var(--gray-600);
}

.empty-leaderboard i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    opacity: 0.4;
    color: var(--gray-400);
}

/* Responsive */
@media (max-width: 992px) {
    .podium-row { gap: 12px; }
    .podium-card { 
        min-width: 120px; 
        max-width: 160px; 
        padding: 18px 8px 12px 8px; 
    }
    .podium-avatar { width: 56px; height: 56px; }
}

@media (max-width: 768px) {
    .leaderboard-header { padding: 2rem 0 1rem 0; }
    .leaderboard-title { font-size: 2rem; }
    .podium-row { 
        flex-wrap: nowrap; 
        gap: 10px; 
    }
    .podium-card { 
        width: 120px; 
        min-width: 100px; 
        max-width: 140px; 
        padding: 10px 2px 8px 2px; 
    }
    .podium-avatar { width: 40px; height: 40px; }
}

@media (max-width: 576px) {
    .leaderboard-header { padding: 1.5rem 0 1rem 0; }
    .leaderboard-title { font-size: 1.5rem; }
    .podium-row { gap: 6px; }
    .podium-card { 
        padding: 6px 2px 4px 2px; 
        width: 90px; 
        min-width: 80px; 
        max-width: 100px; 
    }
    .podium-avatar { width: 28px; height: 28px; }
}

/* Saját pozíció sticky kártya stílusok */
#user-position-section {
    transition: all 0.3s ease;
}

#user-position-section .card {
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
    animation: stickyPulse 2s infinite alternate;
}

@keyframes stickyPulse {
    0% { 
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
        transform: translateY(0);
    }
    100% { 
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
        transform: translateY(-2px);
    }
}

#user-position-section .card-body {
    position: relative;
    overflow: hidden;
}

#user-position-section .card-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Mobilon kisebb sticky pozíció */
@media (max-width: 768px) {
    #user-position-section {
        bottom: 10px !important;
    }
    
    #user-position-section .card-body {
        padding: 0.75rem !important;
    }
    
    #user-position-section .card-title {
        font-size: 0.95rem;
        margin-bottom: 0.5rem !important;
    }
}

@media (max-width: 576px) {
    #user-position-section {
        bottom: 5px !important;
        margin-top: 1rem !important;
    }
    
    #user-position-section .card-body {
        padding: 0.5rem !important;
    }
}
