/* ===== Stats Hero Section ===== */
.stats-hero {
    margin: 2rem auto 3rem;
    padding: 2rem 1.5rem;
    max-width: 1400px;
}

.stats-hero-content {
    text-align: center;
    padding: 2.5rem;
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
}

.stats-title {
    font-size: 2.5rem;
    color: #f1f5f9;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.stats-description {
    font-size: 1.125rem;
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 1.5rem;
}

.stats-update-info {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 0.875rem;
}

.update-icon {
    animation: spin 2s linear infinite;
    font-size: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== Current Stats Overview ===== */
.current-stats-overview {
    max-width: 1400px;
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

.overview-title {
    font-size: 1.5rem;
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-align: center;
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.overview-card {
    background: rgba(30, 41, 59, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.2s ease;
}

.overview-card:hover {
    border-color: rgba(100, 116, 139, 0.3);
    transform: translateY(-2px);
}

.overview-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.overview-icon.online { color: #4ade80; }
.overview-icon.players { color: #3b82f6; }
.overview-icon.versions { color: #8b5cf6; }
.overview-icon.servers { color: #0ea5e9; }

.overview-content {
    flex: 1;
    min-width: 0;
}

.overview-label {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.overview-value {
    font-size: 1.75rem;
    color: #f1f5f9;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.overview-change {
    font-size: 0.8125rem;
    font-weight: 500;
}

.overview-change.positive {
    color: #4ade80;
}

.overview-change.negative {
    color: #f87171;
}

.overview-subtext {
    font-size: 0.8125rem;
    color: #94a3b8;
}

/* ===== Stats Container ===== */
.stats-container {
    max-width: 1400px;
    margin: 0 auto 4rem;
    padding: 0 1.5rem;
}

/* ===== Stats Sections ===== */
.stats-section {
    margin-bottom: 3rem;
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 12px;
    padding: 1.5rem;
}

.stats-section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
}

.stats-section-title {
    font-size: 1.5rem;
    color: #f1f5f9;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.stats-section-description {
    color: #cbd5e1;
    font-size: 0.95rem;
}

/* ===== Charts ===== */
.stats-chart-container {
    height: 300px;
    margin: 1.5rem 0;
    position: relative;
}

/* ===== Stats Insights ===== */
.stats-insights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.insight-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 8px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.insight-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.insight-content {
    flex: 1;
    min-width: 0;
}

.insight-title {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.insight-value {
    font-size: 1.5rem;
    color: #f1f5f9;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.insight-value.positive {
    color: #4ade80;
}

.insight-value.negative {
    color: #f87171;
}

.insight-detail {
    font-size: 0.8125rem;
    color: #94a3b8;
}

/* ===== Version Details Table ===== */
.version-details {
    margin-top: 2rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.version-table-header {
    display: grid;
    grid-template-columns: 60px 1fr 120px 120px;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(15, 23, 42, 0.5);
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    font-weight: 600;
    color: #f1f5f9;
    font-size: 0.875rem;
}

.version-table-body {
    max-height: 400px;
    overflow-y: auto;
}

.version-table-row {
    display: grid;
    grid-template-columns: 60px 1fr 120px 120px;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.05);
    align-items: center;
    transition: background-color 0.2s ease;
}

.version-table-row:hover {
    background: rgba(59, 130, 246, 0.05);
}

.version-table-row:last-child {
    border-bottom: none;
}

.version-table-col {
    color: #cbd5e1;
    font-size: 0.875rem;
}

.version-table-col.rank {
    text-align: center;
}

.version-table-col.version {
    font-family: 'SF Mono', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
}

.version-table-col.servers {
    text-align: right;
    font-weight: 600;
    color: #f1f5f9;
}

.version-table-col.percentage {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rank-badge {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.8125rem;
}

.version-name {
    font-family: 'SF Mono', monospace;
    color: #7dd3fc;
    background: rgba(30, 41, 59, 0.8);
    padding: 0.25rem 0.625rem;
    border-radius: 4px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    max-width: 100%;
}

.percentage-bar-container {
    flex: 1;
    height: 6px;
    background: rgba(30, 41, 59, 0.8);
    border-radius: 3px;
    overflow: hidden;
}

.percentage-bar {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 3px;
    transition: width 0.5s ease;
}

.percentage-value {
    min-width: 40px;
    text-align: right;
    font-weight: 600;
    color: #f1f5f9;
}

.version-table-footer {
    padding: 1rem 1.25rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.875rem;
    background: rgba(15, 23, 42, 0.3);
    border-top: 1px solid rgba(148, 163, 184, 0.1);
}

/* ===== Data Information ===== */
.data-info {
    margin-top: 3rem;
    padding: 1.5rem;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(148, 163, 184, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
}

.info-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.info-content {
    flex: 1;
    min-width: 0;
}

.info-title {
    font-size: 1.125rem;
    color: #f1f5f9;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.info-description {
    color: #cbd5e1;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.info-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.info-link {
    color: #60a5fa;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.info-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.info-separator {
    color: #94a3b8;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .stats-hero {
        padding: 1.5rem 1rem;
        margin: 1rem auto 2rem;
    }
    
    .stats-hero-content {
        padding: 1.5rem;
    }
    
    .stats-title {
        font-size: 2rem;
    }
    
    .stats-description {
        font-size: 1rem;
    }
    
    .current-stats-overview,
    .stats-container {
        padding: 0 1rem;
    }
    
    .overview-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 1rem;
    }
    
    .overview-card {
        padding: 1.25rem;
    }
    
    .stats-section {
        padding: 1.25rem;
    }
    
    .stats-chart-container {
        height: 250px;
    }
    
    .stats-insights {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    
    .version-table-header,
    .version-table-row {
        grid-template-columns: 50px 1fr 80px 80px;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }
    
    .version-table-col {
        font-size: 0.8125rem;
    }
    
    .data-info {
        flex-direction: column;
        gap: 1rem;
        padding: 1.25rem;
    }
    
    .info-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-title {
        font-size: 1.75rem;
    }
    
    .overview-grid {
        grid-template-columns: 1fr;
    }
    
    .overview-value {
        font-size: 1.5rem;
    }
    
    .stats-section-title {
        font-size: 1.25rem;
    }
    
    .version-table-header,
    .version-table-row {
        grid-template-columns: 40px 1fr 70px 70px;
        gap: 0.5rem;
        padding: 0.625rem 0.75rem;
    }
    
    .version-name {
        font-size: 0.75rem;
        padding: 0.125rem 0.375rem;
    }
    
    .rank-badge {
        width: 24px;
        height: 24px;
        line-height: 24px;
        font-size: 0.75rem;
    }
}