/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    background-color: #0f0f0f;
    color: #f1f1f1;
    min-height: 100vh;
}

/* Top Navigation Bar */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    height: 56px;
    background-color: #0f0f0f;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid #2a2a2a;
}

/* Left Section */
.nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    padding: 8px;
}

.hamburger {
    width: 24px;
    height: 2px;
    background-color: #f1f1f1;
    border-radius: 2px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.logo-icon {
    width: 32px;
    height: 24px;
    background: linear-gradient(135deg, #ff0000, #cc0000);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
}

.logo-title {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Center Section */
.nav-center {
    flex: 1;
    max-width: 640px;
    display: flex;
    justify-content: center;
}

.search-container {
    display: flex;
    width: 100%;
    max-width: 580px;
}

.search-input {
    flex: 1;
    height: 40px;
    padding: 0 16px;
    background-color: #121212;
    border: 1px solid #303030;
    border-radius: 40px 0 0 40px;
    color: #f1f1f1;
    font-size: 16px;
}

.search-input:focus {
    outline: none;
    border-color: #3ea6ff;
}

.search-input::placeholder {
    color: #888;
}

.search-btn {
    width: 64px;
    height: 40px;
    background-color: #222;
    border: 1px solid #303030;
    border-left: none;
    border-radius: 0 40px 40px 0;
    cursor: pointer;
    font-size: 16px;
}

.search-btn:hover {
    background-color: #333;
}

/* Right Section */
.nav-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background-color 0.2s;
}

.icon-btn:hover {
    background-color: #272727;
}

.btn-icon {
    font-size: 20px;
}

/* --- CREATE BUTTON STYLES (UPDATED) --- */
.create-btn {
    width: auto;
    padding: 0 12px;
    border-radius: 20px;
    gap: 8px;
    /* Always show a subtle "active" background to indicate it's interactive */
    background-color: #272727; 
    transition: all 0.2s ease;
}

/* Force Create Button Text and Icon to White */
.create-btn .btn-text,
.create-btn .btn-icon {
    color: #ffffff !important;
}

/* Special Hover Effect: Brighter background + slight scale up */
.create-btn:hover {
    background-color: #3a3a3a;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Active click effect */
.create-btn:active {
    transform: scale(0.98);
}

/* --------------------------------------- */

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background-color: #cc0000;
    color: white;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0f0f0f;
}

.profile-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3ea6ff, #0066cc);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* Dropdown Styles */
.dropdown {
    position: absolute;
    top: 56px;
    right: 0;
    background-color: #272727;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    min-width: 280px;
    display: none;
    z-index: 1001;
}

.dropdown.active {
    display: block;
}

/* ADD SPACING TO RIGHT-SIDE DROPDOWNS */
.create-dropdown {
    right: 8px;
    min-width: 240px;
}

.notification-dropdown {
    right: 8px;
    min-width: 360px;
}

/* PROFILE DROPDOWN - NO SCROLLING, ALL ITEMS VISIBLE */
.profile-dropdown {
    right: 8px;
    min-width: 320px;
    max-height: none !important;
    overflow-y: visible !important;
    padding: 8px 0;
}

.dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #3a3a3a;
}

.header-text {
    font-size: 16px;
    font-weight: 500;
}

.settings-link {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    padding: 4px;
    border-radius: 50%;
}

.settings-link:hover {
    background-color: #3a3a3a;
}

.dropdown-divider {
    height: 1px;
    background-color: #3a3a3a;
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #3a3a3a;
}

.item-icon {
    font-size: 18px;
    width: 24px;
}

.item-text {
    font-size: 14px;
}

/* Notification Items */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.notification-item:hover {
    background-color: #3a3a3a;
}

.channel-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.video-title {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.upload-time {
    font-size: 12px;
    color: #aaa;
}

.notification-thumbnail {
    width: 120px;
    height: 68px;
    border-radius: 8px;
    background: linear-gradient(135deg, #333, #444);
    flex-shrink: 0;
    position: relative;
}

.notification-menu {
    position: absolute;
    top: 8px;
    right: 8px;
}

.menu-trigger {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    color: #aaa;
}

.menu-trigger:hover {
    background-color: #3a3a3a;
}

.menu-options {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #272727;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    min-width: 200px;
    display: none;
    z-index: 1002;
}

.menu-options.active {
    display: block;
}

.menu-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
}

.menu-option:hover {
    background-color: #3a3a3a;
}

/* Sidebar Styles */
.sidebar {
    width: 240px;
    background-color: #0f0f0f;
    padding: 12px 0;
    transition: transform 0.3s ease;
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 999;
}

.sidebar.collapsed {
    transform: translateX(-240px);
}

.sidebar-content {
    padding: 0 12px;
}

.sidebar-section {
    margin-bottom: 12px;
}

.sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    color: #aaa;
    font-size: 14px;
    font-weight: 500;
}

.sidebar-header:hover {
    background-color: #272727;
    border-radius: 8px;
}

.section-title {
    font-weight: 500;
}

.expand-icon {
    font-size: 12px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 10px 12px;
    color: #f1f1f1;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.2s;
    font-size: 14px;
}

.sidebar-item:hover {
    background-color: #272727;
}

.sidebar-item.active {
    background-color: #272727;
    font-weight: 500;
}

.sidebar-item .item-icon {
    font-size: 20px;
    width: 24px;
    text-align: center;
}

.sidebar-item .channel-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.sidebar-divider {
    height: 1px;
    background-color: #2a2a2a;
    margin: 12px 0;
}

/* UPDATED: Default to BLOCK so menus are open by default */
.sidebar-submenu {
    display: block; 
    margin-top: 4px;
}

/* Class to hide if toggled closed */
.sidebar-submenu.hidden {
    display: none;
}

/* Main Content */
.main-content {
    display: flex;
    margin-top: 56px;
    min-height: calc(100vh - 56px);
}

.content-area {
    flex: 1;
    padding: 0;
    background-color: #0f0f0f;
    margin-left: 240px;
    transition: margin-left 0.3s ease;
    min-width: 0;
}

.sidebar.collapsed + .content-area {
    margin-left: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-center {
        display: none;
    }
    
    .create-btn .btn-text {
        display: none;
    }
    
    .create-btn {
        width: 40px;
        height: 40px;
        padding: 0;
    }
    
    .sidebar {
        transform: translateX(-240px);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .content-area {
        margin-left: 0;
    }
}

/* Channel content */
.channel-page {
    --channel-muted: #aaa;
    --channel-border: #2b2b2b;
    width: 100%;
    max-width: 1640px;
    margin: 0 auto;
    padding-bottom: 64px;
    overflow: visible;
}

.channel-page button,
.channel-page a {
    font-family: inherit;
}

.channel-banner {
    position: relative;
    height: clamp(190px, 19vw, 310px);
    margin: 20px 28px 0;
    overflow: hidden;
    border-radius: 14px;
    background:
        linear-gradient(115deg, #1a2430 0%, #2a3544 45%, #1c222c 100%);
    background-size: cover;
    background-position: center;
}

.channel-banner::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 42%;
    background: linear-gradient(transparent, rgba(0, 0, 0, .24));
    pointer-events: none;
}

.banner-copy {
    position: absolute;
    z-index: 1;
    left: clamp(28px, 4vw, 70px);
    top: 50%;
    display: flex;
    flex-direction: column;
    transform: translateY(-50%);
    text-shadow: 0 2px 16px rgba(0, 0, 0, .35);
}

.banner-kicker {
    font-size: clamp(22px, 3vw, 46px);
    font-weight: 700;
    letter-spacing: .18em;
}

.banner-tagline {
    margin-top: 9px;
    color: rgba(255, 255, 255, .84);
    font-size: clamp(12px, 1.2vw, 17px);
    letter-spacing: .08em;
}

.channel-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px 42px 26px;
}

.channel-avatar {
    width: clamp(112px, 10vw, 152px);
    height: clamp(112px, 10vw, 152px);
    flex: 0 0 auto;
    border: 3px solid #202020;
    border-radius: 50%;
    object-fit: cover;
}

.channel-identity {
    min-width: 0;
    flex: 1;
}

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

.channel-title-row h1 {
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1.12;
    letter-spacing: -.045em;
}

.verified-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-top: 3px;
    border-radius: 50%;
    cursor: help;
    outline: none;
    filter: drop-shadow(0 2px 6px rgba(62, 166, 255, .28));
    transition: filter .22s ease, transform .22s cubic-bezier(.2, .8, .2, 1);
}

.verified-badge::before {
    content: "";
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(62, 166, 255, .22), transparent 70%);
    opacity: 0;
    transform: scale(.7);
    transition: opacity .22s ease, transform .22s ease;
}

.verified-badge svg {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.verified-badge svg > path:first-child {
    fill: #3ea6ff;
    transition: fill .2s ease;
}

.verified-check {
    fill: none;
    stroke: #fff;
    stroke-width: 2.3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.verified-badge:hover,
.verified-badge:focus-visible {
    filter: drop-shadow(0 4px 11px rgba(62, 166, 255, .5));
    transform: translateY(-1px) scale(1.14) rotate(3deg);
}

.verified-badge:hover::before,
.verified-badge:focus-visible::before {
    opacity: 1;
    transform: scale(1);
}

.verified-badge:hover svg > path:first-child,
.verified-badge:focus-visible svg > path:first-child {
    fill: #65b8f0;
}

.verified-tooltip {
    position: absolute;
    z-index: 30;
    top: calc(100% + 11px);
    left: 50%;
    display: flex;
    align-items: center;
    gap: 5px;
    width: max-content;
    max-width: 180px;
    padding: 7px 10px;
    border: 1px solid #3a3a3a;
    border-radius: 8px;
    background: #26262a;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
    color: #fff;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: 0;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -3px) scale(.94);
    transform-origin: top center;
    transition: opacity .16s ease, transform .18s cubic-bezier(.2, .8, .2, 1);
}

.verified-tooltip::after {
    content: "✓";
    order: -1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #3ea6ff;
    color: #101014;
    font-size: 9px;
    font-weight: 800;
}

.verified-tooltip::before {
    content: "";
    position: absolute;
    bottom: 100%;
    left: 50%;
    border: 5px solid transparent;
    border-bottom-color: #3a3a3a;
    transform: translateX(-50%);
}

.verified-badge:hover .verified-tooltip,
.verified-badge:focus-visible .verified-tooltip {
    opacity: 1;
    transform: translate(-50%, 0) scale(1);
}

.channel-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 10px;
    color: var(--channel-muted);
    font-size: 14px;
}

.channel-handle {
    color: #f1f1f1;
    font-weight: 500;
    text-decoration: none;
}

.channel-description {
    max-width: 760px;
    margin-top: 12px;
    color: #c7c7c7;
    font-size: 14px;
    line-height: 1.45;
}

.description-more {
    padding: 0;
    border: 0;
    background: none;
    color: #f1f1f1;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
}

.channel-links {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-top: 10px;
    color: var(--channel-muted);
    font-size: 14px;
}

.channel-links a {
    color: #3ea6ff;
    font-weight: 500;
    text-decoration: none;
}

.links-chevron {
    border: 0;
    background: none;
    color: #ddd;
    cursor: pointer;
    font-size: 22px;
}

.channel-actions {
    display: flex;
    align-self: flex-start;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
}

.join-button,
.subscribe-button,
.channel-more-button {
    height: 38px;
    border: 0;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background .18s ease, transform .18s ease;
}

.join-button {
    padding: 0 19px;
    background: #2b2b2b;
    color: #f1f1f1;
}

.subscribe-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 19px;
    background: #f1f1f1;
    color: #0f0f0f;
}

.subscribe-button.subscribed {
    background: #2b2b2b;
    color: #f1f1f1;
}

.subscribe-icon {
    font-size: 10px;
}

.subscribe-button.subscribed .subscribe-icon {
    font-size: 15px;
}

.channel-more-button {
    width: 38px;
    background: #2b2b2b;
    color: #f1f1f1;
    font-size: 20px;
}

.channel-more-wrapper {
    position: relative;
}

.channel-more-menu {
    position: absolute;
    z-index: 40;
    top: calc(100% + 9px);
    right: 0;
    width: 210px;
    overflow: hidden;
    padding: 7px 0;
    border: 1px solid #3b3b3b;
    border-radius: 11px;
    background: #282828;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
    transform-origin: top right;
    animation: channel-menu-in .15s ease-out;
}

.channel-more-menu[hidden] {
    display: none;
}

.channel-more-menu button {
    display: flex;
    align-items: center;
    gap: 13px;
    width: 100%;
    height: 42px;
    padding: 0 15px;
    border: 0;
    background: transparent;
    color: #f1f1f1;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
}

.channel-more-menu button:hover,
.channel-more-menu button:focus-visible {
    outline: none;
    background: #3b3b3b;
}

.channel-more-menu button span {
    width: 20px;
    color: #c8c8c8;
    font-size: 17px;
    text-align: center;
}

.channel-more-menu button:last-child {
    color: #ff8a80;
}

@keyframes channel-menu-in {
    from {
        opacity: 0;
        transform: translateY(-5px) scale(.97);
    }
}

.channel-toast {
    position: fixed;
    z-index: 1200;
    right: 24px;
    bottom: 24px;
    max-width: min(360px, calc(100vw - 32px));
    padding: 12px 17px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #f1f1f1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .38);
    color: #111;
    font-size: 13px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease;
}

.channel-toast.visible {
    opacity: 1;
    transform: translateY(0);
}

.channel-modal-backdrop {
    position: fixed;
    z-index: 1300;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(3px);
    animation: modal-fade-in .18s ease-out;
}

body.channel-modal-open {
    overflow: hidden;
}

.channel-modal-backdrop[hidden] {
    display: none;
}

.channel-modal {
    position: relative;
    width: min(540px, 100%);
    max-height: calc(100vh - 40px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 20px;
    background:
        radial-gradient(circle at 8% 0, rgba(62, 166, 255, .13), transparent 36%),
        linear-gradient(145deg, #252525, #1c1c1c 65%);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .68), inset 0 1px 0 rgba(255, 255, 255, .06);
    outline: none;
    animation: modal-rise-in .2s cubic-bezier(.2, .8, .2, 1);
}

.channel-modal::-webkit-scrollbar {
    width: 6px;
}

.channel-modal::-webkit-scrollbar-thumb {
    border-radius: 6px;
    background: #484848;
}

.channel-modal::before {
    content: "";
    position: absolute;
    top: 0;
    right: 14%;
    left: 14%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(98, 190, 250, .75), transparent);
}

.channel-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.channel-modal-header h2 {
    margin-top: 5px;
    font-size: 24px;
    letter-spacing: -.025em;
}

.channel-modal-header > div > p {
    max-width: 390px;
    margin-top: 7px;
    color: #9e9e9e;
    font-size: 12px;
    line-height: 1.45;
}

.modal-kicker {
    color: #70b8e8;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .13em;
}

.modal-close {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #ddd;
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
    transition: background .16s ease, transform .16s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
    outline: none;
    background: #383838;
    transform: rotate(6deg);
}

.modal-channel-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 22px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 13px;
    background: rgba(255, 255, 255, .045);
}

.modal-channel-preview img {
    width: 46px;
    height: 46px;
    border: 2px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    object-fit: cover;
}

.modal-channel-preview > div {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 4px;
}

.modal-channel-preview strong {
    font-size: 14px;
}

.modal-channel-preview strong span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3ea6ff;
    color: #fff;
    font-size: 8px;
}

.modal-channel-preview small {
    overflow: hidden;
    color: #929292;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.modal-channel-preview > i {
    color: #777;
    font-size: 18px;
    font-style: normal;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin: 24px 0;
}

.share-options button {
    display: flex;
    align-items: center;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ddd;
    cursor: pointer;
}

.share-options button > span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    background: #303030;
    color: #fff;
    font-size: 19px;
    font-weight: 600;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.share-options button:hover > span,
.share-options button:focus-visible > span {
    border-color: rgba(255, 255, 255, .32);
    transform: translateY(-3px) scale(1.05);
}

.share-options .share-copy {
    background: linear-gradient(145deg, #2378b5, #165a8c);
}

.share-options .share-email {
    background: linear-gradient(145deg, #6652c8, #4735a3);
}

.share-options .share-x {
    background: linear-gradient(145deg, #303030, #111);
}

.share-options .share-facebook {
    background: linear-gradient(145deg, #3177d1, #1552a1);
}

.share-options small {
    font-size: 11px;
}

.share-link-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 7px 7px 13px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    background: rgba(8, 8, 8, .5);
    transition: border-color .16s ease, box-shadow .16s ease;
}

.share-link-field:focus-within {
    border-color: rgba(62, 166, 255, .7);
    box-shadow: 0 0 0 3px rgba(62, 166, 255, .09);
}

.share-link-field input {
    min-width: 0;
    flex: 1;
    border: 0;
    outline: none;
    background: transparent;
    color: #bdbdbd;
    font-size: 12px;
}

.copy-link-button {
    height: 34px;
    padding: 0 16px;
    border: 0;
    border-radius: 17px;
    background: #3ea6ff;
    color: #071520;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.report-help {
    margin-top: 18px;
    color: #aaa;
    font-size: 13px;
    line-height: 1.5;
}

.report-title-row {
    display: flex;
    align-items: center;
    gap: 13px;
}

.report-shield {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border: 1px solid rgba(255, 113, 104, .22);
    border-radius: 14px;
    background: rgba(255, 81, 72, .1);
    color: #ff7a72;
    font-size: 19px;
}

.report-options {
    display: grid;
    gap: 8px;
    margin-top: 19px;
    padding: 0;
    border: 0;
}

.report-options label {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 58px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 11px;
    background: rgba(255, 255, 255, .035);
    cursor: pointer;
    font-size: 13px;
    transition: border-color .16s ease, background .16s ease;
}

.report-options label:hover,
.report-options label:has(input:checked) {
    border-color: #3ea6ff;
    background: rgba(62, 166, 255, .09);
}

.report-options input {
    width: 16px;
    height: 16px;
    accent-color: #3ea6ff;
}

.report-options label > i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 9px;
    background: #303030;
    color: #bbb;
    font-size: 13px;
    font-style: normal;
    font-weight: 600;
}

.report-options label > span {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.report-options label strong {
    font-size: 13px;
    font-weight: 500;
}

.report-options label small {
    color: #888;
    font-size: 10px;
}

.report-options label:has(input:checked) > i {
    background: #3ea6ff;
    color: #08131b;
}

.report-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 24px;
}

.report-actions button {
    height: 36px;
    padding: 0 18px;
    border: 0;
    border-radius: 18px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
}

.report-cancel {
    background: transparent;
    color: #ddd;
}

.report-cancel:hover {
    background: #333;
}

.report-submit {
    background: #3ea6ff;
    color: #071520;
}

.report-submit:disabled {
    background: #3a3a3a;
    color: #777;
    cursor: not-allowed;
}

@keyframes modal-fade-in {
    from { opacity: 0; }
}

@keyframes modal-rise-in {
    from {
        opacity: 0;
        transform: translateY(14px) scale(.98);
    }
}

@media (max-width: 480px) {
    .channel-modal-backdrop {
        align-items: end;
        padding: 0;
    }

    .channel-modal {
        width: 100%;
        max-height: calc(100vh - 24px);
        border-right: 0;
        border-bottom: 0;
        border-left: 0;
        border-radius: 18px 18px 0 0;
    }

    .share-options {
        gap: 7px;
    }
}

.join-button:hover,
.channel-more-button:hover,
.subscribe-button.subscribed:hover {
    background: #3b3b3b;
}

.subscribe-button:not(.subscribed):hover {
    background: #d9d9d9;
}

.channel-tabs {
    position: sticky;
    z-index: 20;
    top: 56px;
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 54px;
    padding: 0 38px;
    overflow-x: auto;
    border-bottom: 1px solid var(--channel-border);
    background: rgba(15, 15, 15, .96);
    scrollbar-width: none;
}

.channel-tabs::-webkit-scrollbar {
    display: none;
}

.channel-tab {
    position: relative;
    height: 38px;
    padding: 0 16px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: #aaa;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.channel-tab:hover {
    color: #f1f1f1;
    background: #222;
}

.channel-tab.active {
    background: #f1f1f1;
    color: #111;
}

.channel-tab.active::after {
    content: "";
    position: absolute;
    right: 12px;
    bottom: -9px;
    left: 12px;
    height: 2px;
    border-radius: 2px;
    background: #f1f1f1;
}

.channel-search-toggle {
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    margin-left: 6px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #f1f1f1;
    cursor: pointer;
    font-size: 25px;
}

.channel-search-toggle:hover {
    background: #272727;
}

.channel-search-box {
    flex: 1 0 190px;
}

.channel-search-box input {
    width: 100%;
    max-width: 280px;
    padding: 9px 4px;
    border: 0;
    border-bottom: 1px solid #777;
    outline: none;
    background: transparent;
    color: #f1f1f1;
    font-size: 14px;
}

.channel-panel {
    padding: 0 42px;
    outline: none;
}

.featured-section {
    display: grid;
    grid-template-columns: minmax(420px, 1.55fr) minmax(270px, .9fr);
    gap: clamp(28px, 4vw, 62px);
    align-items: center;
    padding: 38px 0 42px;
    border-bottom: 1px solid var(--channel-border);
}

.featured-thumbnail {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    background: #222;
}

.featured-thumbnail img,
.video-thumbnail img,
.short-card > a img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .35s ease, filter .35s ease;
}

.featured-thumbnail:hover img {
    transform: scale(1.02);
    filter: brightness(.76);
}

.featured-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .72);
    color: white;
    font-size: 20px;
    opacity: 0;
    transform: translate(-50%, -50%) scale(.85);
    transition: opacity .2s ease, transform .2s ease;
}

.featured-thumbnail:hover .featured-play {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.duration-badge {
    position: absolute;
    right: 7px;
    bottom: 7px;
    padding: 3px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .82);
    color: white;
    font-size: 12px;
    font-weight: 500;
}

.featured-label {
    color: #70b8e8;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
}

.featured-details h2 {
    max-width: 520px;
    margin-top: 10px;
    font-size: clamp(24px, 2.6vw, 38px);
    line-height: 1.12;
    letter-spacing: -.035em;
}

.featured-stats {
    margin-top: 12px;
    color: var(--channel-muted);
    font-size: 13px;
}

.featured-stats span {
    margin: 0 4px;
}

.featured-summary {
    max-width: 520px;
    margin-top: 17px;
    color: #c2c2c2;
    font-size: 14px;
    line-height: 1.55;
}

.watch-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 40px;
    margin-top: 22px;
    padding: 0 18px;
    border: 0;
    border-radius: 20px;
    background: #f1f1f1;
    color: #111;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
}

.watch-button span {
    font-size: 11px;
}

.content-shelf {
    padding: 34px 0 39px;
    border-bottom: 1px solid var(--channel-border);
}

.shelf-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 19px;
}

.shelf-title-group {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.shelf-title-group h2 {
    font-size: 21px;
    letter-spacing: -.02em;
}

.shelf-title-group > span {
    color: var(--channel-muted);
    font-size: 13px;
}

.shelf-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.play-all-button {
    height: 34px;
    padding: 0 13px;
    border: 0;
    border-radius: 17px;
    background: transparent;
    color: #f1f1f1;
    cursor: pointer;
    font-weight: 500;
}

.play-all-button:hover {
    background: #272727;
}

.shelf-arrow {
    width: 34px;
    height: 34px;
    border: 1px solid #3b3b3b;
    border-radius: 50%;
    background: #1d1d1d;
    color: #f1f1f1;
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
}

.shelf-arrow:hover {
    background: #333;
}

.video-scroller,
.shorts-scroller {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(250px, 1fr);
    gap: 17px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
}

.video-scroller::-webkit-scrollbar,
.shorts-scroller::-webkit-scrollbar {
    display: none;
}

.video-card,
.short-card {
    min-width: 0;
    scroll-snap-align: start;
}

.video-thumbnail {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 16 / 9;
    background: #222;
}

.thumbnail-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, .32);
    color: white;
    font-size: 20px;
    opacity: 0;
    transition: opacity .2s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.035);
}

.video-thumbnail:hover .thumbnail-overlay {
    opacity: 1;
}

.video-card h3,
.short-card h3 {
    margin-top: 11px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.35;
}

.video-card h3 {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.video-card a,
.short-card a {
    color: #f1f1f1;
    text-decoration: none;
}

.video-card p,
.short-card p {
    margin-top: 6px;
    color: var(--channel-muted);
    font-size: 13px;
}

.video-card p span {
    margin: 0 4px;
}

.shorts-mark {
    color: #f44336;
    font-size: 17px;
}

.shorts-scroller {
    grid-auto-columns: 170px;
}

.shorts-scroller .short-card {
    width: 170px;
    max-width: 170px;
    min-width: 170px;
}

.short-card > a {
    display: block;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 9 / 15;
    background: #222;
}

.short-card > a:hover img {
    transform: scale(1.025);
    filter: brightness(.82);
}

.short-card h3 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 1500px) {
    .video-scroller {
        grid-auto-columns: calc((100% - 68px) / 5);
    }

    .shorts-scroller {
        grid-auto-columns: 180px;
    }

    .shorts-scroller .short-card {
        width: 180px;
        max-width: 180px;
        min-width: 180px;
    }
}

@media (max-width: 1100px) {
    .channel-header {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .channel-actions {
        padding: 0 0 0 calc(clamp(112px, 10vw, 152px) + 24px);
        width: 100%;
    }

    .featured-section {
        grid-template-columns: minmax(340px, 1.35fr) minmax(250px, 1fr);
        gap: 28px;
    }

    .featured-summary {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }
}

@media (max-width: 820px) {
    .channel-banner {
        height: 190px;
        margin: 12px 16px 0;
        border-radius: 10px;
    }

    .channel-header {
        padding: 24px 22px;
    }

    .channel-tabs {
        padding: 0 16px;
    }

    .channel-panel {
        padding: 0 22px;
    }

    .featured-section {
        grid-template-columns: 1fr;
    }

    .featured-details {
        max-width: 650px;
    }

    .video-scroller {
        grid-auto-columns: minmax(235px, 72vw);
    }

    .shorts-scroller {
        grid-auto-columns: 150px;
    }

    .shorts-scroller .short-card {
        width: 150px;
        max-width: 150px;
        min-width: 150px;
    }
}

@media (max-width: 600px) {
    .channel-banner {
        height: 145px;
        margin: 0;
        border-radius: 0;
    }

    .channel-header {
        display: grid;
        grid-template-columns: 84px 1fr;
        gap: 18px;
        padding: 20px 16px;
    }

    .channel-avatar {
        width: 84px;
        height: 84px;
    }

    .channel-title-row h1 {
        font-size: 25px;
    }

    .channel-meta {
        gap: 5px;
        font-size: 12px;
    }

    .channel-description,
    .channel-links {
        grid-column: 1 / -1;
    }

    .channel-description {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .channel-actions {
        grid-column: 1 / -1;
        padding: 0;
    }

    .channel-panel {
        padding: 0 16px;
    }

    .featured-section {
        padding: 24px 0 31px;
    }

    .featured-details h2 {
        font-size: 25px;
    }

    .shelf-title-group > span,
    .play-all-button,
    .shelf-arrow {
        display: none;
    }

    .content-shelf {
        padding: 28px 0 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .channel-page *,
    .channel-page *::before,
    .channel-page *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* Channel tab pages */
.channel-panel[hidden] {
    display: none;
}

.tab-page-panel {
    min-height: 520px;
    padding-top: 34px;
    padding-bottom: 64px;
}

.tab-page-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 92px;
    margin-bottom: 30px;
    padding: 19px 22px;
    overflow: hidden;
    border: 1px solid #2c2c2c;
    border-radius: 14px;
    background:
        radial-gradient(circle at 0 50%, rgba(62, 166, 255, .10), transparent 38%),
        linear-gradient(110deg, #1e1e1e, #171717);
}

.tab-page-heading h2 {
    font-size: 26px;
    letter-spacing: -.04em;
}

.tab-heading-copy {
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 0;
}

.tab-heading-copy > div {
    min-width: 0;
}

.tab-heading-copy p {
    margin-top: 5px;
    color: #9d9d9d;
    font-size: 13px;
}

.tab-heading-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border: 1px solid rgba(108, 181, 229, .25);
    border-radius: 14px;
    background: rgba(62, 166, 255, .10);
    color: #79bfea;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    font-size: 18px;
}

.tab-heading-icon.shorts-icon {
    border-color: rgba(255, 84, 84, .25);
    background: rgba(255, 68, 68, .10);
    color: #ff6868;
}

.tab-heading-icon.live-icon {
    border-color: rgba(255, 55, 55, .28);
    background: rgba(255, 40, 40, .11);
    color: #f34b43;
    font-size: 14px;
}

.page-eyebrow {
    color: #6cb5e5;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
}

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

.sort-chip,
.view-toggle {
    height: 36px;
    padding: 0 16px;
    flex: 0 0 auto;
    border: 1px solid #373737;
    border-radius: 18px;
    background: rgba(39, 39, 39, .8);
    color: #f1f1f1;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
}

.sort-chip:hover,
.view-toggle:hover {
    background: #383838;
}

.sort-chip.active {
    border-color: #f1f1f1;
    background: #f1f1f1;
    color: #111;
}

.channel-video-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px 18px;
}

.channel-video-grid .video-card,
.channel-shorts-grid .short-card,
.playlist-card {
    padding: 7px;
    border-radius: 13px;
    transition: background-color .2s ease, transform .2s ease;
}

.channel-video-grid .video-card:hover,
.channel-shorts-grid .short-card:hover,
.playlist-card:hover {
    background: #1b1b1b;
    transform: translateY(-3px);
}

.channel-shorts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 170px);
    justify-content: start;
    gap: 26px 16px;
}

.channel-shorts-grid .short-card {
    width: 170px;
    max-width: 170px;
}

.channel-shorts-grid .short-card > a {
    position: relative;
    aspect-ratio: 9 / 16;
}

.short-play {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0, 0, 0, .68);
    color: #fff;
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity .18s ease;
}

.channel-shorts-grid .short-card > a:hover .short-play {
    opacity: 1;
}

.live-feature {
    display: grid;
    grid-template-columns: minmax(400px, 1.3fr) minmax(280px, .8fr);
    gap: 38px;
    align-items: center;
    padding: 0 0 40px;
    border-bottom: 1px solid var(--channel-border);
}

.live-feature-image {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 16 / 9;
    background: #222;
}

.live-feature-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .3s ease;
}

.live-feature-image:hover img {
    transform: scale(1.025);
}

.live-badge,
.live-viewers,
.premiere-badge {
    position: absolute;
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.live-badge {
    top: 12px;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #e62117;
}

.live-badge i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #fff;
    animation: live-pulse 1.5s ease-in-out infinite;
}

@keyframes live-pulse {
    50% { opacity: .35; }
}

.live-viewers {
    right: 10px;
    bottom: 10px;
    padding: 5px 7px;
    background: rgba(0, 0, 0, .82);
}

.live-feature-copy h3 {
    margin-top: 10px;
    font-size: clamp(24px, 2.5vw, 36px);
    line-height: 1.15;
    letter-spacing: -.035em;
}

.live-feature-copy p {
    max-width: 520px;
    margin-top: 15px;
    color: #bbb;
    font-size: 14px;
    line-height: 1.55;
}

.tab-section {
    padding-top: 34px;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h3 {
    font-size: 20px;
}

.compact-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px 18px;
}

.compact-card-grid .video-card {
    max-width: 480px;
}

.premiere-badge {
    right: 7px;
    bottom: 7px;
    padding: 5px 7px;
    background: #065fd4;
}

.reminder-button {
    height: 32px;
    margin-top: 12px;
    padding: 0 13px;
    border: 1px solid #454545;
    border-radius: 17px;
    background: transparent;
    color: #f1f1f1;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
}

.reminder-button.active {
    border-color: #3ea6ff;
    background: rgba(62, 166, 255, .12);
    color: #3ea6ff;
}

.playlist-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 38px 22px;
}

.playlist-cover {
    position: relative;
    display: block;
    margin-top: 9px;
    border-radius: 10px;
    aspect-ratio: 16 / 9;
    background: #272727;
    overflow: hidden;
}

.playlist-cover > img {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: block;
    border-radius: inherit;
    object-fit: cover;
}

.playlist-cover-mosaic {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(2, minmax(0, 1fr));
    gap: 2px;
    overflow: hidden;
    border-radius: inherit;
    background: #181818;
}
.playlist-cover-mosaic img { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: cover; overflow: hidden; }
.playlist-cover-mosaic.tiles-1 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.playlist-cover-mosaic.tiles-2 { grid-template-rows: 1fr; }
.playlist-cover-mosaic.tiles-3 img:first-child { grid-row: 1 / 3; }
.playlist-custom-cover { position: absolute !important; inset: 0; z-index: 3 !important; display: block; width: 100%; height: 100%; object-fit: cover; }

.playlist-stack {
    position: absolute;
    z-index: 1;
    top: -8px;
    right: 10px;
    left: 10px;
    height: 100%;
    border-radius: 10px;
    background: #555;
}

.playlist-count {
    position: absolute;
    z-index: 3;
    right: 7px;
    bottom: 7px;
    padding: 5px 7px;
    border-radius: 4px;
    background: rgba(0, 0, 0, .82);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
}

.playlist-hover {
    position: absolute;
    z-index: 4;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: inherit;
    background: rgba(0, 0, 0, .64);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .06em;
    opacity: 0;
    transition: opacity .2s ease;
}

.playlist-cover:hover .playlist-hover {
    opacity: 1;
}

.playlist-card h3 {
    margin-top: 14px;
    font-size: 15px;
}

.playlist-card p {
    margin-top: 6px;
    color: var(--channel-muted);
    font-size: 13px;
}

.view-playlist {
    display: inline-block;
    margin-top: 10px;
    color: #aaa;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
}

.view-playlist:hover {
    color: #f1f1f1;
}

.community-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px) minmax(260px, 340px);
    gap: 28px;
    align-items: start;
}

.community-feed {
    display: grid;
    gap: 22px;
}

.community-post,
.community-side-card,
.about-stats,
.community-composer {
    border: 1px solid #303030;
    border-radius: 14px;
    background: #181818;
}

.community-composer { padding: 16px; display: grid; gap: 14px; }
.community-composer textarea {
    resize: vertical;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid #303030;
    border-radius: 10px;
    background: #0f0f0f;
    color: #f1f1f1;
    font: inherit;
    font-size: 14px;
}
.community-composer textarea:focus { outline: none; border-color: #3ea6ff; }
.community-composer-actions { display: flex; align-items: center; gap: 8px; }
.composer-tool-btn {
    position: relative;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #ccc;
    cursor: pointer;
    font-size: 16px;
}
.composer-tool-btn:hover { background: #303030; }
.composer-tool-btn.active { color: #3ea6ff; background: rgba(62,166,255,.15); }
#communityAddPollBtn { margin-left: 10px; }
.composer-tool-btn[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 30;
    bottom: calc(100% + 9px);
    left: 50%;
    width: max-content;
    max-width: 160px;
    padding: 6px 9px;
    border: 1px solid #444;
    border-radius: 6px;
    background: #282828;
    box-shadow: 0 5px 18px rgba(0, 0, 0, .35);
    color: #fff;
    font-size: 11px;
    font-weight: 500;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 4px);
    transition: opacity .14s ease, transform .14s ease;
}
.composer-tool-btn[data-tooltip]::before {
    content: "";
    position: absolute;
    z-index: 30;
    bottom: calc(100% + 4px);
    left: 50%;
    border: 5px solid transparent;
    border-top-color: #444;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%);
    transition: opacity .14s ease;
}
.composer-tool-btn[data-tooltip]:hover::after,
.composer-tool-btn[data-tooltip]:hover::before,
.composer-tool-btn[data-tooltip]:focus-visible::after,
.composer-tool-btn[data-tooltip]:focus-visible::before {
    opacity: 1;
    transform: translate(-50%, 0);
}
.community-composer-preview { flex: 1; color: #aaa; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-post-btn {
    height: 34px;
    padding: 0 16px;
    border: 0;
    border-radius: 17px;
    background: #3ea6ff;
    color: #0f0f0f;
    font-weight: 700;
    cursor: pointer;
}
.composer-post-btn:disabled { background: #303030; color: #777; cursor: default; }
.community-poll-builder { display: grid; gap: 8px; }
.community-poll-builder input {
    padding: 9px 12px;
    border: 1px solid #303030;
    border-radius: 8px;
    background: #0f0f0f;
    color: #f1f1f1;
    font-size: 13px;
}
.community-poll-builder-row { display: flex; align-items: center; gap: 8px; }
.community-poll-builder-row input { flex: 1; }
.community-poll-remove-option { background: transparent; border: 0; color: #888; cursor: pointer; font-size: 16px; }
.community-poll-add-option { justify-self: start; background: transparent; border: 1px dashed #464646; border-radius: 8px; color: #ccc; padding: 6px 12px; cursor: pointer; font-size: 12px; }

.community-post {
    padding: 20px;
}

.post-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.post-author img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
}

.post-author > div {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.post-author strong {
    font-size: 14px;
}

.post-author > div > span {
    color: var(--channel-muted);
    font-size: 12px;
}

.post-author > button {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #ddd;
    cursor: pointer;
    font-size: 20px;
}

.post-author > button:hover {
    background: #303030;
}

.mini-verified {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: #aaa;
    color: #181818;
    font-size: 8px;
}

.community-post > p {
    margin: 18px 0;
    font-size: 15px;
    line-height: 1.55;
}

.community-poll {
    display: grid;
    gap: 9px;
}

.community-poll button {
    position: relative;
    display: block;
    overflow: hidden;
    padding: 12px 14px;
    border: 1px solid #464646;
    border-radius: 8px;
    background: transparent;
    color: #f1f1f1;
    cursor: pointer;
    font-size: 13px;
    text-align: left;
}

.poll-option-row {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.poll-option-row > span,
.poll-option-row > small {
    position: relative;
    z-index: 2;
}

.community-poll button i {
    position: absolute;
    z-index: 1;
    inset: 0 auto 0 0;
    background: rgba(62, 166, 255, .2);
}

.community-poll button.voted {
    border-color: #3ea6ff;
}

.post-actions {
    display: flex;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #303030;
}

.post-actions button {
    height: 34px;
    padding: 0 12px;
    border: 0;
    border-radius: 17px;
    background: transparent;
    color: #ccc;
    cursor: pointer;
    font-size: 13px;
}

.post-actions button:hover,
.post-actions .like-button.active {
    background: #303030;
    color: #f1f1f1;
}

.post-actions .like-button.active {
    color: #ff6b6b;
}

.post-gallery {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    overflow: hidden;
    border-radius: 10px;
}

.post-gallery img {
    width: 100%;
    aspect-ratio: 4 / 3;
    display: block;
    object-fit: cover;
}
.post-gallery.single { grid-template-columns: 1fr; }
.post-gallery.single img { aspect-ratio: 16 / 9; }
.post-gallery + .community-poll { margin-top: 16px; }
.post-actions .delete-button:hover { color: #ff6b6b; }
.post-actions .edit-button:hover { color: #3ea6ff; }
.post-actions .comment-toggle-button.active { background: #303030; color: #f1f1f1; }
.post-edited { color: #888; font-weight: 400; }

.post-edit-box { margin-top: 4px; }
.post-edit-input {
    width: 100%;
    min-height: 72px;
    padding: 10px 12px;
    border: 1px solid #303030;
    border-radius: 8px;
    background: #0f0f0f;
    color: #f1f1f1;
    font: inherit;
    resize: vertical;
}
.post-edit-input:focus { outline: none; border-color: #3ea6ff; }
.post-edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.post-edit-actions button {
    padding: 8px 14px;
    border: 0;
    border-radius: 18px;
    cursor: pointer;
    background: transparent;
    color: #ccc;
}
.post-edit-actions button.primary { background: #3ea6ff; color: #0f0f0f; font-weight: 700; }

.poll-option-image {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 8px;
}

.community-poll-builder-row { position: relative; flex-wrap: wrap; }
.poll-option-thumb {
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 6px;
}

.post-comments {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #303030;
    display: grid;
    gap: 12px;
}
.post-comments-list { display: grid; gap: 12px; }
.post-comments-loading,
.post-comments-empty {
    margin: 0;
    padding: 4px 0;
    color: #aaa;
    font-size: 13px;
}
.post-comment { display: flex; gap: 10px; }
.post-comment-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #3ea6ff;
    color: #0f0f0f;
    font-size: 11px;
    font-weight: 700;
}
.post-comment-body { flex: 1; min-width: 0; }
.post-comment-meta { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.post-comment-meta strong { font-size: 12.5px; }
.post-comment-meta span { color: #aaa; }
.post-comment-body p { margin: 3px 0 0; font-size: 13.5px; line-height: 1.45; word-break: break-word; }
.post-comment-delete {
    flex-shrink: 0;
    align-self: flex-start;
    border: 0;
    background: transparent;
    color: #888;
    cursor: pointer;
    font-size: 16px;
}
.post-comment-delete:hover { color: #ff6b6b; }
.post-comment-composer { display: flex; gap: 8px; }
.post-comment-composer input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #303030;
    border-radius: 16px;
    background: #0f0f0f;
    color: #f1f1f1;
    font-size: 13px;
}
.post-comment-composer input:focus { outline: none; border-color: #3ea6ff; }
.post-comment-composer button {
    padding: 0 14px;
    border: 0;
    border-radius: 16px;
    background: #3ea6ff;
    color: #0f0f0f;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
}
.post-comment-composer button:disabled { background: #303030; color: #777; cursor: default; }

.post-comment-actions { display: flex; gap: 10px; margin-top: 4px; }
.post-comment-reply-btn {
    border: 0;
    background: transparent;
    color: #aaa;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}
.post-comment-reply-btn:hover { color: #3ea6ff; }
.post-comment-reply-box { display: flex; gap: 8px; margin-top: 8px; }
.post-comment-reply-box .post-reply-input {
    flex: 1;
    padding: 7px 12px;
    border: 1px solid #303030;
    border-radius: 14px;
    background: #0f0f0f;
    color: #f1f1f1;
    font-size: 12.5px;
}
.post-comment-reply-box .post-reply-input:focus { outline: none; border-color: #3ea6ff; }
.post-reply-cancel {
    border: 0;
    background: transparent;
    color: #aaa;
    font-size: 12px;
    cursor: pointer;
}
.post-comment-reply-box button[data-post-reply-submit] {
    padding: 0 12px;
    border: 0;
    border-radius: 14px;
    background: #3ea6ff;
    color: #0f0f0f;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
}
.post-comment-reply-box button[data-post-reply-submit]:disabled { background: #303030; color: #777; cursor: default; }
.post-view-replies {
    display: inline-flex;
    align-items: center;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3ea6ff;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
}
.post-comment-replies {
    margin-top: 10px;
    padding-left: 16px;
    border-left: 2px solid #303030;
    display: grid;
    gap: 12px;
}
.post-comment-reply-item .post-comment-avatar { width: 24px; height: 24px; font-size: 10px; }

.community-side-card {
    position: sticky;
    top: 126px;
    padding: 28px;
    text-align: center;
}

.community-side-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(62, 166, 255, .13);
    color: #6cb5e5;
    font-size: 23px;
}

.community-side-card h3 {
    margin-top: 16px;
    font-size: 18px;
}

.community-side-card p {
    margin: 10px 0 20px;
    color: #aaa;
    font-size: 13px;
    line-height: 1.5;
}

.about-layout {
    display: grid;
    grid-template-columns: minmax(0, 760px) minmax(270px, 350px);
    gap: clamp(36px, 7vw, 100px);
}

.about-section + .about-section {
    margin-top: 42px;
    padding-top: 36px;
    border-top: 1px solid var(--channel-border);
}

.about-section h3,
.about-stats h3 {
    margin-bottom: 16px;
    font-size: 19px;
}

.about-section > p {
    color: #c6c6c6;
    font-size: 15px;
    line-height: 1.7;
}

.about-section > p + p {
    margin-top: 14px;
}

.about-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.about-links a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 13px;
    border-radius: 9px;
    background: #1f1f1f;
    color: #f1f1f1;
    text-decoration: none;
}

.about-links a:hover {
    background: #292929;
}

.about-links a > span {
    color: #6cb5e5;
    font-size: 18px;
}

.about-links a > span.social-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    overflow: hidden;
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon img { width: 20px; height: 20px; border-radius: 4px; object-fit: contain; }

.about-links a > div {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 3px;
}

.about-links strong {
    font-size: 13px;
}

.about-links small {
    overflow: hidden;
    color: #999;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.about-links b {
    color: #777;
    font-weight: 400;
}

.about-stats {
    height: fit-content;
    padding: 24px;
}

.about-stats dl > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-top: 1px solid #303030;
    font-size: 13px;
}

.about-stats dt {
    color: #999;
}

.about-stats dd {
    color: #eee;
    text-align: right;
}

.share-channel-button {
    width: 100%;
    height: 38px;
    margin-top: 12px;
    border: 0;
    border-radius: 19px;
    background: #f1f1f1;
    color: #111;
    cursor: pointer;
    font-weight: 500;
}

@media (max-width: 1250px) {
    .channel-video-grid,
    .playlist-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .channel-shorts-grid {
        grid-template-columns: repeat(auto-fill, 160px);
    }
}

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

    .channel-shorts-grid {
        grid-template-columns: repeat(auto-fill, 150px);
    }

    .live-feature,
    .community-layout,
    .about-layout {
        grid-template-columns: 1fr;
    }

    .community-side-card {
        position: static;
        max-width: 520px;
    }
}

@media (max-width: 600px) {
    .tab-page-panel {
        padding-top: 25px;
        padding-bottom: 44px;
    }

    .tab-page-heading {
        align-items: stretch;
        flex-direction: column;
        margin-bottom: 22px;
        padding: 17px;
    }

    .tab-page-heading h2 {
        font-size: 23px;
    }

    .tab-heading-copy p {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .tab-heading-icon {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .channel-video-grid,
    .compact-card-grid {
        grid-template-columns: 1fr;
    }

    .channel-shorts-grid {
        grid-template-columns: repeat(auto-fill, 140px);
        gap: 24px 12px;
    }

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

    .live-feature {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .about-links {
        grid-template-columns: 1fr;
    }

    .community-post {
        padding: 16px;
    }
}
