/**
 * Lo-fi «Оригинальная» — библиотека:
 * плейлисты, история просмотров, смотреть позже, понравившиеся, просмотр плейлиста.
 */
html.original-theme .history-page-container,
html.original-theme .watch-later-container,
html.original-theme .liked-page-container,
html.original-theme .playlists-page-container,
body.original-theme .history-page-container,
body.original-theme .watch-later-container,
body.original-theme .liked-page-container,
body.original-theme .playlists-page-container {
    background: linear-gradient(
        165deg,
        rgba(255, 252, 247, 0.98) 0%,
        rgba(250, 242, 232, 0.96) 55%,
        rgba(245, 236, 224, 0.94) 100%
    ) !important;
    border: 1px solid rgba(180, 150, 120, 0.22) !important;
    border-radius: 22px !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.75) inset,
        0 16px 48px rgba(92, 74, 58, 0.1) !important;
    color: #4a3f35 !important;
}

/* ── Заголовки ── */
html.original-theme .history-page-title,
html.original-theme .liked-page-title,
html.original-theme .playlists-page-title,
html.original-theme .page-title,
html.original-theme .watch-later-container .page-title,
body.original-theme .history-page-title,
body.original-theme .liked-page-title,
body.original-theme .playlists-page-title,
body.original-theme .page-title,
body.original-theme .watch-later-container .page-title {
    color: #5c4a3d !important;
}

html.original-theme .history-date-header,
body.original-theme .history-date-header {
    color: #8b7355 !important;
    border-bottom-color: rgba(180, 150, 120, 0.22) !important;
}

/* ── Кнопки / пилюли (история) ── */
html.original-theme .history-action-pill,
html.original-theme .history-sort-menu .sort-menu-button,
body.original-theme .history-action-pill,
body.original-theme .history-sort-menu .sort-menu-button {
    background: rgba(255, 254, 251, 0.85) !important;
    border: 1px solid rgba(180, 150, 120, 0.28) !important;
    color: #5c4a3d !important;
    box-shadow: 0 1px 4px rgba(92, 74, 58, 0.06);
}

html.original-theme .history-action-pill:hover,
html.original-theme .history-sort-menu .sort-menu-details[open] .sort-menu-button,
html.original-theme .history-sort-menu .sort-menu-button:hover,
body.original-theme .history-action-pill:hover,
body.original-theme .history-sort-menu .sort-menu-details[open] .sort-menu-button,
body.original-theme .history-sort-menu .sort-menu-button:hover {
    background: #f5efe6 !important;
    border-color: rgba(196, 137, 90, 0.35) !important;
    color: #4a3f35 !important;
}

html.original-theme .history-action-pill img,
html.original-theme .history-sort-menu .sort-arrow-icon,
body.original-theme .history-action-pill img,
body.original-theme .history-sort-menu .sort-arrow-icon {
    filter: brightness(0) saturate(100%) opacity(0.45) !important;
}

html.original-theme .history-action-pill--clear,
body.original-theme .history-action-pill--clear {
    background: rgba(255, 251, 250, 0.9) !important;
    border-color: rgba(168, 90, 100, 0.35) !important;
    color: #9e4f48 !important;
}

html.original-theme .history-action-pill--clear:hover,
body.original-theme .history-action-pill--clear:hover {
    background: rgba(232, 196, 196, 0.35) !important;
    border-color: rgba(168, 90, 100, 0.5) !important;
    color: #8b3d38 !important;
}

/* ── Списки видео: история / лайки / позже ── */
html.original-theme .history-video-title,
html.original-theme .liked-video-title,
html.original-theme .video-title a,
html.original-theme .video-title,
html.original-theme .history-playlist-title,
body.original-theme .history-video-title,
body.original-theme .liked-video-title,
body.original-theme .video-title a,
body.original-theme .video-title,
body.original-theme .history-playlist-title {
    color: #4a3f35 !important;
}

html.original-theme .history-video-meta,
html.original-theme .video-meta,
html.original-theme .history-channel-name,
html.original-theme .video-channel-link,
html.original-theme .history-playlist-meta,
html.original-theme .playlist-meta-info,
body.original-theme .history-video-meta,
body.original-theme .video-meta,
body.original-theme .history-channel-name,
body.original-theme .video-channel-link,
body.original-theme .history-playlist-meta,
body.original-theme .playlist-meta-info {
    color: #8b7355 !important;
}

html.original-theme .video-channel-link:hover,
body.original-theme .video-channel-link:hover {
    color: #5c4a3d !important;
}

html.original-theme .history-channel-info,
body.original-theme .history-channel-info {
    background: rgba(255, 254, 251, 0.75) !important;
    border: 1px solid rgba(180, 150, 120, 0.16);
}

html.original-theme .history-video-item:hover,
html.original-theme .liked-video-item:hover,
html.original-theme .playlist-video-item:hover,
body.original-theme .history-video-item:hover,
body.original-theme .liked-video-item:hover,
body.original-theme .playlist-video-item:hover {
    background: rgba(245, 239, 230, 0.85) !important;
    border-color: rgba(180, 150, 120, 0.14) !important;
}

/* Прогресс просмотра на превью (история) */
html.original-theme .history-progress,
body.original-theme .history-progress {
    background: rgba(74, 58, 42, 0.35) !important;
}

html.original-theme .history-progress-bar,
body.original-theme .history-progress-bar {
    background: linear-gradient(90deg, #a86b4a 0%, #c4895a 55%, #e8c4a8 100%) !important;
    box-shadow: 0 0 6px rgba(196, 137, 90, 0.35);
}

html.original-theme .video-index,
html.original-theme .playlist-video-item .video-index,
body.original-theme .video-index,
body.original-theme .playlist-video-item .video-index {
    color: #8b7355 !important;
}

/* ── Кнопки «Воспроизвести» / «Перемешать» ── */
html.original-theme .action-button.play-all,
body.original-theme .action-button.play-all {
    background: linear-gradient(135deg, #fffefb 0%, #f5ebe2 100%) !important;
    border: 1px solid rgba(180, 150, 120, 0.28) !important;
    color: #4a3f35 !important;
    box-shadow: 0 2px 10px rgba(92, 74, 58, 0.08);
}

html.original-theme .action-button.play-all:hover,
body.original-theme .action-button.play-all:hover {
    background: #f5efe6 !important;
}

html.original-theme .action-button.play-all img,
body.original-theme .action-button.play-all img {
    filter: brightness(0) saturate(100%) opacity(0.55) !important;
}

html.original-theme .action-button.shuffle,
html.original-theme .playlist-info-sidebar .action-button,
body.original-theme .action-button.shuffle,
body.original-theme .playlist-info-sidebar .action-button {
    background: rgba(255, 254, 251, 0.7) !important;
    border: 1px solid rgba(180, 150, 120, 0.22) !important;
    color: #5c4a3d !important;
}

html.original-theme .action-button.shuffle:hover,
html.original-theme .playlist-info-sidebar .action-button:hover,
body.original-theme .action-button.shuffle:hover,
body.original-theme .playlist-info-sidebar .action-button:hover {
    background: #f5efe6 !important;
    color: #4a3f35 !important;
}

html.original-theme .action-button.shuffle img,
html.original-theme .playlist-info-sidebar .action-button img,
body.original-theme .action-button.shuffle img,
body.original-theme .playlist-info-sidebar .action-button img {
    filter: brightness(0) saturate(100%) opacity(0.45) !important;
}

/* «Смотреть позже» — theme-watch-later.css */

/* ── Страница плейлистов ── */
html.original-theme .create-playlist-button,
html.original-theme .delete-playlist-main-button,
html.original-theme .apply-filters-button,
html.original-theme .nonempty-toggle-btn,
html.original-theme .sort-menu-button,
html.original-theme .control-select,
body.original-theme .create-playlist-button,
body.original-theme .delete-playlist-main-button,
body.original-theme .apply-filters-button,
body.original-theme .nonempty-toggle-btn,
body.original-theme .sort-menu-button,
body.original-theme .control-select {
    background: rgba(255, 254, 251, 0.9) !important;
    border: 1px solid rgba(180, 150, 120, 0.28) !important;
    color: #5c4a3d !important;
}

html.original-theme .create-playlist-button:hover,
html.original-theme .delete-playlist-main-button:hover,
html.original-theme .apply-filters-button:hover,
html.original-theme .nonempty-toggle-btn:hover,
html.original-theme .sort-menu-button:hover,
body.original-theme .create-playlist-button:hover,
body.original-theme .delete-playlist-main-button:hover,
body.original-theme .apply-filters-button:hover,
body.original-theme .nonempty-toggle-btn:hover,
body.original-theme .sort-menu-button:hover {
    background: #f5efe6 !important;
    border-color: rgba(196, 137, 90, 0.35) !important;
}

html.original-theme .nonempty-toggle-btn.active,
body.original-theme .nonempty-toggle-btn.active {
    background: linear-gradient(135deg, #c4895a 0%, #b8927a 100%) !important;
    border-color: #c4895a !important;
    color: #fffdf9 !important;
}

html.original-theme .create-playlist-button img,
html.original-theme .delete-playlist-main-button img,
html.original-theme .sort-arrow-icon,
body.original-theme .create-playlist-button img,
body.original-theme .delete-playlist-main-button img,
body.original-theme .sort-arrow-icon {
    filter: brightness(0) saturate(100%) opacity(0.45) !important;
}

html.original-theme .filter-checkbox,
html.original-theme .control-label,
body.original-theme .filter-checkbox,
body.original-theme .control-label {
    color: #8b7355 !important;
}

html.original-theme .view-toggle,
html.original-theme .shelves-layout-toggle,
body.original-theme .view-toggle,
body.original-theme .shelves-layout-toggle {
    background: rgba(255, 254, 251, 0.7) !important;
    border: 1px solid rgba(180, 150, 120, 0.22) !important;
}

html.original-theme .view-toggle-btn,
body.original-theme .view-toggle-btn {
    color: #8b7355 !important;
}

html.original-theme .view-toggle-btn.active,
body.original-theme .view-toggle-btn.active {
    background: linear-gradient(135deg, #c4895a 0%, #b8927a 100%) !important;
    color: #fffdf9 !important;
}

html.original-theme .view-toggle-btn:hover:not(.active),
body.original-theme .view-toggle-btn:hover:not(.active) {
    background: rgba(245, 239, 230, 0.9) !important;
    color: #4a3f35 !important;
}

html.original-theme .playlists-grid.is-shelves .playlist-card,
html.original-theme .playlist-card,
body.original-theme .playlists-grid.is-shelves .playlist-card,
body.original-theme .playlist-card {
    background: linear-gradient(180deg, #fffefb 0%, #faf6f0 100%) !important;
    border: 1px solid rgba(180, 150, 120, 0.18) !important;
    box-shadow: 0 4px 16px rgba(92, 74, 58, 0.06);
}

html.original-theme .playlists-grid.is-shelves .playlist-card:hover,
html.original-theme .playlist-card:hover,
body.original-theme .playlists-grid.is-shelves .playlist-card:hover,
body.original-theme .playlist-card:hover {
    background: #f8f4ef !important;
    border-color: rgba(196, 137, 90, 0.28) !important;
}

html.original-theme .playlist-info h3,
html.original-theme .playlist-card .playlist-title,
body.original-theme .playlist-info h3,
body.original-theme .playlist-card .playlist-title {
    color: #4a3f35 !important;
}

html.original-theme .playlist-info p,
html.original-theme .playlist-meta,
body.original-theme .playlist-info p,
body.original-theme .playlist-meta {
    color: #8b7355 !important;
}

html.original-theme .playlist-thumbnail-placeholder,
body.original-theme .playlist-thumbnail-placeholder {
    background: #ebe4da !important;
}

/* ── Просмотр плейлиста (сайдбар + список) ── */
html.original-theme body.playlist-view-page,
body.original-theme.playlist-view-page {
    background: transparent !important;
}

html.original-theme .playlist-info-sidebar,
body.original-theme .playlist-info-sidebar {
    background: linear-gradient(150deg, #fffefb 0%, #f5ebe2 55%, #f0e6da 100%) !important;
    border: 1px solid rgba(180, 150, 120, 0.22) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.8) inset,
        0 12px 36px rgba(92, 74, 58, 0.1) !important;
}

html.original-theme .playlist-title,
html.original-theme .playlist-owner .playlist-owner-link,
html.original-theme .playlist-description,
body.original-theme .playlist-title,
body.original-theme .playlist-owner .playlist-owner-link,
body.original-theme .playlist-description {
    color: #4a3f35 !important;
}

html.original-theme .playlist-video-item.is-playing,
body.original-theme .playlist-video-item.is-playing {
    background: rgba(232, 196, 168, 0.35) !important;
}

html.original-theme .empty-list-message,
html.original-theme .empty-page-placeholder h2,
body.original-theme .empty-list-message,
body.original-theme .empty-page-placeholder h2 {
    color: #5c4a3d !important;
}

html.original-theme .empty-page-placeholder p,
html.original-theme .empty-page-placeholder.vertical p,
body.original-theme .empty-page-placeholder p,
body.original-theme .empty-page-placeholder.vertical p {
    color: #8b7355 !important;
}

html.original-theme .empty-page-button,
body.original-theme .empty-page-button {
    background: linear-gradient(135deg, #c4895a 0%, #b8927a 100%) !important;
    color: #fffdf9 !important;
    border: none !important;
}

html.original-theme .empty-page-placeholder img,
body.original-theme .empty-page-placeholder img {
    filter: brightness(0) saturate(100%) opacity(0.35);
}

/* ── Выпадающие меню на этих страницах ── */
html.original-theme .history-page-container .context-menu-dropdown,
html.original-theme .liked-page-container .context-menu-dropdown,
html.original-theme .watch-later-container .context-menu-dropdown,
html.original-theme .playlists-page-container .sort-menu-dropdown,
html.original-theme .history-sort-menu .sort-menu-dropdown,
html.original-theme .playlist-view-container .context-menu-dropdown,
body.original-theme .history-page-container .context-menu-dropdown,
body.original-theme .liked-page-container .context-menu-dropdown,
body.original-theme .watch-later-container .context-menu-dropdown,
body.original-theme .playlists-page-container .sort-menu-dropdown,
body.original-theme .history-sort-menu .sort-menu-dropdown,
body.original-theme .playlist-view-container .context-menu-dropdown {
    background: #fff9f3 !important;
    border: 1px solid rgba(180, 150, 120, 0.22) !important;
    box-shadow: 0 12px 32px rgba(74, 63, 53, 0.14) !important;
}

html.original-theme .history-page-container .context-menu-dropdown a,
html.original-theme .liked-page-container .context-menu-dropdown a,
html.original-theme .watch-later-container .context-menu-dropdown a,
html.original-theme .sort-menu-dropdown .sort-option,
html.original-theme .playlist-view-container .context-menu-dropdown a,
body.original-theme .history-page-container .context-menu-dropdown a,
body.original-theme .liked-page-container .context-menu-dropdown a,
body.original-theme .watch-later-container .context-menu-dropdown a,
body.original-theme .sort-menu-dropdown .sort-option,
body.original-theme .playlist-view-container .context-menu-dropdown a {
    color: #4a3f35 !important;
}

html.original-theme .history-page-container .context-menu-dropdown a:hover,
html.original-theme .liked-page-container .context-menu-dropdown a:hover,
html.original-theme .watch-later-container .context-menu-dropdown a:hover,
html.original-theme .sort-menu-dropdown .sort-option:hover,
html.original-theme .playlist-view-container .context-menu-dropdown a:hover,
body.original-theme .history-page-container .context-menu-dropdown a:hover,
body.original-theme .liked-page-container .context-menu-dropdown a:hover,
body.original-theme .watch-later-container .context-menu-dropdown a:hover,
body.original-theme .sort-menu-dropdown .sort-option:hover,
body.original-theme .playlist-view-container .context-menu-dropdown a:hover {
    background: #f5efe6 !important;
}

html.original-theme .history-page-container .context-menu-dropdown a img,
html.original-theme .liked-page-container .context-menu-dropdown a img,
html.original-theme .watch-later-container .context-menu-dropdown a img,
html.original-theme .playlist-view-container .context-menu-dropdown a img,
html.original-theme .context-menu-button img,
body.original-theme .history-page-container .context-menu-dropdown a img,
body.original-theme .liked-page-container .context-menu-dropdown a img,
body.original-theme .watch-later-container .context-menu-dropdown a img,
body.original-theme .playlist-view-container .context-menu-dropdown a img,
body.original-theme .context-menu-button img {
    filter: brightness(0) saturate(100%) opacity(0.45) !important;
}

html.original-theme .context-menu-button:hover,
body.original-theme .context-menu-button:hover {
    background: rgba(245, 239, 230, 0.9) !important;
}

html.original-theme .history-playlist-remove-btn,
body.original-theme .history-playlist-remove-btn {
    background: rgba(255, 254, 251, 0.8) !important;
    border-color: rgba(180, 150, 120, 0.25) !important;
    color: #6b5a48 !important;
}

html.original-theme .history-playlist-remove-btn:hover,
body.original-theme .history-playlist-remove-btn:hover {
    background: #f5efe6 !important;
}

html.original-theme .undo-notification,
body.original-theme .undo-notification {
    background: #4a3f35 !important;
    color: #fffdf9 !important;
    border: 1px solid rgba(180, 150, 120, 0.25);
}

html.original-theme .undo-notification-button,
body.original-theme .undo-notification-button {
    color: #e8c4a8 !important;
}

html.original-theme .action-button.wl-short-toggle,
body.original-theme .action-button.wl-short-toggle {
    background: rgba(255, 254, 251, 0.85) !important;
    border: 1px solid rgba(180, 150, 120, 0.25) !important;
    color: #6b5a48 !important;
}

html.original-theme .action-button.wl-short-toggle.is-on,
body.original-theme .action-button.wl-short-toggle.is-on {
    background: linear-gradient(135deg, rgba(196, 137, 90, 0.35) 0%, rgba(184, 146, 122, 0.28) 100%) !important;
    border-color: rgba(196, 137, 90, 0.45) !important;
    color: #4a3f35 !important;
}

html.original-theme .drag-handle-icon,
body.original-theme .drag-handle-icon {
    filter: brightness(0) saturate(100%) opacity(0.35) !important;
}

html.original-theme .view-playlist-text,
body.original-theme .view-playlist-text {
    color: #8b7355 !important;
}

html.original-theme .playlist-thumbnail-container,
body.original-theme .playlist-thumbnail-container {
    background: #ebe4da !important;
}

/* ═══════════════════════════════════════
   Светлая / тёмная тема — плашки списков видео
   ═══════════════════════════════════════ */
html.light-theme .history-video-item,
html.light-theme .liked-video-item,
body.light-theme .history-video-item,
body.light-theme .liked-video-item {
    background: #ffffff !important;
    border-radius: 14px !important;
    padding: 10px 12px !important;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.08),
        0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

html.light-theme .history-video-item:hover,
html.light-theme .liked-video-item:hover,
body.light-theme .history-video-item:hover,
body.light-theme .liked-video-item:hover {
    background: #f5f5f5 !important;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06) !important;
}

html.light-theme .history-thumbnail-wrapper,
html.light-theme .liked-video-item .thumbnail-wrapper,
body.light-theme .history-thumbnail-wrapper,
body.light-theme .liked-video-item .thumbnail-wrapper {
    border-radius: 12px !important;
    overflow: hidden !important;
    background: linear-gradient(160deg, #f0f0f0 0%, #e4e4e4 50%, #d8d8d8 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
}

html.light-theme .history-thumbnail,
html.light-theme .liked-video-item .thumbnail-image,
body.light-theme .history-thumbnail,
body.light-theme .liked-video-item .thumbnail-image {
    border-radius: 0 !important;
    background: transparent !important;
}

html.dark-theme .history-video-item,
html.dark-theme .liked-video-item,
body.dark-theme .history-video-item,
body.dark-theme .liked-video-item {
    background: rgba(255, 255, 255, 0.06) !important;
    border-radius: 14px !important;
    padding: 10px 12px !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

html.dark-theme .history-video-item:hover,
html.dark-theme .liked-video-item:hover,
body.dark-theme .history-video-item:hover,
body.dark-theme .liked-video-item:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.16),
        0 4px 12px rgba(0, 0, 0, 0.35) !important;
}

html.dark-theme .history-thumbnail-wrapper,
html.dark-theme .liked-video-item .thumbnail-wrapper,
body.dark-theme .history-thumbnail-wrapper,
body.dark-theme .liked-video-item .thumbnail-wrapper {
    border-radius: 12px !important;
    overflow: hidden !important;
    background: linear-gradient(160deg, #3d3d3d 0%, #2d2d2d 45%, #252525 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

html.dark-theme .history-thumbnail,
html.dark-theme .liked-video-item .thumbnail-image,
body.dark-theme .history-thumbnail,
body.dark-theme .liked-video-item .thumbnail-image {
    border-radius: 0 !important;
    background: transparent !important;
}

html.dark-theme .history-progress,
body.dark-theme .history-progress {
    background: rgba(255, 255, 255, 0.2) !important;
}

html.dark-theme .history-progress-bar,
body.dark-theme .history-progress-bar {
    background: linear-gradient(90deg, #8b8b8b 0%, #b0b0b0 55%, #d4d4d4 100%) !important;
    box-shadow: none;
}

html.light-theme .history-progress,
body.light-theme .history-progress {
    background: rgba(0, 0, 0, 0.15) !important;
}

html.light-theme .history-progress-bar,
body.light-theme .history-progress-bar {
    background: linear-gradient(90deg, #606060 0%, #888888 55%, #aaaaaa 100%) !important;
    box-shadow: none;
}
