/* video-gallery.css */
.vg-gallery-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 24px;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

.vg-gallery-header {
    margin-bottom: 32px;
}

.vg-gallery-header h1 {
    font-size: 1.9rem;
    font-weight: 600;
    background: linear-gradient(135deg, #1e3c72, #2a5298);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    letter-spacing: -0.3px;
    margin: 0 0 8px 0;
}

.vg-gallery-header p {
    color: #475569;
    margin-top: 8px;
    font-size: 1rem;
}

.vg-video-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    justify-content: flex-start;
}

.vg-video-card {
    flex: 1 1 calc(25% - 28px);
    min-width: 220px;
    background: #F9F9F9;
    overflow: hidden;
    cursor: pointer;
}

.vg-card-preview {
    position: relative;
    background-color: #0f172a;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.vg-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.vg-video-card:hover .vg-card-preview img {
    transform: scale(1.02);
}

.vg-play-badge {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    pointer-events: none;
}

.vg-play-badge svg {
    width: 14px;
    height: 14px;
    fill: white;
}

.vg-card-title {
    padding: 16px 14px 18px;
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
    color: #0f172a;
    border-top: 1px solid #eef2ff;
}

.vg-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    visibility: hidden;
    opacity: 0;
    transition: visibility 0.25s, opacity 0.25s ease;
}

.vg-modal-overlay.vg-active {
    visibility: visible;
    opacity: 1;
}

.vg-modal-container {
    width: 90%;
    max-width: 1100px;
    background: #000000;
    overflow: hidden;
    position: relative;
    transform: scale(0.96);
    transition: transform 0.2s ease;
}

.vg-modal-overlay.vg-active .vg-modal-container {
    transform: scale(1);
}

.vg-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    border: none;
    color: white;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 1010;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    font-weight: 300;
}

.vg-modal-close:hover {
    background: #dc2626;
    transform: scale(1.02);
}

.vg-video-player-wrapper {
    width: 100%;
    background: #000;
    line-height: 0;
}

#vg-modal-video {
    width: 100%;
    height: auto;
    max-height: 85vh;
    object-fit: contain;
    background: #000;
    display: block;
}

.vg-modal-info {
    background: rgba(0, 0, 0, 0.8);
    padding: 14px 20px;
    color: #f1f5f9;
    font-weight: 500;
    font-size: 1rem;
    border-top: 1px solid #334155;
}

@media (max-width: 1024px) {
    .vg-gallery-container {
        padding: 30px 20px;
    }
    .vg-video-card {
        flex: 1 1 calc(50% - 28px);
    }
}

@media (max-width: 640px) {
    .vg-video-card {
        flex: 1 1 100%;
    }
    .vg-gallery-header h1 {
        font-size: 1.6rem;
    }
    .vg-modal-container {
        width: 95%;
    }
    .vg-modal-close {
        top: 12px;
        right: 12px;
        width: 38px;
        height: 38px;
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .vg-card-title {
        font-size: 0.9rem;
        padding: 12px 12px 14px;
    }
}

.vg-video-card:active {
    transform: scale(0.98);
}