
    .dg-preview-card {
        background: #050127;
        border-radius: 12px;
        overflow: hidden;
        cursor: pointer;
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
        transition: transform 0.3s, box-shadow 0.3s;
    }
    .dg-preview-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 30px rgba(255,28,28,0.25);
    }
    .dg-preview-graph {
        position: relative;
        overflow: hidden;
    }
    .dg-preview-scale {
        transform-origin: top left;
        pointer-events: none;
    }
    .dg-preview-gradient {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 30px;
        background: linear-gradient(to bottom, transparent, #050127);
    }
    .dg-preview-label {
        padding: 12px 15px;
        font-size: 14px;
        font-weight: 600;
        color: #FFFAF6;
        background: #090126;
        text-align: center;
    }
    

    .dg-gallery-container {
        max-width: 1400px;
        margin: 0 auto;
        padding: 20px;
        box-sizing: border-box;
    }
    
    .dg-gallery-grid {
        display: grid;
        grid-template-columns: repeat(var(--columns, 3), minmax(0, 1fr));
        gap: 20px;
    }
    
    @media (max-width: 1024px) {
        .dg-gallery-grid {
            grid-template-columns: repeat(var(--columns-tablet, 2), minmax(0, 1fr));
        }
    }
    
    @media (max-width: 767px) {
        .dg-gallery-grid {
            grid-template-columns: repeat(var(--columns-mobile, 1), minmax(0, 1fr));
            gap: 15px;
        }
        .dg-gallery-container {
            padding: 10px;
        }
    }
    
    .dg-gallery-item {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
    
    .dg-gallery-card {
        background: linear-gradient(145deg, #050127, #090126);
        border-radius: 16px;
        overflow: hidden;
        cursor: pointer;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        border: 1px solid rgba(255,255,255,0.05);
        height: 100%;
        display: flex;
        flex-direction: column;
    }
    
    .dg-gallery-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 40px rgba(255,28,28,0.2);
        border-color: rgba(255,28,28,0.3);
    }
    
    .dg-gallery-preview {
        position: relative;
        height: 180px;
        overflow: hidden;
        flex-shrink: 0;
    }
    
    .dg-gallery-scale {
        transform: scale(0.3);
        transform-origin: top left;
        width: 333.33%;
        pointer-events: none;
    }
    
    .dg-gallery-overlay {
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, transparent 50%, rgba(5,1,39,0.95));
        display: flex;
        align-items: flex-end;
        justify-content: center;
        padding-bottom: 15px;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .dg-gallery-card:hover .dg-gallery-overlay {
        opacity: 1;
    }
    
    .dg-gallery-zoom {
        background: #FF1C1C;
        color: #FFFAF6;
        padding: 8px 16px;
        border-radius: 20px;
        font-size: 13px;
        font-weight: 600;
    }
    
    .dg-gallery-title {
        padding: 15px;
        font-size: 14px;
        font-weight: 600;
        color: #FFFAF6;
        text-align: center;
        background: rgba(0,0,0,0.3);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-top: auto;
    }
    
    /* LAZY LOADING */
    .dg-lazy-placeholder {
        position: absolute;
        inset: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #FFFAF6;
        font-size: 12px;
        gap: 10px;
    }

    .dg-lazy-spinner {
        width: 30px;
        height: 30px;
        border: 3px solid rgba(255,255,255,0.1);
        border-top-color: #FF1C1C;
        border-radius: 50%;
        animation: dgSpin 0.8s linear infinite;
    }

    @keyframes dgSpin {
        to { transform: rotate(360deg); }
    }
    
    .dg-loaded .dg-lazy-placeholder {
        display: none;
    }
    
    /* ПАГІНАЦІЯ */
    .dg-pagination {
        margin-top: 40px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .dg-pagination-info {
    color: #090126;
    font-size: 14px;
    opacity: 1;
    }
    
    .dg-pagination-links {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .dg-page-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 5px;
        min-width: 40px;
        height: 40px;
        padding: 0 12px;
        background: #FFFAF6;
        color: #090126;
        text-decoration: none;
        border-radius: 10px;
        font-weight: 600;
        font-size: 14px;
        transition: all 0.2s ease;
    }
    
    .dg-page-link:hover {
        background: #FF1C1C;
        color: #FFFAF6 !important;
        transform: translateY(-2px);
    }
    
    .dg-page-link.dg-page-current {
        background: #FF1C1C;
        color: #FFFAF6;
        pointer-events: none;
    }
    
    .dg-page-dots {
        color: #090126;
        padding: 0 5px;
    }
    
    .dg-page-prev, .dg-page-next {
        padding: 0 16px;
    }
    
    /* Кнопка "Вся Інфографіка" */
    .dg-page-all {
        background: #090126 !important;
        color: #FFFAF6 !important;
        padding: 0 20px;
        margin-left: 10px;
        border: 2px solid #FFFAF6;
        white-space: nowrap;
    }
    
    .dg-page-all:hover {
        background: #050127 !important;
        color: #FFFAF6 !important;
        border-color: #FF1C1C;
        transform: translateY(-2px);
    }
    
    @media (max-width: 767px) {
        .dg-pagination-links {
            gap: 5px;
        }
        .dg-page-link {
            min-width: 36px;
            height: 36px;
            padding: 0 10px;
            font-size: 13px;
        }
        .dg-page-all {
            margin-left: 5px;
            padding: 0 12px;
            font-size: 12px;
        }
    }
    
    @media (max-width: 480px) {
        .dg-pagination-links {
            gap: 4px;
        }
        .dg-page-link {
            min-width: 32px;
            height: 32px;
            padding: 0 8px;
            font-size: 12px;
            border-radius: 8px;
        }
        .dg-page-all {
            margin-left: 3px;
            padding: 0 10px;
            font-size: 11px;
            height: 32px;
        }
        .dg-page-prev, .dg-page-next {
            padding: 0 10px;
        }
        .dg-page-prev svg, .dg-page-next svg {
            width: 14px;
            height: 14px;
        }
    }
    
    /* МОДАЛЬНІ ВІКНА */
    .dg-modal {
        display: none;
        position: fixed;
        inset: 0;
        z-index: 99999;
        overflow-y: auto;
    }
    
    .dg-modal.dg-active {
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 20px;
    }
    
    .dg-modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(5,1,39,0.95);
        backdrop-filter: blur(5px);
    }
    
    .dg-modal-container {
        position: relative;
        background: linear-gradient(145deg, #050127, #090126);
        border-radius: 20px;
        max-width: 1200px;
        width: 100%;
        margin: 20px auto;
        box-shadow: 0 25px 80px rgba(0,0,0,0.5);
        border: 1px solid rgba(255,255,255,0.1);
        animation: dgModalIn 0.3s ease;
    }
    
    @keyframes dgModalIn {
        from { opacity: 0; transform: scale(0.95) translateY(-20px); }
        to { opacity: 1; transform: scale(1) translateY(0); }
    }
    
    .dg-modal-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 20px 25px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .dg-modal-title {
        margin: 0 !important;
        font-size: 18px !important;
        font-weight: 600 !important;
        color: #FFFAF6 !important;
        text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    }
    
    .dg-modal-actions {
        display: flex;
        gap: 10px;
    }
    
    .dg-modal-share,
    .dg-modal-close {
        background: #FFFAF6;
        border: none;
        color: #090126;
        width: 48px;
        height: 48px;
        border-radius: 12px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
    }
    
    .dg-modal-share svg,
    .dg-modal-close svg {
        width: 28px;
        height: 28px;
    }
    
    .dg-modal-share:hover {
        background: #FFF2E3;
        transform: scale(1.05);
    }
    
    .dg-modal-close:hover {
        background: #FF1C1C;
        color: #FFFAF6;
        transform: scale(1.05);
    }
    
    .dg-modal-share.dg-copied {
        background: #22c55e;
        color: #FFFAF6;
    }
    
    .dg-modal-content {
        padding: 25px;
        max-height: 70vh;
        overflow-y: auto;
        overflow-x: auto;
    }
    
    .dg-modal-content > * {
        max-width: 100%;
    }
    
    .dg-modal-content .main-chart,
    .dg-modal-content > div {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .dg-modal-content::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    .dg-modal-content::-webkit-scrollbar-track {
        background: rgba(255,255,255,0.05);
        border-radius: 4px;
    }
    
    .dg-modal-content::-webkit-scrollbar-thumb {
        background: #FF1C1C;
        border-radius: 4px;
    }
    
    .dg-modal-nav {
        display: flex;
        justify-content: space-between;
        padding: 15px 25px;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .dg-modal-prev,
    .dg-modal-next,
    .dg-modal-link {
        background: #FFFAF6;
        border: none;
        color: #090126;
        padding: 10px 20px;
        border-radius: 10px;
        cursor: pointer;
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.2s ease;
        text-decoration: none;
    }
    
    .dg-modal-prev svg,
    .dg-modal-next svg,
    .dg-modal-link svg {
        width: 20px;
        height: 20px;
    }
    
    .dg-modal-prev:hover,
    .dg-modal-next:hover,
    .dg-modal-link:hover {
        background: #FF1C1C;
        color: #FFFAF6;
    }
    
    /* МОБІЛЬНА ВЕРСІЯ */
    @media (max-width: 767px) {
        .dg-modal.dg-active {
            padding: 5px;
        }
        
        .dg-modal-container {
            margin: 5px auto;
            border-radius: 12px;
            max-width: calc(100vw - 10px);
        }
        
        .dg-modal-header {
            padding: 12px 15px;
            flex-wrap: wrap;
            gap: 10px;
        }
        
        .dg-modal-title {
            font-size: 13px !important;
            flex: 1;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            color: #FFFAF6 !important;
        }
        
        .dg-modal-share,
        .dg-modal-close {
            width: 44px;
            height: 44px;
        }
        
        .dg-modal-share svg,
        .dg-modal-close svg {
            width: 24px;
            height: 24px;
        }
        
        .dg-modal-content {
            padding: 10px;
            max-height: 65vh;
        }
        
        .dg-modal-content table {
            font-size: 12px;
        }
        
        .dg-modal-content table td,
        .dg-modal-content table th {
            padding: 6px 8px !important;
            white-space: nowrap;
        }
        
        .dg-modal-content h2 {
            font-size: 16px !important;
        }
        
        .dg-modal-nav {
            padding: 10px 15px;
        }
        
        .dg-modal-prev,
        .dg-modal-next,
        .dg-modal-link {
            padding: 8px 12px;
            font-size: 12px;
        }
    }
    
    @media (max-width: 480px) {
        .dg-modal.dg-active {
            padding: 0;
        }
        
        .dg-modal-container {
            margin: 0;
            border-radius: 0;
            max-width: 100vw;
            min-height: 100vh;
        }
        
        .dg-modal-header {
            padding: 10px 12px;
            position: sticky;
            top: 0;
            background: linear-gradient(145deg, #050127, #090126);
            z-index: 10;
        }
        
        .dg-modal-title {
            font-size: 12px !important;
            color: #FFFAF6 !important;
        }
        
        .dg-modal-share,
        .dg-modal-close {
            width: 40px;
            height: 40px;
        }
        
        .dg-modal-share svg,
        .dg-modal-close svg {
            width: 22px;
            height: 22px;
        }
        
        .dg-modal-content {
            padding: 8px;
            max-height: calc(100vh - 130px);
        }
        
        .dg-modal-content table {
            font-size: 11px;
        }
        
        .dg-modal-content table td,
        .dg-modal-content table th {
            padding: 4px 6px !important;
        }
        
        .dg-modal-nav {
            position: sticky;
            bottom: 0;
            background: linear-gradient(145deg, #050127, #090126);
            padding: 8px 12px;
        }
        
        .dg-modal-prev,
        .dg-modal-next,
        .dg-modal-link {
            padding: 6px 10px;
            font-size: 11px;
        }
        
        .dg-modal-prev svg,
        .dg-modal-next svg,
        .dg-modal-link svg {
            width: 16px;
            height: 16px;
        }
    }
    
    body.dg-modal-open {
        overflow: hidden;
    }
    
.dg-gallery-card:focus-visible,
.dg-page-link:focus-visible,
.dg-modal button:focus-visible,
.dg-modal a:focus-visible {
    outline: 3px solid #FF1C1C;
    outline-offset: 2px;
}

.dg-modal-content > .dg-modal-chart-host { max-width: 100%; }

@media (prefers-reduced-motion: reduce) {
    .dg-gallery-card, .dg-gallery-item, .dg-modal-container, .dg-page-link { transition: none; animation: none; }
}
