/* Scoped Container Styles */
        .custom-yt-container {
            margin: 0 auto;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            box-sizing: border-box;
        }

        .custom-yt-container * {
            box-sizing: border-box;
        }

        /* Responsive Grid: 3 columns on desktop, 2 tablet, 1 mobile */
        .custom-yt-grid {
            display: grid;
            grid-template-columns: repeat(1, 1fr);
            gap: 24px;
        }

        @media (min-width: 768px) {
            .custom-yt-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (min-width: 1024px) {
            .custom-yt-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        /* Card Styles */
        .custom-yt-card {
            background-color: #ffffff;
            border-radius: 12px;
            border: 1px solid #e5e7eb;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
            transition: box-shadow 0.3s ease, transform 0.3s ease;
        }

        .custom-yt-card:hover {
            box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
            transform: translateY(-2px);
        }

        /* Media Area (Thumbnail / Video Preview) */
        .custom-yt-media {
            position: relative;
            width: 100%;
            padding-top: 56.25%; /* 16:9 Aspect Ratio */
            background-color: #000;
            display: block;
            text-decoration: none;
            overflow: hidden;
        }

        .custom-yt-video {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.4s ease;
            pointer-events: none; /* Let the link handle clicks */
        }

        .custom-yt-card:hover .custom-yt-video {
            transform: scale(1.05);
        }

        /* Play Button Overlay */
        .custom-yt-play-icon {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 50px;
            height: 50px;
            background-color: rgba(0, 0, 0, 0.6);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10;
            transition: opacity 0.3s ease, transform 0.3s ease;
        }

        .custom-yt-play-icon svg {
            width: 24px;
            height: 24px;
            fill: #ffffff;
            margin-left: 4px; /* visually center the triangle */
        }

        .custom-yt-card:hover .custom-yt-play-icon {
            opacity: 0;
            transform: translate(-50%, -50%) scale(1.2);
        }

        /* Card Content */
        .custom-yt-body {
            padding: 16px;
            display: flex;
            flex-direction: column;
            flex-grow: 1;
        }

        .custom-yt-title {
            margin: 0 0 8px 0;
            font-size: 1.125rem;
            font-weight: 600;
            color: #1f2937;
            line-height: 1.4;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .custom-yt-meta {
            margin: 0 0 16px 0;
            font-size: 0.875rem;
            color: #6b7280;
        }

        /* Button */
        .custom-yt-btn {
            margin-top: auto;
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            padding: 10px 16px;
            background-color: #006664;
            color: #ffffff;
            border: none;
            border-radius: 6px;
            font-size: 0.95rem;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s ease;
            text-decoration: none;
        }

        .custom-yt-btn:hover {
            background-color: #004746;
            color: #fff;
        }

        .custom-yt-btn svg {
            width: 16px;
            height: 16px;
            fill: currentColor;
        }

        /* Custom Modal (Replacement for alert) */
        .custom-yt-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100vw;
            height: 100vh;
            background: rgba(0, 0, 0, 0.5);
            display: none; /* Hidden by default */
            align-items: center;
            justify-content: center;
            z-index: 9999;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .custom-yt-modal-overlay.active {
            display: flex;
            opacity: 1;
        }

        .custom-yt-modal-content {
            background: white;
            padding: 24px;
            border-radius: 8px;
            width: 90%;
            max-width: 400px;
            text-align: center;
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
        }

        .custom-yt-modal-title {
            margin: 0 0 12px 0;
            font-size: 1.25rem;
            font-weight: bold;
            color: #111827;
        }

        .custom-yt-modal-close {
            margin-top: 20px;
            background: #e5e7eb;
            color: #374151;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            font-weight: 500;
        }

        .custom-yt-modal-close:hover {
            background: #d1d5db;
        }

        .custom-yt-section {
            background-color: #f4f7f9;
        }