body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #000000;
}

.top-bar {
    width: 100%;
    height: 60px;
    background-color: #000000;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    box-sizing: border-box;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999; /* Ensures it is above all other elements */
}

.top-bar-left {
    display: flex;
    align-items: center;
}

.top-bar-left .toggle-btn {
    background-color: transparent;
    color: white;
    border: none;
    cursor: pointer;
    font-size: 24px;
    margin-right: 16px;
    display: block;
}

.top-bar-left .website-logo {
    position: fixed;
    max-width: 150px;
    height: auto;
    left: 65px;
    top: 9px;
    
}

.top-bar-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.search-container {
    display: flex;
    align-items: center;
    height: 40px;
    width: 50%;
    max-width: 600px;
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: 1px solid #383838;
}

.search-input {
    flex: 1;
    padding: 8px 12px;
    border: none;
    outline: none;
    font-size: 16px;
}

.search-btn {
    background-color: #f8f8f8;
    border: none;
    padding: 12px 17px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn i {
    font-size: 18px;
    color: #606060;
}

.search-btn:hover {
    background-color: #e0e0e0;
}

.top-bar-right .user-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

/* Category Bar */
.category-bar {
    display: flex;
    overflow-x: auto;
    background-color: #202020;
    padding: 10px 16px;
    white-space: nowrap;
    position: fixed;
    top: 60px;
    left: 238px;
    width: calc(100% - 240px);
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: left 0.3s, width 0.3s;
}

.sidebar.collapsed ~ .category-bar {
    left: 62px;
    width: calc(100% - 72px);
}

/* Category Bar */
.category-bar {
    display: flex;
    overflow-x: auto;
    background-color: #000000;
    padding: 10px 16px;
    white-space: nowrap;
    position: fixed;
    top: 60px;
    left: 233px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: width 0.3s, left 0.3s;
}

.category-bar.expanded {
    width: calc(100% - 240px); /* Adjust for sidebar width */
    left: 240px;
}

.category-bar.collapsed {
    width: calc(100% - 72px); /* Adjust for collapsed sidebar width */
    left: 72px;
}

.category-btn {
    background-color: #383838;
    color: white;
    border: none;
    padding: 10px 20px;
    margin-right: 10px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background-color 0.3s;
}

.category-btn:hover {
    background-color: #4a4a4a;
}

.thumbnails-container {
    display: flex;
    flex-wrap: wrap;
    margin-top: 100px; /* Adjusted for fixed top bar and category bar */
    padding: 20px;
    transition: margin-left 0.3s;
    margin-left: 220px;
    overflow-y: auto; /* Enable vertical scrolling */
    height: calc(100vh - 100px); /* Adjust for top bar and category bar height */
}

.sidebar {
    z-index: 99999; /* Ensures it is above all other elements */
    width: 220px;
    height: 100vh;
    background-color: #000000;
    color: white;
    position: fixed;
    top: 52.5px;
    left: 6px;
    transition: width 0.3s, height 0.3s, top 0.3s;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 57px;
}

.sidebar .sidebar-content {
    display: flex;
    flex-direction: column;
    margin-top: 10px;
}

.sidebar .sidebar-item {
    display: flex;
    align-items: center;
    padding: 16px;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
    font-size: 14px;
    border-radius: 10px;
}

.sidebar .sidebar-item:hover {
    background-color: #383838;
}

.sidebar .sidebar-item i {
    font-size: 20px;
    margin-right: 16px;
}

.sidebar .sidebar-item .text {
    display: inline-block;
    transition: opacity 0.3s;
}

.sidebar.collapsed .sidebar-item .text {
    opacity: 0;
    visibility: hidden;
}

.sidebar.collapsed ~ .thumbnails-container {
    margin-left: 50px;
}

.sidebar1 {
    width: 0;
    height: 0;
    background-color: #000000;
    color: white;
    position: fixed;
    top: 0px;
    left: 0;
    transition: width 0.3s, height 0.3s, top 0.3s;
    overflow: hidden;
}

.sidebar1.collapsed {
    width: 0;
}

.sidebar1 .sidebar-content1 {
    display: flex;
    flex-direction: column;
    margin-top: 0;
}

.sidebar1 .sidebar-item1 {
    display: flex;
    align-items: center;
    padding: 0;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
    font-size: 0;
    border-radius: 0;
}

.sidebar1 .sidebar-item1:hover {
    background-color: #383838;
}

.sidebar1 .sidebar-item1 i {
    font-size: 0;
    margin-right: 0;
}

.sidebar1 .sidebar-item1 .text1 {
    display: inline-block;
    transition: opacity 0.3s;
}

.sidebar1.collapsed .sidebar-item1 .text1 {
    opacity: 0;
    visibility: hidden;
}

.sidebar1.collapsed ~ .thumbnails-container {
    margin-left: 0;
}

.video-thumbnail {
    width: calc(33.333% - 20px);
    margin: 10px;
    background-color: #000000;
    border-radius: 10px;
    
    position: relative;
    transition: transform 0.3s;
    cursor: pointer;
}

.video-thumbnail:hover {
    transform: translateY(-5px);
}

.thumbnail {
    width: 100%;
    height: auto;
    border-radius: 9px;
}

.thumbnail-overlay {
    position: absolute;
    bottom: 82px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 12px;
    color: white;
}

.info {
    display: flex;
    padding: 10px;
    background-color: #000000;
}

.channel-icon {
    left: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 12px;
}

.details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.title {
    font-size: 14px;
    font-weight: bold;
    color: white;
    margin-bottom: 4px;
}

.channel-name,
.views {
    font-size: 12px;
    color: #aaa;
}

.options-btn {
    position: absolute;
    bottom: 32px;
    right: 0px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.options-btn svg {
    fill: #fff;
}

.options-menu {
    display: none;
    position: absolute;
    top: 106px;
    right: 10px;
    background-color: #111111;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

.options-menu.active {
    display: block;
}

.options-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.options-menu ul li {
    padding: 10px;
}

.options-menu ul li a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

.options-menu ul li:hover {
    background-color: #444;
}

.top-bar-right i {
    display: none;
}

@media (max-width: 768px) {
    .top-bar-left .toggle-btn {
        display: none;
    }

    .top-bar-center .search-input {
        width: 70%;
    }

    .sidebar {
        width: 0;
        height: 0;
        bottom: 0;
        top: auto;
        left: 0;
        flex-direction: row;
        display: flex;
        align-items: center;
        justify-content: space-around;
    }

    .sidebar.collapsed {
        width: 0;
        height: 0;
    }

    .sidebar .sidebar-content {
        flex-direction: row;
        margin-top: 0;
        width: 0;
        justify-content: space-around;
    }

    .sidebar .sidebar-item {
        padding: 0;
        flex-direction: column;
        align-items: center;
    }

    .sidebar .sidebar-item i {
        margin: 0;
    }

    .sidebar .text {
        display: none;
    }

    .top-bar-right i {
        display: contents;
    }

    /* Mobile Sidebar */
    .sidebar1 {
        width: 100vw;
        border-top: .5px solid rgb(143, 143, 143);
        height: 60px;
        bottom: 0;
        top: auto;
        left: 0;
        flex-direction: row;
        display: flex;
        align-items: center;
        justify-content: space-around;
        background-color: #000000;
        color: white;
        position: fixed;
        transition: width 0.3s, height 0.3s, top 0.3s;
        overflow: hidden;
    }

    .sidebar1.collapsed {
        width: 100vw;
        height: 60px;
    }

    .sidebar1 .sidebar-content1 {
        display: flex;
        flex-direction: row;
        margin-top: 0;
        width: 100%;
        justify-content: space-around;
    }

    .sidebar1 .sidebar-item1 {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 10px;
        text-decoration: none;
        border-radius: 20px;
        transition: background-color 0.3s;
        color: white;
    }

    .sidebar1 .sidebar-item1 i {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .sidebar1 .text1 {
        display: block;
        font-size: 12px;
    }

    .sidebar1 .sidebar-item1:hover {
        background-color: #383838;
    }

    .top-bar-left .website-logo {
        position: fixed;
        max-width: 138px;
        height: auto;
        left: 20px;
        top: 11px;
    }

    body {
        font-family: Arial, sans-serif;
        margin: 0;
        padding: 0;
        background-color: #000000;
        overflow-x: auto; /* Prevent horizontal scrolling */
    }

    .thumbnails-container {

        margin: 0 auto;
        padding: 0;
        width: 100%;
        max-width: 100vw;
       
        display: flex;
        overflow-x: auto; /* Enable horizontal scrolling */
       
        
       margin-top: 180px;
        
    }

    

    .video-thumbnail {
        width: 100%;
        margin: 0;
        background-color: #000000;
        border-radius: 0;
       
        position: relative;
        transition: transform 0.3s;
        cursor: pointer;
        box-sizing: border-box;
    }

    .search-btn {
        background-color: #f8f8f8;
        border: none;
        padding: 12px 17px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-icon {
        width: 18px;
        height: 18px;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M20.71 19.29l-3.01-3.01a7.48 7.48 0 10-1.42 1.42l3.01 3.01c.19.19.45.29.71.29s.52-.1.71-.29c.39-.39.39-1.02 0-1.41zm-5.23-1.43a5.5 5.5 0 115.5-5.5 5.5 5.5 0 01-5.5 5.5z"/></svg>');
        background-repeat: no-repeat;
        background-size: cover;
        fill: white;
    }

    .category-bar {
        display: flex;
        overflow-x: auto;
        background-color: #000000;
        padding: 10px 16px;
        white-space: nowrap;
        position: fixed;
        top: 60px;
        left: 0px;
        width: 100%;
        z-index: 1000;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        transition: left 0.3s, width 0.3s;
    }

    .search-input {
        left: 190px;
        flex: 1;
        padding: 8px 12px;
        border: none;
        outline: none;
        font-size: 16px;
    }

    .search-container {
        width: 0;
        max-width: 0;
        margin-right: 0;
        margin-left: 0;
        position: fixed;
        top: 0;
        left: 0;
        z-index: 0;
        background-color: #000000;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
    }
}
