   .anomaly-container {
        max-width: 1600px; /* Adjusted to fit the new grid */
        margin: 0 auto;
        padding: 20px;
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    }

    .fade-in {
        opacity: 0;
        animation: fadeIn 0.8s ease-out forwards;
    }

    .slide-in-from-top {
        opacity: 0;
        transform: translateY(-30px);
        animation: slideInFromTop 0.8s ease-out forwards;
    }

    .slide-in-from-left {
        opacity: 0;
        transform: translateX(-30px);
        animation: slideInFromLeft 0.6s ease-out forwards;
    }

    .scale-in {
        opacity: 0;
        transform: scale(0.95);
        animation: scaleIn 0.6s ease-out forwards;
    }

    .stagger-in {
        opacity: 0;
        transform: translateY(20px);
        animation: staggerIn 0.5s ease-out forwards;
    }

    /* Animation keyframes */
    @keyframes fadeIn {
        from {
            opacity: 0;
        }
        to {
            opacity: 1;
        }
    }

    @keyframes slideInFromTop {
        from {
            opacity: 0;
            transform: translateY(-30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    @keyframes slideInFromLeft {
        from {
            opacity: 0;
            transform: translateX(-30px);
        }
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    @keyframes scaleIn {
        from {
            opacity: 0;
            transform: scale(0.95);
        }
        to {
            opacity: 1;
            transform: scale(1);
        }
    }

    @keyframes staggerIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Pulse animation for loading states */
    @keyframes pulse {
        0%, 100% {
            opacity: 1;
        }
        50% {
            opacity: 0.7;
        }
    }

    .pulse {
        animation: pulse 2s ease-in-out infinite;
    }

    /* Shimmer loading effect */
    .shimmer {
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: shimmer 1.5s infinite;
    }

    @keyframes shimmer {
        0% {
            background-position: -200% 0;
        }
        100% {
            background-position: 200% 0;
        }
    }

    .header-section {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        color: white;
        padding: 32px;
        border-radius: 16px;
        margin-bottom: 32px;
        box-shadow: 0 8px 32px rgba(102, 126, 234, 0.15);
        /* Initial state for animation */
        opacity: 0;
        transform: translateY(-30px);
    }

    .header-section h2 {
        margin-bottom: 8px;
        font-weight: 700;
        font-size: 28px;
        letter-spacing: -0.5px;
    }

    .header-section p {
        opacity: 0.9;
        font-size: 16px;
        margin-bottom: 24px;
    }

    .songs-table {
        background-color: white;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 24px rgba(0,0,0,0.06);
        margin-bottom: 32px;
        border: none;
        /* Initial state for animation */
        opacity: 0;
        transform: scale(0.95);
        overflow-x: auto;
    }

    .table-header {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px 24px;
    display: grid;
    /* Updated grid - give more space to each visible column */
    grid-template-columns: 100px 200px 150px 150px 80px 80px 120px 120px 120px 120px;
    gap: 16px;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 1400px;
    align-items: center;
}

    .sortable-header {
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 4px;
        user-select: none;
        transition: all 0.2s ease;
        padding: 6px 4px;
        border-radius: 6px;
        min-height: 32px;
        justify-content: flex-start;
        overflow: hidden;
        white-space: nowrap;
    }

    .sortable-header span:first-child {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1;
        min-width: 0;
    }

    .sortable-header:hover {
        background: rgba(255,255,255,0.1);
    }

    .sort-icon {
        font-size: 11px;
        opacity: 0.6;
        transition: opacity 0.2s ease;
        flex-shrink: 0;
    }

    .sortable-header.active .sort-icon {
        opacity: 1;
    }

    /* Hidden columns - keep in CSS but set display: none */
    .hidden-column {
        display: none;
    }

    .song-row {
    padding: 20px 24px;
    display: grid;
    /* Match the header grid exactly */
    grid-template-columns: 100px 200px 150px 150px 80px 80px 120px 120px 120px 120px;
    gap: 16px;
    border-bottom: 1px solid #f1f3f4;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: center;
    background: white;
    opacity: 0;
    transform: translateY(20px);
    min-width: 1400px;
}

    .song-row:hover {
        background: linear-gradient(135deg, #f8faff 0%, #f1f5ff 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    }

    .song-row.selected {
        background: linear-gradient(135deg, #e3f2fd 0%, #e8f4fd 100%);
        border-left: 4px solid #667eea;
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.15);
    }

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

    .text-cell {
        font-size: 13px;
        line-height: 1.3;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .product-name {
        font-weight: 600;
        color: #2c3e50;
    }

    .artist-name {
        color: #667eea;
        font-weight: 500;
    }

    .label-name {
        color: #666;
        font-size: 12px;
    }

    .anomaly-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 12px;
        border-radius: 20px;
        font-size: 11px;
        font-weight: 600;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        min-width: 60px;
    }

    .anomaly-today {
        background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
        color: #2d3436;
        box-shadow: 0 2px 8px rgba(253, 203, 110, 0.3);
    }

    .anomaly-recent {
        background: linear-gradient(135deg, #fd79a8 0%, #e84393 100%);
        color: white;
        box-shadow: 0 2px 8px rgba(232, 67, 147, 0.3);
    }

    .anomaly-low {
        background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
        color: white;
        box-shadow: 0 2px 8px rgba(0, 184, 148, 0.3);
    }

    .cluster-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 6px 10px;
        border-radius: 12px;
        font-size: 11px;
        font-weight: 700;
        text-align: center;
        color: white;
        min-width: 32px;
    }

    .cluster-0 {
        background: linear-gradient(135deg, #0173B2 0%, #001C55 100%);
        box-shadow: 0 2px 8px rgba(1, 115, 178, 0.25);
    }

    .cluster-1 {
        background: linear-gradient(135deg, #DE8F05 0%, #B8860B 100%);
        box-shadow: 0 2px 8px rgba(222, 143, 5, 0.25);
    }

    .song-details {
        display: none;
        margin-top: 32px;
        padding: 0;
        background: white;
        border-radius: 16px;
        box-shadow: 0 8px 40px rgba(0,0,0,0.08);
        overflow: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border: 1px solid #f1f3f4;
    }

    .song-details.show {
        display: block;
        animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .plot-container {
        width: 100%;
    }

    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-16px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    .details-header {
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
        color: white;
        padding: 24px 32px;
        font-size: 20px;
        font-weight: 600;
        letter-spacing: -0.3px;
    }

    .song-metadata {
        background: linear-gradient(135deg, #f8faff 0%, #f1f5ff 100%);
        padding: 20px 32px;
        border-bottom: 1px solid #e9ecef;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .metadata-item {
        display: flex;
        flex-direction: column;
        gap: 4px;
    }

    .metadata-label {
        font-size: 12px;
        font-weight: 600;
        color: #666;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .metadata-value {
        font-size: 16px;
        font-weight: 500;
        color: #2c3e50;
    }

    .details-content {
        padding: 32px;
    }

    .plot-section {
        margin-bottom: 40px;
    }

    .plot-section h4 {
        margin-top: 0;
        margin-bottom: 20px;
        color: #2c3e50;
        font-size: 18px;
        font-weight: 600;
        padding-bottom: 12px;
        border-bottom: 2px solid #f1f3f4;
        letter-spacing: -0.2px;
    }

    .loading {
        text-align: center;
        padding: 20px;
        color: #666;
    }

    .error {
        color: #dc3545;
        background-color: #f8d7da;
        padding: 15px;
        border-radius: 8px;
        margin: 20px 0;
    }

    .pagination {
        display: flex;
        justify-content: center;
        margin-top: 20px;
        gap: 10px;
        /* Initial state for animation */
        opacity: 0;
        transform: translateY(20px);
    }

    .page-btn {
        padding: 8px 16px;
        border: 1px solid #ddd;
        background-color: white;
        cursor: pointer;
        border-radius: 4px;
    }

    .page-btn:hover {
        background-color: #f8f9fa;
    }

    .page-btn.active {
        background-color: #2c3e50;
        color: white;
    }

    .summary-stats {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 15px;
        margin-bottom: 20px;
    }

    .stat-box {
        background-color: rgba(255, 255, 255, 0.1);
        padding: 15px;
        border-radius: 8px;
        text-align: center;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255, 255, 255, 0.2);
        /* Initial state for animation */
        opacity: 0;
        transform: translateY(20px);
    }

    .stat-value {
        font-size: 24px;
        font-weight: bold;
        color: white;
    }

    .stat-label {
        color: rgba(255, 255, 255, 0.8);
        font-size: 12px;
        margin-top: 5px;
    }

    /* Loading skeleton styles */
    .skeleton-row {
        padding: 20px 24px;
        display: grid;
        /* Match the others */
        grid-template-columns: 100px 200px 150px 150px 80px 80px 120px 120px 120px 120px;
        gap: 16px;
        border-bottom: 1px solid #f1f3f4;
        align-items: center;
        background: white;
        min-width: 1400px;
    }

    .skeleton-item {
        height: 20px;
        background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
        background-size: 200% 100%;
        animation: shimmer 1.5s infinite;
        border-radius: 4px;
    }

    .skeleton-badge {
        height: 28px;
        width: 60px;
        border-radius: 14px;
    }

    .skeleton-cluster {
        height: 24px;
        width: 32px;
        border-radius: 12px;
    }

    .skeleton-text {
        height: 18px;
        border-radius: 4px;
    }

    /* Filter Controls */
    .filter-controls {
        background: white;
        border-radius: 12px;
        padding: 20px 24px;
        margin-bottom: 24px;
        box-shadow: 0 2px 12px rgba(0,0,0,0.04);
        border: 1px solid #f1f3f4;
        display: flex;
        align-items: center;
        gap: 20px;
        flex-wrap: wrap;
        /* Initial state for animation */
        opacity: 0;
        transform: translateY(-10px);
    }

    .filter-group {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .filter-label {
        font-size: 14px;
        font-weight: 600;
        color: #2c3e50;
        letter-spacing: 0.3px;
    }

    .filter-select {
        appearance: none;
        background: linear-gradient(135deg, #f8faff 0%, #f1f5ff 100%);
        border: 2px solid #e9ecef;
        border-radius: 8px;
        padding: 10px 40px 10px 16px;
        font-size: 14px;
        font-weight: 500;
        color: #2c3e50;
        cursor: pointer;
        transition: all 0.3s ease;
        min-width: 200px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 8L2 4h8z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 12px;
    }

    .filter-select:hover {
        border-color: #667eea;
        background: linear-gradient(135deg, #ffffff 0%, #f8faff 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    }

    .filter-select:focus {
        outline: none;
        border-color: #667eea;
        background: white;
        box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    }

    .clear-filters-btn {
        background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
        color: white;
        border: none;
        border-radius: 8px;
        padding: 10px 20px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        letter-spacing: 0.3px;
        text-transform: uppercase;
        opacity: 0.7;
        transform: scale(0.95);
    }

    .clear-filters-btn:hover {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
    }

    .clear-filters-btn.hidden {
        display: none;
    }

    .weekly-streams {
        font-weight: 600;
        color: #2c3e50;
        font-size: 13px;
    }

    .results-summary {
        font-size: 13px;
        color: #666;
        font-weight: 500;
        margin-left: auto;
        padding: 8px 16px;
        background: rgba(102, 126, 234, 0.08);
        border-radius: 20px;
        border: 1px solid rgba(102, 126, 234, 0.2);
    }