/* ============================================
   STATISTICS.CSS - Complete Integration
   All dynamic elements properly styled
   ============================================ */

/* ============================================
   PAGE CONTAINER
   ============================================ */
#statistics-page {
    padding: 0;
    margin: 0;
    width: 100%;
    animation: fadeIn 0.5s ease;
}

#statistics-page .dashboard-section {
    margin: 0 0 32px 0;
    width: 100%;
}

/* ============================================
   SECTION TITLE 
   ============================================ */
#statistics-page .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
    position: relative;
}

#statistics-page .section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, var(--clr-primary), var(--clr-secondary));
    border-radius: 2px;
}

#statistics-page .section-title i {
    font-size: 1.3rem;
    color: var(--clr-primary);
    background: var(--bg-tertiary);
    padding: 8px;
    border-radius: 12px;
    border: 1px solid var(--border);
}

/* ============================================
   STATS HERO - PREMIUM DESIGN
   ============================================ */

.stats-hero {
    position: relative;
    overflow: hidden;
    padding: 2.5rem 3rem;
    border-radius: 24px;
    margin-bottom: 2rem;
    min-height: 200px;
    
    /* Premium Gradient Background */
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

/* ===== GLOW ORBS ===== */
.stats-hero .hero-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.4;
    pointer-events: none;
    animation: floatOrb 8s ease-in-out infinite;
}

.stats-hero .hero-glow-1 {
    width: 280px;
    height: 280px;
    background: rgba(168, 85, 247, 0.3);
    top: -80px;
    right: -60px;
    animation-delay: 0s;
}

.stats-hero .hero-glow-2 {
    width: 220px;
    height: 220px;
    background: rgba(59, 130, 246, 0.25);
    bottom: -70px;
    left: -50px;
    animation-delay: -3s;
}

.stats-hero .hero-glow-3 {
    width: 180px;
    height: 180px;
    background: rgba(236, 72, 153, 0.15);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -5s;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
}

/* ===== STATS HERO CONTENT ===== */
.stats-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    width: 100%;
}

/* ===== LEFT SECTION ===== */
.stats-hero-left {
    flex: 1;
    min-width: 0;
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 1rem 0.3rem 0.6rem;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 50px;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.hero-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
    transform: translateX(3px);
}

.hero-badge-icon {
    font-size: 0.9rem;
}

.hero-badge-text {
    font-weight: 500;
    letter-spacing: 0.03em;
}

/* Hero Greeting */
.hero-greeting {
    margin-bottom: 1.25rem;
}

.hero-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 700;
    margin: 0 0 0.3rem 0;
    letter-spacing: -0.02em;
}

.hero-greeting-text {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.hero-username {
    background: linear-gradient(135deg, #ffffff 60%, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    font-weight: 400;
}

/* Hero Insights */
.hero-insights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-top: 1.2rem;
}

.hero-insight-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 1rem 0.5rem 0.6rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-insight-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-2px);
    border-color: rgba(139, 92, 246, 0.15);
}

.hero-insight-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.hero-insight-icon.trophy {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.hero-insight-icon.streak {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}
.hero-insight-icon.rating {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.hero-insight-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hero-insight-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-insight-text {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    white-space: nowrap;
}

/* ===== RIGHT SECTION ===== */
.stats-hero-right {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    flex-shrink: 0;
}

/* Hero Stat Cards */
.hero-stat-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 100px;
}

.hero-stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-3px);
    border-color: rgba(139, 92, 246, 0.12);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.hero-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.hero-stat-icon.completed {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}
.hero-stat-icon.episodes {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}
.hero-stat-icon.time {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}
.hero-stat-icon.rating-star {
    background: rgba(139, 92, 246, 0.15);
    color: #8b5cf6;
}

.hero-stat-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.hero-stat-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.2;
}

.hero-stat-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ============================================
   DARK THEME
   ============================================ */
[data-theme="dark"] .stats-hero {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

[data-theme="dark"] .hero-username {
    background: linear-gradient(135deg, #ffffff 60%, rgba(255, 255, 255, 0.7));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .hero-glow-1 {
    background: rgba(168, 85, 247, 0.3);
}
[data-theme="dark"] .hero-glow-2 {
    background: rgba(59, 130, 246, 0.25);
}
[data-theme="dark"] .hero-glow-3 {
    background: rgba(236, 72, 153, 0.15);
}

/* ============================================
   LIGHT THEME
   ============================================ */
[data-theme="light"] .stats-hero {
    background: linear-gradient(135deg, #e8e8ff 0%, #ddddfa 50%, #d0d0f5 100%);
}

[data-theme="light"] .hero-glow-1 {
    background: rgba(168, 85, 247, 0.15);
}
[data-theme="light"] .hero-glow-2 {
    background: rgba(59, 130, 246, 0.12);
}
[data-theme="light"] .hero-glow-3 {
    background: rgba(236, 72, 153, 0.08);
}

[data-theme="light"] .hero-greeting-text {
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .hero-username {
    background: linear-gradient(135deg, #1a1a2e 60%, #4a4a8a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .hero-subtitle {
    color: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] .hero-badge {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(0, 0, 0, 0.06);
    color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .hero-badge:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(139, 92, 246, 0.15);
}

[data-theme="light"] .hero-insight-item {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .hero-insight-item:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(139, 92, 246, 0.1);
}

[data-theme="light"] .hero-insight-text {
    color: rgba(0, 0, 0, 0.7);
}

[data-theme="light"] .hero-insight-label {
    color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .hero-stat-card {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(0, 0, 0, 0.04);
}

[data-theme="light"] .hero-stat-card:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(139, 92, 246, 0.1);
}

[data-theme="light"] .hero-stat-value {
    color: rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .hero-stat-label {
    color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .hero-stat-icon.completed {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
}
[data-theme="light"] .hero-stat-icon.episodes {
    background: rgba(59, 130, 246, 0.08);
    color: #2563eb;
}
[data-theme="light"] .hero-stat-icon.time {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
}
[data-theme="light"] .hero-stat-icon.rating-star {
    background: rgba(139, 92, 246, 0.08);
    color: #7c3aed;
}

[data-theme="light"] .hero-insight-icon.trophy {
    background: rgba(245, 158, 11, 0.08);
    color: #d97706;
}
[data-theme="light"] .hero-insight-icon.streak {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}
[data-theme="light"] .hero-insight-icon.rating {
    background: rgba(139, 92, 246, 0.08);
    color: #7c3aed;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .stats-hero {
        padding: 2rem 2rem;
        min-height: 180px;
    }
    
    .stats-hero-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }
    
    .stats-hero-right {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .hero-stat-card {
        min-width: 0;
    }
}

@media (max-width: 768px) {
    .stats-hero {
        padding: 1.5rem;
        min-height: 160px;
        border-radius: 16px;
    }
    
    .stats-hero-right {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
    }
    
    .hero-title {
        font-size: 1.6rem;
    }
    
    .hero-stat-card {
        padding: 0.6rem 0.8rem;
        border-radius: 12px;
    }
    
    .hero-stat-value {
        font-size: 1rem;
    }
    
    .hero-stat-icon {
        width: 34px;
        height: 34px;
        font-size: 0.75rem;
    }
    
    .hero-glow-1 {
        width: 150px;
        height: 150px;
        top: -40px;
        right: -30px;
    }
    
    .hero-glow-2 {
        width: 120px;
        height: 120px;
        bottom: -30px;
        left: -20px;
    }
    
    .hero-glow-3 {
        width: 100px;
        height: 100px;
    }
    
    .hero-insights {
        gap: 0.5rem;
    }
    
    .hero-insight-item {
        padding: 0.4rem 0.7rem;
        border-radius: 10px;
    }
    
    .hero-insight-text {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .stats-hero {
        padding: 1rem;
        min-height: 140px;
        border-radius: 12px;
    }
    
    .stats-hero-right {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    
    .hero-title {
        font-size: 1.3rem;
        gap: 0.3rem;
    }
    
    .hero-greeting-text {
        font-size: 1rem;
    }
    
    .hero-subtitle {
        font-size: 0.85rem;
    }
    
    .hero-stat-card {
        padding: 0.5rem 0.6rem;
        border-radius: 10px;
        gap: 0.5rem;
    }
    
    .hero-stat-value {
        font-size: 0.85rem;
    }
    
    .hero-stat-label {
        font-size: 0.5rem;
    }
    
    .hero-stat-icon {
        width: 28px;
        height: 28px;
        font-size: 0.65rem;
        border-radius: 8px;
    }
    
    .hero-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.7rem 0.2rem 0.4rem;
    }
    
    .hero-badge-icon {
        font-size: 0.7rem;
    }
    
    .hero-glow-1 {
        width: 100px;
        height: 100px;
        top: -30px;
        right: -20px;
    }
    
    .hero-glow-2 {
        width: 80px;
        height: 80px;
        bottom: -20px;
        left: -15px;
    }
    
    .hero-glow-3 {
        width: 70px;
        height: 70px;
    }
    
    .hero-insight-item {
        padding: 0.3rem 0.5rem;
        gap: 0.4rem;
    }
    
    .hero-insight-icon {
        width: 26px;
        height: 26px;
        font-size: 0.6rem;
        border-radius: 6px;
    }
    
    .hero-insight-text {
        font-size: 0.65rem;
    }
    
    .hero-insight-label {
        font-size: 0.5rem;
    }
}

/* ============================================
   ACCESSIBILITY - REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .stats-hero .hero-glow-orb {
        animation: none !important;
    }
    
    .stats-hero .shine-overlay {
        display: none !important;
    }
    
    .stats-hero .stat-item:hover {
        transform: none !important;
    }
    
    .stats-hero .quote-card:hover {
        transform: none !important;
    }
}

/* ============================================
   OVERVIEW METRICS
   ============================================ */
.overview-metrics {
    margin-bottom: 32px;
}

.overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.overview-title {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    margin: 0;
}

.overview-title i {
    color: var(--clr-primary);
    font-size: 1.2rem;
}

.overview-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 4px 16px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

.overview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.metric-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 18px 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.03);
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: var(--clr-primary);
}

.metric-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
}

.metric-icon.completed {
    background: var(--clr-success);
}

.metric-icon.episodes {
    background: var(--clr-info);
}

.metric-icon.time {
    background: var(--clr-warning);
}

.metric-icon.rating {
    background: var(--clr-secondary);
}

.metric-icon.rate {
    background: var(--clr-primary);
}

.metric-icon.watching {
    background: var(--clr-secondary);
}

.metric-icon.plan {
    background: #F97316;
}

.metric-icon.streak {
    background: #EF4444;
}

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

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
    line-height: 1.2;
    color: var(--text-primary);
    font-family: 'Inter', monospace;
    letter-spacing: -0.5px;
}

.metric-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-change {
    font-size: 0.6rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
}

.metric-change.positive {
    color: var(--clr-success);
}

.metric-change.negative {
    color: var(--clr-danger);
}

.metric-change.neutral {
    color: var(--text-muted);
}

/* ============================================
   LIBRARY ANALYTICS - Dynamic Content
   ============================================ */
.library-analytics {
    margin-bottom: 32px;
}

.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.analytics-header-left {
    display: flex;
    flex-direction: column;
}

.analytics-title {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    margin: 0;
}

.analytics-title i {
    color: var(--clr-secondary);
    font-size: 1.2rem;
}

.analytics-header-right {
    display: flex;
    align-items: baseline;
    gap: 8px;
    background: var(--bg-tertiary);
    padding: 6px 20px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

.analytics-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--clr-primary);
    font-family: 'Inter', monospace;
}

.analytics-total-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.analytics-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.analytics-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 18px 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.analytics-card:hover {
    border-color: var(--clr-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.analytics-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.analytics-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.analytics-card-title i {
    color: var(--clr-secondary);
}

.analytics-card-badge {
    font-size: 0.55rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 10px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

/* ============================================
   GENRE DISTRIBUTION - Dynamic Bars
   ============================================ */
#genreDistribution {
    width: 100%;
    padding: 4px 0;
}

.genre-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    padding: 4px 4px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.genre-bar-wrapper:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.genre-bar-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 80px;
    max-width: 100px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

.genre-bar-track {
    flex: 1;
    height: 20px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.genre-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 4px;
}

.genre-bar-fill.color-0 {
    background: linear-gradient(90deg, #6366F1, #818CF8);
}

.genre-bar-fill.color-1 {
    background: linear-gradient(90deg, #8B5CF6, #A78BFA);
}

.genre-bar-fill.color-2 {
    background: linear-gradient(90deg, #10B981, #34D399);
}

.genre-bar-fill.color-3 {
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

.genre-bar-fill.color-4 {
    background: linear-gradient(90deg, #EC4899, #F472B6);
}

.genre-bar-fill.color-5 {
    background: linear-gradient(90deg, #06B6D4, #22D3EE);
}

.genre-bar-fill.color-6 {
    background: linear-gradient(90deg, #F97316, #FB923C);
}

.genre-bar-fill.color-7 {
    background: linear-gradient(90deg, #EF4444, #F87171);
}

.genre-bar-fill.color-8 {
    background: linear-gradient(90deg, #84CC16, #A3E635);
}

.genre-bar-fill.color-9 {
    background: linear-gradient(90deg, #8B5CF6, #C4B5FD);
}

.genre-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: barShimmer 2s ease-in-out infinite;
    border-radius: 10px;
}

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

    100% {
        transform: translateX(100%);
    }
}

.genre-bar-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 30px;
    text-align: right;
    flex-shrink: 0;
}

.genre-bar-percent {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-muted);
    min-width: 42px;
    text-align: right;
    flex-shrink: 0;
}

/* ============================================
   FORMAT DISTRIBUTION - Dynamic Bars
   ============================================ */
#formatDistribution {
    width: 100%;
    padding: 4px 0;
}

.format-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding: 4px 4px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.format-bar-wrapper:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.format-bar-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.format-bar-icon.tv {
    background: rgba(99, 102, 241, 0.15);
    color: #A78BFA;
}

.format-bar-icon.movie {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
}

.format-bar-icon.ova {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
}

.format-bar-icon.ona {
    background: rgba(236, 72, 153, 0.15);
    color: #F472B6;
}

.format-bar-icon.special {
    background: rgba(6, 182, 212, 0.15);
    color: #22D3EE;
}

.format-bar-icon.music {
    background: rgba(239, 68, 68, 0.15);
    color: #F87171;
}

.format-bar-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 50px;
    flex-shrink: 0;
}

.format-bar-track {
    flex: 1;
    height: 18px;
    background: var(--bg-tertiary);
    border-radius: 9px;
    overflow: hidden;
    position: relative;
}

.format-bar-fill {
    height: 100%;
    border-radius: 9px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 4px;
}

.format-bar-fill.color-tv {
    background: linear-gradient(90deg, #6366F1, #8B5CF6);
}

.format-bar-fill.color-movie {
    background: linear-gradient(90deg, #10B981, #34D399);
}

.format-bar-fill.color-ova {
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

.format-bar-fill.color-ona {
    background: linear-gradient(90deg, #EC4899, #F472B6);
}

.format-bar-fill.color-special {
    background: linear-gradient(90deg, #06B6D4, #22D3EE);
}

.format-bar-fill.color-music {
    background: linear-gradient(90deg, #EF4444, #F87171);
}

.format-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: barShimmer 2s ease-in-out infinite;
    border-radius: 9px;
}

.format-bar-count {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 30px;
    text-align: right;
    flex-shrink: 0;
}

.format-bar-percent {
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-muted);
    min-width: 42px;
    text-align: right;
    flex-shrink: 0;
}

/* ============================================
   INSIGHTS PANEL - Dynamic
   ============================================ */
.insights-panel {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 20px;
    border: 1px solid var(--border);
}

.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.insights-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    margin: 0;
}

.insights-title i {
    color: #FBBF24;
}

.insights-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.insight-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.insight-card:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    transform: translateY(-2px);
}

.insight-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.insight-icon.genre {
    background: rgba(139, 92, 246, 0.15);
    color: #A78BFA;
}

.insight-icon.second {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
}

.insight-icon.format {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
}

.insight-icon.diversity {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
}

.insight-icon.completion {
    background: rgba(79, 70, 229, 0.15);
    color: #818CF8;
}

.insight-icon.genres {
    background: rgba(236, 72, 153, 0.15);
    color: #F472B6;
}

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

.insight-value {
    font-size: 1rem;
    font-weight: 700;
    display: block;
    color: var(--text-primary);
}

.insight-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.insight-detail {
    font-size: 0.6rem;
    color: var(--text-muted);
}

/* ============================================
   SMART INSIGHTS - Dynamic
   ============================================ */
.smart-insights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.smart-insight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.smart-insight:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}

.smart-insight-icon {
    font-size: 0.85rem;
    color: var(--clr-primary);
    margin-top: 1px;
    flex-shrink: 0;
}

.smart-insight-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.smart-insight-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.smart-insight-text .highlight {
    color: var(--clr-primary);
    font-weight: 600;
}

/* ============================================
   RATING ANALYTICS - Dynamic
   ============================================ */
.rating-analytics {
    margin-bottom: 32px;
}

.rating-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.rating-title {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    margin: 0;
}

.rating-title i {
    color: #FBBF24;
    font-size: 1.2rem;
}

.rating-header-right {
    display: flex;
    align-items: baseline;
    gap: 8px;
    background: var(--bg-tertiary);
    padding: 6px 20px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

.rating-total {
    font-size: 1.5rem;
    font-weight: 700;
    color: #FBBF24;
    font-family: 'Inter', monospace;
}

.rating-total-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 500;
}

.rating-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.rating-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 18px 16px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.rating-card:hover {
    border-color: var(--clr-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.rating-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.rating-card-title {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.rating-card-title i {
    color: #FBBF24;
}

.rating-card-badge {
    font-size: 0.55rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 10px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

/* ============================================
   SCORE DISTRIBUTION - Dynamic
   ============================================ */
#scoreDistributionChart {
    width: 100%;
    padding: 4px 0;
}

.score-bar-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
    padding: 3px 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.score-bar-wrapper:hover {
    background: var(--bg-hover);
    transform: translateX(4px);
}

.score-bar-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 28px;
    text-align: right;
    flex-shrink: 0;
}

.score-bar-track {
    flex: 1;
    height: 20px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.score-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-width: 4px;
}

.score-bar-fill.color-10 {
    background: linear-gradient(90deg, #8B5CF6, #A78BFA);
}

.score-bar-fill.color-9 {
    background: linear-gradient(90deg, #6366F1, #818CF8);
}

.score-bar-fill.color-8 {
    background: linear-gradient(90deg, #10B981, #34D399);
}

.score-bar-fill.color-7 {
    background: linear-gradient(90deg, #06B6D4, #22D3EE);
}

.score-bar-fill.color-6 {
    background: linear-gradient(90deg, #F59E0B, #FBBF24);
}

.score-bar-fill.color-5 {
    background: linear-gradient(90deg, #F97316, #FB923C);
}

.score-bar-fill.color-4 {
    background: linear-gradient(90deg, #EC4899, #F472B6);
}

.score-bar-fill.color-3 {
    background: linear-gradient(90deg, #EF4444, #F87171);
}

.score-bar-fill.color-2 {
    background: linear-gradient(90deg, #F43F5E, #FB7185);
}

.score-bar-fill.color-1 {
    background: linear-gradient(90deg, #64748B, #94A3B8);
}

.score-bar-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    animation: barShimmer 2s ease-in-out infinite;
    border-radius: 10px;
}

.score-bar-count {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 28px;
    text-align: right;
    flex-shrink: 0;
}

.score-bar-percent {
    font-size: 0.55rem;
    font-weight: 500;
    color: var(--text-muted);
    min-width: 38px;
    text-align: right;
    flex-shrink: 0;
}

/* ============================================
   RATING BEHAVIOR
   ============================================ */
.rating-behavior-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.behavior-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 12px 14px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.behavior-card:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    transform: translateY(-2px);
}

.behavior-value {
    font-size: 1.2rem;
    font-weight: 700;
    display: block;
    color: var(--text-primary);
    font-family: 'Inter', monospace;
}

.behavior-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.behavior-detail {
    font-size: 0.55rem;
    color: var(--text-muted);
}

/* ============================================
   RATING PERSONALITY
   ============================================ */
.rating-personality {
    margin-top: 20px;
}

.personality-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 20px 24px;
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
}

.personality-card:hover {
    border-color: var(--clr-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.personality-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    color: white;
    flex-shrink: 0;
}

.personality-content {
    flex: 1;
}

.personality-label {
    font-size: 0.6rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.personality-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.personality-description {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.personality-stats {
    display: flex;
    gap: 20px;
    flex-shrink: 0;
}

.personality-stat {
    text-align: center;
}

.personality-stat-value {
    font-size: 1rem;
    font-weight: 700;
    display: block;
    color: var(--text-primary);
    font-family: 'Inter', monospace;
}

.personality-stat-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================
   ADVANCED INSIGHTS - Dynamic
   ============================================ */
.advanced-insights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.advanced-insight {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border-radius: 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.advanced-insight:hover {
    background: var(--bg-hover);
    border-color: var(--border);
}

.advanced-insight-icon {
    font-size: 0.85rem;
    color: #FBBF24;
    margin-top: 1px;
    flex-shrink: 0;
}

.advanced-insight-text {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.advanced-insight-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.advanced-insight-text .highlight {
    color: #FBBF24;
    font-weight: 600;
}

/* ============================================
   COMPLETION JOURNEY - Dynamic
   ============================================ */
.completion-journey {
    margin-bottom: 0;
}

.journey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.journey-title {
    font-size: 1.3rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    margin: 0;
}

.journey-title i {
    color: var(--clr-primary);
    font-size: 1.2rem;
}

.journey-header-right {
    display: flex;
    align-items: center;
}

.journey-time-filters {
    display: flex;
    gap: 6px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: 30px;
    border: 1px solid var(--border);
}

.journey-filter-btn {
    padding: 4px 14px;
    border: none;
    border-radius: 30px;
    background: transparent;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.journey-filter-btn:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.journey-filter-btn.active {
    background: var(--clr-primary);
    color: white;
    box-shadow: 0 2px 12px rgba(79, 70, 229, 0.25);
}

.journey-chart-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 18px 16px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.journey-chart-card:hover {
    border-color: var(--clr-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.journey-secondary-chart {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 18px 16px;
    border: 1px solid var(--border);
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.journey-secondary-chart:hover {
    border-color: var(--clr-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.journey-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.journey-chart-title {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
}

.journey-chart-title i {
    color: var(--clr-primary);
}

.journey-chart-stats {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.journey-stat {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--clr-primary);
    font-family: 'Inter', monospace;
}

.journey-stat-label {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.journey-chart-container {
    width: 100%;
    height: 220px;
}

/* ============================================
   MILESTONES - Dynamic
   ============================================ */
.journey-milestones {
    margin-bottom: 20px;
}

.journey-milestones-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.journey-milestones-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    margin: 0;
}

.journey-milestones-title i {
    color: #FBBF24;
}

.journey-milestones-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.journey-milestones-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

.milestone-item {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
}

.milestone-item:hover {
    background: var(--bg-hover);
    transform: translateY(-2px);
}

.milestone-item.achieved {
    border-left: 3px solid var(--clr-success);
}

.milestone-item.locked {
    border-left: 3px solid var(--border);
    opacity: 0.6;
}

.milestone-icon {
    font-size: 1.2rem;
}

.milestone-content {
    flex: 1;
}

.milestone-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
}

.milestone-date {
    font-size: 0.6rem;
    color: var(--text-muted);
}

/* ============================================
   PACE INSIGHTS - Dynamic
   ============================================ */
.journey-pace {
    margin-top: 0;
}

.journey-pace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 8px;
}

.journey-pace-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    margin: 0;
}

.journey-pace-title i {
    color: var(--clr-info);
}

.journey-pace-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

#paceInsights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.pace-insight {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.pace-insight:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    transform: translateY(-2px);
}

.pace-insight-icon {
    font-size: 0.9rem;
    color: var(--clr-info);
    margin-top: 2px;
    flex-shrink: 0;
}

.pace-insight-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.pace-insight-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.pace-insight-text .highlight {
    color: var(--clr-primary);
    font-weight: 600;
}

/* ============================================
   LIGHT THEME SUPPORT
   ============================================ */
[data-theme="light"] .stats-hero {
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
}

[data-theme="light"] .metric-card,
[data-theme="light"] .analytics-card,
[data-theme="light"] .rating-card,
[data-theme="light"] .journey-chart-card,
[data-theme="light"] .journey-secondary-chart,
[data-theme="light"] .personality-card,
[data-theme="light"] .insights-panel {
    background: #FFFFFF;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .metric-card:hover,
[data-theme="light"] .analytics-card:hover,
[data-theme="light"] .rating-card:hover,
[data-theme="light"] .journey-chart-card:hover,
[data-theme="light"] .journey-secondary-chart:hover {
    border-color: var(--clr-primary);
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.08);
}

[data-theme="light"] .genre-bar-wrapper:hover,
[data-theme="light"] .format-bar-wrapper:hover,
[data-theme="light"] .score-bar-wrapper:hover,
[data-theme="light"] .insight-card:hover,
[data-theme="light"] .behavior-card:hover,
[data-theme="light"] .journey-insight-card:hover,
[data-theme="light"] .milestone-item:hover,
[data-theme="light"] .pace-insight:hover,
[data-theme="light"] .smart-insight:hover,
[data-theme="light"] .advanced-insight:hover {
    background: #F1F5F9;
}

[data-theme="light"] .journey-time-filters {
    background: #F8FAFC;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .analytics-header-right,
[data-theme="light"] .rating-header-right {
    background: #F8FAFC;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .hero-stat-card {
    background: rgba(255, 255, 255, 0.12);
}

[data-theme="light"] .hero-stat-card:hover {
    background: rgba(255, 255, 255, 0.2);
}

[data-theme="light"] .hero-insight-item {
    background: rgba(255, 255, 255, 0.08);
}

[data-theme="light"] .hero-insight-item:hover {
    background: rgba(255, 255, 255, 0.15);
}

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

    .insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .journey-insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .stats-hero-content {
        flex-direction: column;
    }

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

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

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

@media (max-width: 768px) {
    .stats-hero {
        padding: 22px 20px;
        border-radius: 16px;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-stat-card {
        padding: 10px 12px;
    }

    .hero-stat-value {
        font-size: 1.1rem;
    }

    .stats-hero-right {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

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

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

    #paceInsights {
        grid-template-columns: 1fr;
    }

    .journey-time-filters {
        flex-wrap: wrap;
    }

    .journey-filter-btn {
        font-size: 0.6rem;
        padding: 3px 10px;
    }

    .journey-chart-container {
        height: 180px;
    }

    .personality-card {
        flex-direction: column;
        text-align: center;
    }

    .personality-stats {
        width: 100%;
        justify-content: center;
    }

    .rating-behavior-grid {
        grid-template-columns: 1fr;
    }

    .journey-milestones-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .stats-hero {
        padding: 16px 14px;
        border-radius: 14px;
    }

    .hero-title {
        font-size: 1.2rem;
    }

    .hero-insights {
        flex-direction: column;
    }

    .hero-insight-item {
        width: 100%;
    }

    .stats-hero-right {
        grid-template-columns: 1fr 1fr;
        gap: 6px;
    }

    .hero-stat-card {
        padding: 8px 10px;
    }

    .hero-stat-value {
        font-size: 0.95rem;
    }

    .overview-title {
        font-size: 1.1rem;
    }

    .metric-card {
        padding: 14px 12px;
    }

    .metric-value {
        font-size: 1.2rem;
    }

    .analytics-card {
        padding: 14px 12px;
    }

    .insight-card {
        padding: 10px 12px;
    }

    .genre-bar-label {
        font-size: 0.65rem;
        min-width: 60px;
        max-width: 70px;
    }

    .format-bar-label {
        font-size: 0.65rem;
        min-width: 40px;
    }

    .genre-bar-count,
    .format-bar-count,
    .score-bar-count {
        font-size: 0.6rem;
        min-width: 24px;
    }

    .genre-bar-percent,
    .format-bar-percent,
    .score-bar-percent {
        font-size: 0.5rem;
        min-width: 34px;
    }
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    .stats-hero,
    .stats-hero::before,
    .stats-hero::after,
    .metric-card,
    .analytics-card,
    .rating-card,
    .insight-card,
    .behavior-card,
    .journey-insight-card,
    .milestone-item,
    .pace-insight,
    .personality-card,
    .genre-bar-fill::after,
    .format-bar-fill::after,
    .score-bar-fill::after {
        animation: none !important;
        transition: none !important;
    }

    .stats-hero:hover,
    .metric-card:hover,
    .analytics-card:hover,
    .rating-card:hover,
    .insight-card:hover,
    .behavior-card:hover {
        transform: none !important;
    }
}

/* ============================================
   JOURNEY INSIGHTS - Complete Styling
   ============================================ */

.journey-insights {
    margin-bottom: 24px;
}

.journey-insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.journey-insights-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    margin: 0;
}

.journey-insights-title i {
    color: #FBBF24;
    font-size: 1rem;
}

.journey-insights-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   JOURNEY INSIGHTS GRID
   ============================================ */
.journey-insights-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

/* ============================================
   JOURNEY INSIGHT CARD
   ============================================ */
.journey-insight-card {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    cursor: default;
}

.journey-insight-card:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* ============================================
   INSIGHT ICONS
   ============================================ */
.journey-insight-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.journey-insight-icon.first {
    background: rgba(245, 158, 11, 0.15);
    color: #FBBF24;
}

.journey-insight-icon.fastest {
    background: rgba(16, 185, 129, 0.15);
    color: #34D399;
}

.journey-insight-icon.active {
    background: rgba(59, 130, 246, 0.15);
    color: #60A5FA;
}

.journey-insight-icon.pace {
    background: rgba(139, 92, 246, 0.15);
    color: #A78BFA;
}

/* ============================================
   INSIGHT CONTENT
   ============================================ */
.journey-insight-content {
    flex: 1;
    min-width: 0;
}

.journey-insight-value {
    font-size: 1rem;
    font-weight: 700;
    display: block;
    color: var(--text-primary);
    line-height: 1.2;
}

.journey-insight-label {
    font-size: 0.55rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.journey-insight-detail {
    font-size: 0.55rem;
    color: var(--text-muted);
}

/* ============================================
   MILESTONES SECTION
   ============================================ */
.journey-milestones {
    margin-bottom: 24px;
}

.journey-milestones-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.journey-milestones-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    margin: 0;
}

.journey-milestones-title i {
    color: #FBBF24;
    font-size: 1rem;
}

.journey-milestones-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   MILESTONES CONTAINER
   ============================================ */
.journey-milestones-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px;
}

/* ============================================
   MILESTONE ITEM
   ============================================ */
.milestone-item {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    cursor: default;
}

.milestone-item:hover {
    background: var(--bg-hover);
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Achieved Milestone */
.milestone-item.achieved {
    border-left: 3px solid var(--clr-success);
    background: rgba(16, 185, 129, 0.04);
}

.milestone-item.achieved:hover {
    background: rgba(16, 185, 129, 0.08);
}

/* Locked Milestone */
.milestone-item.locked {
    border-left: 3px solid var(--border);
    opacity: 0.6;
}

.milestone-item.locked:hover {
    opacity: 0.8;
}

/* ============================================
   MILESTONE ICON
   ============================================ */
.milestone-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    width: 32px;
    text-align: center;
}

.milestone-item.achieved .milestone-icon {
    animation: milestonePop 0.5s ease;
}

@keyframes milestonePop {
    0% {
        transform: scale(0.8);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* ============================================
   MILESTONE CONTENT
   ============================================ */
.milestone-content {
    flex: 1;
    min-width: 0;
}

.milestone-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.milestone-item.locked .milestone-title {
    color: var(--text-muted);
}

.milestone-date {
    font-size: 0.6rem;
    color: var(--text-muted);
    display: block;
    margin-top: 2px;
}

.milestone-item.achieved .milestone-date {
    color: var(--clr-success);
}

/* ============================================
   PACE INSIGHTS
   ============================================ */
.journey-pace {
    margin-top: 0;
}

.journey-pace-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 8px;
}

.journey-pace-title {
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    margin: 0;
}

.journey-pace-title i {
    color: var(--clr-info);
    font-size: 1rem;
}

.journey-pace-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ============================================
   PACE INSIGHTS GRID
   ============================================ */
#paceInsights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* ============================================
   PACE INSIGHT ITEM
   ============================================ */
.pace-insight {
    background: var(--bg-tertiary);
    border-radius: 12px;
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: default;
}

.pace-insight:hover {
    background: var(--bg-hover);
    border-color: var(--border);
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.pace-insight-icon {
    font-size: 0.9rem;
    color: var(--clr-info);
    margin-top: 2px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.pace-insight-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.pace-insight-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.pace-insight-text .highlight {
    color: var(--clr-primary);
    font-weight: 600;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .journey-insights-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .journey-insights-grid {
        grid-template-columns: 1fr;
    }

    .journey-insight-card {
        padding: 12px 14px;
    }

    .journey-insight-value {
        font-size: 0.9rem;
    }

    .journey-milestones-container {
        grid-template-columns: 1fr 1fr;
    }

    #paceInsights {
        grid-template-columns: 1fr;
    }

    .milestone-item {
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .journey-insights-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .journey-milestones-container {
        grid-template-columns: 1fr;
    }

    .milestone-item {
        padding: 10px 12px;
    }

    .milestone-title {
        font-size: 0.7rem;
    }

    .pace-insight {
        padding: 10px 12px;
    }

    .pace-insight-text {
        font-size: 0.7rem;
    }
}

/* ============================================
   LIGHT THEME SUPPORT
   ============================================ */
[data-theme="light"] .journey-insight-card,
[data-theme="light"] .milestone-item,
[data-theme="light"] .pace-insight {
    background: #F8FAFC;
}

[data-theme="light"] .journey-insight-card:hover,
[data-theme="light"] .milestone-item:hover,
[data-theme="light"] .pace-insight:hover {
    background: #F1F5F9;
}

[data-theme="light"] .milestone-item.achieved {
    background: rgba(16, 185, 129, 0.06);
}

[data-theme="light"] .milestone-item.achieved:hover {
    background: rgba(16, 185, 129, 0.1);
}

[data-theme="light"] .milestone-item.locked {
    opacity: 0.5;
}

/* ============================================
   REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    .journey-insight-card,
    .milestone-item,
    .pace-insight,
    .milestone-item.achieved .milestone-icon {
        animation: none !important;
        transition: none !important;
    }

    .journey-insight-card:hover,
    .milestone-item:hover,
    .pace-insight:hover {
        transform: none !important;
    }
}