/* ===================================
   ADVANCED VIDEO GALLERY STYLES
   =================================== */

.video-gallery-section {
    padding: 4rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    position: relative;
}

.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 1rem;
}

.gallery-title .highlight {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Category Filter Pills */
.category-filter-container {
    position: relative;
    margin-bottom: 3rem;
}

.category-pills {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 1rem;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    user-select: none;
}

.category-pill:hover {
    border-color: #fbbf24;
    color: #111;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

.category-pill.active {
    background: #111;
    border-color: #111;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.category-pill .icon {
    font-size: 1.1rem;
}

/* Gallery Controls */
.gallery-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 0 2rem;
}

.audio-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #6b7280;
}

.audio-toggle:hover {
    border-color: #fbbf24;
    color: #111;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

.audio-toggle .icon {
    font-size: 1.25rem;
    transition: transform 0.3s ease;
}

.audio-toggle.muted .icon {
    transform: scale(0.9);
    opacity: 0.5;
}

.nav-arrows {
    display: flex;
    gap: 0.75rem;
}

.nav-arrow {
    width: 50px;
    height: 50px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-arrow:hover:not(:disabled) {
    border-color: #fbbf24;
    background: #fbbf24;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.3);
}

.nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.nav-arrow svg {
    width: 24px;
    height: 24px;
}

/* Video Gallery Carousel */
.video-carousel-wrapper {
    position: relative;
    overflow: hidden;
}

.video-carousel {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 1rem 2rem 2rem;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.video-carousel::-webkit-scrollbar {
    display: none;
}

/* Video Card */
.video-card {
    flex: 0 0 auto;
    width: 320px;
    scroll-snap-align: start;
    opacity: 0;
    animation: fadeInCard 0.5s ease forwards;
}

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.video-card-inner {
    position: relative;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
    aspect-ratio: 9/16;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.video-card-inner:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.video-element {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video Overlay */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.3) 0%,
            transparent 30%,
            transparent 70%,
            rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-card-inner:hover .video-overlay {
    opacity: 1;
}

/* Category Badge */
.video-category-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #111;
    text-transform: capitalize;
    z-index: 2;
}

/* Play Button */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border: 3px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
}

.play-button:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button.playing {
    opacity: 0;
    pointer-events: none;
}

.play-button svg {
    width: 30px;
    height: 30px;
    fill: white;
    margin-left: 3px;
}

/* Video Info Footer */
.video-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
}

.creator-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.creator-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.creator-details {
    color: white;
}

.creator-name {
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.video-stats {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    opacity: 0.9;
}

.video-stats .star {
    color: #fbbf24;
}

.video-meta {
    text-align: right;
    color: white;
    font-size: 0.75rem;
}

.video-views {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.video-duration {
    opacity: 0.9;
}

/* Loading State */
.gallery-loading {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
    font-size: 1.1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #fbbf24;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.gallery-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #6b7280;
}

.gallery-empty .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .gallery-title {
        font-size: 1.8rem;
    }

    .category-pills {
        overflow-x: auto;
        justify-content: flex-start;
        flex-wrap: nowrap;
        padding: 0 1rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .category-pills::-webkit-scrollbar {
        display: none;
    }

    .category-pill {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
    }

    .gallery-controls {
        flex-direction: column;
        gap: 1rem;
        padding: 0 1rem;
    }

    .video-carousel {
        padding: 1rem 1rem 2rem;
    }

    .video-card {
        width: 280px;
    }

    .nav-arrows {
        display: none;
        /* Hide on mobile, swipe instead */
    }
}

@media (max-width: 480px) {
    .video-card {
        width: 75vw;
        max-width: 300px;
    }
}