/**
 * Statistics Page Styles
 * Glass cards, side-by-side leaderboards, overview stats
 */

/* Statistics page uses #stars from user-profile.css */

/* Glass Card Effect */
.glass-card {
    background: rgba(7, 28, 36, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Stats Overview Grid - Wider Cards */
.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

.stat-overview-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 28px 25px;
    transition: all 0.3s ease;
}

.stat-overview-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stat-overview-card.submitted {
    border-color: rgba(245, 158, 11, 0.4);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(7, 28, 36, 0.85));
}

.stat-overview-card.validated {
    border-color: rgba(74, 222, 128, 0.4);
    background: linear-gradient(135deg, rgba(74, 222, 128, 0.15), rgba(7, 28, 36, 0.85));
}

.stat-overview-icon {
    font-size: 3rem;
    line-height: 1;
}

.stat-overview-content {
    flex: 1;
}

.stat-overview-value {
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.stat-overview-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    margin-top: 5px;
    font-weight: 500;
}

/* Side-by-Side Leaderboards Grid */
.leaderboards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 25px;
    margin-bottom: 25px;
}

.leaderboard-card {
    padding: 0;
    overflow: hidden;
}

.leaderboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: rgba(52, 144, 220, 0.1);
    border-bottom: 1px solid rgba(52, 144, 220, 0.2);
}

.leaderboard-card-header h3 {
    margin: 0;
    font-size: 18px;
    color: #fff;
    font-weight: 600;
}

.view-all-btn {
    color: #fff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    background: rgba(52, 144, 220, 0.2);
    border: 1px solid rgba(52, 144, 220, 0.3);
    border-radius: 20px;
    transition: all 0.2s ease;
}

.view-all-btn:hover {
    background: rgba(52, 144, 220, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 144, 220, 0.2);
}

.leaderboard-card-content {
    padding: 15px 20px;
}

/* Leaderboard Row */
.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    border-radius: 12px;
    transition: all 0.2s ease;
    margin-bottom: 8px;
}

.leaderboard-row:last-child {
    margin-bottom: 0;
}

.leaderboard-row:hover {
    background: rgba(52, 144, 220, 0.1);
}

.leaderboard-row.top-rank.rank-1 {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.12), rgba(255, 215, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.leaderboard-row.top-rank.rank-2 {
    background: linear-gradient(135deg, rgba(192, 192, 192, 0.1), rgba(192, 192, 192, 0.03));
    border: 1px solid rgba(192, 192, 192, 0.15);
}

.leaderboard-row.top-rank.rank-3 {
    background: linear-gradient(135deg, rgba(205, 127, 50, 0.1), rgba(205, 127, 50, 0.03));
    border: 1px solid rgba(205, 127, 50, 0.15);
}

.leaderboard-row.current-user {
    background: rgba(52, 144, 220, 0.15);
    border: 1px solid rgba(52, 144, 220, 0.3);
}

.rank-badge-small {
    width: 40px;
    text-align: center;
    font-size: 1.2rem;
    flex-shrink: 0;
    color: #fff;
    font-weight: 700;
}

/* Wider page container for statistics/leaderboard */
.page-container.statistics-page {
    max-width: 1400px;
}

.user-info-compact {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.avatar-tiny {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-tiny-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3490dc, #60A5FA);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
}

.username-compact {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.you-badge-small {
    background: #3490dc;
    color: white;
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    flex-shrink: 0;
}

.stat-compact {
    font-size: 15px;
    font-weight: 700;
    color: #3490dc;
    text-align: right;
    min-width: 60px;
}

.stat-compact.validated {
    color: #4ADE80;
}

.stat-compact.recipes {
    color: #F59E0B;
}

.stat-compact.discovered {
    color: #8B5CF6;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .stats-overview-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .leaderboards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .stats-overview-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .stat-overview-card {
        flex-direction: column;
        text-align: center;
        gap: 10px;
        padding: 20px;
    }

    .stat-overview-icon {
        font-size: 2.2rem;
    }

    .stat-overview-value {
        font-size: 1.6rem;
    }

    .stat-overview-label {
        font-size: 12px;
    }

    .leaderboard-card-header {
        padding: 15px 20px;
    }

    .leaderboard-card-header h3 {
        font-size: 16px;
    }

    .leaderboard-row {
        padding: 10px 12px;
    }

    .rank-badge-small {
        width: 30px;
        font-size: 1rem;
    }

    .avatar-tiny,
    .avatar-tiny-placeholder {
        width: 28px;
        height: 28px;
    }

    .username-compact {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .stats-overview-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-overview-card {
        padding: 15px;
    }

    .stat-overview-icon {
        font-size: 1.8rem;
    }


    .stat-overview-value {
        font-size: 1.3rem;
    }
}

/* Validation Progress Section */
.validation-progress-section {
    margin-bottom: 35px;
}

.validation-progress-section h2 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.progress-card {
    background: rgba(7, 28, 36, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 25px;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.progress-title {
    color: #fff;
    font-weight: 600;
    font-size: 1.1rem;
}

.progress-percentage {
    color: #4ADE80;
    font-weight: 700;
    font-size: 1.2rem;
}

.progress-bar-container {
    height: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 25px;
}

.progress-bar-bg {
    display: flex;
    height: 100%;
    width: 100%;
}

.progress-bar-fill {
    height: 100%;
    transition: width 1s ease-out;
}

.progress-bar-fill.validated {
    background: #4ADE80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.4);
}

.progress-bar-fill.queued {
    background: #F59E0B;
}

.progress-bar-fill.already {
    background: #3B82F6;
}

.progress-numbers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-stat {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.progress-stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
}

.progress-stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
}

.progress-details {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.detail-item {
    display: flex;
    gap: 10px;
    align-items: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
}

.detail-label {
    color: rgba(255, 255, 255, 0.5);
}

.detail-value {
    font-weight: 600;
    color: #fff;
}

@media (max-width: 768px) {
    .progress-numbers {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}