* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --bg-primary: #0f0f0f;
    --bg-elevated: #212121;
    --bg-surface: #272727;
    --bg-hover: rgba(255, 255, 255, 0.1);
    --yt-hover: rgba(255, 255, 255, 0.1);
    --yt-hover-2: rgba(255, 255, 255, 0.2);
    --yt-ease: cubic-bezier(0.05, 0, 0, 1);
    --text-primary: #f1f1f1;
    --text-secondary: #aaaaaa;
    --border-color: rgba(255, 255, 255, 0.12);
    --yt-red: #ff0033;
    --yt-blue: #3ea6ff;
    --header-height: 56px;
    --mini-sidebar-width: 72px;
    --full-sidebar-width: 240px;
}

html,
body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    overflow-x: hidden;
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #717171;
    border-radius: 4px;
}

.hidden {
    display: none !important;
}

button {
    font-family: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

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

.yt-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
}

.yt-logo {
    display: flex;
    align-items: center;
    padding: 4px 0;
}

.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background: var(--yt-hover);
}

.icon-btn:active {
    background: var(--yt-hover-2);
}

.header-center {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 696px;
    margin: 0 24px;
}

.search-bar-container {
    position: relative;
    display: flex;
    flex: 1;
}

.mobile-search-back {
    display: none;
}

.search-form {
    display: flex;
    align-items: center;
    flex: 1;
    height: 44px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 22px;
    padding: 0 3px 0 0;
    transition: border-color 0.15s, background-color 0.15s;
}

.search-form:focus-within {
    background: #121212;
    border-color: #1c62b9;
}

.search-input-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    border-radius: 22px 0 0 22px;
    padding: 0 4px 0 18px;
    gap: 10px;
    min-width: 0;
}

.search-focus-icon {
    display: none;
    color: var(--text-primary);
    flex-shrink: 0;
}

.search-input-wrap:focus-within .search-focus-icon {
    display: flex;
}

.search-input-wrap input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 16px;
    line-height: 24px;
    font-family: inherit;
    min-width: 0;
}

.search-input-wrap input::placeholder {
    color: #9e9e9e;
}

.clear-search-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.clear-search-btn:hover {
    background: var(--yt-hover);
}

.ask-yt-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px 0 12px;
    margin-right: 4px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.2s;
}

.ask-yt-pill svg {
    width: 22px;
    height: 22px;
}

.ask-yt-pill:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.15) 100%);
}

body[data-view="watch"] .ask-yt-pill,
body[data-view="search"] .ask-yt-pill,
body[data-view="shorts"] .ask-yt-pill,
body[data-view="playlist"] .ask-yt-pill {
    display: none;
}

.search-submit-btn {
    width: 36px;
    height: 36px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    flex-shrink: 0;
    transition: background 0.2s;
}

.search-submit-btn svg {
    width: 24px;
    height: 24px;
}

.search-submit-btn:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.15) 100%);
}

.search-dropdown {
    position: absolute;
    top: 48px;
    left: 0;
    right: 0;
    background: #212121;
    border-radius: 12px;
    padding: 12px 0 6px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.7);
    z-index: 1500;
    overflow: hidden;
}

.sd-item {
    width: 100%;
    min-height: 36px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 16px;
    font-weight: 500;
    text-align: left;
    color: var(--text-primary);
}

.sd-item:hover,
.sd-item.active {
    background: rgba(255, 255, 255, 0.1);
}

.sd-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    flex-shrink: 0;
}

.sd-main {
    flex: 1;
    min-width: 0;
}

.sd-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sd-sub {
    font-size: 12px;
    font-weight: 400;
    color: var(--text-secondary);
}

.sd-thumb {
    width: 44px;
    height: 26px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.sd-remove {
    font-size: 12px;
    font-weight: 400;
    color: var(--yt-blue);
    padding: 2px 6px;
    flex-shrink: 0;
}

.sd-remove:hover {
    text-decoration: underline;
}

.sd-footer {
    text-align: right;
    padding: 6px 16px 2px;
}

.sd-footer button {
    font-size: 11px;
    font-style: italic;
    color: var(--text-secondary);
}

.sd-footer button:hover {
    color: var(--text-primary);
}

.mic-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.13) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}

.mic-btn:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.15) 100%);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.mobile-search-trigger {
    display: none;
}

.create-pill-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 16px 0 12px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.create-pill-btn:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.15) 100%);
}

.avatar-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #00897b;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 6px;
}

body.oled-theme {
    --bg-primary: #000000;
}

.account-dropdown {
    position: fixed;
    top: 52px;
    right: 16px;
    width: 300px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    background: #282828;
    border-radius: 12px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.65);
    z-index: 1600;
    padding-bottom: 4px;
}

.account-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.avatar-circle-lg {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #00897b;
    color: #fff;
    font-size: 18px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.account-info {
    min-width: 0;
}

.account-name {
    font-size: 16px;
    font-weight: 400;
    line-height: 22px;
    color: #f1f1f1;
}

.account-handle {
    font-size: 14px;
    line-height: 20px;
    color: #f1f1f1;
}

.account-link {
    display: inline-block;
    margin-top: 8px;
    color: #3ea6ff;
    font-size: 14px;
    line-height: 20px;
}

.account-link:hover {
    text-decoration: underline;
}

.dropdown-group {
    padding: 8px 0;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0;
}

.dropdown-item {
    width: 100%;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 16px;
    font-size: 14px;
    color: #f1f1f1;
    text-align: left;
    transition: background-color 0.1s;
}

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

.dd-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f1f1f1;
    flex-shrink: 0;
}

.dd-arrow {
    margin-left: auto;
    display: flex;
    align-items: center;
    color: #f1f1f1;
}

.mini-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--mini-sidebar-width);
    background: var(--bg-primary);
    padding: 4px;
    display: flex;
    flex-direction: column;
    z-index: 900;
}

.mini-nav-item {
    width: 64px;
    padding: 16px 0 14px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: var(--text-primary);
    transition: background-color 0.1s;
}

.mini-nav-item:hover {
    background: var(--yt-hover);
}

.mini-nav-item.active {
    font-weight: 500;
}

.full-sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--full-sidebar-width);
    background: var(--bg-primary);
    overflow-y: auto;
    padding: 12px;
    z-index: 1050;
    display: none;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.full-sidebar:hover {
    scrollbar-color: #717171 transparent;
}

.full-sidebar::-webkit-scrollbar-thumb {
    background: transparent;
}

.full-sidebar:hover::-webkit-scrollbar-thumb {
    background: #717171;
}

body.sidebar-expanded .full-sidebar {
    display: block;
}

body.sidebar-expanded .mini-sidebar {
    display: none;
}

body.sidebar-expanded .main-content {
    margin-left: var(--full-sidebar-width);
}

body.sidebar-collapsed .main-content {
    margin-left: var(--mini-sidebar-width);
}

body.watch-mode .mini-sidebar {
    display: none;
}

body.watch-mode .main-content {
    margin-left: 0;
}

body.watch-mode .full-sidebar {
    top: 0;
    z-index: 1300;
}

.sidebar-drawer-header {
    display: none;
    align-items: center;
    gap: 16px;
    height: 56px;
    padding: 0 4px;
    margin-bottom: 12px;
}

body.watch-mode .sidebar-drawer-header,
body.drawer-open .sidebar-drawer-header {
    display: flex;
}

body.drawer-open .full-sidebar {
    display: block;
    top: 0;
    z-index: 1300;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1250;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
}

.sidebar-heading {
    height: 40px;
    padding: 0 12px;
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.sidebar-heading-btn {
    border-radius: 10px;
}

.sidebar-heading-btn:hover {
    background: var(--yt-hover);
}

.sidebar-item {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 24px;
    font-size: 14px;
    text-align: left;
    transition: background-color 0.1s;
}

.sidebar-item>svg {
    flex-shrink: 0;
}

.sidebar-item:hover {
    background: var(--yt-hover);
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.1);
    font-weight: 500;
}

.sidebar-item.active:hover {
    background: var(--yt-hover-2);
}

.sidebar-item span:nth-child(2) {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.14);
    margin: 12px 0;
}

.sub-dot-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
    object-fit: cover;
}

.blue-dot {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--yt-blue);
    margin-left: auto;
    flex-shrink: 0;
}

.live-badge {
    margin-left: auto;
    color: var(--yt-red);
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.red-icon {
    color: var(--yt-red);
    width: 24px;
    text-align: center;
}

.main-content {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    padding: 0 24px 48px;
    transition: margin-left 0.15s ease;
}

.chips-bar {
    position: sticky;
    top: var(--header-height);
    background: rgba(15, 15, 15, 0.96);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    overflow-x: auto;
    scrollbar-width: none;
    z-index: 800;
}

.chips-bar::-webkit-scrollbar {
    display: none;
}

.chip {
    height: 32px;
    padding: 0 12px;
    border-radius: 8px;
    background: var(--yt-hover);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    display: flex;
    align-items: center;
    transition: background-color 0.5s var(--yt-ease), color 0.5s var(--yt-ease);
}

.chip:hover {
    background: var(--yt-hover-2);
}

.chip.active,
.chip.active:hover {
    background: #f1f1f1;
    color: #0f0f0f;
}

.chip-special {
    gap: 6px;
    padding-left: 10px;
}

.home-section-banner {
    font-size: 20px;
    font-weight: 700;
    padding: 12px 0 4px;
}

.custom-feed-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    margin-top: 8px;
    background: #181818;
    border: 1px solid var(--border-color);
    border-radius: 12px;
}

.custom-feed-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-right: 4px;
}

.custom-genre-chip {
    height: 30px;
    padding: 0 12px;
    border-radius: 15px;
    background: var(--yt-hover);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    transition: background-color 0.15s;
}

.custom-genre-chip:hover {
    background: var(--yt-hover-2);
}

.custom-genre-chip.active {
    background: #f1f1f1;
    color: #0f0f0f;
}

.home-scroll-sentinel {
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 16px;
    padding-top: 12px;
}

.video-card {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    padding: 12px;
    margin: -12px;
    border-radius: 16px;
}

.video-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--yt-ease);
}

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

.thumb-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
}

.thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.duration-badge {
    position: absolute;
    bottom: 8px;
    right: 8px;
    height: 20px;
    padding: 0 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.64);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: 0.35px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.video-meta-row {
    display: flex;
    gap: 12px;
    padding-top: 12px;
    position: relative;
    z-index: 1;
}

.channel-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #2b2b2b;
}

.video-text {
    flex: 1;
    min-width: 0;
    padding-right: 32px;
}

.video-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.video-channel,
.video-stats {
    font-size: 14px;
    line-height: 20px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-channel>span:first-child {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.video-channel>*:not(:first-child) {
    flex-shrink: 0;
}

.video-channel .vc-sep {
    width: 2px;
}

.video-channel .vc-play {
    flex-shrink: 0;
}

.card-more-btn {
    position: absolute;
    top: 20px;
    right: 4px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.card-more-btn:hover {
    background: var(--yt-hover);
}

.shorts-section {
    margin: 36px 0 28px;
}

.shorts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.shorts-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 700;
}

.shorts-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 16px;
}

.short-card {
    cursor: pointer;
}

.short-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
}

.short-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.short-new-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(15, 15, 15, 0.78);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
}

.short-meta {
    padding-top: 8px;
}

.short-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.short-views {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.search-view {
    max-width: 1096px;
    margin: 0 auto;
    padding-top: 8px;
}

.search-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.search-chips {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
}

.search-chips::-webkit-scrollbar {
    display: none;
}

.filters-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 18px;
    font-size: 14px;
    font-weight: 500;
    flex-shrink: 0;
}

.filters-btn:hover {
    background: var(--yt-hover);
}

.search-filters-panel {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 12px 16px 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    background: #141414;
    border-radius: 12px;
}

.sf-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 150px;
}

.sf-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    letter-spacing: 0.5px;
}

.sf-select {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 13px;
    outline: none;
}

.search-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 24px;
    align-items: start;
}

.search-results-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.search-card {
    display: flex;
    gap: 16px;
    cursor: pointer;
}

.search-thumb {
    width: 360px;
    max-width: 48%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    background: #1a1a1a;
}

.search-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.search-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.search-title {
    font-size: 18px;
    font-weight: 400;
    line-height: 26px;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-more-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-primary);
    margin: -4px -8px 0 0;
}

.search-more-btn:hover {
    background: var(--yt-hover);
}

.search-stats {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.search-channel-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--text-secondary);
}

.search-channel-row img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.search-desc {
    font-size: 12px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

.badge-tag {
    display: inline-block;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 6px;
}

.search-chapters-btn {
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 7px 10px;
    border-radius: 8px;
    background: #1f1f1f;
    font-size: 12px;
    color: var(--text-primary);
    transition: background-color 0.15s;
}

.search-chapters-btn:hover {
    background: #2b2b2b;
}

.search-chapters-list {
    margin-top: 6px;
    padding: 6px 10px;
    background: #181818;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-chapter-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 3px 0;
}

.search-chapter-row:hover {
    color: var(--text-primary);
}

.search-shorts-shelf {
    padding: 14px 0 8px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.search-shorts-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 14px;
}

.search-shorts-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.search-short-card {
    cursor: pointer;
}

.search-short-thumb {
    width: 100%;
    aspect-ratio: 9 / 16;
    border-radius: 12px;
    overflow: hidden;
    background: #1a1a1a;
    position: relative;
}

.search-short-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-short-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 19px;
    margin-top: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-short-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.knowledge-panel {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    background: #181818;
}

.kp-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.kp-title {
    font-size: 20px;
    font-weight: 500;
}

.kp-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.kp-rating-badge {
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 0 5px;
    border-radius: 3px;
    font-size: 11px;
    color: var(--text-secondary);
}

.kp-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.kp-backdrop-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 12px;
    cursor: pointer;
}

.kp-backdrop {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.kp-season-pill {
    position: absolute;
    left: 10px;
    bottom: 10px;
    height: 32px;
    padding: 0 12px;
    border-radius: 16px;
    background: rgba(15, 15, 15, 0.85);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.kp-watch-btn {
    width: 100%;
    height: 36px;
    border-radius: 18px;
    background: var(--yt-blue);
    color: #0f0f0f;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 8px;
}

.kp-watch-btn:hover {
    background: #65b8ff;
}

.kp-save-btn {
    width: 100%;
    height: 36px;
    border-radius: 18px;
    background: var(--yt-hover);
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 12px;
}

.kp-save-btn:hover {
    background: var(--yt-hover-2);
}

.kp-rows {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--border-color);
    margin-bottom: 10px;
}

.kp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.kp-row:hover .kp-row-title {
    color: var(--yt-blue);
}

.kp-row-left {
    min-width: 0;
}

.kp-row-title {
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.kp-row-sub {
    font-size: 12px;
    color: var(--text-secondary);
}

.kp-row-right {
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.kp-view-all {
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: var(--text-primary);
    padding: 4px 0;
}

.kp-overview {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 8px;
}

.subscriptions-view {
    max-width: 980px;
    margin: 0 auto;
    padding: 24px 16px 48px;
}

.subs-page-header {
    margin-bottom: 24px;
}

.subs-page-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 44px;
    margin-bottom: 14px;
}

.subs-sort-wrap {
    position: relative;
    display: inline-block;
}

.subs-sort-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 8px;
}

.subs-sort-btn:hover {
    background: var(--yt-hover);
}

.subs-sort-menu {
    position: absolute;
    top: 38px;
    left: 0;
    min-width: 170px;
    background: #282828;
    border-radius: 10px;
    padding: 6px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55);
    z-index: 40;
}

.subs-sort-opt {
    width: 100%;
    padding: 9px 16px;
    text-align: left;
    font-size: 14px;
}

.subs-sort-opt:hover {
    background: var(--yt-hover);
}

.subs-sort-opt.active {
    background: rgba(255, 255, 255, 0.14);
    font-weight: 500;
}

.subs-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.subs-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.subs-avatar-col {
    width: 240px;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}

.subs-avatar-lg {
    width: 136px;
    height: 136px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    overflow: hidden;
    object-fit: cover;
}

.subs-info-col {
    flex: 1;
    min-width: 0;
    cursor: pointer;
}

.subs-name-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.subs-name {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-primary);
}

.subs-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.subs-desc {
    font-size: 12px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.subs-action-col {
    flex-shrink: 0;
}

.subs-btn-wrap {
    position: relative;
}

.subs-status-btn {
    height: 36px;
    padding: 0 14px;
    border-radius: 18px;
    background: var(--yt-hover);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.subs-status-btn:hover {
    background: var(--yt-hover-2);
}

.subs-status-btn.unsubbed {
    background: #f1f1f1;
    color: #0f0f0f;
}

.subs-menu {
    position: absolute;
    top: 42px;
    right: 0;
    width: 185px;
    background: #282828;
    border-radius: 12px;
    padding: 6px 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
    z-index: 40;
}

.subs-menu-item {
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.subs-menu-item:hover {
    background: var(--yt-hover);
}

.playlist-view {
    max-width: 1480px;
    margin: 0 auto;
    padding: 20px 0 48px;
}

.playlist-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.playlist-hero {
    position: sticky;
    top: 76px;
    border-radius: 16px;
    overflow: hidden;
    background: #26221e;
}

.playlist-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(44px) brightness(0.45);
    transform: scale(1.25);
}

.playlist-hero-inner {
    position: relative;
    z-index: 1;
    padding: 24px;
    background: linear-gradient(180deg, rgba(15, 15, 15, 0.2) 0%, rgba(15, 15, 15, 0.85) 100%);
}

.playlist-hero-thumb-wrap {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #141414;
    cursor: pointer;
}

.playlist-hero-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.playlist-hero-title {
    font-size: 28px;
    font-weight: 700;
    margin-top: 16px;
}

.playlist-hero-owner {
    font-size: 14px;
    font-weight: 500;
    margin-top: 12px;
}

.playlist-hero-stats {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
    margin-top: 4px;
}

.playlist-hero-icons {
    display: flex;
    gap: 8px;
    margin-top: 14px;
}

.playlist-icon-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
}

.playlist-icon-circle:hover {
    background: rgba(255, 255, 255, 0.22);
}

.playlist-hero-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.playlist-play-btn {
    flex: 1;
    height: 36px;
    border-radius: 18px;
    background: #f1f1f1;
    color: #0f0f0f;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.playlist-play-btn:hover {
    background: #d9d9d9;
}

.playlist-shuffle-btn {
    flex: 1;
    height: 36px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.15);
    color: #f1f1f1;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.playlist-shuffle-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.playlist-chips {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.playlist-items-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.playlist-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 12px;
    cursor: pointer;
    position: relative;
}

.playlist-row:hover {
    background: rgba(255, 255, 255, 0.08);
}

.playlist-row-thumb {
    position: relative;
    width: 160px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a1a;
}

.playlist-row-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.playlist-row-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.playlist-row-meta {
    font-size: 12px;
    color: var(--text-secondary);
}

.playlist-row-more {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-primary);
}

.playlist-row-more:hover {
    background: var(--yt-hover);
}

.you-view {
    max-width: 1120px;
    margin: 0 auto;
    padding: 8px 16px 88px;
}

.you-mobile-topbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    margin-bottom: 12px;
}

.you-accounts-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 12px 0 14px;
    border-radius: 17px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14);
    font-size: 14px;
    font-weight: 500;
}

.you-top-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}

.you-profile-hero {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.you-avatar-xl {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #00897b;
    color: #fff;
    font-size: 32px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.you-display-name {
    font-size: 24px;
    font-weight: 700;
    line-height: 30px;
}

.you-handle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.you-hero-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    max-width: 520px;
}

.you-pill-white {
    flex: 1;
    height: 36px;
    border-radius: 18px;
    background: #f1f1f1;
    color: #0f0f0f;
    font-size: 14px;
    font-weight: 500;
}

.you-pill-dark {
    flex: 1;
    height: 36px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
}

.you-section {
    margin-bottom: 24px;
}

.you-sec-head {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text-primary);
}

.you-history-strip {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
}

.you-history-strip::-webkit-scrollbar {
    display: none;
}

.you-hist-card {
    width: 164px;
    flex-shrink: 0;
    cursor: pointer;
}

.you-hist-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #1a1a1a;
}

.you-hist-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.you-hist-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 4px;
    margin-top: 8px;
}

.you-hist-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.you-hist-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.you-lib-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.you-lib-row {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
}

.you-lib-thumb-stack {
    position: relative;
    width: 140px;
    flex-shrink: 0;
    padding-top: 6px;
}

.you-lib-thumb-cap {
    position: absolute;
    top: 0;
    left: 10px;
    right: 10px;
    height: 10px;
    border-radius: 8px 8px 0 0;
    background: rgba(255, 255, 255, 0.24);
}

.you-lib-thumb-box {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #e6e6e6;
    display: flex;
    align-items: center;
    justify-content: center;
}

.you-lib-thumb-box.dark-box {
    background: #1e2d2d;
    color: #fff;
}

.you-lib-thumb-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.you-lib-badge {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(15, 15, 15, 0.78);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.you-lib-title {
    font-size: 16px;
    font-weight: 500;
}

.you-lib-sub {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.watch-view {
    position: relative;
    padding-top: 20px;
}

.watch-ambient-glow {
    position: absolute;
    top: -12px;
    left: -24px;
    right: -24px;
    height: 760px;
    background-size: cover;
    background-position: center;
    filter: blur(110px) saturate(1.7);
    opacity: 0.24;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 0;
}

.watch-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 2400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 402px;
    gap: 24px;
    align-items: start;
}

.watch-primary {
    min-width: 0;
}

.watch-secondary {
    min-width: 0;
}

body.theater-mode .watch-view {
    padding-top: 0;
}

body.theater-mode .watch-primary {
    display: contents;
}

body.theater-mode .player-shell {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    background: #000;
    border-radius: 0;
}

body.theater-mode .player-wrapper {
    max-height: calc(100vh - 132px);
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: 0;
    margin: 0 auto;
}

body.theater-mode .watch-meta-section {
    grid-column: 1;
    grid-row: 2;
}

body.theater-mode .watch-secondary {
    grid-column: 2;
    grid-row: 2;
}

.watch-playlist-panel {
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    background: #0f0f0f;
}

.wp-header {
    background: #212121;
    padding: 12px 16px 10px;
}

.wp-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wp-title {
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.wp-close-btn:hover {
    background: var(--yt-hover);
}

.wp-meta {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.wp-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.wp-ctrl-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.wp-ctrl-btn:hover {
    background: var(--yt-hover);
    color: var(--text-primary);
}

.wp-ctrl-btn.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.16);
}

.wp-items-list {
    max-height: 410px;
    overflow-y: auto;
    padding: 6px 0;
}

.wp-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    cursor: pointer;
}

.wp-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.wp-item.active {
    background: rgba(255, 255, 255, 0.14);
}

.wp-item-idx {
    width: 20px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.wp-item-thumb {
    position: relative;
    width: 100px;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a1a;
}

.wp-item-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.wp-item-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 18px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wp-item-sub {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wp-item-remove {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.wp-item:hover .wp-item-remove {
    opacity: 1;
}

.wp-item-remove:hover {
    background: var(--yt-hover);
    color: var(--text-primary);
}

.player-shell {
    width: 100%;
    position: relative;
}

.player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    user-select: none;
}

.player-wrapper video,
.player-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    object-fit: contain;
}

.player-loading {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    z-index: 15;
    font-size: 14px;
}

.yt-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.player-error {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.86);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 16;
    padding: 20px;
    text-align: center;
}

.player-error-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pill-btn-white {
    height: 36px;
    padding: 0 16px;
    border-radius: 18px;
    background: var(--text-primary);
    color: var(--bg-primary);
    font-weight: 500;
}

.pill-btn-dark {
    height: 36px;
    padding: 0 16px;
    border-radius: 18px;
    background: var(--bg-surface);
    color: var(--text-primary);
    font-weight: 500;
}

.player-top-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.65);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #ddd;
    z-index: 12;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.player-wrapper:hover .player-top-badge {
    opacity: 1;
}

.subtitle-overlay {
    position: absolute;
    bottom: 64px;
    left: 50%;
    transform: translateX(-50%);
    max-width: 82%;
    text-align: center;
    z-index: 14;
    pointer-events: none;
}

.subtitle-cue {
    display: inline-block;
    background: rgba(8, 8, 8, 0.78);
    color: #ffffff;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 20px;
    line-height: 1.35;
    white-space: pre-line;
}

.subtitle-overlay.size-small .subtitle-cue {
    font-size: 15px;
}

.subtitle-overlay.size-large .subtitle-cue {
    font-size: 26px;
}

.player-center-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 13;
    pointer-events: none;
}

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 28px 12px 6px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    z-index: 18;
    transition: opacity 0.2s;
}

.player-wrapper.hide-controls .player-controls {
    opacity: 0;
    pointer-events: none;
}

.progress-bar-container {
    position: relative;
    height: 14px;
    display: flex;
    align-items: center;
    cursor: pointer;
    margin-bottom: 4px;
}

.progress-bg {
    position: relative;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    transition: height 0.1s;
}

.progress-bar-container:hover .progress-bg {
    height: 5px;
}

.progress-buffered {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.4);
    width: 0%;
}

.progress-played {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: #ff0033;
    width: 0%;
}

.progress-scrubber {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #ff0033;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.1s;
}

.progress-bar-container:hover .progress-scrubber {
    transform: translate(-50%, -50%) scale(1);
}

.controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 40px;
}

.controls-left,
.controls-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ctrl-btn {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    position: relative;
}

.ctrl-btn:hover {
    background: rgba(255, 255, 255, 0.12);
}

.cc-btn.active::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 9px;
    right: 9px;
    height: 2.5px;
    background: #ff0033;
    border-radius: 2px;
}

.volume-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.volume-group input[type="range"] {
    width: 0;
    opacity: 0;
    transition: width 0.2s, opacity 0.2s;
    accent-color: #fff;
    cursor: pointer;
}

.volume-group:hover input[type="range"] {
    width: 58px;
    opacity: 1;
}

.time-display {
    font-size: 13px;
    color: #fff;
    margin-left: 6px;
    white-space: nowrap;
}

.player-settings-menu {
    position: absolute;
    right: 12px;
    bottom: 58px;
    width: 265px;
    max-height: 310px;
    overflow-y: auto;
    background: rgba(28, 28, 28, 0.94);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 8px 0;
    z-index: 25;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.settings-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    font-size: 13px;
    cursor: pointer;
}

.settings-row:hover {
    background: rgba(255, 255, 255, 0.1);
}

.settings-row.active::before {
    content: '✓';
    margin-right: 8px;
    font-weight: 700;
}

.settings-val {
    color: #ddd;
    font-size: 12px;
}

.settings-sub-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 14px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 4px;
}

.settings-back-btn {
    font-size: 14px;
    font-weight: 500;
}

.settings-options-btn {
    font-size: 13px;
    text-decoration: underline;
    color: #ddd;
}

.toggle-switch {
    display: inline-block;
    width: 32px;
    height: 16px;
    background: #555;
    border-radius: 10px;
    position: relative;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.15s;
}

.toggle-switch.on {
    background: #ff0033;
}

.toggle-switch.on::after {
    transform: translateX(16px);
}

.watch-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 28px;
    margin-top: 12px;
}

.watch-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.channel-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.watch-channel-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #2b2b2b;
}

.channel-name-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 16px;
    font-weight: 500;
}

.channel-subs {
    font-size: 12px;
    color: var(--text-secondary);
}

.subscribe-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 18px;
    background: #f1f1f1;
    color: #0f0f0f;
    font-size: 14px;
    font-weight: 500;
    margin-left: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
}

.subscribe-btn:hover {
    background: #d9d9d9;
}

.subscribe-btn.subscribed {
    padding: 0 12px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.subscribe-btn.subscribed:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.15) 100%);
}

.action-buttons-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.like-dislike-pill {
    display: flex;
    align-items: center;
    height: 36px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.like-btn,
.dislike-btn {
    height: 100%;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.like-btn:hover,
.dislike-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.like-btn.active,
.dislike-btn.active {
    color: var(--yt-blue);
}

.pill-sep {
    width: 1px;
    height: 22px;
    background: rgba(255, 255, 255, 0.16);
}

.action-circle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    flex-shrink: 0;
    transition: background 0.2s;
}

.action-circle-btn:hover {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.22) 0%, rgba(255, 255, 255, 0.15) 100%);
}

.watch-more-wrap {
    position: relative;
}

.watch-more-menu {
    position: absolute;
    top: 42px;
    right: 0;
    width: 210px;
    background: #282828;
    border-radius: 12px;
    padding: 6px 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
    z-index: 50;
}

.watch-more-item {
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    font-size: 14px;
    color: var(--text-primary);
}

.watch-more-item:hover {
    background: var(--yt-hover);
}

.description-box {
    margin-top: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.description-box:hover {
    background: rgba(255, 255, 255, 0.14);
}

.desc-stats {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
}

.desc-text {
    font-size: 14px;
    line-height: 20px;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: pre-line;
}

.description-box.expanded .desc-text {
    -webkit-line-clamp: unset;
}

.desc-more-label {
    display: inline-block;
    margin-top: 4px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.wp-season-select {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: none;
    border-radius: 16px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 500;
    outline: none;
    cursor: pointer;
}

.wp-season-select option {
    background: #212121;
    color: #f1f1f1;
}

.embed-source-bar {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    pointer-events: none;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.2s;
}

.embed-source-bar>* {
    pointer-events: auto;
}

.player-wrapper:hover .embed-source-bar,
.embed-source-bar.open {
    opacity: 1;
}

.embed-badge-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 30px;
    padding: 0 10px 0 12px;
    border-radius: 15px;
    background: rgba(15, 15, 15, 0.78);
    backdrop-filter: blur(6px);
    color: #f1f1f1;
    font-size: 12px;
    font-weight: 500;
}

.embed-badge-btn:hover {
    background: rgba(40, 40, 40, 0.9);
}

.embed-source-menu {
    margin-top: 6px;
    width: 170px;
    background: rgba(28, 28, 28, 0.96);
    backdrop-filter: blur(8px);
    border-radius: 10px;
    padding: 6px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.65);
}

.embed-source-opt {
    width: 100%;
    padding: 8px 14px;
    text-align: left;
    font-size: 13px;
    color: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.embed-source-opt:hover {
    background: rgba(255, 255, 255, 0.1);
}

.embed-source-opt.active {
    color: var(--yt-blue);
    font-weight: 500;
}

.comments-section {
    margin-top: 24px;
}

.comments-header {
    display: flex;
    align-items: center;
    gap: 32px;
    margin-bottom: 24px;
}

.comments-count {
    font-size: 20px;
    font-weight: 700;
}

.comments-sort-wrap {
    position: relative;
}

.comments-sort {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.comments-sort::before {
    content: "";
    width: 24px;
    height: 24px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 5H3a1 1 0 000 2h18a1 1 0 100-2Zm-6 6H3a1 1 0 000 2h12a1 1 0 000-2Zm-6 6H3a1 1 0 000 2h6a1 1 0 000-2Z'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 5H3a1 1 0 000 2h18a1 1 0 100-2Zm-6 6H3a1 1 0 000 2h12a1 1 0 000-2Zm-6 6H3a1 1 0 000 2h6a1 1 0 000-2Z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.comments-sort-menu {
    position: absolute;
    top: 32px;
    left: 0;
    width: 156px;
    background: #282828;
    border-radius: 10px;
    padding: 6px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    z-index: 30;
}

.comments-sort-opt {
    width: 100%;
    padding: 9px 16px;
    text-align: left;
    font-size: 14px;
}

.comments-sort-opt:hover {
    background: var(--yt-hover);
}

.comments-sort-opt.active {
    background: rgba(255, 255, 255, 0.14);
}

.add-comment-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 28px;
}

.avatar-circle-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #00897b;
    color: #fff;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.add-comment-input-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.add-comment-input-col input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    font-size: 14px;
    padding: 6px 0;
    outline: none;
}

.add-comment-input-col input:focus {
    border-bottom: 2px solid var(--text-primary);
    padding-bottom: 5px;
}

.add-comment-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.comment-submit-btn {
    height: 36px;
    padding: 0 16px;
    border-radius: 18px;
    background: var(--yt-blue);
    color: #0f0f0f;
    font-weight: 500;
    font-size: 14px;
}

.comments-list,
.sc-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    position: relative;
    display: flex;
    gap: 16px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: #333;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.comment-body {
    flex: 1;
    min-width: 0;
    padding-right: 32px;
}

.comment-author-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-author {
    font-size: 13px;
    font-weight: 500;
}

.comment-time {
    font-size: 12px;
    color: var(--text-secondary);
}

.comment-text {
    font-size: 14px;
    line-height: 20px;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.comment-actions {
    display: flex;
    align-items: center;
    gap: 2px;
    margin: 4px 0 0 -8px;
}

.c-act {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 8px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 500;
    color: #f1f1f1;
    transition: background-color 0.2s;
}

.c-act span {
    color: #aaa;
}

.c-act:hover {
    background: var(--yt-hover);
}

.c-act.active {
    color: var(--yt-blue);
}

.c-act.active span {
    color: var(--yt-blue);
}

.c-dn svg {
    transform: scale(-1, -1);
}

.c-reply {
    padding: 0 12px;
    margin-left: 4px;
}

.comment-more {
    position: absolute;
    top: -6px;
    right: -8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.comment-more:hover {
    background: var(--yt-hover);
}

.comment-item.has-replies .comment-avatar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.comment-threadline {
    width: 2px;
    flex: 1;
    margin-top: 6px;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 1px;
}

.comment-replies-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    margin-left: -12px;
    border-radius: 18px;
    color: #f1f1f1;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.comment-replies-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.comment-replies-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
}

.reply-item {
    display: flex;
    gap: 12px;
}

.reply-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reply-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.reply-form-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.reply-form-row input {
    flex: 1;
    background: transparent;
    border: none;
    border-bottom: 1px solid #717171;
    color: var(--text-primary);
    font-size: 14px;
    padding: 4px 0;
    outline: none;
}

.reply-form-row input:focus {
    border-bottom-color: var(--text-primary);
}

.reply-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.reply-cancel-btn {
    height: 32px;
    padding: 0 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

.reply-cancel-btn:hover {
    background: var(--yt-hover);
}

.reply-submit-btn {
    height: 32px;
    padding: 0 14px;
    border-radius: 16px;
    background: var(--yt-blue);
    color: #0f0f0f;
    font-size: 13px;
    font-weight: 500;
}

.comments-empty {
    color: #aaa;
    font-size: 14px;
}

.related-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    margin-bottom: 16px;
}

.related-chips::-webkit-scrollbar {
    display: none;
}

.up-next-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.up-next-card {
    display: flex;
    gap: 8px;
    cursor: pointer;
    position: relative;
}

.up-next-thumb {
    position: relative;
    width: 168px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #1a1a1a;
}

.up-next-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.up-next-info {
    flex: 1;
    min-width: 0;
    padding-right: 24px;
}

.up-next-title {
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 4px;
}

.up-next-sub {
    font-size: 12px;
    line-height: 18px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.up-next-more {
    position: absolute;
    top: 0;
    right: -6px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
}

.up-next-more:hover {
    background: var(--yt-hover);
}

body.shorts-mode {
    overflow: hidden;
}

body.shorts-mode .main-content {
    padding: 0;
    min-height: 0;
}

.shorts-view {
    position: relative;
    height: calc(100vh - var(--header-height));
}

.shorts-feed {
    height: 100%;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scrollbar-width: none;
    transition: margin 0.2s;
}

.shorts-feed::-webkit-scrollbar {
    display: none;
}

.short-slide {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 8px 0;
    overflow: hidden;
    container-type: inline-size;
    scroll-snap-align: center;
    scroll-snap-stop: always;
}

.short-box {
    position: relative;
    height: 100%;
    aspect-ratio: 9 / 16;
    isolation: isolate;
}

.short-box::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: var(--sbg) center / cover;
    transform: scale(1.9, 1.1);
    filter: blur(70px) saturate(1.3);
    opacity: 0.35;
    pointer-events: none;
}

.short-player {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    overflow: hidden;
    background: #000 center/cover;
    cursor: pointer;
}

.short-player iframe {
    position: absolute;
    top: 0;
    left: 50%;
    height: 100%;
    width: 316%;
    transform: translateX(-50%);
    border: 0;
    pointer-events: none;
}

.short-ctrl {
    position: absolute;
    top: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 3;
}

.short-ctrl-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.short-ctrl-right {
    display: flex;
    align-items: center;
    gap: 0;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    border-radius: 24px;
    padding: 2px 6px;
}

.sp-btn svg,
.sp-pill-btn svg {
    width: 24px;
    height: 24px;
}

.sp-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background-color 0.2s;
}

.sp-btn:hover {
    background: rgba(60, 60, 60, 0.8);
}

.sp-pill-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    position: relative;
    transition: background-color 0.2s;
}

.sp-pill-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}

.sp-pill-btn.active::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 9px;
    right: 9px;
    height: 2px;
    background: var(--yt-red);
}

.short-popup-menu {
    position: absolute;
    top: 58px;
    right: 12px;
    width: 210px;
    background: #282828;
    border-radius: 12px;
    padding: 6px 0;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.65);
    z-index: 6;
}

.short-popup-item {
    width: 100%;
    padding: 10px 16px;
    text-align: left;
    font-size: 14px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

.short-popup-item:hover {
    background: var(--yt-hover);
}

.short-desc-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 60%;
    background: rgba(24, 24, 24, 0.96);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 16px;
    z-index: 7;
    overflow-y: auto;
}

.short-desc-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
}

.short-desc-body {
    font-size: 13px;
    color: #ddd;
    line-height: 1.5;
}

.short-progress-line {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.25);
    z-index: 4;
}

.short-progress-fill {
    height: 100%;
    width: 35%;
    background: var(--yt-red);
}

.short-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 3px;
    padding: 56px 16px 16px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    border-radius: 0 0 12px 12px;
    pointer-events: none;
    z-index: 3;
}

.short-info>* {
    pointer-events: auto;
}

.short-suggest {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    max-width: 100%;
    padding: 0 14px 0 10px;
    margin-bottom: 12px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    color: #f1f1f1;
    font-size: 14px;
    font-weight: 500;
}

.short-suggest svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.short-suggest span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.short-chan {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 500;
}

.short-chan img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.short-sub {
    height: 40px;
    padding: 0 16px;
    border-radius: 20px;
    background: #f1f1f1;
    color: #0f0f0f;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.short-sub.on {
    background: var(--yt-hover-2);
    color: #f1f1f1;
}

.short-ttl {
    font-size: 16px;
    font-weight: 700;
    line-height: 24px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.short-actions {
    align-self: flex-end;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.short-actions .sa-btn svg {
    width: 24px;
    height: 24px;
}

.shorts-nav .sa-btn {
    width: 56px;
    height: 56px;
}

.short-actions>div {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 12px;
}

.sa-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.sa-btn:hover {
    background: var(--yt-hover-2);
}

.sa-btn.on {
    color: #ff4e6a;
}

.short-audio-thumb {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    cursor: pointer;
    margin-top: 2px;
}

.shorts-nav {
    position: absolute;
    right: 24px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 3;
}

.shorts-comments {
    position: absolute;
    top: 8px;
    right: 88px;
    bottom: 8px;
    width: min(460px, 34vw);
    display: flex;
    flex-direction: column;
    background: #0f0f0f;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: none;
    z-index: 5;
}

.shorts-view.with-comments .shorts-feed {
    margin-right: calc(min(460px, 34vw) + 88px);
}

.sc-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 20px;
    font-weight: 700;
}

.sc-head .sc-count {
    margin-right: auto;
    font-size: 14px;
    font-weight: 400;
    color: #aaa;
}

.sc-head .sa-btn {
    width: 40px;
    height: 40px;
    background: none;
}

.sc-head .sa-btn:hover {
    background: var(--yt-hover);
}

.sc-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    gap: 16px;
    scrollbar-width: thin;
    scrollbar-color: #717171 transparent;
}

.sc-list .comment-item {
    gap: 12px;
}

.sc-list .comment-avatar,
.sc-list .reply-avatar {
    width: 24px;
    height: 24px;
    font-size: 11px;
}

.sc-list .comment-body {
    padding-right: 28px;
}

.sc-list .comment-author {
    font-size: 12px;
    font-weight: 700;
}

.sc-list .comment-time {
    font-size: 12px;
    color: #aaa;
}

.sc-list .comment-text {
    font-size: 14px;
    line-height: 20px;
}

.sc-list .comment-actions {
    margin: 2px 0 0 -8px;
}

.sc-list .comment-replies-toggle {
    height: 32px;
    padding: 0 8px;
    margin-left: -8px;
    font-size: 14px;
    font-weight: 700;
}

.sc-list .comment-more {
    top: -6px;
    right: -6px;
}

.sc-list .comment-threadline {
    margin-top: 8px;
}

.sc-add .avatar-circle-sm {
    width: 24px;
    height: 24px;
    font-size: 12px;
}

.sc-add {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.sc-add input {
    flex: 1;
    background: none;
    border: 0;
    border-bottom: 1px solid #717171;
    color: #f1f1f1;
    font-size: 14px;
    padding: 6px 0;
    outline: 0;
}

.sc-add input:focus {
    border-bottom-color: #f1f1f1;
}

.mobile-compass-chip,
.mobile-watch-more-btn,
.mobile-comments-preview,
.mobile-comments-close,
.short-card-more,
.sheet-drag-handle,
.short-mobile-search {
    display: none;
}

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 52px;
    background: var(--bg-primary);
    z-index: 1000;
    justify-content: space-around;
    align-items: center;
}

.mobile-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    color: var(--text-secondary);
}

.mobile-nav-btn.active {
    color: var(--text-primary);
}

.mobile-nav-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #00897b;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast {
    position: fixed;
    bottom: 24px;
    left: 24px;
    background: #f1f1f1;
    color: #0f0f0f;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    z-index: 2000;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

@media (min-width: 1600px) {
    .short-info {
        left: calc(50% - 50cqw + 54px);
        right: auto;
        width: calc(50cqw - 50% - 78px);
        max-width: 520px;
        padding: 0;
        background: none;
        bottom: 8px;
    }

    .short-ttl {
        font-size: 20px;
        line-height: 28px;
    }

    .shorts-view.with-comments .short-info {
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
        padding: 56px 16px 16px;
        bottom: 3px;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
    }

    .shorts-view.with-comments .short-ttl {
        font-size: 16px;
        line-height: 24px;
    }
}

@media (max-width: 1200px) {
    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shorts-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .watch-container {
        grid-template-columns: minmax(0, 1fr) 340px;
    }

    .search-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .knowledge-panel {
        order: -1;
    }
}

@media (max-width: 960px) {
    .shorts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .watch-container {
        grid-template-columns: 1fr;
    }

    .playlist-layout {
        grid-template-columns: 1fr;
    }

    .playlist-hero {
        position: static;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 48px;
    }

    body.sidebar-collapsed .main-content,
    body.sidebar-expanded .main-content {
        margin-left: 0;
    }

    .yt-header {
        padding: 0 8px 0 12px;
    }

    body.shorts-mode:not(.mobile-search-active) .yt-header,
    body[data-view="you"]:not(.mobile-search-active) .yt-header {
        display: none;
    }

    body.shorts-mode:not(.mobile-search-active) .main-content,
    body[data-view="you"]:not(.mobile-search-active) .main-content {
        margin-top: 0;
    }

    body.shorts-mode:not(.mobile-search-active) .main-content {
        height: 100vh;
        background: #000;
    }

    .you-mobile-topbar {
        display: flex;
    }

    #menuToggleBtn,
    .create-pill-btn,
    #notifBtn,
    #accountMenuBtn,
    .mini-sidebar,
    .ask-yt-pill,
    .hide-mobile,
    .watch-ambient-glow {
        display: none;
    }

    .mobile-bottom-nav {
        display: flex;
        bottom: 12px;
        left: 16px;
        right: 16px;
        height: 52px;
        border-radius: 26px;
        background: rgba(24, 24, 24, 0.78);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        padding: 0 8px;
    }

    .mobile-nav-btn {
        height: 40px;
        flex: 1;
        border-radius: 20px;
        justify-content: center;
        color: #f1f1f1;
    }

    .mobile-nav-btn.active {
        background: rgba(255, 255, 255, 0.16);
    }

    .mobile-nav-btn span:not(.mobile-nav-avatar) {
        display: none;
    }

    body.watch-mode .mobile-bottom-nav,
    body.mobile-search-active .mobile-bottom-nav {
        display: none;
    }

    body.watch-mode .mobile-watch-more-btn {
        display: flex;
    }

    .mobile-compass-chip {
        display: inline-flex;
        padding: 0 10px;
    }

    .main-content {
        padding: 0 0 80px;
    }

    body.watch-mode .main-content {
        padding: 0 0 24px;
    }

    .chips-bar {
        padding: 8px 12px;
        gap: 8px;
    }

    .header-center {
        display: none;
    }

    body.mobile-search-active .header-left,
    body.mobile-search-active .header-right,
    body[data-view="search"] .header-left,
    body[data-view="search"] .header-right {
        display: none;
    }

    body.mobile-search-active .header-center,
    body[data-view="search"] .header-center {
        display: flex;
        flex: 1;
        margin: 0;
        gap: 8px;
    }

    body.mobile-search-active .mobile-search-back,
    body[data-view="search"] .mobile-search-back {
        display: flex;
        width: 36px;
        height: 36px;
    }

    body.mobile-search-active .search-form,
    body[data-view="search"] .search-form {
        height: 36px;
        border: none;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 18px;
        padding: 0 4px 0 0;
    }

    body.mobile-search-active .search-input-wrap,
    body[data-view="search"] .search-input-wrap {
        padding: 0 4px 0 14px;
    }

    body.mobile-search-active .search-focus-icon,
    body[data-view="search"] .search-focus-icon,
    body.mobile-search-active .search-submit-btn,
    body[data-view="search"] .search-submit-btn {
        display: none;
    }

    body.mobile-search-active .mic-btn,
    body[data-view="search"] .mic-btn {
        display: flex;
        width: 36px;
        height: 36px;
    }

    .search-dropdown {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        border-radius: 0;
        background: #0f0f0f;
        padding: 8px 0 24px;
        overflow-y: auto;
        box-shadow: none;
    }

    .sd-item {
        min-height: 48px;
        padding: 8px 16px;
    }

    .mobile-search-trigger {
        display: flex;
    }

    .account-dropdown {
        top: 52px;
        left: 12px;
        right: auto;
    }

    .video-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 22px;
        padding: 10px 12px 4px;
    }

    .video-card {
        min-width: 0;
    }

    .video-card {
        padding: 0;
        margin: 0;
    }

    .video-card::before {
        display: none;
    }

    .thumb-wrap {
        border-radius: 12px;
    }

    .video-meta-row {
        padding: 10px 0 0;
    }

    .card-more-btn {
        top: 8px;
        right: -6px;
    }

    .shorts-section {
        margin: 20px 0 16px;
        padding: 0 12px;
    }

    .shorts-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .short-card {
        width: 100%;
        position: relative;
    }

    .short-thumb {
        border-radius: 10px;
    }

    .short-card-more {
        display: flex;
        position: absolute;
        top: 6px;
        right: 4px;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        color: #fff;
        background: rgba(0, 0, 0, 0.28);
        z-index: 2;
    }

    .short-meta {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 28px 10px 10px;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
        border-radius: 0 0 10px 10px;
        pointer-events: none;
    }

    .short-title {
        font-size: 13px;
        line-height: 17px;
        color: #fff;
    }

    .short-views {
        display: none;
    }

    .watch-view {
        padding-top: 0;
    }

    .watch-container {
        padding: 0;
        gap: 12px;
    }

    .player-shell {
        position: sticky;
        top: var(--header-height);
        z-index: 700;
    }

    .player-wrapper {
        border-radius: 0;
    }

    .watch-meta-section {
        padding: 0 12px;
    }

    .watch-title {
        font-size: 18px;
        line-height: 24px;
        margin-top: 10px;
    }

    .watch-actions-bar {
        margin-top: 10px;
        gap: 8px;
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .watch-actions-bar::-webkit-scrollbar {
        display: none;
    }

    .channel-block {
        gap: 8px;
        flex-shrink: 0;
    }

    .watch-channel-avatar {
        width: 32px;
        height: 32px;
    }

    .channel-text {
        display: none;
    }

    .subscribe-btn {
        margin-left: 2px;
        height: 32px;
        padding: 0 12px;
        font-size: 13px;
    }

    .action-buttons-row {
        flex-wrap: nowrap;
        flex-shrink: 0;
    }

    .like-dislike-pill {
        height: 32px;
    }

    .like-btn,
    .dislike-btn {
        padding: 0 10px;
        font-size: 13px;
    }

    .action-circle-btn {
        width: 32px;
        height: 32px;
    }

    .description-box {
        margin-top: 8px;
        padding: 0;
        background: transparent;
    }

    .description-box:hover {
        background: transparent;
    }

    .description-box .desc-text,
    .description-box .desc-more-label {
        display: none;
    }

    .description-box.expanded .desc-text,
    .description-box.expanded .desc-more-label {
        display: block;
    }

    .description-box.expanded {
        background: rgba(255, 255, 255, 0.08);
        padding: 12px;
    }

    .desc-stats {
        font-size: 12px;
        color: var(--text-secondary);
        font-weight: 400;
    }

    .mobile-comments-preview {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin: 12px 0;
        padding: 12px;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.08);
        cursor: pointer;
    }

    .mcp-top {
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: 14px;
    }

    .mcp-title {
        font-weight: 700;
    }

    .mcp-count {
        color: var(--text-secondary);
        font-size: 12px;
    }

    .mcp-dots {
        margin-left: auto;
        color: var(--text-secondary);
        font-size: 10px;
        letter-spacing: 2px;
    }

    .mcp-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .mcp-avatar {
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: #444;
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
    }

    .mcp-text {
        font-size: 13px;
        color: var(--text-primary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sheet-drag-handle {
        display: flex;
        justify-content: center;
        padding: 10px 0 6px;
        touch-action: none;
        cursor: grab;
    }

    .sheet-drag-handle span {
        width: 38px;
        height: 4px;
        border-radius: 2px;
        background: rgba(255, 255, 255, 0.35);
    }

    .comments-section {
        display: none;
    }

    .comments-section.mobile-sheet-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        right: 0;
        top: calc(var(--header-height) + 56.25vw);
        bottom: 0;
        margin-top: 0;
        background: #0f0f0f;
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        border-radius: 14px 14px 0 0;
        padding: 0 16px 76px;
        overflow-y: auto;
        z-index: 950;
        transition: top 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .comments-section.mobile-sheet-open.sheet-full {
        top: var(--header-height);
        border-radius: 0;
    }

    .comments-section.mobile-sheet-open .comments-header {
        margin-bottom: 14px;
        gap: 16px;
        align-items: center;
    }

    .comments-section.mobile-sheet-open .mobile-comments-close {
        display: flex;
        margin-left: auto;
    }

    .comments-section.mobile-sheet-open .add-comment-row {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        margin: 0;
        padding: 10px 16px;
        background: #0f0f0f;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        z-index: 960;
    }

    .watch-secondary {
        padding: 0;
    }

    .watch-playlist-panel {
        margin: 0 12px 14px;
    }

    .related-chips {
        padding: 0 12px;
        margin-bottom: 10px;
    }

    .up-next-list {
        padding: 0 12px;
        gap: 18px;
    }

    .up-next-card {
        flex-direction: column;
        gap: 10px;
    }

    .up-next-thumb {
        width: 100%;
        border-radius: 12px;
    }

    .up-next-info {
        padding: 0 32px 4px 0;
    }

    .up-next-title {
        font-size: 15px;
    }

    .up-next-more {
        top: auto;
        bottom: 4px;
        right: -4px;
    }

    .search-view {
        padding: 8px 0 80px;
    }

    .search-top-bar {
        padding: 0 12px;
        margin-bottom: 12px;
    }

    .search-filters-panel {
        margin: 0 12px 12px;
    }

    .search-layout {
        gap: 16px;
    }

    .knowledge-panel {
        border: none;
        border-radius: 0;
        background: #141414;
        padding: 12px;
    }

    .search-card {
        flex-direction: column;
        gap: 10px;
    }

    .search-thumb {
        width: 100%;
        max-width: 100%;
        border-radius: 0;
    }

    .search-info {
        padding: 0 12px;
    }

    .search-shorts-shelf {
        padding: 14px 12px 8px;
    }

    .search-shorts-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .subs-page-title {
        font-size: 24px;
        line-height: 30px;
    }

    .subs-avatar-col {
        width: 64px;
    }

    .subs-avatar-lg {
        width: 64px;
        height: 64px;
        font-size: 20px;
    }

    .playlist-view {
        padding: 12px 12px 84px;
    }

    .playlist-row-thumb {
        width: 130px;
    }

    .toast {
        bottom: 76px;
        left: 16px;
        right: 16px;
    }

    body.shorts-mode .mini-sidebar {
        display: none;
    }

    body.shorts-mode .main-content {
        margin-left: 0;
        padding: 0;
    }

    .shorts-view {
        height: calc(100vh - 76px);
        background: #000;
    }

    .short-slide {
        padding: 0;
        gap: 0;
    }

    .short-box {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
    }

    .short-box::before {
        display: none;
    }

    .short-player {
        border-radius: 0 0 12px 12px;
    }

    .short-player iframe {
        width: 390%;
        min-width: 100%;
        height: 100%;
    }

    .short-ctrl {
        top: 12px;
        left: 12px;
        right: 12px;
        justify-content: flex-end;
    }

    .short-ctrl-left {
        display: none;
    }

    .short-ctrl-right {
        background: transparent;
        backdrop-filter: none;
        gap: 6px;
    }

    .short-ctrl-right .sp-pill-btn {
        filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.75));
    }

    .short-mobile-search {
        display: flex;
    }

    .short-info {
        bottom: 3px;
        padding: 48px 72px 14px 14px;
        background: linear-gradient(transparent, rgba(0, 0, 0, 0.72));
        border-radius: 0 0 12px 12px;
    }

    .short-progress-line {
        bottom: 0;
    }

    .short-actions {
        position: absolute;
        right: 10px;
        bottom: 14px;
        z-index: 4;
        margin: 0;
        gap: 12px;
    }

    .short-actions>div {
        font-size: 12px;
        font-weight: 500;
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
    }

    .short-audio-thumb {
        width: 36px;
        height: 36px;
        border-radius: 6px;
        border: 1.5px solid rgba(255, 255, 255, 0.8);
    }

    .short-actions>div {
        text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
    }

    .sa-btn {
        background: transparent;
        width: 40px;
        height: 40px;
        filter: drop-shadow(0 1px 4px rgba(0, 0, 0, 0.7));
    }

    .sa-btn:hover {
        background: rgba(255, 255, 255, 0.14);
    }

    .shorts-nav {
        display: none;
    }

    .shorts-comments {
        top: 34vh;
        left: 0;
        right: 0;
        bottom: 0;
        width: auto;
        height: auto;
        border-radius: 16px 16px 0 0;
        background: #0f0f0f;
        z-index: 1100;
        transition: top 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
    }

    .shorts-comments.sheet-full {
        top: 0;
        border-radius: 0;
    }

    .shorts-view.with-comments .shorts-feed {
        margin-right: 0;
    }
}

@media (max-width: 960px) and (max-height: 540px) and (orientation: landscape) {
    .video-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        padding: 8px 16px 0;
    }

    .thumb-wrap {
        border-radius: 12px;
    }

    .video-meta-row {
        padding: 10px 0 0;
    }

    .shorts-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .watch-container {
        grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr);
        padding: 8px 16px;
        gap: 16px;
    }

    .player-shell {
        position: relative;
        top: 0;
    }

    .player-wrapper {
        border-radius: 10px;
    }

    .watch-meta-section {
        padding: 0;
    }

    .up-next-card {
        flex-direction: row;
        gap: 8px;
    }

    .up-next-thumb {
        width: 148px;
        border-radius: 8px;
    }

    .up-next-info {
        padding: 0 24px 0 0;
    }

    .up-next-more {
        top: 0;
        bottom: auto;
        right: -4px;
    }

    .comments-section.mobile-sheet-open {
        top: var(--header-height);
        left: auto;
        width: 50vw;
    }
}

#notifBtn {
    position: relative;
}

.notif-badge {
    position: absolute;
    top: 2px;
    left: 20px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    box-sizing: border-box;
    border-radius: 8px;
    background: #cc0000;
    color: #fff;
    font-size: 10px;
    font-weight: 500;
    line-height: 16px;
    text-align: center;
}

.notif-panel {
    position: fixed;
    top: calc(var(--header-height) - 2px);
    right: 16px;
    width: min(480px, calc(100vw - 16px));
    max-height: min(642px, calc(100vh - 72px));
    display: flex;
    flex-direction: column;
    background: #282828;
    border-radius: 12px;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    z-index: 2100;
}

.notif-panel.hidden {
    display: none;
}

.notif-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 8px 0 16px;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.notif-head h2 {
    font-size: 20px;
    font-weight: 700;
}

.notif-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #717171 transparent;
}

.notif-empty {
    padding: 48px 16px;
    text-align: center;
    color: #aaa;
    font-size: 14px;
}

.notif-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 8px 16px 16px;
    cursor: pointer;
}

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

.notif-dot {
    position: absolute;
    left: 5px;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: 50%;
    background: var(--yt-blue);
}

.notif-av {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.notif-av.icon {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
}

.notif-av svg {
    width: 24px;
    height: 24px;
}

.notif-text {
    flex: 1;
    min-width: 0;
}

.notif-msg {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
    color: #f1f1f1;
}

.notif-meta {
    margin-top: 8px;
    font-size: 12px;
    color: #aaa;
}

.notif-thumb {
    width: 86px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 4px;
    object-fit: cover;
    background: #1a1a1a;
}

.notif-more {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f1f1f1;
    transition: background-color 0.2s;
}

.notif-more:hover {
    background: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .notif-panel {
        top: 48px;
        left: 0;
        right: 0;
        width: auto;
        max-height: calc(100dvh - 130px);
        border-radius: 0 0 12px 12px;
    }

    .shorts-view {
        height: calc(100dvh - 76px);
    }

    .short-player::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 110px;
        background: linear-gradient(rgba(0, 0, 0, 0.55), transparent);
        pointer-events: none;
        z-index: 2;
    }

    .short-info {
        display: flex;
        flex-direction: column;
        padding: 64px 72px 16px 16px;
    }

    .short-chan {
        order: 1;
        gap: 12px;
        margin-bottom: 10px;
        font-size: 16px;
    }

    .short-chan img {
        width: 32px;
        height: 32px;
    }

    .short-sub {
        height: 36px;
        padding: 0 16px;
        font-size: 14px;
    }

    .short-ttl {
        order: 2;
        font-size: 16px;
        font-weight: 400;
        line-height: 22px;
    }

    .short-ttl b {
        font-weight: 700;
    }

    .short-suggest {
        order: 3;
        width: 100%;
        height: 44px;
        margin: 12px 0 0;
        padding: 0 16px;
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.2);
        font-size: 16px;
    }

    .shorts-view.with-comments .shorts-feed {
        height: 34vh;
        background: #000;
    }

    .shorts-view.with-comments .short-slide {
        padding: 0;
    }

    .shorts-view.with-comments .short-box {
        width: auto;
        aspect-ratio: 9 / 16;
    }

    .shorts-view.with-comments .short-player {
        border-radius: 0;
    }

    .shorts-view.with-comments .short-player::after,
    .shorts-view.with-comments .short-info,
    .shorts-view.with-comments .short-actions,
    .shorts-view.with-comments .short-ctrl,
    .shorts-view.with-comments .short-progress-line {
        display: none;
    }

    .shorts-comments {
        background: #0f0f0f;
        border: 0;
        border-radius: 12px 12px 0 0;
        box-shadow: none;
    }

    .sc-list {
        padding: 16px;
        gap: 20px;
    }

    .sc-list .comment-item {
        gap: 12px;
    }

    .sc-list .comment-avatar {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .sc-list .comment-author {
        font-size: 14px;
        font-weight: 400;
        color: #aaa;
    }

    .sc-list .comment-time {
        font-size: 14px;
    }

    .sc-list .comment-text {
        font-size: 16px;
        line-height: 24px;
    }

    .sc-list .comment-more svg {
        transform: rotate(90deg);
    }

    .sc-list .c-reply {
        font-size: 0;
        padding: 0 10px;
        margin-left: 8px;
    }

    .sc-list .c-reply::before {
        content: '';
        display: block;
        width: 24px;
        height: 24px;
        background: currentColor;
        -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1 6a4 4 0 014-4h14a4 4 0 014 4v10a4 4 0 01-4 4h-4.8l-5.105 2.836A1.41 1.41 0 017 21.604V20H5a4 4 0 01-4-4V6Zm8 12v2.601l4.229-2.35.453-.251H19a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2h4ZM7 8a1 1 0 000 2h10a1 1 0 100-2H7Zm-1 5a1 1 0 001 1h6a1 1 0 000-2H7a1 1 0 00-1 1Z'/%3E%3C/svg%3E") center / contain no-repeat;
        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1 6a4 4 0 014-4h14a4 4 0 014 4v10a4 4 0 01-4 4h-4.8l-5.105 2.836A1.41 1.41 0 017 21.604V20H5a4 4 0 01-4-4V6Zm8 12v2.601l4.229-2.35.453-.251H19a2 2 0 002-2V6a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2h4ZM7 8a1 1 0 000 2h10a1 1 0 100-2H7Zm-1 5a1 1 0 001 1h6a1 1 0 000-2H7a1 1 0 00-1 1Z'/%3E%3C/svg%3E") center / contain no-repeat;
    }

    .sc-add {
        padding: 8px 16px 12px;
    }

    .sc-add .avatar-circle-sm {
        display: none;
    }

    .sc-add input {
        height: 48px;
        padding: 0 20px;
        border: 0;
        border-radius: 24px;
        background: #272727;
        font-size: 16px;
    }
}