/* =============================
   DATA DASHBOARD
============================= */


.kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px,1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.kpi-card {
    background: linear-gradient(145deg,#ffffff,#f5f7fa);
    border-radius: 14px;
    padding: 25px;
    text-align: center;
    border: 1px solid #f2f2f2;
}

.kpi-label {
    font-size: 0.85rem;
    color: #777;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: #666;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px,1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.chart-card {
    background: #fff;
    padding: 20px;
    border-radius: 14px;
    border: 1px solid #f2f2f2;
}

.top-albums-section h4 {
    margin-bottom: 20px;
}

.album-row {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.album-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
}

.album-rank {
    font-weight: 700;
    font-size: 1.2rem;
    color: #2B988F;
    width: 25px;
}

.album-title {
    font-weight: 600;
}

.album-meta {
    font-size: 0.8rem;
    color: #777;
}


/* =============================
   TOP ALBUMS � LEADERBOARD STYLE
============================= */

.top-album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.top-album-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px;
    border-radius: 16px;
    background: linear-gradient(145deg, #ffffff, #f8fafc);
    transition: all 0.25s ease;
    border: 1px solid rgba(43,152,143,0.25);
}

    .top-album-card:hover {
        box-shadow: 0 .25rem .5rem rgba(0,0,0,.08);
    }

.rank-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    background: #2B988F;
    color: #fff;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 6px 10px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

.top-album-cover {
    width: 80px;
    height: 80px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.top-album-content {
    flex: 1;
    text-align: left;
}

.top-album-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 6px;
    color: #222;
}

.top-album-rating {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rating-pill {
    background: rgba(43,152,143,0.12);
    color: #2B988F;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.review-count {
    font-size: 0.8rem;
    color: #777;
}

/* =============================
   ENHANCED ANALYTICS STYLING
============================= */

.top-three {
    border: 2px solid rgba(43,152,143,0.25);
    background: linear-gradient(145deg, #ffffff, #eef8f6);
}

.rating-high {
    background: #2B988F;
    color: #fff;
}

.rating-low {
    background: #d9534f;
    color: #fff;
}

.stars {
    display: flex;
    gap: 1px;
    flex-wrap: nowrap;
    overflow: hidden;
    max-width: 140px;
}

    .stars .material-icons {
        font-size: 12px !important;
        line-height: 1;
    }

.star {
    color: gold;
}

.star-empty {
    color: #ddd;
}

.album-metrics {
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
    display: flex;
    gap: 10px;
}

.insight-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px,1fr));
    gap: 20px;
    margin-top: 40px;
}

.insight-card {
    background: linear-gradient(145deg,#ffffff,#f5f7fa);
    padding: 20px;
    border-radius: 14px;
    transition: all 0.25s ease;
    border: 1px solid #f2f2f2;
}

    .insight-card:hover {
        box-shadow: 0 .25rem .5rem rgba(0,0,0,.08);
    }

.insight-title {
    font-size: 0.8rem;
    color: #888;
    margin-bottom: 6px;
}

.insight-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2B988F;
}

.insight-sub {
    font-size: 0.8rem;
    color: #666;
}

.user-rating-line {
    font-size: 0.8rem;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .user-rating-line .label {
        font-weight: 600;
        color: #666;
    }

    .user-rating-line .value {
        font-weight: 700;
    }

    .user-rating-line .delta {
        font-size: 0.75rem;
        font-weight: 600;
    }

.above-avg .delta {
    color: #2B988F;
}

.below-avg .delta {
    color: #d9534f;
}

.equal-avg .delta {
    color: #888;
}

.no-rating {
    color: #aaa;
    font-style: italic;
}

/* ===== Advanced Rating Analytics ===== */

.difference-bar {
    height: 6px;
    background: #eee;
    border-radius: 6px;
    margin-top: 6px;
    overflow: hidden;
}

.difference-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 0.4s ease;
}

.badge-analytic {
    margin-top: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    display: inline-block;
}

    .badge-analytic.highest {
        background: #2B988F;
        color: #fff;
    }

    .badge-analytic.lowest {
        background: #d9534f;
        color: #fff;
    }

/* =============================
   PERSONALITY GRID
============================= */

.personality-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
    gap: 18px;
}

.personality-card {
    background: #fff;
    padding: 18px;
    border-radius: 14px;
    transition: 0.25s ease;
    border: 1px solid #f2f2f2;
}

    .personality-card:hover {
        box-shadow: 0 .25rem .5rem rgba(0,0,0,.08);
    }

.personality-name {
    font-weight: 600;
}

.personality-type {
    font-size: 0.85rem;
    margin-top: 4px;
    color: #2B988F;
    font-weight: 600;
}

.personality-avg {
    font-size: 0.8rem;
    color: #777;
    margin-top: 4px;
}

/* =============================
   INSIGHT CARD ENHANCEMENTS
============================= */

.insight-card {
    display: flex;
    gap: 14px;
    align-items: center;
}

.insight-thumb {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    object-fit: cover;
}

.insight-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.insight-body {
    flex: 1;
}

.insight-bar {
    height: 6px;
    background: #eee;
    border-radius: 6px;
    margin: 6px 0;
    overflow: hidden;
}

.insight-fill {
    height: 100%;
    background: #2B988F;
    transition: width 0.4s ease;
}

    .insight-fill.low {
        background: #999;
    }

    .insight-fill.harsh {
        background: #d9534f;
    }

    .insight-fill.generous {
        background: #2B988F;
    }

.chart-card-full {
    width: 100%;
}

    .chart-card-full canvas {
        width: 100% !important;
        height: 420px !important;
    }

#albumTabBottom.active-tab {
    background: #fff0f0;
    border-color: #d9534f;
    color: #aa4947;
    box-shadow: 0 6px 16px rgba(217,83,79,.10);
}


/* =============================
   BOTTOM 10 � DECLINE STYLING
============================= */

.bottom-album-card {
    background: linear-gradient(145deg, #fff6f6, #fff);
    border: 1px solid #f2f2f2;
}

    .bottom-album-card .rank-badge {
        background: #d9534f;
    }



    .bottom-album-card .top-album-cover {
        filter: saturate(0.9) brightness(0.95);
    }

    .bottom-album-card:hover {
        box-shadow: 0 .25rem .5rem rgba(0,0,0,.08);
    }

    .bottom-album-card .top-album-title {
        color: #444;
    }

    .bottom-album-card .review-count {
        color: #999;
    }

    .bottom-album-card a {
        color: #aa4947;
    }

/* =============================
   ALBUM TAB ICON ENHANCEMENTS
============================= */

.album-tab {
    position: relative;
    transition: color 0.25s ease;
}

.album-tab-icon {
    font-size: 18px;
    transition: transform 0.25s ease, opacity 0.25s ease;
    opacity: 0.75;
}

/* Hover effect */
.album-tab:hover .album-tab-icon {
    transform: translateY(-2px) scale(1.08);
    opacity: 1;
}

/* Active state */
.album-tab.active-tab .album-tab-icon {
    opacity: 1;
}

/* Specific color accents */
#albumTabTop.active-tab .album-tab-icon {
    color: #2B988F;
}

#albumTabBottom.active-tab .album-tab-icon {
    color: #d9534f;
}

/* Subtle hover tint */
#albumTabTop:hover {
    color: #2B988F;
}

#albumTabBottom:hover {
    color: #d9534f;
}

.top-albums-header {
    min-height: 48px;
}

.top-albums-subtitle {
    line-height: 1;
    display: flex;
    align-items: center;
}
