/* ==========================================
   STATS HERO
========================================== */
.stats-hero {
    padding: 160px 8% 40px;
    text-align: center;
    position: relative;
}

.stats-hero-kicker {
    font-size: 13px;
    letter-spacing: 6px;
    color: #A0A0A0;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
}

.stats-hero-title {
    font-size: clamp(30px, 5vw, 50px);
    color: #F5F5F5;
    margin: 14px 0 8px;
    animation: heroGlow 3s ease-in-out infinite alternate;
}

.stats-hero-sub {
    color: #808080;
    font-size: 16px;
    letter-spacing: 1px;
}

/* ==========================================
   OVERVIEW GRID
========================================== */
.stats-overview {
    padding: 10px 8% 20px;
}

.stats-overview-grid {
    grid-template-columns: repeat(4, 1fr);
}

.stats-card-glass {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.1);
    background: rgba(17,17,17,.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.stats-card-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 30% 0%, rgba(255,255,255,.04), transparent 70%);
    pointer-events: none;
}

.stats-card-glass .stat-card-icon {
    font-size: 32px;
    margin-bottom: 14px;
}

.stats-card-glass h2 {
    font-size: 36px;
    color: #F5F5F5;
    transition: all .3s ease;
}

.stats-card-glass p {
    margin-top: 8px;
    color: #808080;
    font-size: 14px;
    letter-spacing: .5px;
}

/* ==========================================
   STATS SECTIONS
========================================== */
.stats-section {
    padding: 30px 8%;
}

.stats-section-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 22px;
    color: #F5F5F5;
    margin-bottom: 28px;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 14px;
}

.stats-section-title::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #F5F5F5, transparent);
}

.stats-empty-text {
    color: #505050;
    font-size: 14px;
    text-align: center;
    padding: 30px;
}

/* ==========================================
   DONUT CHART
========================================== */
.stats-chart-layout {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}

.donut-wrapper {
    position: relative;
    width: 260px;
    height: 260px;
    flex-shrink: 0;
}

.donut-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.donut-center-num {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    color: #F5F5F5;
    font-weight: 700;
}

.donut-center-label {
    font-size: 13px;
    color: #808080;
    letter-spacing: 1px;
}

.donut-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.04);
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-name {
    flex: 1;
    color: #cfd4dc;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .5px;
}

.legend-pct {
    color: #808080;
    font-size: 13px;
    font-family: 'Orbitron', sans-serif;
}

/* ==========================================
   RATING BAR CHART
========================================== */
.stats-bar-chart {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 600px;
}

.stat-bar-item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stat-bar-label {
    min-width: 30px;
    text-align: right;
    color: #A0A0A0;
    font-family: 'Orbitron', sans-serif;
    font-size: 16px;
    font-weight: 700;
}

.stat-bar-track {
    flex: 1;
    height: 14px;
    background: rgba(255,255,255,.06);
    border-radius: 14px;
    overflow: hidden;
}

.stat-bar-fill {
    height: 100%;
    border-radius: 14px;
    background: linear-gradient(90deg, #707070, #D0D0D0);
    transition: width 1s cubic-bezier(.22,.8,.28,1);
    position: relative;
}

.stat-bar-fill::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.25) 50%, transparent 60%);
    animation: barShimmer 4s ease-in-out infinite;
}

@keyframes barShimmer {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.stat-bar-num {
    min-width: 28px;
    color: #606060;
    font-size: 14px;
    font-family: 'Orbitron', sans-serif;
}

/* ==========================================
   INSIGHTS GRID
========================================== */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.insight-card {
    display: flex;
    gap: 16px;
    padding: 24px;
    border-radius: 16px;
    background: rgba(17,17,17,.65);
    border: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all .3s ease;
}

.insight-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255,255,255,.18);
    box-shadow: 0 16px 40px rgba(0,0,0,.4);
}

.insight-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.insight-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.insight-title {
    font-size: 12px;
    color: #808080;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
}

.insight-value {
    font-size: 22px;
    color: #F5F5F5;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

.insight-detail {
    font-size: 13px;
    color: #606060;
    line-height: 1.4;
}

/* ==========================================
   PROGRESS RING
========================================== */
.progress-ring-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

.progress-ring {
    transform: rotate(-90deg);
    width: 200px;
    height: 200px;
}

.progress-ring-bg {
    fill: none;
    stroke: rgba(255,255,255,.06);
    stroke-width: 12;
}

.progress-ring-fill {
    fill: none;
    stroke: #D0D0D0;
    stroke-width: 12;
    stroke-linecap: round;
    stroke-dasharray: 534;
    stroke-dashoffset: 534;
    transition: stroke-dashoffset 1.5s cubic-bezier(.22,.8,.28,1);
    filter: drop-shadow(0 0 8px rgba(255,255,255,.2));
}

.progress-ring-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.progress-ring-num {
    font-family: 'Orbitron', sans-serif;
    font-size: 36px;
    color: #F5F5F5;
    font-weight: 700;
}

.progress-ring-label {
    font-size: 12px;
    color: #808080;
    text-align: center;
    letter-spacing: .5px;
}

/* ==========================================
   FUN FACTS
========================================== */
.fun-facts {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.fun-fact-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-radius: 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.06);
    transition: all .3s ease;
}

.fun-fact-card:hover {
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.12);
    transform: translateX(4px);
}

.fun-fact-emoji {
    font-size: 28px;
    flex-shrink: 0;
    margin-top: 2px;
}

.fun-fact-text {
    color: #A0A0A0;
    font-size: 15px;
    line-height: 1.5;
}

.fun-fact-text strong {
    color: #E9EBEF;
}

/* ==========================================
   MOBILE RESPONSIVE
========================================== */
@media (max-width: 768px) {
    .stats-hero {
        padding: 120px 5% 30px;
    }

    .stats-overview-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .stats-card-glass h2 {
        font-size: 28px;
    }

    .stats-section {
        padding: 24px 4%;
    }

    .stats-section-title {
        font-size: 18px;
    }

    .stats-chart-layout {
        flex-direction: column;
        align-items: center;
    }

    .donut-wrapper {
        width: 220px;
        height: 220px;
    }

    #genreDonut {
        width: 220px;
        height: 220px;
    }

    .donut-legend {
        width: 100%;
    }

    .insights-grid {
        grid-template-columns: 1fr;
    }

    .progress-ring-wrapper {
        width: 160px;
        height: 160px;
    }

    .progress-ring {
        width: 160px;
        height: 160px;
    }

    .progress-ring-num {
        font-size: 28px;
    }

    /* Add bottom padding for mobile nav */
    .fun-facts {
        padding-bottom: 20px;
    }
}

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

    .stats-card-glass {
        padding: 20px 14px;
    }

    .stats-card-glass h2 {
        font-size: 22px;
    }

    .stat-bar-label {
        font-size: 14px;
    }

    .insight-card {
        padding: 18px;
    }
}
