* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    transition: 0.2s ease;
}

body {
    padding-top: 56px;

}

.navbar {
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 1000;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1vw;
    background-color: white;
    gap: 1.5vw;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);

}

.dropdown {
    position: relative;
    display: inline-block;
    cursor: pointer;
}


.dropdown-content {
    display: none;
    white-space: nowrap;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 150px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    z-index: 10;
}

.dropdown-content a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: black;
}

.dropdown-content a:hover {
    background-color: #f0f0f0;
}


.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown i {
    font-size: 1.4rem;
    padding: 10px;
    cursor: pointer;
}

.navbar img {
    height: 28px;
    margin-right: 20px;
    object-fit: contain;
    padding: 4px 6px;
}

.input-icon {
    display: flex;
}

.nav-input {
    height: 36px;
    width: 50vw;
    padding-left: 2vw;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid rgb(226, 217, 217);
    border-bottom-left-radius: 50px;
    border-top-left-radius: 50px;
    font-size: 1rem;
}

.nav-search-icon {
    height: 36px;
    width: 4vw;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom-right-radius: 50px;
    border-top-right-radius: 50px;
    border: 1px solid rgb(237, 230, 230);
    font-size: 1.20rem;
    color: rgb(44, 39, 39);
    text-decoration: none;
    background-color: rgb(237, 230, 230);

}

.nav-microphone {
    height: 36px;
    width: 3.5vw;
    background-color: rgb(237, 230, 230);
    color: rgb(44, 39, 39);
    border-radius: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    text-decoration: none;
}

.nav-create {
    width: 7vw;
    height: 7vh;
    border-radius: 50px;
    padding: 0.4vh 1.2vw;
    margin-left: 1vw;
    display: flex;
    justify-content: space-between;
    align-items: center;

    font-size: 1.2rem;
    background-color: rgb(237, 230, 230);
    color: rgb(44, 39, 39);
    text-decoration: none;
}

.nav-bell-icon {
    width: 40px;
    height: 7vh;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: rgb(44, 39, 39);
    text-decoration: none;
}

.nav-s-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1rem;
    background-color: green;
    color: white;
}
.nav-create:hover,
.nav-bell-icon:hover,
.nav-microphone:hover,
.nav-search-icon:hover {
    background-color: #e5e5e5;
}
.youtube-side-bar {
    position: fixed;
    top: 56px;
    left: 0;
    width: 72px;
    height: 100vh;
    background-color: white;
    border-right: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    padding-top: 10px;
    z-index: 100;
    gap: 2vh;
}
.youtube-side-bar a.active {
    background-color: #eee;
    border-radius: 10px;
}

.youtube-side-bar a {
    text-decoration: none;
    color: black;
    padding: 12px 0;
    font-size: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: background-color 0.3s ease;
}

.youtube-side-bar a i {
    font-size: 24px;
    margin-bottom: 0.5rem;
}

.youtube-side-bar a:hover {
    background-color: #f2f2f2;
    border-radius: 10px;
}

.category-bar {
    position: fixed;
    top: 56px;
    left: 80px;
    height: 50px;
    width: calc(100% - 80px);
    background-color: white;
    display: flex;
    align-items: center;
    padding: 0 12px;
    gap: 0.5rem;
    border-bottom: 1px solid #ddd;
    z-index: 200;
    white-space: nowrap;
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow-x: auto;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.category-bar::-webkit-scrollbar {
    display: none;
}

.category-bar a {
    text-decoration: none;
    color: black;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.category-bar a:hover {
    background-color: #f2f2f2;
    transform: scale(1.05);
}

.category-bar a.active {
    background-color: #dcdcdc;
    font-weight: bold;

}

.video-grid {
    margin-left: 80px;
    margin-top: 70px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.2rem;
    padding: 1rem;
    max-width: 1600px;
}

.video-card {
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.video-card:hover {
    transform: scale(1.02);
}

.video-card img {
    width: 100%;
    border-radius: 8px;
    aspect-ratio: 16 / 9;

    object-fit: cover;
    border-radius: 8px;

}

.video-info {
    display: flex;
    margin-top: 8px;
    gap: 10px;
}

.video-info img {
    width: 30px;
    object-fit: cover;
}

.channel-logo {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.video-text h4 {
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.video-text p {
    font-size: 0.8rem;
    color: #606060;
}

/* Mobile (max-width: 768px)*/
@media (max-width: 768px) {

    .navbar {
        padding: 0 3vw;
        height: 8vh;
        gap: 1vw;
    }

    .navbar img {
        height: 6vh;
        margin-right: 2vw;
    }

    .nav-input {
        width: 45vw;
        height: 5.5vh;
        font-size: 0.9rem;
    }

    .nav-search-icon {
        width: 10vw;
        height: 5.5vh;
    }

    .nav-microphone {
        width: 8vw;
        height: 5.5vh;
    }

    .nav-create {
        display: none;

    }

    .youtube-side-bar {
        display: none;
    }

    .category-bar {
        left: 0px;
        width: 100%;
        
    }

    .video-grid {
        margin-left: 0;
        grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    }
}

/*Extra Small (max-width: 480px)*/
@media (max-width: 480px) {

    .nav-input {
        display: none;
        /* Hide search bar */
    }
    .navbar {
        justify-content: space-between;
        gap: 2vw;
    }

    .nav-search-icon {
        border-radius: 50%;
        width: 40px;
        height: 40px;
    }

    .navbar img {
        height: 35px;
    }
    .nav-microphone {
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }

    .youtube-side-bar {
        display: none;
    }

    .video-grid {
        margin-left: 0;
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
        margin-top: 110px;
    }

    .category-bar {
        left: 0;
        width: 100%;
        top: 60px;
    }
}