/**
 * Community Leaderboard Pro - Public Styles
 */

/* Leaderboard Container */
.clp-leaderboard {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.clp-leaderboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.clp-leaderboard-header h3 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.clp-leaderboard-timeframe {
    background: #f0f0f0;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
    color: #666;
}

/* Leaderboard List */
.clp-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.clp-leaderboard-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.clp-leaderboard-item:hover {
    background: #f0f0f0;
    transform: translateX(5px);
}

.clp-leaderboard-item.rank-1 {
    background: linear-gradient(135deg, #fff9e6, #fff);
    border: 2px solid #ffd700;
}

.clp-leaderboard-item.rank-2 {
    background: linear-gradient(135deg, #f5f5f5, #fff);
    border: 2px solid #c0c0c0;
}

.clp-leaderboard-item.rank-3 {
    background: linear-gradient(135deg, #fff5e6, #fff);
    border: 2px solid #cd7f32;
}

/* Rank Display */
.clp-rank {
    min-width: 50px;
    text-align: center;
}

.clp-medal {
    font-size: 32px;
    line-height: 1;
}

.clp-rank-number {
    font-size: 24px;
    font-weight: bold;
    color: #666;
}

/* Avatar */
.clp-avatar img {
    border-radius: 50%;
    border: 2px solid #e0e0e0;
}

/* Member Info */
.clp-member-info {
    flex: 1;
}

.clp-member-name {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.clp-member-level {
    font-size: 14px;
}

/* Points Display */
.clp-points {
    text-align: right;
    min-width: 100px;
}

.clp-points-value {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #2271b1;
}

.clp-points-label {
    display: block;
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

/* Level Badges */
.clp-level-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
    color: #fff;
    white-space: nowrap;
}

.clp-level-badge.level-1 { background: #95a5a6; }
.clp-level-badge.level-2 { background: #3498db; }
.clp-level-badge.level-3 { background: #9b59b6; }
.clp-level-badge.level-4 { background: #e74c3c; }
.clp-level-badge.level-5 { background: #e67e22; }
.clp-level-badge.level-6 { background: #f39c12; }
.clp-level-badge.level-7 { background: #27ae60; }
.clp-level-badge.level-8 { background: #16a085; }
.clp-level-badge.level-9 { 
    background: linear-gradient(90deg, #f39c12, #e74c3c);
    box-shadow: 0 2px 8px rgba(243, 156, 18, 0.4);
}

/* Member Card */
.clp-member-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.clp-member-card-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.clp-member-avatar img {
    border-radius: 50%;
    border: 3px solid #2271b1;
}

.clp-member-details h3 {
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #333;
}

.clp-member-rank {
    font-size: 16px;
    color: #666;
}

/* Stats Row */
.clp-stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.clp-stat {
    text-align: center;
    padding: 15px;
    background: #fafafa;
    border-radius: 8px;
}

.clp-stat-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.clp-stat-value {
    font-size: 20px;
    font-weight: bold;
    color: #2271b1;
}

/* Progress Section */
.clp-progress-section {
    margin-top: 20px;
}

.clp-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #333;
}

.clp-progress-bar {
    height: 24px;
    background: #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.clp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #4a9dd9);
    border-radius: 12px;
    transition: width 0.5s ease;
}

.clp-progress-footer {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    text-align: center;
}

.clp-max-level-badge {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #fff9e6, #fff);
    border: 2px solid #ffd700;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    color: #f39c12;
}

/* Distribution */
.clp-distribution {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
}

.clp-distribution h3 {
    margin-top: 0;
}

.clp-distribution-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

.clp-distribution-bar {
    margin-bottom: 15px;
}

.clp-distribution-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
    font-size: 14px;
}

.clp-level {
    font-weight: bold;
}

.clp-level-name {
    color: #666;
}

.clp-distribution-visual {
    display: flex;
    align-items: center;
    gap: 10px;
}

.clp-bar-container {
    flex: 1;
    height: 30px;
    background: #f0f0f0;
    border-radius: 15px;
    overflow: hidden;
}

.clp-bar-fill {
    height: 100%;
    border-radius: 15px;
    transition: width 0.5s ease;
}

.clp-bar-fill.level-1 { background: #95a5a6; }
.clp-bar-fill.level-2 { background: #3498db; }
.clp-bar-fill.level-3 { background: #9b59b6; }
.clp-bar-fill.level-4 { background: #e74c3c; }
.clp-bar-fill.level-5 { background: #e67e22; }
.clp-bar-fill.level-6 { background: #f39c12; }
.clp-bar-fill.level-7 { background: #27ae60; }
.clp-bar-fill.level-8 { background: #16a085; }
.clp-bar-fill.level-9 { background: linear-gradient(90deg, #f39c12, #e74c3c); }

.clp-distribution-stats {
    min-width: 100px;
    text-align: right;
}

.clp-percentage {
    font-weight: bold;
    color: #333;
}

.clp-count {
    color: #666;
    font-size: 13px;
}

/* My Progress */
.clp-my-progress {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px;
    margin: 20px 0;
}

.clp-my-progress h3 {
    margin-top: 0;
}

.clp-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.clp-progress-stat {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #fafafa;
    border-radius: 8px;
}

.clp-progress-stat-icon {
    font-size: 36px;
}

.clp-progress-stat-value {
    font-size: 28px;
    font-weight: bold;
    color: #2271b1;
}

.clp-progress-stat-label {
    font-size: 13px;
    color: #666;
}

.clp-next-level-section {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.clp-next-level-section h4 {
    margin-top: 0;
    color: #333;
}

.clp-progress-bar-large {
    height: 40px;
    background: #e0e0e0;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    margin: 15px 0;
}

.clp-progress-bar-large .clp-progress-fill {
    display: flex;
    align-items: center;
    justify-content: center;
}

.clp-progress-text {
    color: #fff;
    font-weight: bold;
    font-size: 14px;
}

.clp-progress-description {
    text-align: center;
    color: #666;
    margin: 10px 0 0 0;
}

/* Like Button */
.clp-like-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.clp-like-button:hover {
    border-color: #2271b1;
    transform: scale(1.05);
}

.clp-like-button.liked {
    background: #ffe6e6;
    border-color: #ff4444;
}

.clp-like-icon {
    font-size: 18px;
}

.clp-like-count {
    font-weight: bold;
    color: #333;
}

/* Empty States */
.clp-leaderboard-empty {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .clp-leaderboard-item {
        flex-wrap: wrap;
    }
    
    .clp-member-card-header {
        flex-direction: column;
        text-align: center;
    }
    
    .clp-stat-row {
        grid-template-columns: 1fr;
    }
    
    .clp-progress-grid {
        grid-template-columns: 1fr;
    }
    
    .clp-distribution-visual {
        flex-direction: column;
        align-items: stretch;
    }
    
    .clp-distribution-stats {
        text-align: left;
    }
}
