:root {
    --sidebar: 240px;
    --sidebar-mini: 72px;
}

/* GLOBAL */
body {
    overflow-x: hidden;
    background: #f9f9f9;
    transition: background .3s;
}

body.dark {
    background: #181818;
    color: #eee;
}

body.dark .btn {
    color: white;
}

body.dark .navbar,
body.dark .tabs-wrapper {
    --bs-bg-opacity: 1;
    background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important;
}

/* NAVBAR */
.navbar {
    height: 60px;
    z-index: 100;
    --bs-bg-opacity: 1;
    background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
}

/* GRID LAYOUT */
.app {
    display: grid;
    /* grid-template-columns: var(--sidebar) 1fr; */
    transition: grid-template-columns .3s;
}

.app.collapsed {
    /* grid-template-columns: var(--sidebar-mini) 1fr; */
}

/* SIDEBAR */
#sidebar {
    height: calc(100vh - 60px);
    background: #fff;
    position: sticky;
    top: 60px;
}

body.dark #sidebar {
    background: #212121;
}

#sidebar .nav-link {
    display: flex;
    gap: 12px;
    align-items: center;
}

.app.collapsed .link-text {
    display: none;
}

/* CONTENT */
#content {
    padding: 1rem;
    min-width: 0;
    /* 🔥 CRITICAL FIX */
}

/* VIDEO */
.video-card img {
    border-radius: 12px;
}

.video-card {
    transition: transform .2s;
    cursor: pointer;
}

.video-card:hover {
    transform: scale(1.02);
}

/* MOBILE */
@media(max-width:768px) {
    .app {
        /* grid-template-columns: 0 1fr; */
    }

    #sidebar {
        position: fixed;
        z-index: 1050;
        width: var(--sidebar);
        transform: translateX(-100%);
        transition: transform .3s;
    }

    #sidebar.show {
        transform: translateX(0);
    }
}

/* TABS */
.tabs-wrapper {
    top: 60px;
    /* navbar height */
    z-index: 1020;
    --bs-bg-opacity: 1;
    background-color: rgba(var(--bs-light-rgb), var(--bs-bg-opacity)) !important;
}

.nav-pills .nav-link {
    white-space: nowrap;
    border-radius: 20px;
    padding: 6px 14px;
    background: #eee;
    color: #000;
    margin-right: 8px;
}

.nav-pills .nav-link.active {
    background: #000;
    color: #fff;
}

/* DARK MODE */
body.dark .nav-pills .nav-link {
    background: #303030;
    color: #eee;
}

body.dark .nav-pills .nav-link.active {
    background: #fff;
    color: #000;
}

/* YOUTUBE CARD */
.yt-card {
    cursor: pointer;
}

.yt-thumb {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
}

.yt-thumb img {
    width: 100%;
    display: block;
    border-radius: 12px;
}

.yt-time {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
}

/* AVATAR */
.yt-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

/* TITLE */
.yt-title {
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    margin-bottom: 4px;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* META */
.yt-meta {
    font-size: 13px;
    color: #606060;
}

.yt-channel:hover {
    color: #000;
}

/* DARK MODE */
body.dark .yt-meta {
    color: #aaa;
}

body.dark .yt-channel:hover {
    color: #fff;
}

:root {
    --sidebar: 240px;
    --sidebar-mini: 72px;
}

/* GLOBAL */
body {
    overflow-x: hidden;
    background: #f9f9f9;
}

body.dark {
    background: #181818;
    color: #eee;
}

/* NAVBAR */
.navbar {
    height: 60px;
}

/* APP GRID */
.app {
    display: grid;
    /* grid-template-columns: var(--sidebar) 1fr; */
    transition: grid-template-columns .3s;
}

.app.collapsed {
    grid-template-columns: var(--sidebar-mini) 1fr;
}

/* SIDEBAR */
#sidebar {
    background: #fff;
    height: calc(100vh - 60px);
    position: sticky;
    top: 60px;
}

body.dark #sidebar {
    background: #212121;
}

#sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.app.collapsed .link-text {
    display: none;
}

/* CONTENT */
#content {
    padding: 1rem;
    min-width: 0;
}

/* VIDEO */
.video-wrapper {
    position: relative;
    padding-top: 56.25%;
    border-radius: 12px;
    overflow: hidden;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

/* ACTIONS */
.action-btn {
    background: #eee;
    padding: 6px 12px;
    border-radius: 20px;
}

body.dark .action-btn {
    background: #303030;
}

/* SUGGESTED */
.suggest img {
    border-radius: 8px;
}

/* MOBILE */
@media(max-width:768px) {
    .app {
        /* grid-template-columns: 0 1fr; */
    }

    #sidebar {
        position: fixed;
        width: var(--sidebar);
        z-index: 1050;
        transform: translateX(-100%);
        transition: transform .3s;
    }

    #sidebar.show {
        transform: translateX(0);
    }
}

.profile-cover {
    height: 250px;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('via.placeholder.com');
    background-size: cover;
    background-position: center;
    border-radius: 0 0 15px 15px;
}

.avatar-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--dt-dark);
    margin-top: -60px;
    object-fit: cover;
}

.nav-tabs .nav-link {
    color: black;
}

body.dark .nav-tabs .nav-link {
    color: white;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
    border: none;
    opacity: .8;
}

.nav-tabs .nav-link.active {
    background-color: transparent;
    border: none;
    border-top: 1px solid red;
    border-radius: 0;
    color: red !important;
}

.card {
    background-color: rgba(0, 0, 0, 0.5);
    /* Semi-transparent dark card background */
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark .card h5 {
    color: white !important;
}

.card h5 {
    color: black !important;
}

.form-control {
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: black;
    height: 50px;
}

.form-control::placeholder {
    color: rgba(0, 0, 0, 0.7);
}

.form-control:focus {
    background-color: rgba(0, 0, 0, 0.15);
    border-color: #e91e63;
    box-shadow: none;
}

body.dark .form-control {
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    height: 50px;
}

body.dark .form-control::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

body.dark .form-control:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #e91e63;
    box-shadow: none;
}

.btn-pink {
    background-color: #e91e63;
    /* Pink login button */
    border-color: #e91e63;
    height: 50px;
}

.btn-google {
    background-color: transparent;
    border: 1px solid;
    /* color: white; */
    height: 50px;
}

.text-muted a {
    color: inherit;
    text-decoration: none;
}

.play-button {
    width: 100px;
    height: 100px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
}

body.dark .play-button {
    background-color: rgba(255, 255, 255, 0.2);
}

.play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
    border-left: 30px solid white;
    margin-left: 5px;
    /* Adjust for visual centering */
}

.mobilePrefix {
    background-color: rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.2);
    color: black;
}

body.dark .mobilePrefix {
    background-color: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white;
}