:root {
    color-scheme: light;
    color: #0f172a;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f8fafc;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
    color: #0f172a;
}

.yt-clone-site-content {
    min-height: calc(100vh - 128px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    background: #e2e8f0;
    color: #0f172a;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

.yt-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    line-height: 1;
}

.yt-search-bar {
    display: none;
}

.yt-search-bar input {
    min-width: 0;
}

@media (min-width: 640px) {
    .yt-search-bar {
        display: flex;
    }

    .mobile-search-toggle {
        display: none;
    }
}

.yt-search-bar.yt-mobile-search-open {
    display: flex;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 40;
    margin: 0;
    max-width: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
    padding: 0.75rem 1rem;
}

.site-header {
    position: relative;
}

.yt-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem 0.85rem;
    font-size: 0.8125rem;
    border-radius: 9999px;
    border: 1px solid transparent;
    background: #f8fafc;
    color: #0f172a;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.yt-pill:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
}

.yt-pill-active,
.yt-pill-active:hover {
    background: #0f172a;
    color: #ffffff;
}

.yt-video-card img {
    display: block;
    width: 100%;
    height: auto;
}

.yt-sidebar {
    width: 13rem;
    z-index: 20;
}

#page.sidebar-collapsed .yt-sidebar {
    width: 4.5rem;
    overflow: visible;
}

#page.sidebar-collapsed .yt-nav-item {
    justify-content: center;
}

#page.sidebar-collapsed .yt-sidebar .label,
#page.sidebar-collapsed .yt-nav-divider {
    display: none;
}

.yt-sidebar-backdrop {
    display: none;
}

#page.sidebar-collapsed .yt-subs-section::after {
    content: "";
    position: absolute;
    top: 0;
    right: -0.75rem;
    width: 0.75rem;
    height: 100%;
}

#page.sidebar-collapsed .yt-subs-flyout {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    top: 0;
    left: calc(100% + 0.25rem);
    width: 16rem;
    z-index: 50;
    border-radius: 1rem;
    padding: 0.75rem;
    background: #ffffff;
    box-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(15, 23, 42, 0.08);
    transition: opacity 0.15s ease, visibility 0s linear 0.2s, pointer-events 0s linear 0.2s;
}

.dark #page.sidebar-collapsed .yt-subs-flyout {
    background: #0f172a;
    border-color: rgba(255, 255, 255, 0.08);
}

#page.sidebar-collapsed .yt-subs-section:hover .yt-subs-flyout,
#page.sidebar-collapsed .yt-subs-section:focus-within .yt-subs-flyout {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 0.15s ease, visibility 0s linear 0s, pointer-events 0s linear 0s;
}

#page:not(.sidebar-collapsed) .yt-subs-section.yt-subs-list-collapsed .yt-subs-flyout {
    display: none;
}

/* Inline (expanded sidebar) Subscriptions list: the same markup is reused for
   the collapsed sidebar's hover popover, where tighter padding is correct
   because the popover has its own box padding. Inline it sits directly in
   the nav column, so its title/rows need to line up with the Home/Shorts
   items above (which get 1.5rem of left inset: 0.75rem from the nav
   container plus 0.75rem of their own padding) instead of the popover's
   narrower padding. */
#page:not(.sidebar-collapsed) .yt-subs-flyout {
    margin-top: 0.375rem;
}

#page:not(.sidebar-collapsed) .yt-subs-flyout-title {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

#page:not(.sidebar-collapsed) .yt-subs-list a,
#page:not(.sidebar-collapsed) .yt-subs-show-more {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.yt-subs-chevron {
    transition: transform 0.2s ease;
}

.yt-subs-section:not(.yt-subs-list-collapsed) .yt-subs-chevron {
    transform: rotate(90deg);
}

.yt-subs-show-more-chevron {
    transition: transform 0.2s ease;
}

.yt-subs-show-more.yt-subs-expanded .yt-subs-show-more-chevron {
    transform: rotate(180deg);
}

@media (max-width: 639px) {
    #page .yt-sidebar {
        position: fixed;
        top: 65px;
        left: 0;
        bottom: 0;
        height: auto;
        z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 10px 0 25px -10px rgba(0, 0, 0, 0.35);
    }

    #page:not(.sidebar-collapsed) .yt-sidebar {
        transform: translateX(0);
    }

    #page:not(.sidebar-collapsed) .yt-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 30;
        background: rgba(15, 23, 42, 0.5);
    }
}

body.yt-clone-video-page #page .yt-sidebar {
    position: fixed;
    top: 65px;
    left: 0;
    bottom: 0;
    height: auto;
    z-index: 40;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 10px 0 25px -10px rgba(0, 0, 0, 0.35);
}

body.yt-clone-video-page #page:not(.sidebar-collapsed) .yt-sidebar {
    transform: translateX(0);
}

body.yt-clone-video-page #page:not(.sidebar-collapsed) .yt-sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(15, 23, 42, 0.5);
}

.dark {
    color-scheme: dark;
}

.dark body {
    color: #e2e8f0;
    background: #020617;
}

.dark .site-header,
.dark .site-footer,
.dark .rounded-3xl {
    background: rgba(15, 23, 42, 0.95);
}

.dark .yt-pill-active,
.dark .yt-pill-active:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.yt-reaction-btn.yt-reaction-active {
    border-color: #7c3aed;
    background: #7c3aed;
    color: #ffffff;
}

.yt-subscribe-btn.yt-subscribed,
.yt-subscribe-btn.yt-subscribed:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.yt-subscribe-btn.yt-subscribed:hover {
    background: #cbd5e1;
}

.dark .yt-subscribe-btn.yt-subscribed,
.dark .yt-subscribe-btn.yt-subscribed:hover {
    background: #1e293b;
    color: #f1f5f9;
}

.dark .yt-subscribe-btn.yt-subscribed:hover {
    background: #334155;
}

.yt-comment-react-btn.yt-comment-react-active {
    color: #7c3aed;
}

.yt-replies-chevron {
    transition: transform 0.2s ease;
}

.yt-comment.yt-replies-open .yt-replies-toggle .yt-replies-chevron {
    transform: rotate(180deg);
}

.yt-comment .children {
    display: none;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.yt-comment.yt-replies-open .children {
    display: block;
}

.yt-comment .children > li + li {
    margin-top: 1.25rem;
}