/* 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: 24px;
    background-color: #0f0f0f;
    margin-left: 240px;
    transition: margin-left 0.3s ease;
}

.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;
    }
}

/* Watch page: intentionally scoped away from navigation and app sidebar */
:root {
    --watch-bg: #0f0f0f;
    --watch-surface: #272727;
    --watch-surface-hover: #3f3f3f;
    --watch-text: #f1f1f1;
    --watch-muted: #aaa;
    --watch-border: #3f3f3f;
    --watch-accent: #ff0033;
    --watch-blue: #3ea6ff;
    --watch-blue-rgb: 62, 166, 255;
    --pill-bg: rgba(118,118,122,.4);
    --pill-bg-hover: rgba(118,118,122,.58);
}

html[data-theme="light"] {
    --watch-bg: #fff;
    --watch-surface: #f2f2f2;
    --watch-surface-hover: #e5e5e5;
    --watch-text: #0f0f0f;
    --watch-muted: #606060;
    --watch-border: #d8d8d8;
}

.content-area {
    min-width: 0;
    color: var(--watch-text);
    background: var(--watch-bg);
}

.watch-shell {
    max-width: 1660px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 24px;
}

.watch-primary { min-width: 0; }
.player-stage-wrap { position: relative; isolation: isolate; }

.ambient-glow {
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: 12px;
    background: transparent;
    box-shadow: 0 0 80px 36px rgb(0,0,0);
    opacity: 0;
    pointer-events: none;
    transition: opacity .8s ease, box-shadow 1.1s ease;
}
.ambient-glow.active { opacity: .55; }

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

.player-stage video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.player-big-play {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    background: rgba(255, 0, 40, .92);
    font-size: 22px;
    cursor: pointer;
    transition: transform .18s, opacity .18s;
}

.player-stage.is-playing .player-big-play { opacity: 0; pointer-events: none; }
.player-big-play:hover { transform: translate(-50%, -50%) scale(1.06); }

.player-controls {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 34px 14px 8px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .92));
    transition: opacity .2s;
}

.player-stage.controls-hidden .player-controls { opacity: 0; pointer-events: none; }

.progress-wrap { position: relative; height: 18px; display: flex; align-items: center; }
.progress-range {
    width: 100%;
    height: 4px;
    border-radius: 4px;
    background: linear-gradient(to right, #ff0033 0%, #ff0033 0%, rgba(211, 211, 211, .32) 0%, rgba(211, 211, 211, .32) 100%);
    cursor: pointer;
    accent-color: #ff0033;
    appearance: none;
    -webkit-appearance: none;
    z-index: 2;
}

.progress-range::-webkit-slider-runnable-track {
    height: 4px;
    border-radius: 4px;
    background: transparent;
}

.progress-range::-moz-range-track {
    height: 4px;
    border-radius: 4px;
    background: transparent;
}

.progress-range::-webkit-slider-thumb {
    width: 13px;
    height: 13px;
    margin-top: -4.5px;
    border: 0;
    border-radius: 50%;
    background: #ff0033;
    appearance: none;
    -webkit-appearance: none;
}

.progress-range::-moz-range-thumb {
    width: 13px;
    height: 13px;
    border: 0;
    border-radius: 50%;
    background: #ff0033;
}
.progress-wrap:hover .progress-range { height: 6px; }

.chapter-marks { position: absolute; inset: 1px 3px; pointer-events: none; z-index: 3; }
.chapter-marks i { position: absolute; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.7), 0 0 5px rgba(255,255,255,.45); transform: translateX(-1px); }
.ad-marks { position: absolute; inset: 1px 3px; pointer-events: none; z-index: 4; }
.ad-marks i { position: absolute; top: 0; bottom: 0; width: 3px; border-radius: 2px; background: #ffd400; box-shadow: 0 0 0 1px rgba(0,0,0,.7), 0 0 6px rgba(255,212,0,.65); transform: translateX(-1px); }

.seek-preview {
    position: absolute;
    left: 0;
    bottom: 25px;
    width: 184px;
    padding: 6px;
    border-radius: 7px;
    background: rgba(20, 20, 20, .96);
    color: #fff;
    text-align: center;
    transform: translateX(-50%);
    opacity: 0;
    pointer-events: none;
}

.progress-wrap:hover .seek-preview { opacity: 1; }
.preview-image { height: 96px; border-radius: 4px; background: linear-gradient(135deg, #395c75, #b7794e); margin-bottom: 5px; }
.preview-image.has-frame-preview { background-position:center; background-size:cover; background-repeat:no-repeat; }
.seek-preview strong, .seek-preview span { display: block; font-size: 11px; line-height: 1.4; }
.seek-preview span { color: #bbb; }

.control-row, .control-group { display: flex; align-items: center; }
.control-row { justify-content: space-between; }
.control-group { gap: 4px; }
.control-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 40px;
    height: 36px;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 19px;
    cursor: pointer;
    border-radius: 50%;
    transition: background .15s ease;
}
.control-btn:hover { background: rgba(255,255,255,.12); }
.control-btn small { font-size: 9px; font-weight: 700; }
.control-btn-round { width: 40px; height: 40px; background: var(--pill-bg); }
.control-btn-round:hover { background: var(--pill-bg-hover); }
.cc-btn.active { color: var(--watch-accent); }
.time-display { display: inline-flex; align-items: center; height: 40px; padding: 0 10px; color: #fff; font-size: 12px; font-weight: 600; margin-left: 2px; background: var(--pill-bg); border-radius: 999px; white-space: nowrap; }

.volume-group {
    display: flex;
    align-items: center;
    height: 40px;
    background: var(--pill-bg);
    border-radius: 999px;
    transition: background .15s ease;
}
.volume-group:hover, .volume-group:focus-within { background: var(--pill-bg-hover); }
.volume-group .control-btn-round { background: transparent; }
.volume-group .control-btn-round:hover { background: transparent; }
.volume-group input { width: 0; margin-right: 0; opacity: 0; accent-color: #fff; transition: width .2s ease, opacity .2s ease, margin .2s ease; }
.volume-group:hover input, .volume-group:focus-within input { width: 70px; margin-right: 12px; opacity: 1; }

.control-group-bubble {
    background: var(--pill-bg);
    border-radius: 999px;
    padding: 0 4px;
}

.player-menu-wrap { display: contents; }
.more-wrap { position: relative; }
.bell-wrap { position: relative; }
.bell-menu { width: 200px; }
.bell-menu button { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bell-menu button .bell-check { opacity: 0; color: var(--watch-blue); font-weight: 700; }
.bell-menu button.selected .bell-check { opacity: 1; }
.action-pill.bell-btn { width: 38px; height: 38px; min-height: 0; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; position: relative; font-size: 15px; }
.bell-btn .bell-icon { display: inline-block; transform-origin: 50% 0; }
.bell-btn.notif-on .bell-icon { animation: bellRing .6s ease; }
.bell-btn.notif-on::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(var(--watch-blue-rgb), .7);
    animation: bellPulseRing .75s ease-out;
    pointer-events: none;
}
@keyframes bellRing {
    0%, 100% { transform: rotate(0deg); }
    15%, 45%, 75% { transform: rotate(18deg); }
    30%, 60%, 90% { transform: rotate(-18deg); }
}
@keyframes bellPulseRing {
    0% { box-shadow: 0 0 0 0 rgba(var(--watch-blue-rgb), .55); opacity: 1; transform: scale(1); }
    100% { box-shadow: 0 0 0 14px rgba(var(--watch-blue-rgb), 0); opacity: 0; transform: scale(1.15); }
}
.player-menu, .action-menu {
    position: absolute;
    right: 0;
    bottom: 44px;
    width: 250px;
    padding: 10px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    background: rgba(30,30,30,.98);
    color: #fff;
    box-shadow: 0 8px 30px rgba(0,0,0,.45);
    display: none;
    z-index: 10;
}
.action-menu.active { display: grid; gap: 6px; }

.player-menu { width: 264px; max-height: 380px; overflow-y: auto; padding: 6px; border-radius: 14px; background: rgba(26,27,31,.98); right: 14px; bottom: 56px; }
.player-menu.active { display: block; }
.player-menu::-webkit-scrollbar { width: 6px; }
.player-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }

.pm-view { display: none; flex-direction: column; }
.pm-view.active { display: flex; }

.pm-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 8px; border: 0; background: transparent; color: #fff; font: inherit; font-size: 13px; text-align: left; cursor: pointer; border-radius: 8px; }
.pm-row:hover { background: rgba(255,255,255,.08); }
.pm-row-icon { display: flex; flex: 0 0 auto; color: #d8d8d8; }
.pm-row-label { flex: 1; min-width: 0; }
.pm-row-value { flex: 0 0 auto; display: flex; align-items: center; gap: 4px; color: #a3a3a3; font-size: 12.5px; }
.pm-chevron { flex: 0 0 auto; display: flex; color: #8a8a8a; }

.pm-switch { position: relative; flex: 0 0 auto; width: 40px; height: 22px; border-radius: 999px; background: #47474a; border: 0; padding: 0; cursor: pointer; transition: background .18s ease; }
.pm-switch i { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #141414; transition: transform .18s ease; }
.pm-switch.on { background: #e9e9ea; }
.pm-switch.on i { transform: translateX(18px); }

.pm-back { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 8px 12px; margin-bottom: 4px; border: 0; border-bottom: 1px solid rgba(255,255,255,.1); background: transparent; color: #fff; font: inherit; font-size: 13.5px; font-weight: 600; text-align: left; cursor: pointer; }
.pm-back:hover { color: var(--watch-accent); }

.pm-option { display: flex; align-items: center; gap: 8px; width: 100%; padding: 10px; border: 0; background: transparent; color: #ddd; font: inherit; font-size: 13px; text-align: left; cursor: pointer; border-radius: 8px; }
.pm-option:hover { background: rgba(255,255,255,.08); }
.pm-option::before { content: ''; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: transparent; }
.pm-option.selected { color: #fff; font-weight: 700; }
.pm-option.selected::before { background: var(--watch-accent); }
.pm-option-secondary { margin-top: 4px; border-top: 1px solid rgba(255,255,255,.1); border-radius: 0; padding-top: 12px; color: #9fb4ff; }

.pm-badge { display: inline-flex; align-items: center; padding: 1px 5px; margin-left: 2px; border-radius: 4px; background: var(--watch-accent, #ff0033); color: #fff; font-size: 9px; font-weight: 800; }
#settingsBtn { position: relative; }
.control-quality-badge { position: absolute; top: 1px; right: 1px; padding: 1px 4px; border-radius: 4px; background: var(--watch-accent, #ff0033); color: #fff; font-size: 8px; font-weight: 800; line-height: 1.3; }

.player-sponsor, .info-card {
    position: absolute;
    top: 18px;
    left: 18px;
    padding: 10px 14px;
    color: #fff;
    background: rgba(0,0,0,.72);
    border-radius: 7px;
    font-size: 13px;
}
.player-sponsor button, .panel-close { border: 0; background: none; color: inherit; cursor: pointer; margin-left: 10px; font-size: 18px; }
.player-info { position: absolute; top: 18px; right: 18px; width: 30px; height: 30px; border: 2px solid #fff; border-radius: 50%; color: #fff; background: rgba(0,0,0,.5); font-weight: 700; cursor: pointer; }
.info-card { left: auto; right: 18px; top: 55px; width: 250px; display: none; }
.info-card.active { display: flex; flex-direction: column; gap: 5px; }
.info-card .panel-close { position: absolute; right: 5px; top: 1px; }
.info-card span { color: #bbb; font-size: 12px; }
.player-watermark { position: absolute; right: 18px; bottom: 68px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 7px; color: #fff; background: rgba(255,0,40,.8); text-decoration: none; font-weight: 800; }

.seek-feedback { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); padding: 13px 18px; border-radius: 30px; color: #fff; background: rgba(0,0,0,.7); opacity: 0; transition: opacity .2s; }
.seek-feedback.active { opacity: 1; }
.video-unavailable {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 7%;
    background: #000;
}
.video-unavailable[hidden] { display: none; }

.video-unavailable-icon {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 0, 40, .14);
    color: var(--watch-accent, #ff0033);
    font-size: 38px;
    font-weight: 800;
    line-height: 1;
}

.video-unavailable-text {
    max-width: 420px;
}
.video-unavailable-text strong {
    display: block;
    margin-bottom: 7px;
    color: #fff;
    font-size: clamp(20px, 2.4vw, 26px);
    font-weight: 700;
    line-height: 1.3;
}
.video-unavailable-text p {
    margin: 0;
    color: var(--watch-muted, #aaa);
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 480px) {
    .video-unavailable { flex-direction: column; text-align: center; gap: 14px; }
}

.end-screen { position: absolute; inset: 0; display: none; place-content: center; gap: 20px; text-align: center; color: #fff; background: rgba(0,0,0,.78); z-index: 5; }
.end-screen.active { display: grid; }
.end-screen strong { font-size: 24px; }
.end-screen-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; max-width: 90%; margin: 0 auto; }
.end-screen button,
.end-screen .end-screen-tile {
  min-width: 140px;
  max-width: 220px;
  padding: 14px 16px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  text-align: left;
  background: #fff;
  color: #111;
}
.end-screen .end-screen-tile small {
  font-size: 11px;
  font-weight: 500;
  color: #666;
}
.end-screen .end-screen-tile[data-restart] {
  background: #ff0033;
  color: #fff;
}
.end-screen .end-screen-tile[data-restart] small { color: rgba(255,255,255,.85); }
.info-card { cursor: pointer; }
.end-screen { place-content:center; gap:16px; padding:7%; background:#000b; backdrop-filter:blur(2px); }
.end-screen-grid { display:grid; grid-template-columns:repeat(4,minmax(62px,150px)); grid-auto-flow:dense; align-items:center; gap:14px 10px; width:min(760px,94%); max-width:none; }
.end-screen .end-screen-tile { display:grid; grid-column:span 2; gap:7px; min-width:0; max-width:none; padding:0; border:0; color:#fff; background:transparent; }
.end-screen-media { position:relative; display:grid; width:100%; aspect-ratio:16/9; place-items:center; overflow:hidden; border:2px solid #fff; border-radius:4px; background:linear-gradient(145deg,#ffffff24,transparent 45%),linear-gradient(135deg,#18596d,#50345e 54%,#bd7c3c); box-shadow:0 5px 18px #0008; transition:.16s; }
.end-screen-media::after { content:""; position:absolute; inset:54% -10% -20%; background:linear-gradient(12deg,#14242d 0 38%,transparent 39%); }
.end-screen-media.has-asset { background-position:center; background-size:cover; }
.end-screen-media.has-asset::after { display:none; }.end-screen-media.has-asset b { opacity:0; }
.end-screen-media > img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.end-screen-media b { position:relative; z-index:1; display:grid; width:38px; height:38px; place-items:center; border-radius:50%; color:#fff; background:#000b; }
.end-screen-media i { position:absolute; right:4px; bottom:4px; z-index:2; padding:3px 5px; color:#fff; background:#000d; font-size:8px; font-style:normal; }
.end-screen-copy { display:grid; width:100%; overflow:hidden; text-align:left; text-shadow:0 1px 4px #000; }
.end-screen-copy strong,.end-screen-copy small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.end-screen-copy strong { font-size:12px!important; }.end-screen-copy small { color:#bbb!important; font-size:10px!important; }
.end-screen .end-screen-tile:hover .end-screen-media { border-color:var(--watch-blue); transform:scale(1.025); }
.end-screen .end-screen-tile.is-round { grid-column:span 1; justify-items:center; }
.end-screen .is-round .end-screen-media { width:min(90px,100%); aspect-ratio:1; border-radius:50%; background:linear-gradient(145deg,#5f6e7a,#20252b); }
.end-screen .is-round .end-screen-media::after,.end-screen .end-screen-link .end-screen-media::after { display:none; }
.end-screen .end-screen-subscribe .end-screen-media { background:linear-gradient(145deg,#ff3155,#b50020); }
.end-screen .end-screen-channel .end-screen-media { background:linear-gradient(145deg,#3ea6ff,#3154a4); }
.end-screen .end-screen-restart .end-screen-media { background:linear-gradient(145deg,#444,#171717); }
.end-screen .end-screen-link .end-screen-media { aspect-ratio:2.8/1; border-radius:999px; background:#263746; }
.end-screen { pointer-events:none; }
.end-screen .end-screen-tile { pointer-events:auto; }
.player-controls { z-index:8; }
.end-screen-grid:has(.is-positioned) { position:absolute; inset:0; display:block; width:100%; max-width:none; height:100%; }
.end-screen:has(.is-positioned) > strong { display:none; }
.end-screen .end-screen-tile.is-positioned { position:absolute; width:28%; transform:translate(-50%,-50%); }
.end-screen .end-screen-tile.is-positioned.is-round { width:17%; }
.end-screen .end-screen-tile.is-round .end-screen-copy { justify-items:center; text-align:center; }
.end-screen .end-screen-tile.is-round .end-screen-copy strong,.end-screen .end-screen-tile.is-round .end-screen-copy small { width:100%; text-align:center; }
.end-screen-tile[data-tooltip]::after { content:attr(data-tooltip); position:absolute; left:50%; bottom:calc(100% + 9px); z-index:20; max-width:230px; padding:8px 11px; border:1px solid #ffffff24; border-radius:7px; color:#f1f3f4; background:#202124f7; box-shadow:0 7px 20px #0009; font-size:11px; font-weight:500; line-height:1.3; white-space:nowrap; opacity:0; pointer-events:none; transform:translate(-50%,4px); transition:.14s; }
.end-screen-tile[data-tooltip]:hover::after { opacity:1; transform:translate(-50%,0); }

.video-heading { margin-top: 14px; }
.hashtag-row { display: flex; gap: 8px; margin-bottom: 4px; }
.hashtag-row a { color: var(--watch-blue); font-size: 13px; text-decoration: none; }
.video-heading h1 { color: #fff; font-size: clamp(19px, 2vw, 24px); line-height: 1.35; }

.video-actions { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; }
.channel-summary, .engagement-actions, .split-pill { display: flex; align-items: center; gap: 10px; }
.channel-summary { gap: 8px; }
.channel-avatar, .comment-avatar { flex: 0 0 auto; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; color: #fff; background: linear-gradient(135deg,#e33756,#7c244e); text-decoration: none; font-weight: 800; }
.channel-summary > div { display: flex; flex-direction: column; min-width: 0; }
.channel-name { color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; transition: color .15s ease; }
.channel-name:hover { color: #c7c7c7; }
.channel-name span { color: var(--watch-muted); }
.channel-summary small { color: #c7c7c7; font-size: 11px; }

.channel-name .verified-badge {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
    margin-left: 4px;
    color: var(--watch-blue);
    cursor: default;
}
.verified-badge svg { display: block; }
.verified-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 9px);
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 9px;
    border-radius: 6px;
    background: #000;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
    z-index: 5;
}
.verified-badge::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #000;
    opacity: 0;
    pointer-events: none;
    transition: opacity .15s ease;
}
.verified-badge:hover::after, .verified-badge:hover::before,
.verified-badge:focus::after, .verified-badge:focus::before,
.verified-badge:focus-visible::after, .verified-badge:focus-visible::before { opacity: 1; }
.subscribe-btn {
    position: relative;
    overflow: hidden;
    border: 0;
    border-radius: 20px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
    color: #fff;
    background: var(--watch-accent);
    transition: background-color .25s ease, color .25s ease, transform .15s ease;
}
.subscribe-btn:hover { background: #d40029; }
.subscribe-btn:active { transform: scale(.96); }
.subscribe-btn.subscribed { color: var(--watch-text); background: var(--watch-surface); }
.subscribe-btn.subscribed:hover { background: var(--watch-surface-hover); }
.subscribe-btn.pulse { animation: subscribeBtnPulse .42s ease; }
@keyframes subscribeBtnPulse {
    0% { transform: scale(1); }
    40% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,.5);
    transform: scale(0);
    opacity: 1;
    pointer-events: none;
    animation: btnRippleExpand .6s ease-out forwards;
}
@keyframes btnRippleExpand {
    to { transform: scale(1); opacity: 0; }
}
.confetti-burst { position: fixed; width: 0; height: 0; z-index: 9999; pointer-events: none; }
.confetti-piece {
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 6px;
    opacity: 1;
    animation: confettiFly .85s cubic-bezier(.2,.7,.3,1) forwards;
}
.confetti-piece.is-round { border-radius: 50%; }
@keyframes confettiFly {
    0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
    70% { opacity: 1; }
    100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.4); opacity: 0; }
}
.join-btn {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--watch-border);
    border-radius: 20px;
    padding: 10px 16px;
    cursor: pointer;
    font-weight: 700;
    color: var(--watch-text);
    background: transparent;
    transition: background-color .2s ease, border-color .2s ease, transform .15s ease;
}
.join-btn:hover { background: var(--watch-surface-hover); border-color: var(--watch-muted); }
.join-btn:active { transform: scale(.96); }
.action-pill, .split-pill button { min-height: 38px; padding: 0 14px; border: 0; color: var(--watch-text); background: var(--watch-surface); cursor: pointer; font-weight: 600; }
.action-pill { border-radius: 20px; }
.action-pill:hover, .split-pill button:hover { background: var(--watch-surface-hover); }
.split-pill { gap: 0; border-radius: 20px; overflow: hidden; background: var(--watch-surface); }
.split-pill button:first-child { border-right: 1px solid var(--watch-border); }
.split-pill button.active { color: var(--watch-blue); }
.reaction-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-variant-numeric: tabular-nums;
}
.reaction-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    display: block;
    overflow: visible;
    transition: transform .15s ease;
}
.reaction-icon .thumb-hand {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.65;
    stroke-linejoin: round;
    stroke-linecap: round;
    transition: fill .15s ease, stroke-width .15s ease;
}
.reaction-icon .thumb-pad {
    fill: currentColor;
    stroke: none;
}
.reaction-icon-down { transform: rotate(180deg); }
.reaction-btn:hover .reaction-icon { transform: translateY(-1px); }
.reaction-btn:hover .reaction-icon-down { transform: rotate(180deg) translateY(-1px); }
.reaction-btn.active .reaction-icon .thumb-hand {
    fill: currentColor;
    stroke-width: 1;
}
.reaction-btn.active:hover .reaction-icon { transform: translateY(-1px) scale(1.04); }
.reaction-btn.active:hover .reaction-icon-down { transform: rotate(180deg) translateY(-1px) scale(1.04); }
#likeCount, #dislikeCount { min-width: 1ch; }
.action-menu { top: 44px; bottom: auto; }
.action-menu button { padding: 10px; color: #fff; background: transparent; text-align: left; border: 0; border-radius: 6px; cursor: pointer; }
.action-menu button:hover { background: #444; }

.description-card { position: relative; margin: 8px 0 24px; padding: 14px; border-radius: 12px; background: var(--watch-surface); font-size: 14px; }
.description-card:not(.expanded) { cursor: pointer; }
.description-stats { display: flex; gap: 10px; margin-bottom: 8px; }
.description-stats span { padding: 2px 6px; color: #111; background: #fff; border-radius: 4px; font-size: 10px; font-weight: 800; }
.description-body { max-height: 45px; overflow: hidden; line-height: 1.5; }
.description-card.expanded .description-body { max-height: none; }
.description-body p { margin-bottom: 12px; }
.description-body a, .comment a { color: var(--watch-blue); text-decoration: none; }
.description-body .desc-link,
.description-body .desc-channel,
.description-body .timestamp {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
    vertical-align: baseline;
}
.description-body .timestamp { font-variant-numeric: tabular-nums; font-weight: 700; }
.description-chapters { overflow: hidden; margin: 16px 0 5px; border: 1px solid rgba(255,255,255,.16); border-radius: 12px; background: rgba(255,255,255,.055); }
.description-chapters header { display: flex; align-items: center; gap: 11px; padding: 13px 15px; border-bottom: 1px solid rgba(255,255,255,.12); }
.description-chapters header div { display: grid; }
.description-chapters header strong { font-size: 15px; }
.description-chapters header small { color: var(--watch-muted); font-size: 11px; }
.description-chapters-icon { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 8px; color: var(--watch-blue); background: rgba(62,166,255,.14); font-size: 20px; }
.description-chapter-list { display: flex; gap: 8px; overflow-x: auto; padding: 10px; scrollbar-width: thin; scroll-snap-type: x proximity; }
.description-body .description-chapter { position:relative; display:grid; grid-template-columns:1fr; flex:0 0 205px; gap:0; width:205px; overflow:hidden; padding:0; border:1px solid rgba(255,255,255,.1); border-radius:9px; background:rgba(0,0,0,.18); scroll-snap-align:start; }
.description-chapter-thumb { display:block; width:100%; aspect-ratio:16/9; overflow:hidden; background:#111; }
.description-chapter-thumb img { width:100%; height:100%; object-fit:cover; transition:transform .2s; }
.description-chapter-copy { display:grid; grid-template-columns:44px minmax(0,1fr); gap:7px; align-items:center; padding:8px 10px; }
.description-chapter-copy b { color:var(--watch-blue); font-size:12px; font-variant-numeric:tabular-nums; }
.description-chapter em { overflow: hidden; color: var(--watch-text); font-style: normal; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.description-chapter i { position:absolute; right:8px; top:8px; display:grid; width:28px; height:28px; place-items:center; border-radius:50%; color:#fff; background:#000b; font-size:10px; font-style:normal; }
.description-chapter:hover { border-color: rgba(62,166,255,.55); background: rgba(255,255,255,.08); }
.description-chapter:hover .description-chapter-thumb img { transform:scale(1.035); }
.description-chapter:hover em { text-decoration: underline; }
.description-body .desc-favicon {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex: 0 0 auto;
    background: rgba(255,255,255,0.08);
    object-fit: contain;
}
.description-body .desc-empty { opacity: .75; }
.show-more-btn { margin-top: 8px; border: 0; color: var(--watch-text); background: transparent; font-weight: 700; cursor: pointer; }
.music-credit { display: flex; align-items: center; gap: 12px; padding: 12px; margin: 12px 0; border: 1px solid var(--watch-border); border-radius: 10px; }
.music-credit > span { font-size: 25px; }
.music-credit div { display: flex; flex-direction: column; }
.music-credit small { color: var(--watch-muted); }
.shorts-strip { display: flex; gap: 10px; overflow-x: auto; padding: 8px 0; }
.shorts-strip button { flex: 0 0 145px; height: 190px; padding: 14px; display: flex; flex-direction: column; justify-content: flex-end; border: 0; border-radius: 10px; color: #fff; text-align: left; background: linear-gradient(25deg,#283048,#859398); }
.shorts-strip button:nth-child(2) { background: linear-gradient(25deg,#134e5e,#71b280); }
.shorts-strip button:nth-child(3) { background: linear-gradient(25deg,#603813,#b29f94); }
.shorts-strip span { font-size: 11px; margin-bottom: 4px; }

.comments-header { display: flex; align-items: center; gap: 24px; margin-bottom: 24px; }
.comments-header h2 { font-size: 20px; }
.sort-toggle { display: flex; padding: 3px; border-radius: 20px; background: var(--watch-surface); }
.sort-toggle button { padding: 7px 14px; border: 0; border-radius: 17px; color: var(--watch-muted); background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s ease, color .15s ease; }
.sort-toggle button.active { color: var(--watch-text); background: var(--watch-surface-hover); }

.comment-composer { display: flex; gap: 14px; margin-bottom: 26px; }
.comment { display: flex; gap: 14px; margin-bottom: 6px; }
.comment-composer > div, .comment-content { flex: 1; min-width: 0; }
.comment-avatar { width: 40px; height: 40px; font-size: 13px; }
.comment-avatar.tone-a { background: linear-gradient(135deg,#e33756,#7c244e); }
.comment-avatar.tone-b { background: linear-gradient(135deg,#c9822f,#7a4712); }
.comment-avatar.tone-c { background: linear-gradient(135deg,#3d8fd6,#1c4f7c); }
.comment-avatar.tone-d { background: linear-gradient(135deg,#3fae86,#1f5f47); }
.comment-avatar.tone-e { background: linear-gradient(135deg,#9b6fe0,#5a3b93); }

.comment-composer textarea {
    width: 100%;
    min-height: 20px;
    padding: 10px 14px;
    border: 1px solid var(--watch-border);
    border-radius: 14px;
    outline: 0;
    color: var(--watch-text);
    background: var(--watch-surface);
    font: inherit;
    resize: vertical;
    transition: border-color .15s ease;
}
.comment-composer textarea:focus { border-color: var(--watch-blue); }
.comment-composer { position: relative; }
.comment-composer:not(.is-active) .composer-actions { display: none; }
.composer-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 10px; }
.composer-actions button { padding: 9px 16px; border: 0; border-radius: 18px; color: var(--watch-text); background: transparent; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s ease; }
.composer-actions button:hover { background: var(--watch-surface); }
.composer-actions .primary { color: #0f0f0f; background: var(--watch-blue); }
.composer-actions .primary:hover { filter: brightness(1.08); }
.composer-actions .primary:disabled { opacity: .4; cursor: default; filter: none; }
.composer-actions .primary:disabled:hover { background: var(--watch-blue); }
#emojiBtn { width: 36px; height: 36px; padding: 0; border-radius: 50%; font-size: 16px; }

.emoji-picker {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 20;
    width: 300px;
    max-height: 260px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--watch-border);
    border-radius: 12px;
    background: var(--watch-surface);
    box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.emoji-picker-section + .emoji-picker-section { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--watch-border); }
.emoji-picker-label { display: block; margin-bottom: 6px; color: var(--watch-muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.emoji-picker-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.emoji-picker-item {
    position: relative;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    transition: background .15s ease;
}
.emoji-picker-item:hover { background: var(--watch-surface-hover); }
.emoji-picker-item img { width: 22px; height: 22px; object-fit: contain; }
.emoji-picker-add { color: var(--watch-muted); font-size: 20px; font-weight: 700; border: 1px dashed var(--watch-border); }
.emoji-picker-remove {
    position: absolute;
    top: -4px;
    right: -4px;
    display: grid;
    place-items: center;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    color: #fff;
    background: #ff4e67;
    font-size: 10px;
    line-height: 1;
    opacity: 0;
    transition: opacity .15s ease;
}
.emoji-picker-custom:hover .emoji-picker-remove { opacity: 1; }
.comment-emoji { width: 20px; height: 20px; vertical-align: middle; object-fit: contain; margin: 0 1px; }
.comment-empty { padding: 28px 0; text-align: center; color: var(--watch-muted); opacity: .85; }

.comment { padding: 10px; margin-left: -10px; margin-right: -10px; border-radius: 12px; transition: background .15s ease; }
.comment:hover { background: var(--watch-surface); }
.comment-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; }
.comment-meta strong { font-size: 13px; font-weight: 700; }
.comment-time, .comment-edited { color: var(--watch-muted); font-size: 12px; font-weight: 400; }
.comment-body-text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.comment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-top: 4px; }
.comment-actions button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 11px;
    border: 0;
    border-radius: 16px;
    color: var(--watch-muted);
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s ease, color .15s ease;
}
.comment-actions button:hover { background: var(--watch-surface-hover); color: var(--watch-text); }
.comment-like svg { fill: none; stroke: currentColor; stroke-width: 1.8; }
.comment-like.is-liked { color: #ff4e67; }
.comment-like.is-liked svg { fill: #ff4e67; stroke: #ff4e67; }
.comment-actions button.danger, .comment-delete { color: #ff6b6b; }
.comment-actions button.danger:hover, .comment-delete:hover { background: rgba(255,107,107,.12); color: #ff6b6b; }
.comment-edit-box { margin-top: 8px; }
.comment-edit-input {
  width: 100%;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid var(--watch-border);
  border-radius: 8px;
  background: var(--watch-surface);
  color: var(--watch-text);
  font: inherit;
  resize: vertical;
}
.comment-edit-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.comment-edit-actions button {
  padding: 8px 14px;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  background: transparent;
  color: var(--watch-text);
}
.comment-edit-actions button.primary { background: var(--watch-blue); color: #fff; }
.view-replies { color: var(--watch-blue); font-weight: 700; }

.comment-reply-box { margin-top: 10px; display: flex; gap: 10px; }
.comment-reply-box .comment-reply-input {
  flex: 1;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid var(--watch-border);
  border-radius: 8px;
  background: var(--watch-surface);
  color: var(--watch-text);
  font: inherit;
  resize: vertical;
}
.comment-reply-box .comment-reply-input:focus { border-color: var(--watch-blue); outline: none; }
.comment-reply-actions { display: flex; flex-direction: column; gap: 6px; }
.comment-reply-actions button {
  padding: 6px 14px;
  border: 0;
  border-radius: 18px;
  cursor: pointer;
  background: transparent;
  color: var(--watch-text);
  font-size: 12.5px;
}
.comment-reply-actions button.primary { background: var(--watch-blue); color: #fff; }
.comment-reply-actions button.primary:disabled { background: var(--watch-surface-hover); color: var(--watch-muted); cursor: default; }
.comment-view-replies {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 4px 4px 4px 0;
  border: 0;
  background: transparent;
  color: var(--watch-blue);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.comment-view-replies svg { transition: transform .15s ease; }
.comment-view-replies.active svg { transform: rotate(180deg); }
.comment-replies { margin-top: 6px; padding-left: 22px; border-left: 2px solid var(--watch-border); }
.comment-replies .comment { margin-left: 0; }
.comment-replies .comment-avatar { width: 32px; height: 32px; font-size: 11px; }
.creator-heart { position: relative; color: #ff4e67; }
.creator-heart i { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; color: #fff; background: #b42342; font-size: 7px; }
.load-more { width: 100%; padding: 10px; border: 1px solid var(--watch-border); border-radius: 20px; color: var(--watch-blue); background: transparent; cursor: pointer; font-weight: 700; }

.recommendations-rail { min-width: 0; }
.up-next-header { display: flex; justify-content: space-between; align-items: center; }
.up-next-header { margin-bottom: 12px; }
.up-next-header label { display: flex; align-items: center; gap: 8px; color: var(--watch-muted); font-size: 12px; text-transform: uppercase; font-weight: 700; }
.up-next-header input { accent-color: var(--watch-blue); }
.autoplay-switch { cursor:pointer; user-select:none; }
.autoplay-switch input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.autoplay-switch > span { position:relative; display:block; width:36px; height:20px; flex:0 0 36px; border-radius:999px; background:#606060; box-shadow:inset 0 0 0 1px #ffffff1f; transition:background .18s,box-shadow .18s; }
.autoplay-switch > span::after { content:""; position:absolute; top:3px; left:3px; width:14px; height:14px; border-radius:50%; background:#fff; box-shadow:0 1px 4px #0008; transition:transform .18s; }
.autoplay-switch input:checked + span { background:var(--watch-blue); }
.autoplay-switch input:checked + span::after { transform:translateX(16px); }
.autoplay-switch input:focus-visible + span { box-shadow:0 0 0 2px var(--watch-bg),0 0 0 4px var(--watch-blue); }
.recommendation-card { display: grid; grid-template-columns: 168px 1fr; gap: 9px; margin-bottom: 10px; color: var(--watch-text); text-decoration: none; }
.recommendation-card.up-next { padding-bottom: 12px; border-bottom: 1px solid var(--watch-border); }
.recommendation-thumb { position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background-size: cover; background-position: center; }
.recommendation-thumb span { position: absolute; right: 4px; bottom: 4px; padding: 3px 4px; border-radius: 3px; color: #fff; background: rgba(0,0,0,.8); font-size: 11px; }
.recommendation-thumb.mountain { background-image: linear-gradient(20deg,rgba(0,0,0,.1),transparent),url('https://images.unsplash.com/photo-1464822759023-fed622ff2c3b?auto=format&fit=crop&w=500&q=70'); }
.recommendation-thumb.ocean { background-image: url('https://images.unsplash.com/photo-1507525428034-b723cf961d3e?auto=format&fit=crop&w=500&q=70'); }
.recommendation-thumb.forest { background-image: url('https://images.unsplash.com/photo-1448375240586-882707db888b?auto=format&fit=crop&w=500&q=70'); }
.recommendation-thumb.desert { background-image: url('https://images.unsplash.com/photo-1509316785289-025f5b846b35?auto=format&fit=crop&w=500&q=70'); }
.recommendation-thumb.cabin { background-image: url('https://images.unsplash.com/photo-1449158743715-0a90ebb6d2d8?auto=format&fit=crop&w=500&q=70'); }
.recommendation-card > div:last-child { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.recommendation-card strong { font-size: 14px; line-height: 1.28; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.recommendation-card span, .recommendation-card small { color: var(--watch-muted); font-size: 12px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 3000; transform: translate(-50%,20px); padding: 11px 18px; border-radius: 7px; color: #fff; background: #303030; opacity: 0; pointer-events: none; transition: .2s; }
.toast.active { opacity: 1; transform: translate(-50%,0); }
.watch-dialog { width: min(92vw, 480px); padding: 24px; border: 1px solid var(--watch-border); border-radius: 14px; color: var(--watch-text); background: var(--watch-surface); }
.watch-dialog::backdrop { background: rgba(0,0,0,.65); }
.watch-dialog h2 { margin-bottom: 20px; }
.watch-dialog > label { display: flex; gap: 10px; align-items: center; padding: 10px 0; }
.dialog-close { float: right; border: 0; color: var(--watch-text); background: transparent; font-size: 24px; cursor: pointer; }
.dialog-primary { float: right; margin-top: 16px; padding: 10px 18px; border: 0; border-radius: 20px; background: var(--watch-blue); cursor: pointer; font-weight: 700; }

/* Save-to-playlist dialog */
#saveDialog {
    position: fixed;
    inset: 0;
    width: min(92vw, 520px);
    max-height: min(88vh, 650px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--watch-border) 75%, white 8%);
    border-radius: 20px;
    background: color-mix(in srgb, var(--watch-surface) 94%, #111);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .58);
}

#saveDialog::backdrop {
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(5px);
}

#saveDialog[open] { animation: save-dialog-in .2s ease-out; }

@keyframes save-dialog-in {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.save-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--watch-border);
}

.save-dialog-title { display: flex; align-items: center; gap: 13px; }
.save-dialog-title h2 { margin: 0; font-size: 20px; line-height: 1.2; }
.save-dialog-title p { margin-top: 4px; color: var(--watch-muted); font-size: 12px; }

.save-dialog-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #ff1647, #c50032);
    font-size: 24px;
    box-shadow: 0 7px 18px rgba(255, 0, 51, .22);
}

#saveDialog .dialog-close {
    float: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 50%;
    color: var(--watch-muted);
    line-height: 1;
    transition: color .15s, background-color .15s;
}

#saveDialog .dialog-close:hover { color: var(--watch-text); background: var(--watch-surface-hover); }

.save-video-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 18px 24px 8px;
    padding: 10px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--watch-bg) 55%, transparent);
}

.save-preview-image {
    position: relative;
    flex: 0 0 96px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, #2a5368, #cf8859);
}

.save-preview-image i {
    position: absolute;
    right: 4px;
    bottom: 4px;
    padding: 2px 4px;
    border-radius: 3px;
    color: #fff;
    background: rgba(0, 0, 0, .78);
    font-size: 10px;
    font-style: normal;
}

.save-video-preview > div,
.playlist-option-copy { display: flex; flex-direction: column; min-width: 0; }

.save-video-preview strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.save-video-preview small,
.playlist-option-copy small { margin-top: 4px; color: var(--watch-muted); font-size: 11px; }
.save-playlist-list { padding: 8px 16px 14px; }

#saveDialog .save-playlist-option {
    display: grid;
    grid-template-columns: 24px 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 12px 10px;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color .15s;
}

#saveDialog .save-playlist-option:hover { background: var(--watch-surface-hover); }
.save-playlist-option input { position: absolute; opacity: 0; pointer-events: none; }

.custom-check {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 2px solid var(--watch-muted);
    border-radius: 6px;
    color: transparent;
    font-size: 13px;
    transition: background-color .15s, border-color .15s, color .15s;
}

.save-playlist-option input:checked + .custom-check {
    border-color: var(--watch-blue);
    color: #07131b;
    background: var(--watch-blue);
}

.save-playlist-option input:focus-visible + .custom-check {
    outline: 2px solid var(--watch-blue);
    outline-offset: 2px;
}

.playlist-option-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--watch-text);
    background: color-mix(in srgb, var(--watch-surface-hover) 76%, transparent);
    font-size: 19px;
}

.playlist-option-copy strong { font-size: 14px; }
.playlist-privacy { color: var(--watch-muted); font-size: 11px; }

.save-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--watch-border);
    background: color-mix(in srgb, var(--watch-bg) 35%, transparent);
}

.new-playlist-btn {
    padding: 9px 12px;
    border: 0;
    border-radius: 18px;
    color: var(--watch-text);
    background: transparent;
    cursor: pointer;
    font-weight: 700;
}

.new-playlist-btn:hover { background: var(--watch-surface-hover); }

#saveDialog .dialog-primary {
    float: none;
    min-width: 88px;
    margin: 0;
    color: #07131b;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--watch-blue) 24%, transparent);
}

.create-playlist-panel {
    margin: 4px 16px 12px;
    padding: 16px 16px 14px;
    border: 1px solid var(--watch-border);
    border-radius: 16px;
    background:
        linear-gradient(165deg, color-mix(in srgb, var(--watch-blue) 8%, transparent), transparent 42%),
        color-mix(in srgb, var(--watch-surface) 92%, #000 8%);
    box-shadow: inset 0 1px 0 color-mix(in srgb, #fff 6%, transparent);
}

.create-playlist-panel[hidden] { display: none !important; }

.create-playlist-panel h3 {
    margin: 0 0 4px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.create-playlist-hint {
    margin: 0 0 14px;
    color: var(--watch-muted);
    font-size: 12.5px;
    line-height: 1.4;
}

.create-playlist-field {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
}

.create-playlist-field > span {
    font-size: 12px;
    font-weight: 600;
    color: var(--watch-muted);
    letter-spacing: 0.01em;
}

.create-playlist-field input,
.create-playlist-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 14px;
    border: 1px solid var(--watch-border);
    border-radius: 12px;
    color: var(--watch-text);
    background: color-mix(in srgb, var(--watch-bg) 82%, #000 18%);
    font: inherit;
    font-size: 14px;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}

.create-playlist-field input::placeholder {
    color: color-mix(in srgb, var(--watch-muted) 85%, transparent);
}

.create-playlist-field input:hover,
.create-playlist-field select:hover {
    border-color: color-mix(in srgb, var(--watch-blue) 35%, var(--watch-border));
}

.create-playlist-field input:focus,
.create-playlist-field select:focus {
    outline: none;
    border-color: color-mix(in srgb, var(--watch-blue) 70%, var(--watch-border));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--watch-blue) 22%, transparent);
    background: color-mix(in srgb, var(--watch-bg) 70%, transparent);
}

.create-playlist-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 2px;
}

#saveDialog .dialog-secondary {
    padding: 9px 14px;
    border: 0;
    border-radius: 18px;
    color: var(--watch-text);
    background: transparent;
    cursor: pointer;
    font-weight: 600;
}

#saveDialog .dialog-secondary:hover {
    background: var(--watch-surface-hover);
}

#saveDialog.create-mode .save-playlist-list,
#saveDialog.create-mode .save-dialog-footer,
#saveDialog.create-mode .save-video-preview {
    display: none;
}

#saveDialog.create-mode .save-dialog-header h2::after {
    content: none;
}

#saveDialog.create-mode .save-dialog-title p {
    opacity: 0;
    height: 0;
    margin: 0;
    overflow: hidden;
}

#saveDialog.create-mode .save-dialog-title h2 {
    font-size: 0;
}

#saveDialog.create-mode .save-dialog-title h2::before {
    content: 'New playlist';
    font-size: 1.15rem;
}

/* Share dialog */
#shareDialog {
    position: fixed;
    inset: 0;
    width: min(92vw, 540px);
    max-height: min(90vh, 680px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--watch-border) 75%, white 8%);
    border-radius: 20px;
    background: color-mix(in srgb, var(--watch-surface) 94%, #111);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .58);
}

#shareDialog::backdrop {
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(5px);
}

#shareDialog[open] { animation: share-dialog-in .2s ease-out; }

@keyframes share-dialog-in {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.share-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--watch-border);
}

.share-dialog-title { display: flex; align-items: center; gap: 13px; }
.share-dialog-title h2 { margin: 0; font-size: 20px; line-height: 1.2; }
.share-dialog-title p { margin-top: 4px; color: var(--watch-muted); font-size: 12px; }

.share-dialog-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #3388ff, #1453cf);
    font-size: 21px;
    box-shadow: 0 7px 18px rgba(40, 120, 255, .24);
}

#shareDialog .dialog-close {
    float: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 50%;
    color: var(--watch-muted);
    line-height: 1;
    transition: color .15s, background-color .15s;
}

#shareDialog .dialog-close:hover { color: var(--watch-text); background: var(--watch-surface-hover); }
.share-dialog-body { padding: 18px 24px 24px; }

.share-video-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 12px;
    background: color-mix(in srgb, var(--watch-bg) 55%, transparent);
}

.share-preview-image {
    position: relative;
    flex: 0 0 104px;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: 8px;
    background: linear-gradient(135deg, #2a5368, #cf8859);
}

.share-preview-image i {
    position: absolute;
    right: 4px;
    bottom: 4px;
    padding: 2px 4px;
    border-radius: 3px;
    color: #fff;
    background: rgba(0, 0, 0, .78);
    font-size: 10px;
    font-style: normal;
}

.share-video-preview > div { display: flex; flex-direction: column; min-width: 0; }
.share-video-preview strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.share-video-preview small { margin-top: 4px; color: var(--watch-muted); font-size: 11px; }
.share-section-label { margin: 18px 0 10px; color: var(--watch-muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

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

.share-options button {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 7px;
    padding: 9px 4px;
    border: 0;
    border-radius: 12px;
    color: var(--watch-text);
    background: transparent;
    cursor: pointer;
    transition: background-color .15s, transform .15s;
}

.share-options button:hover { background: var(--watch-surface-hover); transform: translateY(-2px); }

.share-options i {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    font-style: normal;
    font-weight: 700;
    box-shadow: 0 5px 14px rgba(0, 0, 0, .2);
}

.share-options span { font-size: 11px; }
.share-email { background: linear-gradient(135deg, #f55b55, #c83232); }
.share-whatsapp { background: linear-gradient(135deg, #66bb6a, #25d366); }
.share-x { background: #080808; }
.share-facebook { background: linear-gradient(135deg, #2f7df4, #1555b9); font-family: Arial, sans-serif; }
.share-reddit { background: linear-gradient(135deg, #ff6a2a, #e13b00); }

.copy-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 6px 6px 12px;
    border: 1px solid var(--watch-border);
    border-radius: 12px;
    background: color-mix(in srgb, var(--watch-bg) 55%, transparent);
    transition: border-color .15s;
}

.copy-row:focus-within { border-color: var(--watch-blue); }
.link-icon { color: var(--watch-muted); font-size: 20px; }
.copy-row input { flex: 1; min-width: 0; border: 0; outline: 0; color: var(--watch-text); background: transparent; font-size: 12px; }

.copy-row button {
    border: 0;
    border-radius: 18px;
    padding: 8px 16px;
    color: #07131b;
    background: var(--watch-blue);
    cursor: pointer;
    font-weight: 700;
}

.qr-demo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid var(--watch-border);
    border-radius: 12px;
    color: var(--watch-text);
    text-align: left;
}

.qr-code {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 9px;
    color: #111;
    background: #fff;
    font-size: 34px;
}

.qr-demo > div { display: flex; flex-direction: column; }
.qr-demo strong { font-size: 13px; }
.qr-demo small { margin-top: 3px; color: var(--watch-muted); font-size: 11px; }

/* Report dialog */
#reportDialog {
    position: fixed;
    inset: 0;
    width: min(92vw, 560px);
    max-height: min(90vh, 720px);
    margin: auto;
    padding: 0;
    overflow: hidden auto;
    border: 1px solid color-mix(in srgb, var(--watch-border) 75%, white 8%);
    border-radius: 20px;
    background: color-mix(in srgb, var(--watch-surface) 94%, #111);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .58);
}

#reportDialog::backdrop {
    background: rgba(0, 0, 0, .72);
    backdrop-filter: blur(5px);
}

#reportDialog[open] { animation: report-dialog-in .2s ease-out; }

@keyframes report-dialog-in {
    from { opacity: 0; transform: translateY(12px) scale(.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.report-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px 18px;
    border-bottom: 1px solid var(--watch-border);
}

.report-dialog-title { display: flex; align-items: center; gap: 13px; }
.report-dialog-title h2 { margin: 0; font-size: 20px; line-height: 1.2; }
.report-dialog-title p { margin-top: 4px; color: var(--watch-muted); font-size: 12px; }

.report-dialog-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #ff6a52, #c92d35);
    font-size: 20px;
    box-shadow: 0 7px 18px rgba(218, 54, 60, .24);
}

#reportDialog > .report-dialog-header .dialog-close {
    float: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 50%;
    color: var(--watch-muted);
    line-height: 1;
    transition: color .15s, background-color .15s;
}

#reportDialog > .report-dialog-header .dialog-close:hover {
    color: var(--watch-text);
    background: var(--watch-surface-hover);
}

.report-dialog-body { padding: 18px 24px 8px; }

.report-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid color-mix(in srgb, var(--watch-blue) 30%, transparent);
    border-radius: 12px;
    color: var(--watch-muted);
    background: color-mix(in srgb, var(--watch-blue) 9%, transparent);
}

.report-notice > span { color: var(--watch-blue); font-size: 17px; }
.report-notice p { font-size: 12px; line-height: 1.45; }

.report-reasons {
    min-width: 0;
    margin-top: 18px;
    border: 0;
}

.report-reasons legend {
    margin-bottom: 8px;
    color: var(--watch-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}

#reportDialog .report-option {
    display: grid;
    grid-template-columns: 22px 40px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 6px;
    border: 1px solid transparent;
    border-radius: 13px;
    cursor: pointer;
    transition: border-color .15s, background-color .15s;
}

#reportDialog .report-option:hover { background: var(--watch-surface-hover); }
#reportDialog .report-option:has(input:checked) {
    border-color: color-mix(in srgb, var(--watch-blue) 55%, transparent);
    background: color-mix(in srgb, var(--watch-blue) 9%, transparent);
}

.report-option input { position: absolute; opacity: 0; pointer-events: none; }

.report-radio {
    width: 20px;
    height: 20px;
    border: 2px solid var(--watch-muted);
    border-radius: 50%;
    box-shadow: inset 0 0 0 4px transparent;
    transition: border-color .15s, background-color .15s;
}

.report-option input:checked + .report-radio {
    border-color: var(--watch-blue);
    background: var(--watch-blue);
    box-shadow: inset 0 0 0 4px color-mix(in srgb, var(--watch-surface) 96%, #111);
}

.report-option input:focus-visible + .report-radio {
    outline: 2px solid var(--watch-blue);
    outline-offset: 3px;
}

.report-option-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    color: var(--watch-text);
    background: color-mix(in srgb, var(--watch-surface-hover) 76%, transparent);
    font-size: 17px;
    font-weight: 700;
}

.report-option > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.report-option strong { font-size: 14px; }
.report-option small { margin-top: 4px; color: var(--watch-muted); font-size: 11px; line-height: 1.35; }

.report-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid var(--watch-border);
    background: color-mix(in srgb, var(--watch-bg) 35%, transparent);
}

#reportDialog .report-cancel {
    float: none;
    width: auto;
    height: auto;
    margin: 0;
    padding: 9px 15px;
    border-radius: 19px;
    color: var(--watch-text);
    background: transparent;
    font-size: 13px;
    font-weight: 700;
}

#reportDialog .report-cancel:hover { background: var(--watch-surface-hover); }

#reportDialog .dialog-primary {
    float: none;
    min-width: 104px;
    margin: 0;
    color: #07131b;
}

#reportDialog .dialog-primary:disabled {
    color: var(--watch-muted);
    background: var(--watch-surface-hover);
    cursor: not-allowed;
    opacity: .7;
}

.shortcuts-dialog dl { display: grid; grid-template-columns: 1fr auto; gap: 13px; }.shortcuts-dialog dd { color: var(--watch-muted); }

.watch-shell.theater { display: block; max-width: none; }
.watch-shell.theater .player-stage {
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 80px);
    margin-left: 0;
    border-radius: 0;
}
.watch-shell.theater .recommendations-rail { margin-top: 22px; }
.player-stage-placeholder { width: 100%; min-width: 0; flex: 0 0 auto; }
.watch-shell .player-stage.miniplayer {
    position: fixed;
    width: min(var(--watch-mini-width, 400px), calc(100vw - 48px));
    max-width: none;
    max-height: none;
    height: auto;
    inset: auto 24px 24px auto;
    margin: 0;
    z-index: 2500;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.08);
    cursor: move;
    animation: miniPlayerPopIn .28s cubic-bezier(.2,.8,.2,1);
}
@keyframes miniPlayerPopIn {
    from { opacity: 0; transform: translateY(18px) scale(.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.player-stage.miniplayer .player-controls, .player-stage.miniplayer .player-big-play, .player-stage.miniplayer .end-screen { display: none; }
.player-stage.miniplayer .player-sponsor, .player-stage.miniplayer .player-info, .player-stage.miniplayer .info-card { display: none; }

.mini-player-bar { display: none; }
.player-stage.miniplayer .mini-player-bar {
    display: block;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
    padding-top: 16px;
    background: linear-gradient(to top, rgba(0,0,0,.9) 0%, rgba(0,0,0,.6) 65%, transparent 100%);
}
.mini-player-progress {
    position: relative;
    height: 3px;
    margin: 0 0 8px;
    background: rgba(255,255,255,.25);
    overflow: hidden;
}
.mini-player-progress i {
    display: block;
    height: 100%;
    width: 0%;
    background: var(--watch-accent, #ff0033);
    transition: width .12s linear;
}
.mini-player-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 10px 9px;
}
.mini-player-info {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.mini-player-title {
    overflow: hidden;
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mini-player-channel {
    overflow: hidden;
    color: rgba(255,255,255,.7);
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mini-player-actions {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 4px;
}
.mini-player-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.14);
    color: #fff;
    cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}
.mini-player-btn:hover {
    background: rgba(255,255,255,.28);
    transform: scale(1.08);
}
.mini-player-btn svg { display: block; }
.mini-player-close { font-size: 16px; font-weight: 700; line-height: 1; }

@media (max-width: 1180px) {
    .watch-shell { grid-template-columns: 1fr; }
    .recommendations-rail { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 18px; }
    .up-next-header, .recommendations-rail > .load-more { grid-column: 1 / -1; }
}

@media (max-width: 850px) {
    .content-area { padding: 12px; }
    .video-actions { align-items: flex-start; flex-direction: column; }
    .engagement-actions { width: 100%; overflow-x: auto; padding-bottom: 4px; }
    .recommendations-rail { grid-template-columns: 1fr; }
    .watch-shell .player-stage.miniplayer { width: min(var(--watch-mini-width, 400px), 88vw); }
}

@media (max-width: 560px) {
    .content-area { padding: 0 0 18px; }
    .player-stage { border-radius: 0; }
    .video-heading, .video-actions, .description-card, .comments-section, .recommendations-rail { margin-left: 12px; margin-right: 12px; }
    .channel-summary { width: 100%; }.channel-summary > div { flex: 1; }
    .control-group #backBtn, .control-group #forwardBtn, .control-group #pipBtn, .time-display { display: none; }
    .control-btn { width: 34px; }
    .recommendation-card { grid-template-columns: 42% 1fr; }
    .comments-header { justify-content: space-between; gap: 8px; }
    .player-stage.miniplayer { right: 8px; bottom: 8px; }
    #saveDialog { width: calc(100vw - 24px); border-radius: 16px; }
    .save-dialog-header, .save-dialog-footer { padding-left: 16px; padding-right: 16px; }
    .save-video-preview { margin-left: 16px; margin-right: 16px; }
    .playlist-privacy { display: none; }
    #saveDialog .save-playlist-option { grid-template-columns: 24px 40px minmax(0, 1fr); }
    #shareDialog { width: calc(100vw - 24px); border-radius: 16px; }
    .share-dialog-header { padding-left: 16px; padding-right: 16px; }
    .share-dialog-body { padding: 16px; }
    .share-options { gap: 4px; }
    .share-options i { width: 40px; height: 40px; }
    #reportDialog { width: calc(100vw - 24px); border-radius: 16px; }
    .report-dialog-header, .report-dialog-footer { padding-left: 16px; padding-right: 16px; }
    .report-dialog-body { padding-left: 16px; padding-right: 16px; }
    #reportDialog .report-option { grid-template-columns: 22px 36px minmax(0, 1fr); gap: 9px; padding-left: 8px; padding-right: 8px; }
    .report-option-icon { width: 36px; height: 36px; }
}

/* Shared button tooltip floats outside clipped player and card containers. */
.button-tooltip {
    position: fixed;
    z-index: 4000;
    max-width: min(280px, calc(100vw - 16px));
    padding: 7px 10px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 6px;
    color: #fff;
    background: rgba(28, 28, 28, .96);
    box-shadow: 0 4px 14px rgba(0, 0, 0, .35);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.25;
    text-align: center;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    transform: translateY(3px);
    transition: opacity .12s ease, transform .12s ease;
}

.button-tooltip.active {
    opacity: 1;
    transform: translateY(0);
}
