    * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            font-size: 18px;
            line-height: 1.5;
            color: #333;
            background: #f5f5f5;
        }

        .container {
            display: flex;
            min-height: 100vh;
        }

        /* ── Left Sidebar ── */
        .sidebar {
            width: 500px;
            background: #2c3e50;
            color: white;
            padding: 20px;
            position: fixed;
            height: 100vh;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: #4a6278 #2c3e50;
        }

        .sidebar::-webkit-scrollbar { width: 6px; }
        .sidebar::-webkit-scrollbar-track { background: #2c3e50; }
        .sidebar::-webkit-scrollbar-thumb { background: #4a6278; border-radius: 3px; }

        .sidebar .library_title {
            font-size: 24px;
            line-height: 1.5;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid #34495e;
        }

        .sidebar-search {
            display: flex;
            margin-bottom: 16px;
        }

        .sidebar-search input {
            flex: 1;
            min-width: 0;
            padding: 8px 12px;
            border: none;
            border-radius: 4px 0 0 4px;
            font-size: 14px;
            background: #3d5166;
            color: #ecf0f1;
            outline: none;
        }

        .sidebar-search input::placeholder {
            color: #8899a6;
        }

        .sidebar-search input:focus {
            background: #4a6278;
        }

        .sidebar-search button {
            padding: 8px 12px;
            border: none;
            border-radius: 0 4px 4px 0;
            background: #3498db;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            transition: background 0.15s;
        }

        .sidebar-search button:hover {
            background: #2980b9;
        }

        /* Expand / Collapse all controls */
        .tree-controls {
            display: flex;
            gap: 6px;
            margin-bottom: 14px;
        }

        .tree-controls button {
            background: rgba(255,255,255,0.08);
            color: #8899a6;
            border: none;
            padding: 5px 12px;
            border-radius: 4px;
            font-size: 13px;
            line-height: 1.5;
            cursor: pointer;
            transition: background 0.15s, color 0.15s;
        }

        .tree-controls button:hover {
            background: rgba(255,255,255,0.15);
            color: #ecf0f1;
        }

        .category-menu {
            list-style: none;
        }

        .category-item {
            margin: 1px 0;
        }

        /* Row that holds toggle + link */
        .category-link-row {
            display: flex;
            align-items: center;
            border-radius: 4px;
            transition: background 0.15s;
        }

        .category-link-row:hover {
            background: #34495e;
        }

        .category-item.active > .category-link-row {
            background: #3498db;
        }

        .category-item.active > .category-link-row .toggle-btn { color: #fff; }

        .category-item.in-path > .category-link-row {
            background: #34495e;
        }

        .category-link-row a {
            color: #ecf0f1;
            text-decoration: none;
            padding: 7px 10px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            flex: 1;
            font-size: 15px;
            line-height: 1.5;
            min-width: 0;
        }

        .cat-name {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            flex: 1;
            min-width: 0;
        }

        .count {
            font-size: 0.8em;
            opacity: 0.55;
            margin-left: 8px;
            flex-shrink: 0;
        }

        /* Toggle button */
        .toggle-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            background: none;
            border: none;
            color: #8899a6;
            cursor: pointer;
            flex-shrink: 0;
            border-radius: 4px;
            transition: color 0.15s, background 0.15s;
            margin-right: 4px;
        }

        .toggle-btn:hover {
            color: #fff;
            background: rgba(255,255,255,0.1);
        }

        .toggle-icon {
            display: block;
            width: 16px;
            height: 16px;
            transition: transform 0.2s ease;
        }

        .toggle-btn.expanded .toggle-icon {
            transform: rotate(90deg);
        }

        /* Submenu collapse */
        .category-submenu {
            list-style: none;
            overflow: hidden;
            max-height: 0;
            transition: max-height 0.3s ease;
            border-left: 1px solid rgba(255,255,255,0.08);
            margin-left: 13px;
        }

        .category-submenu.open {
            max-height: 2000px;
            transition: max-height 0.5s ease;
        }

        /* Indentation */
        .category-item.level-0 > .category-link-row { padding-left: 0; }
        .category-item.level-0 > .category-submenu { padding-left: 14px; }
        .category-item.level-1 > .category-link-row { padding-left: 6px; }
        .category-item.level-1 > .category-submenu { padding-left: 14px; }
        .category-item.level-2 > .category-link-row { padding-left: 6px; }
        .category-item.level-2 > .category-submenu { padding-left: 14px; }
        .category-item.level-3 > .category-link-row { padding-left: 6px; }
        .category-item.level-3 > .category-submenu { padding-left: 14px; }
        .category-item.level-4 > .category-link-row { padding-left: 6px; }
        .category-item.level-4 > .category-submenu { padding-left: 14px; }
        .category-item.level-5 > .category-link-row { padding-left: 6px; }
        .category-item.level-6 > .category-link-row { padding-left: 6px; }

        /* ── Main Content ── */
        .main-content {
            flex: 1;
            margin-left: 500px;
            padding: 30px;
        }

        .page-header {
            background: white;
            padding: 30px;
            border-radius: 8px;
            margin-bottom: 30px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .page-header h2 {
            font-size: 22px;
            line-height: 1.5;
            color: #2c3e50;
            margin-bottom: 10px;
        }

        .breadcrumb {
            color: #7f8c8d;
            font-size: 14px;
            line-height: 1.5;
        }

        .breadcrumb a {
            color: #3498db;
            text-decoration: none;
        }

        .breadcrumb a:hover {
            text-decoration: underline;
        }

        .breadcrumb-separator {
            margin: 0 8px;
        }

        /* ── Video Grid (category listing) ── */
        .videos-section {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
            gap: 20px;
        }

        .video-card {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid #e2e6ea;
            transition: box-shadow 0.2s, transform 0.15s;
        }

        .video-card:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
            transform: translateY(-2px);
        }

        .video-container {
            position: relative;
            width: 100%;
            padding-bottom: 56.25%;
            background: #1a1a2e;
            overflow: hidden;
        }

        .video-thumbnail {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            cursor: pointer;
        }

        .video-thumbnail img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s;
        }



        .play-button {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            background: none;
            border: none;
            cursor: pointer;
            transition: transform 0.2s, opacity 0.2s;
            z-index: 10;
            opacity: 0.85;
        }

        .video-card:hover .play-button {
            opacity: 1;
            transform: translate(-50%, -50%) scale(1.08);
        }

        .video-player {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: none;
        }

        .video-player.active {
            display: block;
        }

        .video-player iframe {
            width: 100%;
            height: 100%;
        }

        .video-duration {
            position: absolute;
            bottom: 8px;
            right: 8px;
            background: rgba(0, 0, 0, 0.82);
            color: white;
            padding: 2px 6px;
            border-radius: 3px;
            font-size: 13px;
            font-weight: 600;
            line-height: 1.5;
            letter-spacing: 0.02em;
        }

        .video-details {
            padding: 14px 16px 16px;
        }

        .video-details h3 {
            font-size: 16px;
            font-weight: 600;
            color: #1a1a2e;
            line-height: 1.5;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .video-description {
            color: #6b7280;
            font-size: 14px;
            line-height: 1.5;
            margin-top: 8px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .video-meta {
            display: flex;
            align-items: center;
            gap: 14px;
            margin-top: 12px;
            font-size: 14px;
            line-height: 1.5;
            color: #9ca3af;
        }

        .video-meta span {
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .video-meta svg {
            width: 15px;
            height: 15px;
            flex-shrink: 0;
        }

        .video-link {
            display: inline-block;
            margin-top: 12px;
            font-size: 14px;
            line-height: 1.5;
            color: #3498db;
            text-decoration: none;
            font-weight: 500;
        }

        .video-link:hover {
            text-decoration: underline;
        }

        /* ── Video Detail page (two-column layout) ── */
        .video-card-detail {
            background: white;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .detail-layout {
            display: flex;
            gap: 0;
        }

        /* Left column: info + products */
        .detail-info {
            flex: 1;
            min-width: 0;
            padding: 25px;
            display: flex;
            flex-direction: column;
        }

        .detail-info h3 {
            font-size: 20px;
            color: #2c3e50;
            margin-bottom: 12px;
            line-height: 1.5;
        }

        .detail-info .video-description {
            color: #555;
            font-size: 18px;
            line-height: 1.5;
            margin-bottom: 16px;
            -webkit-line-clamp: unset;
            display: block;
            overflow: visible;
        }

        .detail-meta {
            display: flex;
            flex-wrap: wrap;
            gap: 16px;
            margin-bottom: 20px;
            padding-bottom: 16px;
            border-bottom: 1px solid #e8e8e8;
        }

        .meta-item {
            display: flex;
            align-items: center;
            gap: 5px;
            font-size: 15px;
            line-height: 1.5;
            color: #6b7280;
        }

        .meta-item svg {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
        }

        /* Products section at bottom of left column */
        .detail-products {
            margin-top: auto;
            padding-top: 16px;
        }

        .detail-products h5 {
            font-size: 16px;
            line-height: 1.5;
            color: #2c3e50;
            margin-bottom: 10px;
            font-weight: 600;
        }

        .product-grid {
            display: flex;
            gap: 10px;
            overflow-x: auto;
            padding-bottom: 6px;
            scrollbar-width: thin;
            scrollbar-color: #ccc transparent;
        }

        .product-grid::-webkit-scrollbar { height: 4px; }
        .product-grid::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

        .product-card {
            display: flex;
            flex-direction: column;
            width: 120px;
            flex-shrink: 0;
            text-decoration: none;
            border-radius: 6px;
            overflow: hidden;
            background: #f8f9fa;
            border: 1px solid #eee;
            transition: background 0.15s, box-shadow 0.15s;
        }

        .product-card:hover {
            background: #f0f2f5;
            box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        }

        .product-thumb {
            width: 100%;
            height: 68px;
            object-fit: cover;
            background: #e8e8e8;
        }

        .product-thumb-placeholder {
            display: flex;
            align-items: center;
            justify-content: center;
            color: #aaa;
        }

        .product-thumb-placeholder svg {
            width: 24px;
            height: 24px;
        }

        .product-title {
            font-size: 13px;
            line-height: 1.4;
            font-weight: 500;
            color: #2c3e50;
            padding: 6px 8px 2px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .product-card:hover .product-title {
            color: #3498db;
        }

        .sku-tag {
            color: #7f8c8d;
            font-size: 11px;
            line-height: 1.5;
            padding: 0 8px 6px;
        }

        /* Related videos section */
        .detail-related {
            margin-top: 20px;
            padding-top: 16px;
            border-top: 1px solid #e8e8e8;
        }

        .detail-related h5 {
            font-size: 16px;
            line-height: 1.5;
            color: #2c3e50;
            margin-bottom: 10px;
            font-weight: 600;
        }

        .related-grid {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            padding-bottom: 6px;
        }

        .related-grid::-webkit-scrollbar { height: 4px; }
        .related-grid::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }

        .related-card {
            display: flex;
            flex-direction: column;
            width: 120px;
            flex-shrink: 0;
            text-decoration: none;
            border-radius: 6px;
            overflow: hidden;
            background: #f8f9fa;
            border: 1px solid #eee;
            transition: background 0.15s, box-shadow 0.15s;
        }

        .related-card:hover {
            background: #f0f2f5;
            box-shadow: 0 2px 6px rgba(0,0,0,0.08);
        }

        .related-thumb {
            width: 100%;
            height: 68px;
            object-fit: cover;
            background: #e8e8e8;
        }

        .related-title {
            font-size: 13px;
            line-height: 1.4;
            font-weight: 500;
            color: #2c3e50;
            padding: 6px 8px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        .related-card:hover .related-title {
            color: #3498db;
        }

        /* Right column: video player */
        .detail-video {
            width: 768px;
            flex-shrink: 0;
            display: flex;
            align-items: flex-start;
        }

        .detail-video .video-container {
            position: relative;
            width: 100%;
            padding-bottom: 56.25%;
            background: #000;
        }

        .video-card-detail .video-thumbnail:hover { opacity: 0.9; }

        .video-card-detail .play-button {
            opacity: 1;
        }

        .video-card-detail .play-button:hover {
            transform: translate(-50%, -50%) scale(1.1);
        }

        .no-products {
            background: white;
            padding: 40px;
            text-align: center;
            border-radius: 8px;
            color: #7f8c8d;
        }

        .welcome-section {
            background: white;
            padding: 40px;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        .welcome-section h3 {
            font-size: 20px;
            line-height: 1.5;
            color: #2c3e50;
            margin-bottom: 15px;
        }

        .welcome-section p {
            color: #555;
            font-size: 18px;
            line-height: 1.5;
        }

        /* ── Responsive breakpoints ── */
        @media (max-width: 768px) {
            body {
                font-size: 16px;
            }

            .sidebar {
                width: 100%;
                position: relative;
                height: auto;
            }

            .main-content {
                margin-left: 0;
            }

            .videos-section {
                grid-template-columns: 1fr;
            }

            .detail-layout {
                flex-direction: column-reverse;
            }

            .detail-video {
                width: 100%;
            }

            .detail-info {
                padding: 20px;
            }

            .detail-info .video-description {
                font-size: 16px;
            }

            .welcome-section p {
                font-size: 16px;
            }
        }

        @media (min-width: 769px) and (max-width: 1200px) {
            .videos-section {
                grid-template-columns: repeat(2, 1fr);
            }

            .detail-video {
                width: 380px;
            }
        }