/* ============================================================
   SINGLE-VIDEO.CSS — страница видео по референсу (v3)
   Правки: призрачные кнопки, лайк красным, описание без плашки,
   SHOW MORE капсом, без тегов, разделитель перед комментариями,
   комментарии как на референсе, Autoplay убран, sticky + тонкий
   скроллбар правой колонки, галочка верификации скрыта.
   НЕ ТРОГАЕМ: плеер, палитру, порядок кнопок.
   ГОРИЗОНТАЛЬНЫЕ КАРТОЧКИ: стили вынесены в video-card-horizontal.php
   ============================================================ */



/*требует чистки стили пока грязные */
.sv-comments-section {
	display :none;}
#player-author-block {
	display:flex;
	margin-left:100px;
}
	.share-modal-btn {
		margin-right:12px;
	}
	.yt-player-close:hover {
		background:none !important;
		scale:1.2 !important;
	}
	.yt-player-close {
width:44px!important;
top:19px;
height:44px !important;
		left:120px;
		position:fixed!important;
		background:var(--bg-card)!important;
color:var(--text-primary)!important;
	}
.block-back {
    display: block;
    position: fixed;
    align-items: center;
    right: 120px;
	}
.block-share {
    display: block;
    float:right;
}
	.top-block {
    padding: 16px 0 16px 0;
    display:block;
	width:100%;
	}

.arrow-left-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}
	
	
	
	
	.modal_block {
		display:block;
		margin-top:-8px;
	}
	.search-modal2 {
    margin-top: 25px;
    margin-left: auto;
    margin-right: auto;
    max-width: 500px;
    background: var(--bg-body) !important;
	margin-left: 16px;
}
	
    /* ========== СТИЛИ ДЛЯ ИКОНОК ПЛЕЕРА ========== */
    .center-play-icon {
        width: 64px;
        height: 64px;
        cursor: pointer;
        filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
        transition: transform 0.2s ease;
        pointer-events: none;
        position: absolute;
        top: 0;
        left: 0;
    }

    /* ========== ЦЕНТРАЛЬНАЯ КНОПКА PLAY/PAUSE ========== */
    .yt-center-play {
        padding: 24px;
        cursor: pointer;
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        z-index: 10;
        width: 9vh;
        height: 9vh;
        min-width: 60px;
        min-height: 60px;
        max-width: 120px;
        max-height: 120px;
        background: rgba(0,0,0,0.4);
        border-radius: 50%;
        transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
        visibility: visible;
        opacity: 1;
        pointer-events: auto;
    }

    /* Скрываем кнопку когда контролы скрыты */
    .yt-player-wrapper:not(.controls-visible) .yt-center-play {
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* Показываем кнопку когда контролы видны */
    .yt-player-wrapper.controls-visible .yt-center-play {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    /* Скрываем кнопку для аудио режима */
    .yt-player-wrapper.audio-mode .yt-center-play {
        display: none !important;
    }

    .yt-center-play:hover {
        transform: translate(-50%, -50%) scale(1.05);
        background: rgba(0,0,0,0.6);
    }

    .yt-center-play:active {
        transform: translate(-50%, -50%) scale(0.95);
    }

    .yt-center-play > div {
        position: relative;
        width: 64px;
        height: 64px;
        display: flex;
        align-items: center !important;
    justify-content: center !important;
    
    }

    /* Управление иконками через класс playing на wrapper */
    .yt-player-wrapper.playing #center-play-icon-play {
        display: none !important;
    }

    .yt-player-wrapper.playing #center-play-icon-pause {
        display: block !important;
    }

    .yt-player-wrapper:not(.playing) #center-play-icon-play {
        display: block !important;
    }

    .yt-player-wrapper:not(.playing) #center-play-icon-pause {
        display: none !important;
    }

    .yt-center-play:hover .center-play-icon {
        transform: scale(1.1);
    }

    /* Иконки в аудио плеере */
    .audio-btn-icon {
        width: 24px;
        height: 24px;
        filter: brightness(0) invert(1);
        transition: transform 0.2s;
    }

    .audio-btn-icon:hover {
        transform: scale(1.1);
    }

    .audio-play-icon {
        width: 32px;
        height: 32px;
        filter: brightness(0) invert(1);
        transition: transform 0.2s;
    }

    .audio-play-icon:hover {
        transform: scale(1.1);
    }

    .yt-audio-btn {
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .yt-audio-btn:hover {
        opacity: 0.8;
    }

    /* Аудио плеер */
    .yt-audio-player {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        display: none;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        z-index: 100;
    }

    .yt-player-wrapper.audio-mode .yt-audio-player {
        display: flex;
		background: var(--bg-body)!important;
    }

    .yt-player-wrapper.audio-mode .yt-video-player {
        opacity: 0;
    }

    .yt-audio-controls {
        display: flex;
        align-items: center;
        gap: 20px;
        margin-bottom: 20px;
    }

    .yt-audio-time {
        color: white;
        font-size: 14px;
        font-weight: 300;
        opacity: 0.8;
    }

    .yt-audio-sep {
        margin: 0 6px;
    }

    /* ========== СТИЛИ ДЛЯ КНОПОК УПРАВЛЕНИЯ ========== */
    .control-icon {
        width: 20px;
        height: 20px;
        filter: brightness(0) invert(1);
        transition: transform 0.2s;
        display: block;
    }

    .yt-control-btn {
        background: none;
        border: none;
        padding: 6px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0.9;
        transition: opacity 0.2s;
    }

    .yt-control-btn:hover {
        opacity: 1;
    }

    .yt-control-btn:hover .control-icon {
        transform: scale(1.1);
    }

    .yt-controls-right {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .yt-controls-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        padding: 0 12px;
        margin-top: 8px;
    }

    .yt-time {
        color: white;
        font-size: 13px;
        font-weight: 400;
        text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    }

    /* ========== КОНТРОЛЫ ВИДЕО (весь блок) ========== */
    .yt-video-controls {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 20;
        padding: 12px 0 8px 0;
        background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 100%);
        visibility: hidden;
        opacity: 0;
        transition: visibility 0.3s ease, opacity 0.3s ease;
    }

    .yt-player-wrapper.controls-visible .yt-video-controls {
        visibility: visible;
        opacity: 1;
    }

    /* ========== ПРОГРЕСС-БАР НИЖНИЙ (всегда виден, вне контролов) ========== */
    .yt-progress-container {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: rgba(255,255,255,0.3);
        cursor: pointer;
        z-index: 15;
        transition: height 0.2s, opacity 0.3s ease;
        display: block !important;
    }

    .yt-progress-container:hover {
        height: 8px;
    }

    .yt-progress-fill {
        height: 100%;
        background: var(--text-primary);
        width: 0%;
        transition: width 0.1s linear;
        position: relative;
        border-radius:0 5px 5px 0!important;
    }

    .yt-progress-thumb {
        position: absolute;
        top: 50%;
        right: -6px;
        transform: translateY(-50%);
        width: 12px;
        height: 12px;
        background: var(--text-primary);
        border-radius: 50%;
        opacity: 0;
        transition: opacity 0.2s;
    }

    .yt-progress-container:hover .yt-progress-thumb {
        opacity: 1;
    }

    .yt-progress-container.dragging .yt-progress-thumb {
        opacity: 1;
    }

    /* ========== ПРОГРЕСС-БАР ВЕРХНИЙ (внутри контролов) ========== */
    .yt-progress-container-upper {
        position: relative;
        width: calc(100% - 24px);
        margin: 0 12px 4px 12px;
        height: 4px;
        background: rgba(255,255,255,0.3);
        cursor: pointer;
        z-index: 1;
        border-radius: 0;
        display: block !important;
        transition: height 0.2s, opacity 0.3s ease;
    }

    .yt-progress-container-upper:hover {
        height: 8px;
    }

    .yt-progress-container-upper .yt-progress-fill {
        height: 100%;
        width: 0%;
        transition: width 0.1s linear;
        position: relative;
        border-radius: 0 !important;
    }

    .yt-progress-container-upper .yt-progress-thumb {
        position: absolute;
        top: 50%;
        right: -6px;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        background: var(--accent-color);
        border-radius: 50%!important;
        opacity: 0;
        transition: opacity 0.2s;
    }

    .yt-progress-container-upper:hover .yt-progress-thumb {
        opacity: 1;
    }

    .yt-progress-container-upper.dragging .yt-progress-thumb {
        opacity: 1;
    }

    /* Скрываем нижний бар, когда контролы видны */
    .yt-player-wrapper.controls-visible .yt-progress-container {
        display: none !important;
    }

    /* Показываем нижний бар, когда контролы скрыты */
    .yt-player-wrapper:not(.controls-visible) .yt-progress-container {
        display: block !important;
    }

    .yt-video-controls:hover {
        transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .yt-player-wrapper {
        position: relative;
        width: 100%;
        background: #000;
        overflow: hidden;
    }

    .yt-video-player {
        width: 100%;
        height: 100%;
        display: block;
        background: #000;
    }

    /* Скрываем нативные контролы */
    .yt-video-player::-webkit-media-controls {
        display: none !important;
    }

    .yt-video-player::-webkit-media-controls-enclosure {
        display: none !important;
    }

    /* Адаптив для мобильных */
    @media (max-width: 768px) {
		.top-block {
		padding: 16px!important;
			
		}
        .yt-center-play {
            width: 7vh;
            height: 7vh;
            min-width: 50px;
            min-height: 50px;
            padding: 16px;
        }
        
        .yt-center-play > div {
            width: 48px;
            height: 48px;
        }
        
        .center-play-icon {
            width: 48px;
            height: 48px
				marging-top:12px;
        }
        
        .yt-progress-container-upper {
            height: 3px !important;
            margin: 0 8px 3px 8px;
            width: calc(100% - 16px);
        }
        
        .yt-progress-container-upper:hover {
            height: 4px !important;
        }
        
        .yt-progress-container {
            height: 3px !important;
        }
        
        .yt-progress-container:hover {
            height: 4px !important;
        }
        
        .yt-progress-thumb {
            width: 16px !important;
            height: 16px !important;
        }
        
        .yt-progress-container-upper .yt-progress-thumb {
            width: 16px !important;
            height: 16px !important;
        }
		
        .yt-controls-row {
            padding: 0 8px;
            margin-top: 4px;
        }
    }

    @media (max-width: 480px) {
        .yt-center-play {
            width: 6vh;
            height: 6vh;
            min-width: 44px;
            min-height: 44px;
            padding: 12px;
        }
        
        .yt-center-play > div {
            width: 40px;
            height: 40px;
        }
        
        .center-play-icon {
            width: 40px;
            height: 40px
				margin-top:12px;
        }
        
        .yt-progress-container-upper {
            height: 3px !important;
            margin: 0 6px 2px 6px;
            width: calc(100% - 12px);
        }
        
        .yt-progress-thumb {
            width: 8px !important;
            height: 8px !important;
        }
        
        .yt-progress-container-upper .yt-progress-thumb {
            width: 16px !important;
            height: 16px !important;
        }
        
        .yt-controls-row {
            padding: 0 6px;
            margin-top: 3px;
        }
    }

    /* ========== ФИКС ДЛЯ САЙДБАРА ========== */
    #yt-modal-sidebar {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    #yt-rec-videos-container {
        display: block !important;
        visibility: visible !important;
    }

    /* Скрываем только когда модальное окно закрыто */
    #yt-player-modal:not(.active) #yt-modal-sidebar {
        display: none !important;
    }

    /* При активном модальном окне показываем */
    #yt-player-modal.active #yt-modal-sidebar {
        display: block !important;
    }
    
    
    
    
    /* ===== ФИКС ТАБОВ ===== */
#player-rec-tabs {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 8px !important;
    overflow-x: auto !important;
    padding: 8px 4px !important;
    margin: 0 !important;
    width: 100% !important;
    background: transparent !important;
    border: none !important;
    align-items: center !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
	padding-bottom:4px!important;
padding-top:20px !important;
}

#player-rec-tabs::-webkit-scrollbar {
    display: none !important;
}

#player-rec-tabs .rec-tab-btn {
    flex: 0 0 auto !important;
    padding: 6px 14px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: var(--text-secondary) !important;
    background: transparent !important;
    border: none !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    font-family: inherit !important;
    position: relative !important;
    min-width: auto !important;
    width: auto !important;
    display: inline-block !important;
}

#player-rec-tabs .rec-tab-btn.active {
    color: var(--text-primary) !important;
    font-weight: 500 !important;
background:var(--bg-card)!important;
}

#player-rec-tabs .rec-tab-btn:hover {
    color: var(--text-primary) !important; 
}
	#player-rec-tabs .rec-tab-btn {
		padding:8px 16px !important;
	}
#player-rec-tabs .tab-indicator {
    display: none !important;
}


/* ========== ПАНЕЛЬ КОММЕНТАРИЕВ В ПЛЕЕРЕ (ПК) ========== */
.yt-comments-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 380px;
    height: 100%;
    background: #fff;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    z-index: 2000;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
}

.yt-comments-panel.open {
    transform: translateX(0);
}

.yt-comments-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
    background: #fff;
}

.yt-comments-panel-header span {
    font-size: 18px;
    font-weight: 600;
}

.yt-comments-panel-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.yt-comments-panel-close:hover {
    background: #f0f0f0;
}

.yt-comments-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.yt-comments-panel-content .comment-item {
    margin-bottom: 16px;
    padding: 8px 0;
    border-bottom: 0;
}

.yt-comments-panel-content .comment-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.yt-comments-panel-content .comment-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.yt-comments-panel-content .comment-author {
    font-weight: 600;
    font-size: 13px;
}

.yt-comments-panel-content .comment-date {
    font-size: 12px;
    color: #606060;
    margin-left: 8px;
}

.yt-comments-panel-content .comment-text {
    font-size: 14px;
    margin-left: 44px;
    margin-bottom: 6px;
}

.yt-comments-panel-content .comment-actions {
    margin-left: 42px;
    display: flex;
    gap: 16px;
    font-size: 12px;
    align-items: center;
}

.yt-comments-panel-content .comment-actions button {
    background: none;
    border: none;
    color: #606060;
    cursor: pointer;
    padding: 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.yt-comments-panel-content .comment-actions button:hover {
    color: #CF001F;
}

.yt-comments-panel-content .comment-actions .reply-btn i {
    font-size: 14px;
}

.yt-comments-panel-content .comment-replies-count {
    margin-left: 42px;
    margin-top: 6px;
    font-size: 12px;
    color: #606060;
    cursor: pointer;
    display: inline-block;
}

.yt-comments-panel-content .comment-replies-count:hover {
    color: #CF001F;
}

.comment-form-wrapper-panel {
    flex-shrink: 0;
    padding: 12px 20px 16px;
    border-top: 1px solid #e5e5e5;
    background: #fff;
    display: flex;
    gap: 10px;
    align-items: center;
}

.comment-avatar-panel {
    flex-shrink: 0;
}

.comment-avatar-panel img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-input-wrapper-panel {
    flex: 1;
    display: flex;
    gap: 8px;
    align-items: center;
}

.comment-textarea-panel {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 30px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    background: #f9f9f9;
    min-height: 40px;
    max-height: 100px;
}

.comment-textarea-panel:focus {
    border-color: #CF001F;
    outline: none;
    background: white;
}

.comment-submit-arrow-panel {
    background: #CF001F;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.comment-submit-arrow-panel:hover {
    background: #a00018;
}

/* ========== МОБИЛЬНЫЕ УСТРОЙСТВА ========== */
@media (max-width: 768px) {
    .yt-comments-panel {
        position: fixed;
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: auto !important;
        min-height: 60vh;
        max-height: 80vh;
        border-radius: 20px 20px 0 0 !important;
        transform: translateY(100%) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15) !important;
        background: #fff !important;
        z-index: 20001 !important;
        display: none !important;
    }
    
    .yt-comments-panel.open {
        transform: translateY(0) !important;
        display: flex !important;
    }
    
    /* Затемнение на мобилках */
    .yt-comments-overlay-mobile {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.4);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        z-index: 20000;
        display: none;
    }
    
    .yt-comments-overlay-mobile.active {
        display: block;
    }
    
    .yt-comments-panel-header {
        padding: 12px 16px !important;
    }
    
    .yt-comments-panel-header span {
        font-size: 16px !important;
    }
    
    .yt-comments-panel-content {
        padding: 12px 16px !important;
    }
    
    .comment-form-wrapper-panel {
        padding: 10px 16px 16px !important;
    }
}

@media (max-width: 480px) {
    .yt-comments-panel {
        min-height: 50vh;
        max-height: 85vh;
    }
}

/* ========== МОДАЛЬНОЕ ОКНО ОТВЕТОВ ========== */
.replies-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.replies-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.replies-container {
    position: relative;
    width: 90%;
    max-width: 500px;
    background: #fff;
    border-radius: 16px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: repliesSlideIn 0.3s ease;
}

@keyframes repliesSlideIn {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.replies-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
    flex-shrink: 0;
}

.replies-header span {
    font-size: 18px;
    font-weight: 600;
}

.replies-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.replies-close:hover {
    background: #f0f0f0;
}

.replies-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.replies-content .comment-item {
    margin-bottom: 16px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.replies-content .comment-item:last-child {
    border-bottom: none;
}

.replies-content .comment-header {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.replies-content .comment-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.replies-content .comment-author {
    font-weight: 600;
    font-size: 13px;
}

.replies-content .comment-date {
    font-size: 12px;
    color: #606060;
    margin-left: 8px;
}

.replies-content .comment-text {
    font-size: 14px;
    margin-left: 44px;
    margin-bottom: 4px;
}

.replies-content .comment-actions {
    margin-left: 42px;
    display: flex;
    gap: 16px;
    font-size: 12px;
    align-items: center;
}

.replies-content .comment-actions button {
    background: none;
    border: none;
    color: #606060;
    cursor: pointer;
    padding: 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.replies-content .comment-actions button:hover {
    color: #CF001F;
}

.reply-form-wrapper {
    flex-shrink: 0;
    padding: 12px 20px 16px;
    border-top: 1px solid #e5e5e5;
    background: #fff;
    display: flex;
    gap: 10px;
    align-items: center;
}

.reply-avatar {
    flex-shrink: 0;
}

.reply-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.reply-input-wrapper {
    flex: 1;
    display: flex;
    gap: 8px;
    align-items: center;
}

.reply-textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 30px;
    resize: none;
    font-family: inherit;
    font-size: 14px;
    background: #f9f9f9;
    min-height: 40px;
    max-height: 100px;
}

.reply-textarea:focus {
    border-color: #CF001F;
    outline: none;
    background: white;
}

.reply-submit-arrow {
    background: #CF001F;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.reply-submit-arrow:hover {
    background: #a00018;
}

@media (max-width: 768px) {
    .replies-container {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        animation: repliesSlideUp 0.3s ease;
    }
    
    @keyframes repliesSlideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .replies-content {
        padding: 12px 16px;
    }
    
    .reply-form-wrapper {
        padding: 10px 16px 16px;
    }
}
/* ========== АУДИО ПРОГРЕСС-БАР ========== */
.yt-audio-progress-container {
    position: relative;
    width: 60%;
    max-width: 400px;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    margin: 16px auto 8px auto;
    transition: height 0.2s ease;
    z-index: 10;
}

.yt-audio-progress-container:hover {
    height: 10px;
}

.yt-audio-progress-fill {
    height: 100%;
    background: #ffffff;
    width: 0%;
    border-radius: 10px;
    transition: width 0.1s linear;
    position: relative;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.yt-audio-progress-thumb {
    position: absolute;
    top: 50%;
    right: -8px;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.6), 0 0 40px rgba(255, 255, 255, 0.3);
    opacity: 1 !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    pointer-events: none;
}

.yt-audio-progress-container:hover .yt-audio-progress-thumb {
    transform: translateY(-50%) scale(1.2);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 60px rgba(255, 255, 255, 0.4);
}

/* Анимация пульсации для thumb */
@keyframes audioThumbPulse {
    0% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 255, 255, 0.8), 0 0 60px rgba(255, 255, 255, 0.3);
    }
    100% {
        box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    }
}

.yt-audio-progress-container:not(.dragging) .yt-audio-progress-thumb {
    animation: audioThumbPulse 2s ease-in-out infinite;
}

.yt-audio-progress-container.dragging .yt-audio-progress-thumb {
    animation: none;
    transform: translateY(-50%) scale(1.3);
}

/* Скрываем старые прогресс-бары в аудио режиме */
.yt-player-wrapper.audio-mode .yt-progress-container {
    display: none !important;
}

.yt-player-wrapper.audio-mode .yt-progress-container-upper {
    display: none !important;
}

/* Показываем новый аудио прогресс-бар только в аудио режиме */
.yt-player-wrapper:not(.audio-mode) .yt-audio-progress-container {
    display: none !important;
}
	#yt-player-modal.active #yt-modal-sidebar {
		padding-top:16px !important;
	}

/* Адаптив для мобильных */
@media (max-width: 768px) {
	.share-icon {
		width:24px !important;
		height:24px !important;
	}
	#yt-player-modal.active #yt-modal-sidebar {
		display:none !important;
	}
.author-avatar {
margin-right:0;}
#player-author-block {
margin-left:56px;}

	.yt-player-close {
		left:14px;
		width:48px;
border-radius:50%!important;
top:14px;
	}
	
    .yt-audio-progress-container {
        width: 85%;
        height: 5px;
    }
    
    .yt-audio-progress-container:hover {
        height: 7px;
    }
    
    .yt-audio-progress-thumb {
        width: 14px;
        height: 14px;
        right: -7px;
    }
}

@media (max-width: 480px) {
    .yt-audio-progress-container {
        width: 90%;
        height: 4px;
        margin: 12px auto 6px auto;
    }
    
    .yt-audio-progress-container:hover {
        height: 6px;
    }
    
    .yt-audio-progress-thumb {
        width: 12px;
        height: 12px;
        right: -6px;
    }
}
/* Запрещаем оверлеям перекрывать плеер */
.replies-overlay,
.global-comments-overlay,
.slide-panel-overlay,
.global-description-overlay {
    pointer-events: none !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 0 !important;
}
/* Полностью скрываем модалку ответов в плеере */
#replies-modal {
    display: none !important;
}
/* ===== THUMBNAIL НА ПРОГРЕСС-БАРЕ (СКРЫТ ПО УМОЛЧАНИЮ) ===== */
.yt-progress-thumb {
    position: absolute;
    top: 50%;
    right: -6px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: var(--text-primary);
    border-radius: 50%;
    opacity: 0 !important; /* Скрыт по умолчанию */
    transition: opacity 0.2s ease;
    pointer-events: none;
}

/* Показываем ТОЛЬКО при перетаскивании */
.yt-progress-container.dragging .yt-progress-thumb,
.yt-progress-container-upper.dragging .yt-progress-thumb-upper {
    opacity: 1 !important;
}

/* Для верхнего прогресс-бара */
.yt-progress-container-upper .yt-progress-thumb {
    opacity: 0 !important;
}

.yt-progress-container-upper.dragging .yt-progress-thumb {
    opacity: 1 !important;
} 
 
/*конец грязных стилей*/









.single-video-page {
    --sv-bg: var(--yt-bg, #14161b);
    --sv-elev: var(--yt-bg-soft, #1a1d23);
    --sv-border: var(--yt-border-soft, #2a2e36);
    --sv-text: var(--yt-text, #f1f2f4);
    --sv-dim: var(--yt-text-dim, #9aa0aa);
    --sv-mute: var(--yt-text-mute, #7d828c);
    --sv-red: var(--yt-red, #ff4b4b);
    --sv-red-filter: brightness(0) saturate(100%) invert(38%) sepia(60%) saturate(3000%) hue-rotate(338deg) brightness(102%) contrast(101%);
    color: var(--sv-text);
}

.sv-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    max-width: 1720px;
    margin: 0 auto;
    padding: 24px;
    align-items: start;
}
.sv-main { min-width: 0; }

/* ===== ПЛЕЕР — НЕ ТРОГАЕМ ===== */
.sv-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 16px;
    overflow: hidden;
}
.yt-video-player { width: 100%; height: 100%; object-fit: contain; display: block; }

.yt-center-play {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    pointer-events: none;
}
.center-play-disc {
    position: relative;
    width: 68px; height: 68px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(16, 18, 23, 0.72);
    border-radius: 50%;
    backdrop-filter: blur(6px);
    transition: transform 0.15s ease, opacity 0.2s ease;
}
.center-play-icon { position: absolute; }

.yt-video-controls {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 26px 14px 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
    opacity: 0; transition: opacity 0.2s ease;
}
.sv-player-wrapper:hover .yt-video-controls,
.sv-player-wrapper.paused .yt-video-controls { opacity: 1; }

.yt-controls-row { display: flex; align-items: center; justify-content: space-between; }
.yt-time { font-size: 12px; color: #e8eaee; font-variant-numeric: tabular-nums; }
.yt-controls-right { display: flex; gap: 4px; }
.yt-control-btn {
    width: 36px; height: 36px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: none; border-radius: 50%;
    cursor: pointer; transition: background 0.15s ease;
}
.yt-control-btn:hover { background: rgba(255, 255, 255, 0.12); }

.yt-progress-container, .yt-progress-container-upper {
    position: relative; height: 4px;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 2px; cursor: pointer;
    transition: height 0.12s ease;
}
.yt-progress-container-upper { margin-bottom: 8px; }
.yt-progress-container:hover, .yt-progress-container-upper:hover { height: 6px; }
.yt-progress-fill { height: 100%; width: 0; background: var(--sv-red); border-radius: 2px; }
.yt-progress-thumb {
    position: absolute; top: 50%; left: 0;
    width: 12px; height: 12px;
    background: var(--sv-red); border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.12s ease;
}
.yt-progress-container:hover .yt-progress-thumb,
.yt-progress-container-upper:hover .yt-progress-thumb { transform: translate(-50%, -50%) scale(1); }

/* Аудио-режим */
.yt-audio-player {
    display: none;
    position: absolute; left: 12px; right: 12px; bottom: 12px;
    flex-direction: column; gap: 10px;
    background: rgba(20, 22, 27, 0.92);
    border: 1px solid var(--sv-border);
    border-radius: 14px; padding: 14px 16px;
    backdrop-filter: blur(8px);
}
.sv-player-wrapper.audio-mode .yt-audio-player,
.yt-audio-player.active, .yt-audio-player.show,
.yt-audio-player[style*="block"], .yt-audio-player[style*="flex"] { display: flex; }
.yt-audio-controls { display: flex; align-items: center; justify-content: center; gap: 18px; }
.yt-audio-btn {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    background: none; border: none; border-radius: 50%;
    cursor: pointer; transition: background 0.15s ease;
}
.yt-audio-btn:hover { background: rgba(255, 255, 255, 0.1); }
.yt-audio-play-btn { width: 52px; height: 52px; background: var(--sv-red); }
.yt-audio-play-btn:hover { background: #ff6060; }
.yt-audio-time { text-align: center; font-size: 12px; color: var(--sv-dim); font-variant-numeric: tabular-nums; }
.yt-audio-progress-container { position: relative; height: 4px; background: rgba(255,255,255,0.2); border-radius: 2px; cursor: pointer; }
.yt-audio-progress-fill { height: 100%; width: 0; background: var(--sv-red); border-radius: 2px; }
.yt-audio-progress-thumb {
    position: absolute; top: 50%; left: 0; width: 12px; height: 12px;
    background: var(--sv-red); border-radius: 50%; transform: translate(-50%, -50%);
}

/* ===== ЗАГОЛОВОК + ДЕЙСТВИЯ ===== */
.sv-info { padding-top: 16px; }
.sv-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.sv-title-wrapper { min-width: 0; flex: 1 1 320px; }
.sv-title { margin: 0 0 6px; font-size: 19px; font-weight: 700; line-height: 1.3; color: #fff; }
.sv-title-stats { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--sv-dim); }
.sv-sep { color: var(--sv-mute); }

.sv-title-stats .sv-sep,
.sv-title-stats .sv-date,
.sv-title-stats .sv-duration { display: none; }

.sv-actions { display: flex; gap: 4px; flex-wrap: wrap; flex: 0 0 auto; }
.sv-action-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 36px; padding: 0 12px;
    background: transparent; border: none; border-radius: 10px;
    color: var(--sv-text); font-size: 13px; font-weight: 500;
    font-family: inherit; cursor: pointer;
    transition: background 0.15s ease;
}
.sv-action-btn:hover { background: rgba(255, 255, 255, 0.07); }
.sv-action-btn img { display: block; }

.sv-like-btn img { filter: var(--sv-red-filter); }
.sv-like-btn .sv-like-count { color: var(--sv-red); font-weight: 600; }
.sv-like-count { font-variant-numeric: tabular-nums; }

/* ===== АВТОР ===== */
.sv-author-block {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 0; margin-top: 12px;
    border-top: 1px solid var(--sv-border);
}
.sv-author-avatar img { width: 44px !important; height: 44px !important; border-radius: 12px !important; object-fit: cover; display: block; }
.sv-author-info { min-width: 0; flex: 1; }
.sv-author-name {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--sv-text); font-size: 15px; font-weight: 700; text-decoration: none;
}
.sv-author-name:hover { color: #fff; }
.sv-author-stats { font-size: 12.5px; color: var(--sv-dim); margin-top: 2px; }

.sv-verified,
img[src*="2fd06f"] { display: none !important; }

.sv-subscribe-btn {
    height: 38px; padding: 0 20px;
    display: inline-flex; align-items: center;
    background: transparent; border: 1px solid var(--sv-red); border-radius: 10px;
    color: #fff; font-size: 13.5px; font-weight: 600;
    font-family: inherit; text-decoration: none; cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.sv-subscribe-btn:hover { background: rgba(255, 75, 75, 0.12); }
.sv-subscribe-btn[data-action="unsub"] { background: #22262e; border-color: transparent; color: var(--sv-text); }
.sv-subscribe-btn[data-action="unsub"]:hover { background: #2e333c; }

/* ===== ОПИСАНИЕ ===== */
.sv-description {
    background: transparent;
    border-radius: 0;
    padding: 0;
    margin-top: 4px;
    font-size: 13.5px; line-height: 1.6; color: #c6cbd3;
}
.sv-description-content { overflow: hidden; }
.sv-description-content p { margin: 0 0 8px; }
.sv-description-content a { color: #ff6b6b; text-decoration: none; }
.sv-description-content a:hover { text-decoration: underline; }
.sv-description-toggle {
    margin-top: 10px; background: none; border: none; padding: 0;
    color: var(--sv-dim); font-size: 11.5px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    font-family: inherit; cursor: pointer;
    transition: color 0.15s ease;
}
.sv-description-toggle:hover { color: #fff; }

.sv-meta-bottom { display: none; }

/* ===== КОММЕНТАРИИ ===== */
.sv-comments-section {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--sv-border);
}
.sv-comments-header h3 { margin: 0 0 16px; font-size: 16px; font-weight: 700; color: #fff; }
.sv-comments-count { color: var(--sv-dim); font-weight: 400; font-size: 14px; margin-left: 6px; }

.sv-comment-form { display: flex; gap: 12px; margin-bottom: 24px; }
.sv-comment-avatar img { width: 40px !important; height: 40px !important; border-radius: 12px !important; object-fit: cover; }
.sv-comment-input-wrapper { flex: 1; display: flex; align-items: flex-end; gap: 8px; min-width: 0; }
.sv-comment-textarea {
    flex: 1; min-width: 0; resize: none;
    background: transparent; border: none; border-bottom: 1px solid var(--sv-border);
    color: var(--sv-text); font-size: 13.5px; font-family: inherit;
    padding: 8px 0; outline: none; transition: border-color 0.15s ease;
}
.sv-comment-textarea:focus { border-bottom-color: var(--sv-red); }
.sv-comment-submit {
    width: 36px; height: 36px; flex: 0 0 auto;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--sv-red); border: none; border-radius: 50%;
    color: #fff; font-size: 16px; cursor: pointer; transition: background 0.15s ease;
}
.sv-comment-submit:hover { background: #ff6060; }
.sv-comment-login { color: var(--sv-dim); font-size: 13.5px; margin-bottom: 20px; }
.sv-comment-login a { color: #ff6b6b; text-decoration: none; font-weight: 600; }

.sv-comments-loading { color: var(--sv-mute); font-size: 13px; padding: 16px 0; }

.sv-comments-list > div { display: flex; gap: 12px; padding: 14px 0; }
.sv-comments-list img.avatar,
.sv-comments-list img[class*="avatar"] {
    width: 40px; height: 40px; border-radius: 12px; object-fit: cover; flex: 0 0 auto;
}
.sv-comment-author,
.sv-comments-list .comment-author { font-size: 13.5px; font-weight: 700; color: #fff; }
.sv-comment-date,
.sv-comments-list .comment-date { font-size: 12px; color: var(--sv-dim); margin-left: 8px; font-weight: 400; }
.sv-comment-text,
.sv-comments-list .comment-text { font-size: 13.5px; color: #c6cbd3; line-height: 1.5; margin-top: 4px; }
.sv-comment-actions,
.sv-comments-list .comment-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.sv-comment-like,
.sv-comments-list .comment-like {
    display: inline-flex; align-items: center; gap: 6px;
    background: none; border: none; padding: 0;
    color: var(--sv-red); font-size: 12px; font-weight: 600; cursor: pointer;
}
.sv-comment-like img,
.sv-comments-list .comment-like img { filter: var(--sv-red-filter); }
.sv-comment-reply,
.sv-comments-list .comment-reply {
    background: none; border: none; padding: 0;
    color: var(--sv-dim); font-size: 12px; font-weight: 600;
    font-family: inherit; cursor: pointer; transition: color 0.15s ease;
}
.sv-comment-reply:hover,
.sv-comments-list .comment-reply:hover { color: #fff; }

/* ===== ПРАВАЯ КОЛОНКА ===== */
.sv-sidebar {
    min-width: 0;
    position: sticky;
    top: calc(var(--header-h, 68px) + 16px);
    max-height: calc(100vh - var(--header-h, 68px) - 32px);
    overflow-y: auto;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: #2e333c transparent;
}
.sv-sidebar::-webkit-scrollbar { width: 4px; }
.sv-sidebar::-webkit-scrollbar-track { background: transparent; }
.sv-sidebar::-webkit-scrollbar-thumb { background: #2e333c; border-radius: 2px; }
.sv-sidebar::-webkit-scrollbar-thumb:hover { background: #3a3f48; }

.sv-autoplay { display: none !important; }

.sv-rec-tabs {
    position: relative!important; display: flex!important; gap:8px!important;
    background: var(--sv-elev); border-radius: 12px; padding: 5px;
    margin-bottom: 14px; overflow-x: auto; scrollbar-width: none;
}
.sv-rec-tabs::-webkit-scrollbar { display: none; }
.tab-indicator { display: none; }
.rec-tab-btn {
    position: relative; z-index: 1; flex: 0 0 auto;
    padding: 8px 12px; background: none; border: none; border-radius: 8px;
    color: var(--sv-dim); font-size: 12.5px; font-weight: 500;
    font-family: inherit; white-space: nowrap; cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.rec-tab-btn:hover { color: var(--sv-text); background:#2e333c;}
.rec-tab-btn.active { background: #fff; color: #2e333c!important; }

/* ===== СКЕЛЕТОНЫ И СПИННЕР (для показа загрузки перед AJAX) ===== */
@keyframes sv-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
.sv-shimmer {
    background: linear-gradient(90deg, #232730 0%, #2e333c 50%, #232730 100%);
    background-size: 800px 100%;
    animation: sv-shimmer 1.4s infinite linear;
    border-radius: 4px;
}
.skeleton-related-title { height: 14px; width: 92%; }
.skeleton-related-channel { height: 12px; width: 60%; margin-bottom: 6px; }
.skeleton-related-meta { height: 11px; width: 45%; }

.loading-spinner {
    width: 30px; height: 30px; margin: 0 auto;
    border: 3px solid var(--sv-border); border-top-color: var(--sv-red);
    border-radius: 50%; animation: sv-spin 0.8s linear infinite;
}
@keyframes sv-spin { to { transform: rotate(360deg); } }
#sv-rec-no-more { text-align: center; padding: 20px; color: var(--sv-mute) !important; font-size: 13px; }

/* ===== АДАПТИВ ===== */
@media (max-width: 1200px) { .sv-layout { grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; } }
@media (max-width: 980px) {
    .sv-layout { grid-template-columns: 1fr; }
    .sv-sidebar { position: static; max-height: none; overflow: visible; padding-right: 0; }
}
@media (max-width: 768px) {
	.sv-info {padding-left:16px;padding-right:16px;}
	.yt-main { padding:0;}
    .yt-main.single-video-page { padding: 0 !important;}
    .sv-layout { padding: 0; gap: 16px; }
    .sv-player-wrapper { border-radius: 0; }
    .sv-title { font-size: 17px; }
    .sv-actions { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
    .sv-actions::-webkit-scrollbar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .sv-shimmer { animation: none; }
    .yt-video-controls, .center-play-disc { transition: none; }
}

/* ===== ФИКС: страница не вылезает из потока ===== */
.yt-main.single-video-page {
    position: static !important;
    margin: 0 !important;
    transform: none !important;
    background: transparent !important;
    width: auto;
    max-width: 100%;
}




/* ============================================================
   РЕКОМЕНДАЦИИ: перебиваем карточки главной (.ytb-card) внутри
   сайдбара. Главная не затрагивается — всё под #sv-rec-container.
   ============================================================ */

/* 1) Контейнер — строго 1 колонка */
#sv-rec-container,
#sv-rec-container.video-grid,
#sv-rec-container.rec-video-grid {
	padding-top:0!important;
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    grid-template-columns: none !important;
}

/* 2) Карточка — превью слева, контент справа */
#sv-rec-container .ytb-card {
    display: grid !important;
    grid-template-columns: 168px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start;
    padding: 6px;
    border-radius: 10px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transition: background-color 0.15s ease;
}
#sv-rec-container .ytb-card:hover { background: rgba(255, 255, 255, 0.05) !important; }

/* 3) Превью (первый дочерний элемент или .ytb-thumb) */
#sv-rec-container .ytb-card > a:first-child,
#sv-rec-container .ytb-card > div:first-child,
#sv-rec-container .ytb-thumb,
#sv-rec-container .ytb-card-thumb {
    position: relative;
    width: 168px !important;
    min-width: 168px;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    display: block;
}
#sv-rec-container .ytb-card > a:first-child img,
#sv-rec-container .ytb-thumb img,
#sv-rec-container .ytb-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
}

/* 4) Тело: аватар + текст */
#sv-rec-container .ytb-card-body {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 2px 0 !important;
}
#sv-rec-container .ytb-card-body > img,
#sv-rec-container .ytb-card-body > a:first-child,
#sv-rec-container .ytb-avatar {
    flex: 0 0 36px;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    object-fit: cover;
    display: block;
}
#sv-rec-container .ytb-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
#sv-rec-container .ytb-meta h3,
#sv-rec-container .ytb-title {
    margin: 0 !important;
    font-size: 13.5px !important;
    font-weight: 600;
    line-height: 1.35;
    color: var(--sv-text) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
#sv-rec-container .ytb-meta > *:not(h3):not(.ytb-title) {
    font-size: 12px;
    color: var(--sv-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 5) Скелетоны загрузки — тоже горизонтальные */
#sv-rec-container .ytb-skeleton-card {
    display: grid !important;
    grid-template-columns: 168px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start;
}
#sv-rec-container .ytb-skeleton-thumb {
    width: 168px !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
}

/* 6) Мобильный адаптив */
@media (max-width: 480px) {
    #sv-rec-container .ytb-card,
    #sv-rec-container .ytb-skeleton-card {
        grid-template-columns: 140px minmax(0, 1fr) !important;
    }
    #sv-rec-container .ytb-card > a:first-child,
    #sv-rec-container .ytb-card > div:first-child,
    #sv-rec-container .ytb-skeleton-thumb {
        width: 140px !important;
        min-width: 140px;
    }
}

/* ============================================================
   РЕКОМЕНДАЦИИ В САЙДБАРЕ: карточки главной (.ytb-card)
   в горизонтальном формате. Требует подключённого ytb-main.css!
   Главную не трогает — всё под #sv-rec-container.
   ============================================================ */

/* 1) Контейнер — строго 1 колонка */
#sv-rec-container,
#sv-rec-container.video-grid,
#sv-rec-container.rec-video-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    grid-template-columns: none !important;
}

/* 2) Карточка — превью слева, контент справа */
#sv-rec-container .ytb-card {
    display: grid !important;
    grid-template-columns: 168px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start;
    padding: 6px;
    border-radius: 10px;
    transition: background-color 0.15s ease;
}
#sv-rec-container .ytb-card:hover { background: rgba(255, 255, 255, 0.05); }

/* 3) Превью: убираем нижний отступ главной, фикс 168px */
#sv-rec-container .ytb-thumb-wrap {
    width: 168px !important;
    min-width: 168px;
    margin-bottom: 0 !important;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
}

/* 4) Тело карточки */
#sv-rec-container .ytb-card-body { padding: 2px 0; }

/* Типографика компактнее, чем на главной */
#sv-rec-container .ytb-title { font-size: 13.5px !important; }
#sv-rec-container .ytb-author { font-size: 12px !important; }
#sv-rec-container .ytb-stats { font-size: 11.5px !important; }

/* 5) Меню ⋮: дропдаун чуть уже, чтобы не вылезал из сайдбара */
#sv-rec-container .ytb-card-more { position: relative; position: absolute; right: 0; bottom: 0;}
#sv-rec-container .ytb-menu { min-width: 220px; }

/* 6) Скелетоны — тоже горизонтальные */
#sv-rec-container .ytb-skeleton-card {
    display: grid !important;
    grid-template-columns: 168px minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start;
}
#sv-rec-container .ytb-skeleton-thumb {
    width: 168px !important;
    margin-bottom: 0 !important;
}

/* 7) Мобильный адаптив */
@media (max-width: 480px) {
    #sv-rec-container .ytb-card,
    #sv-rec-container .ytb-skeleton-card {
        grid-template-columns: 140px minmax(0, 1fr) !important;
    }
    #sv-rec-container .ytb-thumb-wrap,
    #sv-rec-container .ytb-skeleton-thumb {
        width: 140px !important;
        min-width: 140px;
    }
}









/* ===== Мобильные: скрываем аватар автора в рекомендациях ===== */
@media (max-width: 768px) {
    #sv-rec-container .ytb-avatar-link,
    #sv-rec-container .ytb-avatar {
        display: none !important;
    }
    /* текст занимает освободившееся место без лишнего отступа */
    #sv-rec-container .ytb-card-body {
        gap: 0;
    }
    #sv-rec-container .ytb-meta {
        padding-top: 2px;
    }
}

.sv-description-content {
    overflow: hidden;
    max-height: 90px;
    transition: max-height 0.25s ease;
}
/* JS вешает extended на .sv-description — учитываем оба варианта */
.sv-description.expanded .sv-description-content,
.sv-description-content.expanded {
    max-height: none;
} 

/* =========================================================
   ЗАДАЧА 1: Прилипающий плеер при скролле (Мобильные)
   ========================================================= */
@media (max-width: 768px) {
    .sv-player-wrapper, 
    .yt-player-wrapper {
        position: -webkit-sticky; /* Для Safari на iOS */
        position: sticky!important;
        top: 0 ; /* Прилипает к самому верху экрана */
        z-index: 100; /* Гарантирует, что плеер будет ПОВЕРХ прокручиваемого текста */
        width: 100%;
        background: #000000; /* ВАЖНО: фон плеера, чтобы текст не просвечивал под ним при скролле */
       margin-bottom: 16px;
box-shadow: 0 4px 12px rgba(0,0,0,0.5); /* Легкая тень снизу для красоты */
    }

    /* Убеждаемся, что блок с информацией идет строго после плеера */
    .sv-info {
        position: relative;
        padding: 0 16px;
        background: #0f0f0f; /* Цвет фона твоего сайта, чтобы не было белых полос */
    }
}

/* =========================================================
   Прилипающий плеер (Мобильные) - через fixed + JS
   ========================================================= */
@media (max-width: 768px) {
    /* Когда плеер прилип, добавляем отступ сверху для контента */
    .sv-main.player-stuck {
        padding-top: 0; /* Отступ будет задаваться через JS динамически */
    }

    .sv-player-wrapper.stuck {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 999 !important;
        background: #000000 !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.5);
    }

    /* Плейсхолдер, чтобы контент не прыгал */
    .sv-player-placeholder {
        display: none!important;
    }
    
    .sv-player-placeholder.active {
        display: block;
        width: 100%;
        /* Высота будет задана через JS */
    }
}

/* =========================================================
   Прилипающие табы под плеером (Мобильные)
   ========================================================= */
@media (max-width: 768px) {
    /* Когда табы прилипают */
    #sv-rec-tabs.tabs-stuck {
        position: fixed !important;
        top: var(--yt-player-height, 220px) !important; /* Высота плеера (задается JS) */
        left: 0 !important;
        width: 100% !important;
        z-index: 998 !important; /* Чуть ниже плеера (у плеера 999) */
        background: #0f0f0f !important; /* Цвет фона сайта */
        padding: 12px 0 !important;
        box-shadow: 0 2px 8px rgba(0,0,0,0.4);
        border-top: 1px solid #272727;
        border-bottom: 1px solid #272727;
    }

    /* Плейсхолдер для табов, чтобы контент не прыгал */
    .tabs-placeholder {
        display: none;
    }
    
    .tabs-placeholder.active {
        display: block;
        /* Высота задается через JS */
    }

    /* Когда табы прилипли — добавляем отступ сверху к блоку рекомендаций,
       чтобы они не перекрывали первые карточки */
    .sv-sidebar.tabs-offset {
        padding-top: 60px; /* Высота табов + небольшой воздух */
    }
}

/* =========================================================
   НАТИВНЫЙ STICKY ДЛЯ МОБИЛЬНЫХ (БЕЗ JS-ДЁРГАНИЯ)
   ========================================================= */
@media (max-width: 768px) {
    /* 1. КРИТИЧЕСКИ ВАЖНО: ломаем любые overflow у родителей, которые убивают sticky */
    body, html, .sv-layout, .sv-main, .sv-sidebar, .yt-player-wrapper {
        overflow-x: visible !important;
        overflow-y: visible !important;
    }

    /* 2. Прилипающий плеер */
    .sv-player-wrapper, 
    .yt-player-wrapper {
        position: -webkit-sticky !important; /* Для iOS Safari */
        position: sticky !important;
        top: 0 !important;
        z-index: 100 !important;
        background: #000000 !important;
        margin-bottom: 0 !important;
    }

    /* 3. Прилипающие табы */
    #sv-rec-tabs {
        position: -webkit-sticky !important;
        position: sticky !important;
        /* Высота плеера + 2px зазора. Задается через JS один раз! */
        top: var(--player-sticky-top, 220px) !important; 
        z-index: 99 !important; /* Чуть ниже плеера */
        background: #0f0f0f !important; /* Цвет фона твоего сайта */
        padding: 12px 0 !important;
        border-top: 1px solid #272727;
        border-bottom: 1px solid #272727;
        margin-bottom: 10px; /* Воздух до карточек видео */
    }

    /* 4. Небольшой отступ для сайдбара, чтобы карточки не прилипали к табам */
    .sv-sidebar {
        padding-top: 5px;
    }
}

/* === Иконки (inline SVG) === */
.control-icon,
.sv-like-icon,
.sv-watchlater-icon,
.sv-verified,
.audio-play-icon,
.audio-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}
.control-icon { width: 20px; height: 20px; font-size: 20px; color: #fff; }
.sv-like-icon,
.sv-watchlater-icon { width: 18px; height: 18px; font-size: 18px; }
.sv-verified { width: 14px; height: 14px; font-size: 14px; }
.audio-play-icon { width: 32px; height: 32px; font-size: 32px; color: #fff; }
.audio-btn-icon { width: 24px; height: 24px; font-size: 24px; color: #fff; }

.control-icon svg,
.sv-like-icon svg,
.sv-watchlater-icon svg,
.sv-verified svg,
.audio-play-icon svg,
.audio-btn-icon svg { width: 100%; height: 100%; display: block; }

/* Специфичные кнопки в actions */
.sv-audio-btn > span:first-child,
.sv-pip-btn > span:first-child,
.sv-share-btn > span:first-child {
    display: inline-flex;
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 1;
}
.sv-audio-btn > span:first-child svg,
.sv-pip-btn > span:first-child svg,
.sv-share-btn > span:first-child svg { width: 100%; height: 100%; }

/* Центральная кнопка play/pause */
.center-play-icon {
    display: inline-flex;
    width: 64px;
    height: 64px;
    font-size: 64px;
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,.6));
}
.center-play-icon svg { width: 100%; height: 100%; display: block; }

/* ====== АУДИО-РЕЖИМ: скрытие видео и отображение аудио-плеера ====== */

.yt-player-wrapper.audio-mode .yt-video-player {
    display: none !important;
}

.yt-player-wrapper.audio-mode .yt-center-play {
    display: none !important;
}

.yt-player-wrapper.audio-mode .yt-video-controls {
    display: none !important;
}

.yt-player-wrapper.audio-mode .yt-progress-container {
    display: none !important;
}

/* Сам контейнер плеера сохраняет высоту, чтобы не прыгал контент */
.yt-player-wrapper.audio-mode {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f1419 0%, #1a1f2e 100%);
    min-height: 140px;
    aspect-ratio: 16 / 9;
    width: 100%;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

.yt-player-wrapper.audio-mode::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M30 20v60l50-30z' fill='none' stroke='%23ff0033' stroke-width='2' opacity='0.08'/%3E%3C/svg%3E");
    background-size: 200px;
    opacity: 0.5;
    animation: audio-bg-pulse 8s ease-in-out infinite;
}

@keyframes audio-bg-pulse {
    0%, 100% { opacity: 0.3; transform: scale(1); }
    50%      { opacity: 0.6; transform: scale(1.05); }
}

/* Сам UI аудио-плеера занимает всю площадь wrapper'а */
.yt-player-wrapper.audio-mode .yt-audio-player {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 24px 32px;
    box-sizing: border-box;
    position: relative;
    z-index: 5;
    gap: 18px;
}

.yt-audio-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
}

.yt-audio-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
}

.yt-audio-btn:hover {
    background: rgba(255, 0, 51, 0.15);
    border-color: #ff0033;
    transform: scale(1.08);
}

.yt-audio-play-btn {
    width: 68px;
    height: 68px;
    background: #ff0033;
    border-color: #ff0033;
}

.yt-audio-play-btn:hover {
    background: #ff1a4a;
    box-shadow: 0 0 24px rgba(255, 0, 51, 0.4);
}

.yt-audio-btn .audio-btn-icon svg,
.yt-audio-btn .audio-play-icon svg {
    width: 22px;
    height: 22px;
    color: #fff;
}

.yt-audio-time {
    text-align: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.5px;
}

.yt-audio-progress-container {
    position: relative;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    cursor: pointer;
    transition: height 0.15s ease;
}

.yt-audio-progress-container:hover {
    height: 10px;
}

.yt-audio-progress-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #ff0033;
    border-radius: 3px;
    width: 0%;
    pointer-events: none;
}

.yt-audio-progress-thumb {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
}

.yt-audio-progress-container:hover .yt-audio-progress-thumb,
.yt-audio-progress-container.dragging .yt-audio-progress-thumb {
    opacity: 1;
}

/* Кнопка переключения аудио-режима в активном состоянии */
.sv-audio-btn.active {
    background: #ff0033 !important;
    color: #fff !important;
}
.sv-audio-btn.active span:first-child svg {
    color: #fff;
}

/* ====== Адаптив для мобильных ====== */
@media (max-width: 640px) {
    .yt-player-wrapper.audio-mode {
        min-height: 180px;
    }
    .yt-player-wrapper.audio-mode .yt-audio-player {
        padding: 20px 20px;
        gap: 14px;
    }
    .yt-audio-controls {
        gap: 18px;
    }
    .yt-audio-btn {
        width: 42px;
        height: 42px;
    }
    .yt-audio-play-btn {
        width: 60px;
        height: 60px;
    }
}