/* CSS for the video gallery */
       .youtube-gallery-container {
           max-width: 1200px;
           margin: 0 auto;
           padding: 20px;
       }

       .gallery-header {
           text-align: center;
           margin-bottom: 40px;
       }

       .gallery-header h1 {
           font-size: 2.5em;
           margin-bottom: 10px;
           color: #333;
       }

       .gallery-header p {
           font-size: 1.2em;
           color: #666;
       }

       .filter-buttons {
           text-align: center;
           margin-bottom: 30px;
       }

       .filter-btn {
           background: #f0f0f0;
           border: none;
           padding: 10px 20px;
           margin: 5px;
           cursor: pointer;
           border-radius: 25px;
           transition: all 0.3s;
           font-size: 14px;
       }

       .filter-btn:hover, .filter-btn.active {
           background: #0048ff;
           color: white;
       }

       .video-grid {
           display: grid;
           grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
           gap: 25px;
           margin-bottom: 40px;
       }

       .video-item {
           background: #fff;
           border-radius: 8px;
           overflow: hidden;
           box-shadow: 0 2px 10px rgba(0,0,0,0.1);
           transition: transform 0.3s, box-shadow 0.3s;
           cursor: pointer;
       }

       .video-item:hover {
           transform: translateY(-5px);
           box-shadow: 0 5px 20px rgba(0,0,0,0.15);
       }

       .video-thumbnail {
           position: relative;
           padding-bottom: 56.25%;
           overflow: hidden;
           background: #000;
       }

       .video-thumbnail img {
           position: absolute;
           top: 0;
           left: 0;
           width: 100%;
           height: 100%;
           object-fit: cover;
       }

       .play-button {
           position: absolute;
           top: 50%;
           left: 50%;
           transform: translate(-50%, -50%);
           width: 68px;
           height: 48px;
           background: rgba(255, 0, 0, 0.8);
           border-radius: 8px;
           display: flex;
           align-items: center;
           justify-content: center;
           transition: background 0.3s;
       }

       .video-item:hover .play-button {
           background: rgba(255, 0, 0, 1);
       }

       .play-button::after {
           content: '';
           width: 0;
           height: 0;
           border-left: 20px solid white;
           border-top: 12px solid transparent;
           border-bottom: 12px solid transparent;
           margin-left: 5px;
       }

       .video-duration {
           position: absolute;
           bottom: 8px;
           right: 8px;
           background: rgba(0, 0, 0, 0.8);
           color: white;
           padding: 2px 6px;
           border-radius: 4px;
           font-size: 12px;
           font-weight: 500;
       }

       .video-info {
           padding: 15px;
       }

       .video-title {
           font-size: 16px;
           font-weight: 600;
           margin-bottom: 8px;
           color: #333;
           display: -webkit-box;
           -webkit-line-clamp: 2;
           -webkit-box-orient: vertical;
           overflow: hidden;
           line-height: 1.4;
       }

       .video-meta {
           font-size: 13px;
           color: #666;
           display: flex;
           justify-content: space-between;
           align-items: center;
       }

       .video-views {
           display: flex;
           align-items: center;
           gap: 5px;
       }

       .load-more-btn {
           display: block;
           margin: 0 auto;
           padding: 12px 30px;
           background: #007cba;
           color: white;
           border: none;
           border-radius: 5px;
           font-size: 16px;
           cursor: pointer;
           transition: background 0.3s;
       }

       .load-more-btn:hover {
           background: #005a87;
       }

       .load-more-btn:disabled {
           background: #ccc;
           cursor: not-allowed;
       }

       .loading-spinner {
           text-align: center;
           padding: 20px;
           display: none;
       }

       .loading-spinner.active {
           display: block;
       }

       /* Modal for video playback */
       .video-modal {
           display: none;
           position: fixed;
           top: 0;
           left: 0;
           width: 100%;
           height: 100%;
           background: rgba(0, 0, 0, 0.9);
           z-index: 9999;
           padding: 20px;
       }

       .video-modal.active {
           display: flex;
           align-items: center;
           justify-content: center;
       }

       .modal-content {
           position: relative;
           max-width: 900px;
           width: 100%;
       }

       .modal-video-wrapper {
           position: relative;
           padding-bottom: 56.25%;
           height: 0;
       }

       .modal-video-wrapper iframe {
           position: absolute;
           top: 0;
           left: 0;
           width: 100%;
           height: 100%;
       }

       .modal-close {
           position: absolute;
           top: -40px;
           right: 0;
           color: white;
           font-size: 30px;
           cursor: pointer;
           background: none;
           border: none;
           padding: 5px;
       }

       .error-message {
           text-align: center;
           padding: 40px;
           color: #666;
           display: none;
       }

       .error-message.active {
           display: block;
       }

       /* Playlist Categories Styles */
.playlist-categories {
    margin-bottom: 40px;
}

.category-section {
    margin-bottom: 50px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.category-section.hidden {
    display: none;
}

.category-title {
    font-size: 2em;
    color: #333;
    margin-bottom: 25px;
    text-align: center;
    text-transform: capitalize;
    position: relative;
}

.category-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #ff0000, #cc0000);
    border-radius: 2px;
}

.playlist-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.playlist-title {
    font-size: 1.5em;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.playlist-videos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.playlist-video-item {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.playlist-video-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.playlist-video-item .video-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
    background: #000;
}

.playlist-video-item .video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.playlist-video-item .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 35px;
    background: rgba(255, 0, 0, 0.8);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.playlist-video-item:hover .play-button {
    background: rgba(255, 0, 0, 1);
}

.playlist-video-item .play-button::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 15px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    margin-left: 3px;
}

.playlist-video-item .video-duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

.playlist-video-item .video-info {
    padding: 12px;
}

.playlist-video-item .video-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.playlist-video-item .video-meta {
    font-size: 12px;
    color: #666;
}

.view-all-btn {
    background: linear-gradient(135deg, #ff0000, #cc0000);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.3);
}

.view-all-btn:hover {
    background: linear-gradient(135deg, #cc0000, #990000);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
}

/* Responsive Design for Playlists */
@media (max-width: 768px) {
    .category-title {
        font-size: 1.5em;
    }

    .playlist-title {
        font-size: 1.2em;
    }

    .playlist-videos {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .playlist-section {
        padding: 15px;
    }

    .category-section {
        padding: 15px;
    }
}
