.ranking-header {
    max-width: 1200px;
    margin: 3rem auto 2rem;
    padding: 0 2rem;
    text-align: center;
}

.ranking-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

.ranking-header p {
    font-size: 1.2rem;
    color: var(--gray);
}

.user-stats {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.stats-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.stat-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, var(--light-pink) 0%, var(--light-yellow) 100%);
    padding: 1rem;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--pink) 0%, var(--yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--gray);
    font-size: 1rem;
    margin-top: 0.3rem;
}

.ranking-section {
    max-width: 1200px;
    margin: 3rem auto 4rem;
    padding: 0 2rem;
}

.ranking-container {
    background: var(--white);
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.ranking-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem;
    border-bottom: 2px solid var(--light-pink);
}

.ranking-header-row h2 {
    font-size: 2rem;
    color: var(--dark);
}

.refresh-btn {
    background: var(--light-pink);
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark);
    transition: all 0.3s;
}

.refresh-btn:hover {
    background: var(--pink);
    color: white;
    transform: scale(1.05);
}

/* Podium */
.podium {
    display: flex;
    justify-content: center;
    align-items: end;
    padding: 2rem;
    gap: 1rem;
    background: linear-gradient(135deg, var(--light-pink) 0%, var(--light-yellow) 100%);
}

.podium-place {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    min-width: 150px;
}

.podium-place:hover {
    transform: translateY(-5px);
}

.podium-place.first {
    order: 2;
    transform: scale(1.1);
    border: 3px solid #FFD700;
}

.podium-place.second {
    order: 1;
    border: 3px solid #C0C0C0;
}

.podium-place.third {
    order: 3;
    border: 3px solid #CD7F32;
}

.podium-rank {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.podium-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
    color: var(--dark);
}

.podium-points {
    color: var(--gray);
    font-size: 0.9rem;
}

.podium-badge {
    background: linear-gradient(135deg, var(--pink) 0%, var(--yellow) 100%);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.5rem;
    display: inline-block;
}

/* Ranking List */
.ranking-list {
    padding: 1.5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.rank-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    border-radius: 15px;
    background: var(--light-pink);
    transition: all 0.3s;
    gap: 1rem;
}

.rank-item:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow);
}

.rank-item.current-user {
    background: linear-gradient(135deg, var(--pink) 0%, var(--yellow) 100%);
    color: white;
    box-shadow: var(--shadow-lg);
}

.rank-number {
    font-size: 1.4rem;
    font-weight: 700;
    min-width: 44px;
    text-align: center;
    flex-shrink: 0;
}

.rank-info {
    flex: 1;
    min-width: 0;
}

.rank-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rank-role {
    font-size: 0.78rem;
    opacity: 0.75;
}

.rank-points {
    font-size: 1.1rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.empty-ranking {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
}

.empty-ranking h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.empty-ranking p {
    color: var(--gray);
    margin-bottom: 2rem;
}

/* User Info in Nav — handled by styles.css */
/* Admin Panel Button */
.admin-panel-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
}

.admin-btn {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
    border: none;
    padding: 0.9rem 1.4rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
    transition: all 0.3s;
}

.admin-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(255, 107, 107, 0.5);
}

@media (max-width: 768px) {
    .ranking-header h1 {
        font-size: 2rem;
    }

    .stats-card {
        flex-direction: column;
        text-align: center;
    }

    .podium {
        flex-direction: column;
        align-items: center;
    }

    .podium-place.first {
        order: 1;
        transform: none;
    }

    .podium-place.second {
        order: 2;
    }

    .podium-place.third {
        order: 3;
    }

    .ranking-header-row {
        flex-direction: column;
        gap: 1rem;
    }

    .rank-item {
        padding: 0.8rem 1rem;
    }

    .admin-panel-btn {
        bottom: 1rem;
        right: 1rem;
    }
}