        .card-chart-container {
    background: var(--card-bg, #ffffff);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.card-chart-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
    color: var(--text-color, #333);
}

.chart-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    margin-bottom: 20px;
}

.card-images-row {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.card-image-item {
    position: relative;
    transition: transform 0.3s ease;
}

.card-image-item:hover {
    transform: translateY(-5px);
}

.card-image-item img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: block;
}

.card-image-item-large img {
    width: 150px;
    height: auto;
}

.card-image-item-small img {
    width: 100px;
    height: auto;
}

.card-image-label {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ============================================================================
   TABLET STYLES (768px and below)
   ============================================================================ */
@media screen and (max-width: 768px) {
    .card-chart-container {
        padding: 15px;
        margin-bottom: 20px;
    }

    .card-chart-title {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .chart-wrapper {
        height: 350px;
    }

    .card-images-row {
        gap: 12px;
    }

    .card-image-item-large img {
        width: 130px;
    }

    .card-image-item-small img {
        width: 85px;
    }
}

/* ============================================================================
   MOBILE STYLES (600px and below)
   ============================================================================ */
@media screen and (max-width: 600px) {
    .card-chart-container {
        padding: 12px;
        margin-bottom: 15px;
        border-radius: 8px;
    }

    .card-chart-title {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    /* Shorter charts on mobile for better scrolling */
    .chart-wrapper {
        height: 280px;
        margin-bottom: 15px;
    }

    /* Stack card images in 2 columns on mobile */
    .card-images-row {
        gap: 10px;
        justify-content: space-around;
    }

    .card-image-item {
        flex: 0 0 45%; /* 2 columns with spacing */
        max-width: 45%;
    }

    .card-image-item-large img,
    .card-image-item-small img {
        width: 100%;
        height: auto;
    }

    .card-image-label {
        font-size: 0.75rem;
        padding: 3px 6px;
    }

    /* Make chart text smaller on mobile */
    .chart-wrapper canvas {
        font-size: 10px !important;
    }
}

/* ============================================================================
   SMALL MOBILE STYLES (400px and below)
   ============================================================================ */
@media screen and (max-width: 400px) {
    .card-chart-container {
        padding: 10px;
        margin-bottom: 12px;
    }

    .card-chart-title {
        font-size: 1rem;
    }

    .chart-wrapper {
        height: 240px;
    }

    /* Stack all images in single column on very small screens */
    .card-images-row {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .card-image-item {
        flex: 0 0 auto;
        max-width: 200px;
        width: 100%;
    }

    .card-image-item-large img,
    .card-image-item-small img {
        width: 100%;
    }
}

/* ============================================================================
   TOUCH-FRIENDLY IMPROVEMENTS
   ============================================================================ */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets on touch devices */
    .card-image-item {
        padding: 5px;
    }

    /* Remove hover effects on touch devices */
    .card-image-item:hover {
        transform: none;
    }

    /* Add tap feedback instead */
    .card-image-item:active {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* ============================================================================
   DARK MODE SUPPORT
   ============================================================================ */
.dark-mode .card-chart-container {
    background: var(--dark-card-bg, #2a2a2a);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.dark-mode .card-chart-title {
    color: var(--dark-text-color, #e0e0e0);
}

.dark-mode .card-image-item img {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

/* ============================================================================
   HORIZONTAL SCROLL OPTION (Alternative for very wide charts)
   ============================================================================ */
.chart-scroll-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

@media screen and (max-width: 600px) {
    .chart-scroll-container {
        margin: 0 -12px;
        padding: 0 12px;
    }
}