.ugc-videos-section {
    padding: 60px 0;
    overflow: hidden;
}

.ugc-videos-header {
    text-align: center;
    margin-bottom: 20px;
}

.ugc-videos-header .section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #111;
}

.ugc-videos-header .section-subtitle {
    font-size: 16px;
    color: #666;
    margin: 0;
}

.ugc-videos-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.ugc-video-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 9 / 16;
    border: 1px solid #000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    transform: translateZ(0); /* Hardware acceleration */
    width: 100%;
    max-width: 320px;
}

.ugc-video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.video-play-icon svg {
    margin-left: 4px; /* center the play triangle optically */
}

.ugc-video-item.is-playing .video-play-icon {
    opacity: 0;
}

.video-mute-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: all 0.3s ease;
}
.video-mute-icon:hover {
    background: rgba(0,0,0,0.8);
    transform: scale(1.1);
}
.video-mute-icon .icon-muted { display: none; }
.video-mute-icon .icon-unmuted { display: block; }
.video-mute-icon.muted .icon-muted { display: block; }
.video-mute-icon.muted .icon-unmuted { display: none; }
@media (max-width: 767px) {
    .ugc-videos-section {
        padding: 40px 0;
    }
    
    .ugc-videos-header .section-title {
        font-size: 16px;
    }
    
    .ugc-videos-header .section-subtitle {
        font-size: 13px;
        margin-top: 5px;
    }

    /* Rigid 2 in a row, rest as carousel via horizontal scroll */
    .ugc-videos-grid {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 15px;
        padding-bottom: 15px; /* for scrollbar */
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 15px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        justify-content: flex-start;
    }
    
    .ugc-videos-grid::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }

    .ugc-video-item {
        /* Make sure exactly 2 videos fit in the viewport minus gap padding */
        /* 50vw - 15px outer gap - 7.5px half gap = roughly 46vw */
        flex: 0 0 calc(50% - 7.5px);
        scroll-snap-align: start;
        border-radius: 8px;
        max-width: none;
    }
    
    .ugc-video-player {
        border-radius: 8px;
    }
}
