/* ============================================
   STATISTICS & CHARTS STYLES (ADD THIS SECTION)
   ============================================ */

/* Statistics containers */
.adp-statistics {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Stats counters grid */
.adp-stats-counters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.adp-counter {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.adp-counter:hover {
    transform: translateY(-5px);
}

.adp-counter-number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.adp-counter-label {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Charts grid - FIXED */
.adp-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.adp-chart-container {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

.adp-chart-container h3 {
    margin: 0 0 25px 0;
    color: #2c3e50;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: none;
}

.adp-chart-container canvas {
    max-width: 100%;
    height: auto !important;
    max-height: 300px;
    margin: 0 auto;
}

/* Leaderboard */
.adp-leaderboard {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    margin: 50px 0;
    border: 1px solid #e9ecef;
}

.adp-leaderboard h3 {
    margin: 0 0 25px 0;
    color: #2c3e50;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: none;
}

.adp-leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.adp-leaderboard-item {
    display: grid;
    grid-template-columns: 50px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

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

.adp-rank {
    font-size: 1.5rem;
    font-weight: bold;
    text-align: center;
    background: linear-gradient(135deg, #3498db, #2ecc71);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.adp-country {
    font-size: 1.1rem;
    color: #2c3e50;
    font-weight: 500;
}

.adp-count {
    color: #6c757d;
    font-weight: 600;
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
}

.adp-progress {
    grid-column: 1 / -1;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.adp-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 4px;
    transition: width 1s ease-in-out;
}

/* Real-time stats */
.adp-real-time {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    margin: 50px 0;
    border: 1px solid #e9ecef;
}

.adp-real-time h3 {
    margin: 0 0 25px 0;
    color: #2c3e50;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: none;
}

.adp-real-time-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.adp-real-time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border-left: 4px solid #3498db;
}

.adp-stat-label {
    font-weight: 600;
    color: #2c3e50;
}

.adp-stat-value {
    color: #27ae60;
    font-weight: 600;
    font-size: 1.1rem;
}

/* No data message */
.adp-no-data {
    text-align: center;
    padding: 60px 30px;
    background: #f8f9fa;
    border-radius: 15px;
    border: 2px dashed #dee2e6;
    margin: 50px 0;
}

.adp-no-data p {
    font-size: 1.2rem;
    color: #6c757d;
    margin: 0;
}

/* Export section */
.adp-export-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    margin: 50px 0;
    border: 1px solid #e9ecef;
    text-align: center;
}

.adp-export-section h3 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 1.4rem;
    font-weight: 600;
    border-bottom: none;
}

.adp-export-btn {
    background: linear-gradient(135deg, #3498db, #2ecc71);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.adp-export-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

/* Chart loading state */
.chart-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
    background: #f8f9fa;
    border-radius: 10px;
}

.chart-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 3px solid #e9ecef;
    border-top-color: #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive charts */
@media (max-width: 768px) {
    .adp-stats-counters {
        grid-template-columns: 1fr;
    }
    
    .adp-charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .adp-chart-container {
        padding: 15px;
        min-height: 300px;
    }
    
    .adp-chart-container canvas {
        max-height: 250px;
    }
    
    .adp-leaderboard-item {
        grid-template-columns: 40px 1fr;
        gap: 15px;
    }
    
    .adp-count {
        grid-column: 2;
        grid-row: 2;
    }
    
    .adp-progress {
        grid-column: 1 / -1;
    }
    
    .adp-real-time-stats {
        grid-template-columns: 1fr;
    }
}

/* Small screens */
@media (max-width: 480px) {
    .adp-chart-container canvas {
        max-height: 200px;
    }
    
    .adp-counter-number {
        font-size: 2rem;
    }
    
    .adp-leaderboard-item {
        padding: 12px;
    }
}

/* Ensure charts are visible */
canvas#adp-country-chart,
canvas#adp-type-chart,
canvas#adp-growth-chart {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix for Chart.js canvas rendering */
.adp-chart-container canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
    min-height: 250px;
}