:root {
    --bg-color: #0f0f0f;
    --sidebar-width: 240px;
    --yt-gray: #aaa;
    --yt-white: #fff;
    --yt-border: rgba(255, 255, 255, 0.1);
    --primary-red: #E50914;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body {
    background-color: var(--bg-color);
    color: var(--yt-white);
    font-family: 'Outfit', 'Inter', sans-serif;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(229, 9, 20, 0.05) 0%, transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(229, 9, 20, 0.05) 0%, transparent 40%);
    background-attachment: fixed;
}

[v-cloak] {
    display: none !important;
}

.main-content {
    padding: 80px 10px 20px 10px;
    max-width: 100%;
    margin: 0;
    min-height: 90vh;
    display: block;
    /* Override global flex */
    width: 100%;
}

@media (max-width: 600px) {
    .main-content {
        padding-top: 85px;
        max-width: 100%;
    }
}

.page-header {
    margin-bottom: 50px;
    text-align: left;
    padding-left: 20px;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-header p {
    color: var(--yt-gray);
    font-size: 1.1rem;
}

.explorer-container {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 10px;
    background: transparent;
    border: none;
    min-height: 85vh;
    align-items: start;
}

.explorer-container.has-right-sidebar {
    grid-template-columns: 220px 1fr 320px;
}

.right-sidebar {
    background: rgba(20, 20, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 24px;
    backdrop-filter: blur(20px);
    position: sticky;
    top: 100px;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.right-sidebar h3 {
    margin-top: 0;
    margin-bottom: 5px;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: #888;
}

.leaderboard-entry {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s;
}

.leaderboard-entry:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

/* Landing Leaderboard Styles */
.landing-leaderboard-section {
    width: 100%;
    max-width: 800px;
    margin-top: 60px;
}

.leaderboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 15px;
}

.leaderboard-card-landing {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: all 0.3s;
}

.leaderboard-card-landing:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.rank-badge {
    font-size: 1.2rem;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.user-avatar-landing {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    background: #e50914;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.user-avatar-landing i {
    color: #fff;
    font-size: 1.2rem;
}

.user-info-landing {
    flex: 1;
    min-width: 0;
}

.user-name {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.user-time {
    font-size: 0.8rem;
    color: #aaa;
}

@media (max-width: 1200px) {
    .explorer-container.has-right-sidebar {
        grid-template-columns: 220px 1fr;
    }

    .right-sidebar {
        display: none;
    }
}

@media (max-width: 900px) {

    .explorer-container,
    .explorer-container.has-right-sidebar,
    .explorer-container.landing-mode.has-right-sidebar {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

.explorer-container.landing-mode {
    grid-template-columns: 1fr;
}

.explorer-container.landing-mode.has-right-sidebar {
    grid-template-columns: 1fr 350px;
}

.category-sidebar {
    width: auto;
    border: 1px solid var(--glass-border);
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    position: sticky;
    top: 100px;
    height: fit-content;
}

.main-explorer {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex: 1;
}

.landing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    width: 100%;
    min-height: 60vh;
}

.landing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    max-width: 800px;
    width: 100%;
}

@media (max-width: 600px) {
    .landing-grid {
        grid-template-columns: 1fr;
    }

    .leaderboard-grid {
        grid-template-columns: 1fr;
    }
}

.landing-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: 32px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    position: relative;
    overflow: hidden;
}

@media (max-width: 600px) {
    .landing-card {
        padding: 60px 20px;
        border-radius: 24px;
    }
}

.landing-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 40px;
    text-align: center;
    background: linear-gradient(to right, #fff, #888);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
    padding: 0 10px;
}

@media (max-width: 600px) {
    .landing-title {
        font-size: 2rem;
        margin-bottom: 30px;
    }
}

.landing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at top right, rgba(229, 9, 20, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s;
}

.landing-card:hover::before {
    opacity: 1;
}

.landing-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(229, 9, 20, 0.5);
    transform: translateY(-15px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

.landing-card i,
.landing-card .emoji {
    font-size: 4.5rem;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));
    transition: transform 0.4s;
    z-index: 1;
}

.landing-card:hover .emoji {
    transform: scale(1.2) rotate(5deg);
}

.landing-card h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: #fff;
    margin: 0;
    z-index: 1;
    letter-spacing: -0.5px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 4px;
    color: var(--yt-gray);
    font-weight: 500;
}

.category-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.category-item.active {
    background: rgba(229, 9, 20, 0.1);
    color: var(--primary-red);
}

.category-item i {
    width: 20px;
    text-align: center;
}

@media (max-width: 900px) {
    .explorer-container {
        gap: 0;
    }

    .category-sidebar {
        width: 100%;
        border: none;
        border-radius: 0;
        background: transparent;
        backdrop-filter: none;
        display: flex;
        justify-content: center;
        overflow-x: auto;
        padding: 10px 10px;
        position: relative;
        top: 0;
        margin-bottom: 0;
        transition: all 0.3s ease;
    }

    .category-sidebar.hidden {
        display: none;
    }

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

    .category-item {
        margin-bottom: 0;
        white-space: nowrap;
        margin: 0 5px;
        flex-shrink: 0;
    }

    .main-explorer {
        background: transparent;
        border: none;
        border-radius: 0;
        padding: 0;
    }

    .explorer-header {
        padding: 15px 10px;
        background: transparent;
    }

    .tree-explorer {
        padding: 0 10px !important;
    }

    .main-content {
        padding: 70px 0 20px 0;
    }
}

@media (max-width: 600px) {
    .main-content {
        padding-top: 85px;
        /* Increased to avoid overlap with fixed nav */
        max-width: 100%;
    }
}

.explorer-header {
    padding: 20px 30px;
    border-bottom: 1px solid var(--glass-border);
}

.category-icon {
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
}

.category-info h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.tree-explorer {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

@media (max-width: 600px) {
    .tree-explorer {
        padding: 10px;
    }
}

/* Tree Styles */
.tree-node-levels {
    margin: 5px 0;
}

.node-content-levels {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    gap: 12px;
    border: 1px solid transparent;
}

.node-content-levels:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
}

.node-content-levels.active {
    background: rgba(229, 9, 20, 0.1);
}

.expand-icon-levels {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: transform 0.3s;
    font-size: 0.8rem;
}

.expand-icon-levels.expanded {
    transform: rotate(90deg);
    color: var(--primary-red);
}

.node-icon-levels {
    font-size: 1.1rem;
    color: var(--yt-gray);
}

.node-label-levels {
    flex: 1;
    font-weight: 600;
    font-size: 0.95rem;
}

.node-id-levels {
    font-size: 0.75rem;
    color: #444;
    font-family: monospace;
    opacity: 0.5;
}

.nested-children-levels {
    padding-left: 30px;
    margin-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

.node-message-levels {
    font-size: 0.85rem;
    color: var(--yt-gray);
    padding: 0 0 10px 65px;
    opacity: 0.7;
    font-weight: 300;
}

/* Type Icons */
.type-folder::before {
    content: "\f07b";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.type-section_header::before {
    content: "\f07b";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #4a9eff;
}

.type-options::before {
    content: "\f013";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #aaa;
}

.type-video::before {
    content: "\f03d";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: var(--primary-red);
}

.type-pdf::before {
    content: "\f1c1";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #ff4a4a;
}

.type-text::before {
    content: "\f0f6";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.type-lesson::before {
    content: "\f518";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #2ecc71;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0;
    font-size: 1rem;
}

.breadcrumb-item {
    color: var(--yt-gray);
    display: flex;
    align-items: center;
    padding: 5px 0;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.breadcrumb-item:hover {
    color: #fff;
}

.breadcrumb-item:first-child {
    padding-left: 0;
}

.breadcrumb-item:last-child {
    color: #fff;
    font-weight: 600;
    cursor: default;
}

@media (max-width: 900px) {
    .breadcrumbs {
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        font-size: 0.85rem;
        padding: 5px 0;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .breadcrumbs::-webkit-scrollbar {
        display: none;
    }

    .breadcrumb-item {
        flex-shrink: 0;
        font-size: 0.85rem;
        max-width: 150px;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .breadcrumb-item i {
        font-size: 0.7rem;
    }

    .explorer-header {
        position: relative;
    }

    .explorer-header::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 30px;
        background: linear-gradient(to right, transparent, rgba(15, 15, 15, 0.9));
        pointer-events: none;
    }
}

.current-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 800px;
    margin: 0 auto;
    width: 100%;
}

.list-view-item {
    display: flex;
    flex-direction: column;
    background: #1a1a1a;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    max-width: 500px;
    align-self: flex-start;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.item-bubble {
    padding: 10px 14px;
    background: #2b2b2b;
    border-radius: 15px 15px 15px 5px;
    border: none;
    max-width: 85%;
    width: fit-content;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    align-self: flex-start;
    margin-bottom: 4px;
    color: #fff;
    font-size: 0.95rem;
    line-height: 1.4;
}

.item-media-preview {
    width: 100%;
    aspect-ratio: unset;
    min-height: 150px;
    background: #000;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.item-media-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.media-play-overlay {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.item-footer {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.item-caption {
    font-size: 0.95rem;
    color: #fff;
    line-height: 1.5;
    padding: 12px 15px;
}

.item-thumb {
    display: none;
}

.item-details {
    padding: 0 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    height: 100%;
}

.item-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 1rem;
    background: transparent;
    border-radius: 0;
    color: var(--yt-gray);
}

.list-view-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.item-title {
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: unset;
    display: block;
}

.item-meta {
    display: none;
}

.share-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--yt-gray);
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover {
    background: rgba(229, 9, 20, 0.2);
    color: var(--primary-red);
    transform: scale(1.1);
}

.pin-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--yt-gray);
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 8px;
}

.pin-btn:hover {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    transform: scale(1.1);
}

.pin-btn.pinned {
    color: #f1c40f;
    background: rgba(241, 196, 15, 0.1);
}

.more-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: var(--yt-gray);
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 8px;
}

.more-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transform: scale(1.1);
}

.more-menu {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.modal-overlay-share {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-modal {
    background: #1a1a1a;
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.share-options {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 25px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.2s;
    flex: 1;
}

.share-option:hover {
    transform: translateY(-5px);
}

.share-option-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.share-option-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
}

.close-share {
    margin-top: 25px;
    color: #555;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
}

.close-share:hover {
    color: #fff;
}

.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 600;
    z-index: 10000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.telegram-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #229ED9;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(34, 158, 217, 0.3);
    text-decoration: none;
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.telegram-fab:hover {
    transform: scale(1.1) rotate(10deg);
}

.whatsapp-fab {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    text-decoration: none;
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-fab:hover {
    transform: scale(1.1) rotate(10deg);
}

.chat-fab {
    position: fixed;
    bottom: 170px;
    right: 30px;
    background: var(--primary-red);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(229, 9, 20, 0.4);
    text-decoration: none;
    z-index: 2000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
}

.chat-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 15px 40px rgba(229, 9, 20, 0.6);
}

.chat-fab::after {
    content: 'AI Rose';
    position: absolute;
    right: 80px;
    background: #e50914;
    color: white;
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s;
    pointer-events: none;
}

.chat-fab:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.lesson-view-container {
    max-width: 100%;
    margin: 0;
    padding: 0 10px 60px 10px;
}

.lesson-video-card {
    display: flex;
    gap: 16px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    margin-bottom: 16px;
    flex-direction: column;
}

@media (min-width: 768px) {
    .lesson-video-card {
        flex-direction: row;
        gap: 24px;
    }
}

.lesson-thumbnail-wrapper {
    position: relative;
    flex-shrink: 0;
    width: 100%;
    aspect-ratio: 16/9;
    background: #1a1a1a;
    border-radius: 12px;
    overflow: hidden;
}

@media (min-width: 768px) {
    .lesson-thumbnail-wrapper {
        width: 360px;
        height: 202px;
    }
}

.lesson-thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.lesson-video-card:hover .lesson-thumbnail-wrapper img {
    opacity: 0.9;
}

.lesson-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding-top: 4px;
}

.lesson-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #f1f1f1;
    margin-bottom: 4px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

@media (min-width: 768px) {
    .lesson-title {
        font-size: 1.25rem;
    }
}

.lesson-meta {
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.lesson-meta span:not(:last-child)::after {
    content: "•";
    margin: 0 4px;
}

.lesson-description {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    display: none;
}

@media (min-width: 768px) {
    .lesson-description {
        display: -webkit-box;
    }
}

.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.video-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.status-badge {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
}

.status-badge.ready {
    background: #46d369;
    color: #000;
}

.status-badge.processing {
    background: #0099ff;
    color: #fff;
}

.explorer-container.lesson-mode {
    grid-template-columns: 1fr;
}

.explorer-container.lesson-mode .category-sidebar {
    display: none;
}

.explorer-container.lesson-mode .main-explorer {
    max-width: 1200px;
    margin: 0 auto;
}

/* Search Bar Styles */
.search-container {
    flex: 1;
    max-width: 600px;
    margin: 0 20px;
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2px 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.search-input-wrapper:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-red);
    box-shadow: 0 0 0 4px rgba(229, 9, 20, 0.1);
}

.search-icon {
    color: var(--yt-gray);
    margin-right: 12px;
    font-size: 0.9rem;
}

.search-input {
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    padding: 8px 0;
    width: 100%;
    outline: none;
}

.search-filters-inline {
    display: flex;
    gap: 6px;
    margin-right: 10px;
    border-right: 1px solid var(--glass-border);
    padding-right: 10px;
}

.search-filter-tag {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: var(--yt-gray);
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255, 255, 255, 0.03);
}

.search-filter-tag:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.search-filter-tag.active {
    background: var(--primary-red);
    color: #fff;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.3);
}

.clear-search {
    color: var(--yt-gray);
    cursor: pointer;
    font-size: 0.8rem;
    padding: 5px;
    transition: color 0.2s;
}

.clear-search:hover {
    color: #fff;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #1a1a1a;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    z-index: 2000;
    max-height: 450px;
    overflow-y: auto;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

.search-loading {
    padding: 20px;
    text-align: center;
    color: var(--primary-red);
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.result-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    color: var(--yt-gray);
    flex-shrink: 0;
}

.result-info {
    flex: 1;
    min-width: 0;
}

.result-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #fff;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-meta {
    font-size: 0.75rem;
    color: var(--yt-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.result-score {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary-red);
    background: rgba(229, 9, 20, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
}

/* Arabic Support */
[dir="rtl"] .search-icon {
    margin-right: 0;
    margin-left: 12px;
}

[dir="rtl"] .result-icon {
    margin-right: 0;
    margin-left: 15px;
}

@media (max-width: 900px) {
    .search-container {
        display: none;
        /* Hide in mobile nav for now, or move to sidebar/overlay */
    }
}