// ==UserScript==
// @name              YouTube™ Classic 📺 — (Remove rounded design + Return YouTube dislikes)
// @version           2026.5.16.7
// @author            Adam Lui, magma_craft
// @namespace         https://github.com/adamlui
// @description       Reverts YouTube to its classic design (before all the rounded corners & hidden dislikes) + redirects YouTube Shorts + blocks thumbnail ads
// @license           MIT
// @icon              https://cdn.jsdelivr.net/gh/adamlui/youtube-classic@3bd207d/assets/images/icons/app/icon48.png
// @icon64            https://cdn.jsdelivr.net/gh/adamlui/youtube-classic@3bd207d/assets/images/icons/app/icon64.png
// @compatible        chrome
// @compatible        firefox
// @compatible        opera
// @compatible        safari
// @compatible        edge
// @match             *://*.youtube.com/*
// @connect           cdn.jsdelivr.net
// @connect           gm.ytclassic.com
// @connect           raw.githubusercontent.com
// @require           https://cdn.jsdelivr.net/npm/json5@2.2.3/dist/index.min.js#sha256-S7ltnVPzgKyAGBlBG4wQhorJqYTehj5WQCrADCKJufE=
// @require           https://cdn.jsdelivr.net/gh/adamlui/userscripts@ff2baba/assets/js/lib/css.js/dist/css.min.js#sha256-zf9s8C0cZ/i+gnaTIUxa0+RpDYpsJVlyuV5L2q4KUdA=
// @require           https://cdn.jsdelivr.net/gh/adamlui/userscripts@ff2baba/assets/js/lib/dom.js/dist/dom.min.js#sha256-nTc2by3ZAz6AR7B8fOqjloJNETvjAepe15t2qlghMDo=
// @require           https://cdn.jsdelivr.net/gh/Anarios/return-youtube-dislike@v4.0.4/Extensions/UserScript/Return%20Youtube%20Dislike.user.js#sha256-BPRgJOQfxTUmr09fqGi1dlZ14jtZfdKHhKltqmf5B+Y=
// @grant             GM_registerMenuCommand
// @grant             GM_unregisterMenuCommand
// @grant             GM_getValue
// @grant             GM_setValue
// @grant             GM_xmlhttpRequest
// @grant             GM.xmlHttpRequest
// @run-at            document-end
// @downloadURL       https://gm.ytclassic.com
// @updateURL         https://gm.ytclassic.com
// @homepageURL       https://www.ytclassic.com
// @supportURL        https://github.com/adamlui/youtube-classic/issues
// @contributionURL   https://ko-fi.com/adamlui
// ==/UserScript==

(async () => {
    'use strict'

    // Init DATA
    window.env = {
        browser: { isFF: navigator.userAgent.includes('Firefox') },
        scriptManager: {
            name: (() => { try { return GM_info.scriptHandler } catch (err) { return 'unknown' }})(),
            version: (() => { try { return GM_info.version } catch (err) { return 'unknown' }})()
        },
        ui: {
            scheme: document.documentElement.hasAttribute('dark')
                 || window.matchMedia?.('(prefers-color-scheme: dark)')?.matches ? 'dark' : 'light'
        }
    }
    env.scriptManager.supportsTooltips = env.scriptManager.name == 'Tampermonkey'
                                      && parseInt(env.scriptManager.version.split('.')[0]) >= 5
    window.xhr = typeof GM != 'undefined' && GM.xmlHttpRequest || GM_xmlhttpRequest
    window.app = {
        symbol: '📺', configKeyPrefix: 'ytClassic',
        commitHashes: { data: '7756476' } // for cached selectors.json5
    }
    app.urls = { data: `https://cdn.jsdelivr.net/gh/adamlui/youtube-classic@${app.commitHashes.data}/assets/data` }
    app.selectors = await new Promise(resolve => xhr({ // used in *block modes
        method: 'GET', onload: ({ responseText }) => resolve(JSON5.parse(responseText)),
        url: `${app.urls.data}/selectors.json5`
    }))

    // Init SETTINGS
    app.config ??= {}
    window.settings = {

        controls: { // displays top-to-bottom in toolbar menu
            restoreDislikes: {
                type: 'toggle', label: 'Restore Dislikes', defaultVal: true,
                helptip: 'Show dislike counts using Return YouTube Dislike data'
            },
            unroundCorners: {
                type: 'toggle', label: 'Unround Corners', defaultVal: true,
                helptip: 'Unround corners around UI elements'
            },
            disableShorts: {
                type: 'toggle', label: 'Redirect Shorts', defaultVal: true,
                helptip: 'Redirect Shorts to classic wide player'
            },
            shortsBlock: {
                type: 'toggle', label: 'Hide Shorts', defaultVal: true,
                helptip: 'Hide Shorts from appearing in home page + results'
            },
            playablesBlock: {
                type: 'toggle', label: 'Hide Playables', defaultVal: true,
                helptip: 'Hide Playables from appearing in home page'
            },
            adBlock: {
                type: 'toggle', label: 'Block Ads', defaultVal: false,
                helptip: 'Hide ad thumbnails from homepage layouts'
            },
            aiBlock: {
                type: 'toggle', label: 'Block AI Elements', defaultVal: true,
                helptip: 'Hide AI elements from home + video pages'
            },
            reduceAnimations: {
                type: 'toggle',  label: 'Reduce Animations',  defaultVal: true,
                helptip: 'Reduce UI animations'
            },
            idlePrevention: {
                type: 'toggle', label: 'Idle Prevention', defaultVal: true,
                helptip: 'Prevent tab from falling asleep'
            },
            notifDisabled: {
                type: 'toggle', label: 'Mode Notifications', defaultVal: false,
                helptip: 'Show notifications when toggling mode/settings'
            }
        },

        load(...keys) {
            keys.flat().forEach(key =>
                app.config[key] = processKey(key, GM_getValue(`${app.configKeyPrefix}_${key}`, undefined)))
            function processKey(key, val) {
                const ctrl = settings.controls?.[key]
                if (val != undefined && ( // validate stored val
                        (ctrl?.type == 'toggle' && typeof val != 'boolean')
                     || (ctrl?.type == 'slider' && isNaN(parseFloat(val)))
                )) val = undefined
                return val ?? (ctrl?.defaultVal ?? (ctrl?.type == 'slider' ? 100 : false))
            }
        },

        save(key, val) { GM_setValue(`${app.configKeyPrefix}_${key}`, val) ; app.config[key] = val },

        typeIsEnabled(key) { // for menu labels + notifs to return ON/OFF
            const reInvertSuffixes = /disabled|hidden/i
            return reInvertSuffixes.test(key) // flag in control key name
                && !reInvertSuffixes.test(this.controls[key]?.label || '') // but not in label msg key name
                    ? !app.config[key] : app.config[key] // so invert since flag reps opposite type state, else don't
        }
    }
    settings.load(Object.keys(settings.controls))

    const EXPFLAGS = {
        enable_channel_page_header_profile_section: false,
        enable_header_channel_handler_ui: false,
        kevlar_unavailable_video_error_ui_client: false,
        kevlar_refresh_on_theme_change: false,
        kevlar_modern_sd_v2: false,
        kevlar_watch_cinematics: false,
        kevlar_watch_comments_panel_button: false,
        kevlar_watch_grid: false,
        kevlar_watch_grid_hide_chips: false,
        kevlar_watch_metadata_refresh: false,
        kevlar_watch_metadata_refresh_no_old_secondary_data: false,
        kevlar_watch_modern_metapanel: false,
        kevlar_watch_modern_panels: false,
        kevlar_watch_panel_height_matches_player: false,
        smartimation_background: false,
        web_amsterdam_playlists: false,
        web_animated_actions: false,
        web_animated_like: false,
        web_button_rework: false,
        web_button_rework_with_live: false,
        web_darker_dark_theme: false,
        web_enable_youtab: false,
        web_guide_ui_refresh: false,
        web_modern_ads: false,
        web_modern_buttons: false,
        web_modern_chips: false,
        web_modern_collections_v2: false,
        web_modern_dialogs: false,
        web_modern_playlists: false,
        web_modern_subscribe: false,
        web_modern_tabs: false,
        web_rounded_containers: false,
        web_rounded_thumbnails: false,
        web_searchbar_style: 'default',
        web_segmented_like_dislike_button: false,
        web_sheets_ui_refresh: false,
        web_snackbar_ui_refresh: false,
        web_watch_rounded_player_large: false
    }

    // Define FUNCTIONS

    window.feedback = {

        cjsNotify(...args) {
            const scheme = document.querySelector('html[dark]')
                || window.matchMedia?.('(prefers-color-scheme: dark)').matches ? 'dark' : 'light'

            let msg, position, notifDuration, shadow, toast
            if (typeof args[0] == 'object' && !Array.isArray(args[0]))
                ({ msg, position, notifDuration, shadow, toast } = args[0])
            else [msg, position, notifDuration, shadow] = args
            notifDuration = notifDuration ? +notifDuration : 1.75 // sec duration to maintain notification visibility
            const fadeDuration = 0.35, // sec duration of fade-out
                vpYoffset = 23, vpXoffset = 27 // px offset from viewport border

            // Create/append notification div
            const notificationDiv = document.createElement('div') // make div
            notificationDiv.id = Math.floor(Math.random() * 1000000) + Date.now()
            notificationDiv.classList.add('chatgpt-notif')
            notificationDiv.textContent = msg // insert msg
            document.body.append(notificationDiv) // insert into DOM

            // Create/append close button
            const closeBtn = document.createElement('div')
            closeBtn.title = 'Dismiss' ; closeBtn.classList.add('notif-close-btn', 'no-mobile-tap-outline')
            const closeSVG = document.createElementNS('http://www.w3.org/2000/svg', 'svg')
            closeSVG.setAttribute('height', '8px')
            closeSVG.setAttribute('viewBox', '0 0 14 14')
            closeSVG.setAttribute('fill', 'none')
            closeSVG.style.height = closeSVG.style.width = '8px' // override SVG styles on non-OpenAI sites
            const closeSVGpath = document.createElementNS('http://www.w3.org/2000/svg', 'path')
            closeSVGpath.setAttribute('fill-rule', 'evenodd')
            closeSVGpath.setAttribute('clip-rule', 'evenodd')
            closeSVGpath.setAttribute('fill', 'white')
            closeSVGpath.setAttribute('d', 'M13.7071 1.70711C14.0976 1.31658 14.0976 0.683417 13.7071 0.292893C13.3166 -0.0976312 12.6834 -0.0976312 12.2929 0.292893L7 5.58579L1.70711 0.292893C1.31658 -0.0976312 0.683417 -0.0976312 0.292893 0.292893C-0.0976312 0.683417 -0.0976312 1.31658 0.292893 1.70711L5.58579 7L0.292893 12.2929C-0.0976312 12.6834 -0.0976312 13.3166 0.292893 13.7071C0.683417 14.0976 1.31658 14.0976 1.70711 13.7071L7 8.41421L12.2929 13.7071C12.6834 14.0976 13.3166 14.0976 13.7071 13.7071C14.0976 13.3166 14.0976 12.6834 13.7071 12.2929L8.41421 7L13.7071 1.70711Z')
            closeSVG.append(closeSVGpath) ; closeBtn.append(closeSVG) ; notificationDiv.append(closeBtn)

            // Determine div position/quadrant
            notificationDiv.isTop = !position || !/low|bottom/i.test(position)
            notificationDiv.isRight = !position || !/left/i.test(position)
            notificationDiv.quadrant = (notificationDiv.isTop ? 'top' : 'bottom')
                                    + (notificationDiv.isRight ? 'Right' : 'Left')

            // Create/append/update notification style (if missing or outdated)
            const thisUpdated = 1746996635555 // timestamp of last edit for this file's `notifStyle`
            let notifStyle = document.querySelector('#chatgpt-notif-style') // try to select existing style
            if (!notifStyle || parseInt(notifStyle.getAttribute('last-updated'), 10) < thisUpdated) { // if missing or outdated
                if (!notifStyle) { // outright missing, create/id/attr/append it first
                    notifStyle = document.createElement('style') ; notifStyle.id = 'chatgpt-notif-style'
                    notifStyle.setAttribute('last-updated', thisUpdated.toString())
                    document.head.append(notifStyle)
                }
                notifStyle.textContent = ( // update prev/new style contents
                    '.chatgpt-notif {'
                        + 'font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",'
                            + '"Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif ;'
                        + '.no-mobile-tap-outline { outline: none ; -webkit-tap-highlight-color: transparent }'
                        + 'background-color: black ; padding: 10px 13px 10px 18px ;' // bubble style
                            + 'border-radius: 11px ; border: 1px solid #f5f5f7 ;'
                        + 'opacity: 0 ; position: fixed ; z-index: 9999 ; font-size: 1.8rem ; color: white ;' // visibility
                        + 'user-select: none ; -webkit-user-select: none ; -moz-user-select: none ; -o-user-select: none ;'
                            + '-ms-user-select: none ;'
                        + `transform: translateX(${ // init off-screen for transition fx
                            !notificationDiv.isRight ? '-' : '' }35px) ;`
                        + ( shadow ? `--shadow: -8px 13px 25px 0 ${ /\b(?:shadow|on)\b/i.test(shadow) ? 'gray' : shadow };
                            box-shadow: var(--shadow) ; -webkit-box-shadow: var(--shadow) ; -moz-box-shadow: var(--shadow)`
                                : '' ) + '}'
                    + `.notif-close-btn {
                        cursor: pointer ; float: right ; position: relative ; right: -4px ; margin-left: -3px ;`
                        + 'display: grid }' // top-align for non-OpenAI sites
                    + '@keyframes notif-zoom-fade-out { 0% { opacity: 1 ; transform: scale(1) }' // transition out keyframes
                        + '15% { opacity: 0.35 ; transform: rotateX(-27deg) scale(1.05) }'
                        + '45% { opacity: 0.05 ; transform: rotateX(-81deg) }'
                        + '100% { opacity: 0 ; transform: rotateX(-180deg) scale(1.15) }}'
                )
                if (toast) notifStyle.textContent += `
                    div.chatgpt-notif {
                        position: absolute ; left: 50% ; right: 21% !important ; text-align: center ;
                        ${ scheme == 'dark' ? 'border: 2px solid white ;' : '' }
                        margin-${ !notificationDiv.isTop ? 'bottom: 105px' : 'top: 42px' };
                        transform: translate(-50%, -50%) scale(0.6) !important }
                    div.chatgpt-notif > div.notif-close-btn { top: 18px ; right: 7px ; transform: scale(2) }`
            }

            // Enqueue notification
            let notifyProps = JSON.parse(localStorage.notifyProps
                ??= JSON.stringify({ queue: { topRight: [], bottomRight: [], bottomLeft: [], topLeft: [] }}))
            notifyProps.queue[notificationDiv.quadrant].push(notificationDiv.id)
            localStorage.notifyProps = JSON.stringify(notifyProps)

            // Position notification (defaults to top-right)
            notificationDiv.style.top = notificationDiv.isTop ? vpYoffset.toString() + 'px' : ''
            notificationDiv.style.bottom = !notificationDiv.isTop ? vpYoffset.toString() + 'px' : ''
            notificationDiv.style.right = notificationDiv.isRight ? vpXoffset.toString() + 'px' : ''
            notificationDiv.style.left = !notificationDiv.isRight ? vpXoffset.toString() + 'px' : ''

            // Re-position old notifications
            const thisQuadrantQueue = notifyProps.queue[notificationDiv.quadrant]
            if (thisQuadrantQueue.length > 1) {
                try { // to move old notifications
                    for (const divID of thisQuadrantQueue.slice(0, -1)) { // exclude new div
                        const oldDiv = document.getElementById(divID),
                            offsetProp = oldDiv.style.top ? 'top' : 'bottom', // pick property to change
                            vOffset = +parseInt(oldDiv.style[offsetProp]) +5 + oldDiv.getBoundingClientRect().height
                        oldDiv.style[offsetProp] = `${vOffset}px` // change prop
                    }
                } catch (err) { console.warn('Failed to re-position notification:', err) }
            }

            // Show notification
            setTimeout(() => {
                notificationDiv.style.opacity = scheme == 'dark' ? 0.8 : 0.67 // show msg
                notificationDiv.style.transform = 'translateX(0)' // bring from off-screen
                notificationDiv.style.transition = 'transform 0.15s ease, opacity 0.15s ease'
            }, 10)

            // Init delay before hiding
            const hideDelay = fadeDuration > notifDuration ? 0 // don't delay if fade exceeds notification duration
                            : notifDuration - fadeDuration // otherwise delay for difference

            // Add notification dismissal to timeout schedule + button clicks
            const dismissNotif = () => {
                notificationDiv.style.animation = `notif-zoom-fade-out ${fadeDuration}s ease-out`
                clearTimeout(dismissFuncTID)
            }
            const dismissFuncTID = setTimeout(dismissNotif, hideDelay * 1000) // maintain visibility for `hideDelay` secs, then dismiss
            closeSVG.onclick = dismissNotif // add to close button clicks

            // Destroy notification
            notificationDiv.onanimationend = () => {
                notificationDiv.remove() // remove from DOM
                notifyProps = JSON.parse(localStorage.notifyProps)
                notifyProps.queue[notificationDiv.quadrant].shift() // + memory
                localStorage.notifyProps = JSON.stringify(notifyProps) // + storage
            }

            return notificationDiv
        },

        notify(msg, pos = '', notifDuration = '', shadow = '') { // requires dom.js
            if (app.config.notifDisabled && !msg.includes(settings.controls.notifDisabled.label)) return

            // Strip state word to append colored one later
            const foundState = toolbarMenu.state.words.find(word => msg.includes(word))
            if (foundState) msg = msg.replace(foundState, '')

            // Show notification
            this.cjsNotify(`${app.symbol} ${msg}`, pos, notifDuration, shadow || env.ui.scheme == 'dark' ? '' : 'shadow')
            const notif = document.querySelector('.chatgpt-notif:last-child')

            // Tweak styles
            notif.style.fontSize = '385%'
            if (foundState) { // append styled state word
                const styledStateSpan = dom.create.elem('span', { style: `color: ${
                    foundState == toolbarMenu.state.words[0] ?
                        '#ef4848 ; text-shadow: rgba(255,169,225,0.44) 2px 1px 5px'
                    : '#5cef48 ; text-shadow: rgba(255,250,169,0.38) 2px 1px 5px'
                }`})
                styledStateSpan.append(foundState) ; notif.append(styledStateSpan)
            }
        }
    }

    window.toolbarMenu = {
        state: {
            symbols: ['❌', '✔️'], separator: env.scriptManager.name == 'Tampermonkey' ? ' — ' : ': ',
            words: ['OFF', 'ON']
        },

        refresh() {
            if (typeof GM_unregisterMenuCommand == 'undefined') return
            this.entryIDs.forEach(id => GM_unregisterMenuCommand(id))
            this.register()
        },

        register() {
            this.entryIDs = Object.keys(settings.controls).map(key => {
                const ctrl = settings.controls[key]
                const menuLabel = `${
                    ctrl.symbol || this.state.symbols[+settings.typeIsEnabled(key)] } ${ctrl.label} ${
                        ctrl.type == 'toggle' ? this.state.separator + this.state.words[+settings.typeIsEnabled(key)]
                      : ctrl.type == 'slider' ? ': ' + app.config[key] + ctrl.labelSuffix || ''
                      : ctrl.status ? ` — ${ctrl.status}` : '' }`
                return GM_registerMenuCommand(menuLabel, () => {
                    settings.save(key, !app.config[key]) ; sync.configToUI({ updatedKey: key })
                    feedback.notify(`${ctrl.label}: ${this.state.words[+settings.typeIsEnabled(key)]}`)
                }, env.scriptManager.supportsTooltips ? { title: ctrl.helptip || ' ' } : undefined)
            })
        }
    }

    window.styles = {

        update({ key, keys, autoAppend }) { // requires dom.js
            if (!key && !keys) return console.error('Option \'key\' or \'keys\' required by styles.update()')
            ;[].concat(keys || key).forEach(key => {
                const style = this[key] ; style.node ||= dom.create.style()
                if ((autoAppend ?? style.autoAppend) && !style.node.isConnected) document.head.append(style.node)
                style.node.textContent = style.css
            })
        },

        block: {
            autoAppend: true,
            get css() {
                return Object.entries(app.selectors.block)
                    .map(([key, selectors]) => !app.config[`${key}Block`] ? ''
                        : `${css.selectors.extract(selectors).join(',')} { display: none !important }`
                    ).join('')
            }
        },

        dislikes: {
            autoAppend: true,
            get css() {
                return app.config.restoreDislikes ? '' : `
                    dislike-button-view-model,
                    like-button-view-model button::after { /* Like btn right sep */
                        display: none !important }`
            }
        },

        tweaks: {
            autoAppend: true,
            get css() {
                return  `

                    /* Revert old background color and buttons */
                    html[dark] {
                    --yt-spec-general-background-a: #181818 !important ;
                    --yt-spec-general-background-b: #0f0f0f !important ;
                    --yt-spec-brand-background-primary: rgba(33,33,33,0.98) !important ;
                    --yt-spec-10-percent-layer: rgba(255,255,255,0.1) !important
                    }
                    html:not([dark]) {
                    --yt-spec-general-background-a: #f9f9f9 !important ;
                    --yt-spec-general-background-b: #f1f1f1 !important ;
                    --yt-spec-brand-background-primary: rgba(255,255,255,0.98) !important ;
                    --yt-spec-10-percent-layer: rgba(0,0,0,0.1) !important
                    }

                    /* Un-segment engagement buttons below vid https://github.com/adamlui/youtube-classic/issues/10 */
                    :where(segmented-like-dislike-button-view-model, yt-button-view-model) button { background: none !important }

                    ytd-masthead { background: var(--yt-spec-brand-background-solid) !important }
                    ytd-app { background: var(--yt-spec-general-background-a) !important }
                    ytd-browse[page-subtype="channels"] { background: var(--yt-spec-general-background-b) !important }
                    ytd-c4-tabbed-header-renderer {
                    --yt-lightsource-section1-color: var(--yt-spec-general-background-a) !important }
                    ytd-mini-guide-renderer, ytd-mini-guide-entry-renderer {
                        background-color: var(--yt-spec-brand-background-solid) !important }
                    #cinematics.ytd-watch-flexy { display: none !important }
                    #tabs-divider.ytd-c4-tabbed-header-renderer { border-bottom: 0px !important }
                    #header.ytd-rich-grid-renderer { width: 100% !important }
                    [page-subtype="home"] #chips-wrapper.ytd-feed-filter-chip-bar-renderer {
                        background-color: var(--yt-spec-brand-background-primary) !important ;
                        border-top: 1px solid var(--yt-spec-10-percent-layer) !important ;
                        border-bottom: 1px solid var(--yt-spec-10-percent-layer) !important
                    }
                    ytd-feed-filter-chip-bar-renderer[is-dark-theme] #left-arrow.ytd-feed-filter-chip-bar-renderer::after {
                        background: linear-gradient(
                            to right, var(--yt-spec-brand-background-primary) 20%, rgba(33,33,33,0) 80%) !important
                    }
                    ytd-feed-filter-chip-bar-renderer[is-dark-theme] #right-arrow.ytd-feed-filter-chip-bar-renderer::before {
                        background: linear-gradient(
                            to left, var(--yt-spec-brand-background-primary) 20%, rgba(33,33,33,0) 80%) !important
                    }
                    ytd-feed-filter-chip-bar-renderer :where(#left-arrow-button,
                        #right-arrow-button).ytd-feed-filter-chip-bar-renderer
                            { background-color: var(--yt-spec-brand-background-primary) !important }
                    yt-chip-cloud-renderer[is-dark-theme] #right-arrow.yt-chip-cloud-renderer::before {
                        background: linear-gradient(to left, var(--ytd-chip-cloud-background,
                            var(--yt-spec-general-background-a)) 10%, rgba(24,24,24,0) 90%) !important
                    }
                    yt-chip-cloud-renderer :where(#left-arrow-button, #right-arrow-button).yt-chip-cloud-renderer {
                        background: var(--ytd-chip-cloud-background, var(--yt-spec-general-background-a)) !important }
                    yt-chip-cloud-renderer[is-dark-theme] #left-arrow.yt-chip-cloud-renderer::after {
                        background: linear-gradient(to right, var(--ytd-chip-cloud-background,
                            var(--yt-spec-general-background-a)) 10%, rgba(24,24,24,0) 90%) !important
                    }
                    yt-chip-cloud-renderer #left-arrow.yt-chip-cloud-renderer::after {
                        background: linear-gradient(
                            to right, var(--ytd-chip-cloud-background, var(--yt-spec-general-background-a)) 10%,
                            rgba(249,249,249,0) 90%
                        ) !important
                    }
                    yt-chip-cloud-renderer #right-arrow.yt-chip-cloud-renderer::before {
                        background: linear-gradient(
                            to left, var(--ytd-chip-cloud-background, var(--yt-spec-general-background-a)) 10%,
                            rgba(249,249,249,0) 90%
                        ) !important
                    }
                    ytd-feed-filter-chip-bar-renderer[component-style="FEED_FILTER_CHIP_BAR_STYLE_TYPE_HASHTAG_LANDING_PAGE"]
                        #chips-wrapper.ytd-feed-filter-chip-bar-renderer,
                    ytd-feed-filter-chip-bar-renderer[component-style="FEED_FILTER_CHIP_BAR_STYLE_TYPE_CHANNEL_PAGE_GRID"]
                        #chips-wrapper.ytd-feed-filter-chip-bar-renderer
                            { background-color: var(--yt-spec-general-background-b) !important }
                    ytd-feed-filter-chip-bar-renderer:where(
                        [component-style="FEED_FILTER_CHIP_BAR_STYLE_TYPE_HASHTAG_LANDING_PAGE"],
                        [component-style="FEED_FILTER_CHIP_BAR_STYLE_TYPE_CHANNEL_PAGE_GRID"]
                    ) #chips-wrapper.ytd-feed-filter-chip-bar-renderer {
                        background-color: var(--yt-spec-general-background-b) !important }
                    yt-chip-cloud-chip-renderer {
                        height: 32px !important ; border: 1px solid var(--yt-spec-10-percent-layer) !important ;
                        border-radius: 16px !important ; box-sizing: border-box !important
                    }

                    /* Remove rounded corners on buttons and boxes */
                    #container.ytd-searchbox {
                        background-color: var(--ytd-searchbox-background) !important ;
                        border-radius: 2px 0 0 2px !important ;
                        box-shadow: inset 0 1px 2px var(--ytd-searchbox-legacy-border-shadow-color) !important ;
                        color: var(--ytd-searchbox-text-color) !important ; padding: 2px 6px !important
                    }

                    ytd-searchbox[desktop-searchbar-style="rounded_corner_dark_btn"] #searchbox-button.ytd-searchbox {
                        display: none !important }
                    ytd-searchbox[desktop-searchbar-style="rounded_corner_light_btn"] #searchbox-button.ytd-searchbox {
                        display: none !important }
                    #search[has-focus] #search-input { margin-left: 32px !important }
                    #search-icon-legacy.ytd-searchbox { display: block !important ; border-radius: 0px 2px 2px 0px !important }
                    .sbsb_a { border-radius: 2px !important }
                    .sbsb_c { padding-left: 10px !important }
                    div.sbqs_c::before { margin-right: 10px !important }
                    ytd-searchbox[has-focus] #search-icon.ytd-searchbox {
                        padding-left: 10px !important ; padding-right: 10px !important }
                    #voice-search-button.ytd-masthead {
                        background-color: var(--yt-spec-general-background-a) !important ; margin-left: 4px !important }
                    #guide-content.ytd-app { background: var(--yt-spec-brand-background-solid) !important }
                    a#endpoint.yt-simple-endpoint.style-scope.ytd-mini-guide-entry-renderer { margin: 0px !important }
                    ytd-guide-entry-renderer[guide-refresh] { width: 100% !important ; border-radius: 0px !important }
                    tp-yt-paper-item.ytd-guide-entry-renderer { --paper-item-focused-before-border-radius: 0px !important }
                    ytd-guide-section-renderer.style-scope.ytd-guide-renderer { padding-left: 0px !important }
                    ytd-mini-guide-renderer[guide-refresh] { padding: 0 !important }
                    tp-yt-paper-item.style-scope.ytd-guide-entry-renderer {
                        border-radius: 0px !important ; padding-left: 24px !important }
                    #guide-section-title.ytd-guide-section-renderer {
                        color: var(--yt-spec-text-secondary) !important ; padding: 8px 24px !important ;
                        font-size: var(--ytd-tab-system-font-size) !important ;
                        font-weight: var(--ytd-tab-system-font-weight) !important ;
                        letter-spacing: var(--ytd-tab-system-letter-spacing) !important ;
                        text-transform: var(--ytd-tab-system-text-transform) !important
                    }
                    .style-scope.ytd-rich-item-renderer { border-radius: 2px !important }
                    #tooltip.tp-yt-paper-tooltip { border-radius: 2px !important }
                    .style-scope.ytd-topic-link-renderer { border-radius: 2px !important }
                    .bold.style-scope.yt-formatted-string { font-family: Roboto !important }
                    .style-scope.yt-formatted-string { font-family: Roboto !important }
                    #bar { border-radius: 2px !important }
                    ytd-multi-page-menu-renderer {
                        border-radius: 0px !important ; border: 1px solid var(--yt-spec-10-percent-layer) !important ;
                        border-top: none !important ; box-shadow: none !important
                    }
                    yt-dropdown-menu { --paper-menu-button-content-border-radius:  2px !important }
                    ytd-menu-popup-renderer { border-radius: 2px !important }
                    .style-scope.ytd-feed-nudge-renderer { border-radius: 2px !important }
                    .style-scope.ytd-inline-survey-renderer { border-radius: 2px !important}
                    tp-yt-paper-button#button.style-scope.ytd-button-renderer.style-inactive-outline.size-default {
                        border-radius: 2px !important }
                    ytd-thumbnail-overlay-toggle-button-renderer.style-scope.ytd-thumbnail { border-radius: 2px !important }
                    ytd-compact-link-renderer.ytd-settings-sidebar-renderer { margin: 0px !important ; border-radius: 0 !important }
                    ytd-compact-link-renderer[compact-link-style=compact-link-style-type-settings-sidebar]
                        tp-yt-paper-item.ytd-compact-link-renderer
                            { padding-left: 24px !important ; padding-right: 24px !important }
                    img#img.style-scope.yt-image-shadow { border-radius: 50px !important }
                    #title.style-scope.ytd-feed-nudge-renderer { font-family: Roboto !important }
                    yt-chip-cloud-chip-renderer.style-scope.ytd-feed-nudge-renderer { border-radius: 50px !important }
                    div#label-container.style-scope.ytd-thumbnail-overlay-toggle-button-renderer {
                        border: 2px !important ; text-transform: uppercase !important }
                    ytd-thumbnail-overlay-time-status-renderer.style-scope.ytd-thumbnail { border-radius: 2px !important }
                    ytd-backstage-post-dialog-renderer { border-radius: 2px !important }
                    yt-bubble-hint-renderer { border-radius: 2px !important }
                    #top-row.ytd-watch-metadata > div#actions.item.style-scope.ytd-watch-metadata
                        > div#actions-inner.style-scope.ytd-watch-metadata > div#menu.style-scope.ytd-watch-metadata
                        > ytd-menu-renderer.style-scope.ytd-watch-metadata
                        > div#top-level-buttons-computed.top-level-buttons.style-scope.ytd-menu-renderer > ytd-button-renderer,
                    #top-row.ytd-watch-metadata > div#actions.item.style-scope.ytd-watch-metadata
                        > div#actions-inner.style-scope.ytd-watch-metadata > div#menu.style-scope.ytd-watch-metadata
                        > ytd-menu-renderer.style-scope.ytd-watch-metadata > div#flexible-item-buttons.style-scope.ytd-menu-renderer
                        > ytd-button-renderer,
                    #top-row.ytd-watch-metadata > div#actions.item.style-scope.ytd-watch-metadata
                        > div#actions-inner.style-scope.ytd-watch-metadata > div#menu.style-scope.ytd-watch-metadata
                        > ytd-menu-renderer.style-scope.ytd-watch-metadata
                        > div#top-level-buttons-computed.top-level-buttons.style-scope.ytd-menu-renderer
                        > ytd-segmented-like-dislike-button-renderer.style-scope.ytd-menu-renderer
                        > yt-smartimation.style-scope.ytd-segmented-like-dislike-button-renderer
                        > div#segmented-buttons-wrapper.style-scope.ytd-segmented-like-dislike-button-renderer
                        > div#segmented-like-button.style-scope.ytd-segmented-like-dislike-button-renderer
                        > ytd-toggle-button-renderer
                            { text-transform: capitalize !important }
                    #top-row.ytd-watch-metadata > div#actions.item.style-scope.ytd-watch-metadata
                        > div#actions-inner.style-scope.ytd-watch-metadata > div#menu.style-scope.ytd-watch-metadata
                        > ytd-menu-renderer.style-scope.ytd-watch-metadata
                        > div#top-level-buttons-computed.top-level-buttons.style-scope.ytd-menu-renderer
                        > ytd-segmented-like-dislike-button-renderer.style-scope.ytd-menu-renderer
                        > yt-smartimation.style-scope.ytd-segmented-like-dislike-button-renderer
                        > div#segmented-buttons-wrapper.style-scope.ytd-segmented-like-dislike-button-renderer
                        > div#segmented-dislike-button.style-scope.ytd-segmented-like-dislike-button-renderer
                        > ytd-toggle-button-renderer.style-scope.ytd-segmented-like-dislike-button-renderer.style-text
                        > a.yt-simple-endpoint.style-scope.ytd-toggle-button-renderer
                        > yt-icon-button#button.yt-simple-endpoint.style-scope.ytd-toggle-button-renderer
                        > button#button.style-scope.yt-icon-button
                            { width: 24px !important ; height: 24px !important }
                    #top-row.ytd-watch-metadata > div#actions.item.style-scope.ytd-watch-metadata
                        > div#actions-inner.style-scope.ytd-watch-metadata > div#menu.style-scope.ytd-watch-metadata
                        > ytd-menu-renderer.style-scope.ytd-watch-metadata
                        > div#top-level-buttons-computed.top-level-buttons.style-scope.ytd-menu-renderer
                        > ytd-segmented-like-dislike-button-renderer.style-scope.ytd-menu-renderer
                        > yt-smartimation.style-scope.ytd-segmented-like-dislike-button-renderer
                        > div#segmented-buttons-wrapper.style-scope.ytd-segmented-like-dislike-button-renderer
                        > div#segmented-dislike-button.style-scope.ytd-segmented-like-dislike-button-renderer
                        > ytd-toggle-button-renderer.style-scope.ytd-segmented-like-dislike-button-renderer.style-text
                        > a.yt-simple-endpoint.style-scope.ytd-toggle-button-renderer
                        > yt-icon-button#button.yt-simple-endpoint.style-scope.ytd-toggle-button-renderer
                            { padding: 6px !important }
                    ytd-watch-metadata[modern-metapanel] #description.ytd-watch-metadata, #description.ytd-watch-metadata {
                        background-color: transparent !important ; border-radius: 0px !important }
                    ytd-watch-metadata[modern-metapanel] #description-inner.ytd-watch-metadata,
                        #description-inner.ytd-watch-metadata
                            { margin: 0px !important }
                    ytd-watch-metadata[modern-metapanel-order] #comment-teaser.ytd-watch-metadata,
                        #comment-teaser.ytd-watch-metadata
                            { border: 1px solid var(--yt-spec-10-percent-layer) !important ; border-radius: 4px !important }
                    ytd-comments-entry-point-header-renderer[modern-metapanel], #comment-teaser.ytd-watch-metadata {
                        background-color: transparent !important }
                    div#title.text-shell.skeleton-bg-color { border-radius: 2px !important }
                    div#count.text-shell.skeleton-bg-color { border-radius: 2px !important }
                    div#owner-name.text-shell.skeleton-bg-color { border-radius: 2px !important }
                    div#published-date.text-shell.skeleton-bg-color { border-radius: 2px !important }
                    div.rich-video-title.text-shell.skeleton-bg-color { border-radius: 2px !important }
                    div.rich-video-meta.text-shell.skeleton-bg-color { border-radius: 2px !important }
                    ytd-video-view-count-renderer { font-size: 1.4rem !important }
                    #meta #avatar { width: 48px ; height: 48px ; margin-right: 16px }
                    #meta #avatar img { width: 100% }
                    #channel-name.ytd-video-owner-renderer { font-size: 1.4rem !important }
                    #info.ytd-video-primary-info-renderer { height: 40px !important }
                    ytd-merch-shelf-renderer { background-color: transparent !important }
                    div#clarify-box.attached-message.style-scope.ytd-watch-flexy { margin-top: 0px !important }
                    ytd-clarification-renderer.style-scope:where(.ytd-item-section-renderer, .ytd-watch-flexy) {
                    border: 1px solid !important ; border-color: #0000001a !important ; border-radius: 0px !important }
                    yt-formatted-string.description.style-scope.ytd-clarification-renderer { font-size: 1.4rem !important }
                    div.content-title.style-scope.ytd-clarification-renderer { padding-bottom: 4px !important }
                    ytd-toggle-button-renderer.style-scope.ytd-live-chat-frame,
                        yt-live-chat-header-renderer.style-scope.yt-live-chat-renderer
                            { background: var(--yt-spec-brand-background-solid) !important }
                    ytd-toggle-button-renderer.style-scope.ytd-live-chat-frame
                        > a.yt-simple-endpoint.style-scope.ytd-toggle-button-renderer
                        > tp-yt-paper-button.style-scope.ytd-toggle-button-renderer
                            { padding-top: 4px !important ; padding-bottom: 4px !important }
                    ytd-playlist-panel-renderer[modern-panels]:not([hide-header-text]) .title.ytd-playlist-panel-renderer {
                        font-family: Roboto !important ; font-size: 1.4rem !important ; line-height: 2rem !important ;
                        font-weight: 500 !important
                    }
                    ytd-tvfilm-offer-module-renderer[modern-panels] #header.ytd-tvfilm-offer-module-renderer {
                        border-radius: 0px !important ; font-family: Roboto !important ; font-size: 1.6rem !important ;
                        line-height: 2.2rem !important ; font-weight: 400 !important
                    }
                    ytd-donation-shelf-renderer[modern-panels] #header-text.ytd-donation-shelf-renderer {
                        font-family: Roboto !important ; font-size: 1.6rem !important ; font-weight: 500 !important }
                    .ytp-flyout-cta .ytp-flyout-cta-action-button.ytp-flyout-cta-action-button-rounded {
                        font-family: Arial !important ; background: #167ac6 !important ;
                        border: solid 1px transparent !important ; border-color: #167ac6 !important ;
                        border-radius: 2px !important ; box-shadow: 0 1px 0 rgba(0,0,0,.05) !important ;
                        font-size: 11px !important ; font-weight: 500 !important ; height: 28px !important ;
                        margin: 0 8px 0 0 !important ; max-width: 140px !important ; padding: 0 10px !important
                    }
                    .ytp-ad-action-interstitial-action-button.ytp-ad-action-interstitial-action-button-rounded {
                        background-color: #167ac6 !important ; border: none !important ; border-radius: 2px ;
                        font-family: Roboto !important ; font-size: 23px !important ; height: 46px !important ;
                        line-height: 46px !important ; min-width: 164px !important ; padding: 0 20px !important
                    }
                    .ytp-settings-menu { border-radius: 2px !important }
                    .branding-context-container-inner.ytp-rounded-branding-context { border-radius: 2px !important }
                    .ytp-tooltip.ytp-rounded-tooltip:not(.ytp-preview) .ytp-tooltip-text { border-radius: 2px !important }
                    .ytp-autonav-endscreen-upnext-button.ytp-autonav-endscreen-upnext-button-rounded {
                        border-radius: 2px !important }
                    .ytp-videowall-still-image { border-radius: 0 !important }
                    div.iv-card.iv-card-video.ytp-rounded-info { border-radius: 0 !important}
                    div.iv-card.iv-card-playlist.ytp-rounded-info { border-radius: 0 !important }
                    div.iv-card.iv-card-channel.ytp-rounded-info { border-radius: 0 !important }
                    div.iv-card.ytp-rounded-info { border-radius: 0 !important }
                    .ytp-tooltip.ytp-rounded-tooltip.ytp-text-detail.ytp-preview,
                        .ytp-tooltip.ytp-rounded-tooltip.ytp-text-detail.ytp-preview .ytp-tooltip-bg
                            { border-radius: 2px !important }
                    @font-face {
                        font-family: no-parens ;
                        src: url("data:application/x-font-woff;base64,d09GRk9UVE8AABuoAAoAAAAASrAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABDRkYgAAANJAAADlwAABk8NN4INERTSUcAABugAAAACAAAAAgAAAABT1MvMgAAAVAAAABRAAAAYABfsZtjbWFwAAAEQAAACM0AABnoJENu0WhlYWQAAAD0AAAAMwAAADYFl9tDaGhlYQAAASgAAAAeAAAAJAdaA+9obXR4AAAbgAAAAB8AABAGA+gAfG1heHAAAAFIAAAABgAAAAYIAVAAbmFtZQAAAaQAAAKbAAAF6yBNB5Jwb3N0AAANEAAAABMAAAAg/7gAMnjaY2BkYGBg5G6tPXx8azy/zVcGZuYXQBGGiz6un+F0zf8O5hzmAiCXmYEJJAoAkoQNcAB42mNgZGBgLvjfASRfMNQw1DDnMABFUAATAHAaBFEAAAAAUAAIAQAAeNpjYGZ+wTiBgZWBgamLKYKBgcEbQjPGMRgx3GFAAt//r/v/+/7///wPGOxBfEcXJ38GBwaG//+ZC/53MDAwFzBUJOgz/kfSosDAAAAMpBWaAAAAeNqdU9tu00AQPU6TcqmoRIV46YvFE5Vgm7ZOVDVPSS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/bW3tl7+2Af7ZN9ti/21cIs3L5ZhH23H/bTftlv72/LjR557ImnnnmeF8mL7EXxfLyoXjQvuhfDi+nF8mJ7cTxfL64Xz4vvJfASeok8Py+xl8RL6vl7ybzkXgovpZfKS+2l8dJ66bz0XgYvo5fJy+xl8bJ62bzsXg4vp5fLy+3l8fJ6+bz8XgGvoFfIK+wV8Yp6xbziXgmvpFfKK+2V8cp65bzyXgX/ 7z6hESlDISxG6LeMoRQWI4J9f/X9NjSir/2s+yuN77eLFnbkRw5ZtsH3+5HwPBL+VZc18/150f6oHBLUyvfPbh758VWj/eMf//jHP/7xj/9//B1wRw5P6pN6ll+CTLG+jwvxk9IhuifynigRz3z/B+I69cx42u3BAQ0AAAgDoG/WNvBjGERgmg0AAADwwAGHXgFoAAAAAAEAAAAA");;
                        unicode-range: U+0028, U+0029
                    }
                    span.ytp-menu-label-secondary { font-family: "no-parens", "Roboto", sans-serif }
                    .ytp-swatch-color-white { color: #f00 !important }
                    .iv-branding .branding-context-container-inner { border-radius: 2px !important }
                    .ytp-offline-slate-bar { border-radius: 2px !important }
                    .ytp-offline-slate-button { border-radius: 2px !important }
                    .ytp-tooltip.ytp-rounded-tooltip.ytp-preview:not(.ytp-text-detail),
                        .ytp-tooltip.ytp-rounded-tooltip.ytp-preview:not(.ytp-text-detail) .ytp-tooltip-bg
                            { border-radius: 2px !important }
                    #movie_player > div.ytp-promotooltip-wrapper > div.ytp-promotooltip-container { border-radius: 2px !important }
                    .ytp-fine-scrubbing-container { display: none !important }
                    .ytp-progress-bar, .ytp-heat-map-container, .ytp-fine-scrubbing-container {
                        transform: translateY(0) !important }
                    .ytp-chrome-bottom { height: auto !important }
                    .ytp-tooltip-edu { display: none !important }
                    #buttons.ytd-c4-tabbed-header-renderer { flex-direction: row-reverse !important }
                    button.yt-spec-button-shape-next.yt-spec-button-shape-next--tonal.yt-spec-button-shape-next--mono.yt-spec-button-shape-next--size-s {
                        background-color: var(--yt-spec-badge-chip-background) !important ;
                        color: var(--yt-spec-text-secondary) !important ; height: 25px !important ; letter-spacing: 0.5px !important ;
                        border-radius: 2px !important ; text-transform: uppercase !important
                    }
                    ytd-channel-tagline-renderer { display: none !important }
                    #avatar.ytd-c4-tabbed-header-renderer {
                        width: 80px !important ; height: 80px !important ; margin: 0 24px 0 0 !important ; flex: none !important ;
                        overflow: hidden !important
                    }
                    #avatar-editor.ytd-c4-tabbed-header-renderer { --ytd-channel-avatar-editor-size: 80px !important }
                    #channel-name.ytd-c4-tabbed-header-renderer { margin-bottom: 0 !important }
                    #channel-header-container.ytd-c4-tabbed-header-renderer {
                        padding-top: 0 !important ; align-items: center !important }
                    #inner-header-container.ytd-c4-tabbed-header-renderer {
                        margin-top: 0 !important ; align-items: center !important }
                    yt-formatted-string#channel-handle.style-scope.ytd-c4-tabbed-header-renderer { display: none !important }
                    ytd-c4-tabbed-header-renderer[use-page-header-style] #channel-pronouns.ytd-c4-tabbed-header-renderer,
                        yt-formatted-string#channel-pronouns.style-scope.ytd-c4-tabbed-header-renderer
                            { display: none !important }
                    #videos-count { display: none !important }
                    .meta-item.ytd-c4-tabbed-header-renderer { display: block !important }
                    div#channel-header-links.style-scope.ytd-c4-tabbed-header-renderer { display: none !important }
                    ytd-c4-tabbed-header-renderer[use-page-header-style] #channel-name.ytd-c4-tabbed-header-renderer {
                        font-size: 2.4em !important ; font-weight: 400 !important ;
                        line-height: var(--yt-channel-title-line-height, 3rem) !important
                    }
                    span.delimiter.style-scope.ytd-c4-tabbed-header-renderer { display: none !important }
                    div#meta.style-scope.ytd-c4-tabbed-header-renderer { width: auto !important }
                    ytd-c4-tabbed-header-renderer[use-page-header-style] #inner-header-container.ytd-c4-tabbed-header-renderer {
                    flex-direction: row !important }
                    div.page-header-banner.style-scope.ytd-c4-tabbed-header-renderer {
                        margin-left: 0px !important ; margin-right: 0px !important ; border-radius: 0px !important }
                    ytd-browse[darker-dark-theme][page-subtype="playlist"], ytd-browse[darker-dark-theme][page-subtype="show"] {
                        background-color: var(--yt-spec-general-background-b) !important}
                    ytd-two-column-browse-results-renderer.ytd-browse[background-refresh] {
                        background-color: var(--yt-spec-general-background-b) !important }
                    .yt-sans-20.yt-dynamic-sizing-formatted-string, .yt-sans-22.yt-dynamic-sizing-formatted-string,
                        .yt-sans-24.yt-dynamic-sizing-formatted-string, .yt-sans-28.yt-dynamic-sizing-formatted-string,
                        yt-text-input-form-field-renderer[component-style="INLINE_FORM_STYLE_TITLE"][amsterdam]
                            tp-yt-paper-input.yt-text-input-form-field-renderer .input-content.tp-yt-paper-input-container > input
                    {
                        font-family: "Roboto", "Arial", sans-serif !important ; font-size: 2.4rem !important ;
                        line-height: 3.2rem !important ; font-weight: 400 !important
                    }
                    ytd-browse[page-subtype=playlist][amsterdam] { padding-top: 0 !important }
                    ytd-browse[page-subtype=playlist][amsterdam] ytd-playlist-header-renderer.ytd-browse {
                        margin-left: 0 !important ; height: calc(100vh - var(--ytd-toolbar-height)) !important }
                    .immersive-header-container.ytd-playlist-header-renderer {
                        margin-bottom: 0 !important ; border-radius: 0 !important }
                    ytd-playlist-header-renderer,
                        yt-formatted-string[has-link-only_]:not([force-default-style])
                            a.yt-simple-endpoint.yt-formatted-string:visited,
                        .metadata-stats.ytd-playlist-byline-renderer,
                        .yt-spec-button-shape-next--overlay.yt-spec-button-shape-next--text,
                        ytd-text-inline-expander.ytd-playlist-header-renderer
                    {
                        color: var(--yt-spec-text-primary) !important ;
                    --ytd-text-inline-expander-button-color: var(--yt-spec-text-primary) !important
                    }
                    ytd-dropdown-renderer[no-underline] tp-yt-paper-dropdown-menu-light
                        .tp-yt-paper-dropdown-menu-light[style-target=input],
                    tp-yt-iron-icon.tp-yt-paper-dropdown-menu-light
                            { color: var(--yt-spec-text-primary) !important }
                    .yt-spec-button-shape-next--overlay.yt-spec-button-shape-next--tonal,
                    .yt-spec-button-shape-next--overlay.yt-spec-button-shape-next--filled {
                        background: transparent !important ; color: var(--yt-spec-text-primary) !important ;
                        border-radius: 2px !important ; text-transform: uppercase
                    }
                    .metadata-text-wrapper.ytd-playlist-header-renderer {
                    --yt-endpoint-color: var(--yt-spec-text-primary) !important ;
                    --yt-endpoint-hover-color: var(--yt-spec-text-primary) !important
                    }
                    div.immersive-header-background-wrapper.style-scope.ytd-playlist-header-renderer > div {
                        background: var(--yt-spec-general-background-a) !important }
                    #contents > ytd-playlist-video-list-renderer {
                        background: var(--yt-spec-general-background-b) !important ; margin-right: 0px !important }
                    ytd-browse[page-subtype=playlist][amsterdam] #alerts.ytd-browse {
                        padding-left: 388px !important ; padding-right: 0px !important ; margin-bottom: 0 !important }
                    ytd-alert-with-button-renderer[type=INFO], ytd-alert-with-button-renderer[type=SUCCESS] {
                        background: var(--yt-spec-general-background-a) !important }
                    .yt-spec-button-shape-next--overlay.yt-spec-button-shape-next--tonal {
                        background: var(--yt-spec-base-background) }
                    iron-input.tp-yt-paper-input > input.tp-yt-paper-input, textarea.tp-yt-iron-autogrow-textarea {
                        color: var(--yt-spec-text-primary) !important }
                    #labelAndInputContainer.tp-yt-paper-input-container :where(> label, > .paper-input-label) {
                        color: var(--yt-spec-text-secondary) }
                    .unfocused-line.tp-yt-paper-input-container, .focused-line.tp-yt-paper-input-container {
                        border-bottom-color: var(--yt-spec-text-primary) !important }
                    [page-subtype="history"] #channel-header.ytd-tabbed-page-header {
                        background-color: var(--yt-spec-general-background-a) !important ; padding-top: 0 !important ;
                        padding-bottom: 0 !important
                    }
                    .page-header-view-model-wiz__page-header-title--page-header-title-large {
                        margin-top: 24px !important ; margin-bottom: 8px !important ;
                        color: var(--yt-spec-text-primary) !important ;
                        font-size: 1.6em !important ; line-height: 1.4em !important ; font-weight: 500 !important
                    }
                    #endpoint.yt-simple-endpoint.ytd-guide-entry-renderer.style-scope[title="Trending"] { display: none !important }
                    #endpoint.yt-simple-endpoint.ytd-guide-entry-renderer.style-scope[title="Podcasts"] { display: none !important }
                    ytd-guide-entry-renderer > a[href*="/channel/UCkYQyvc_i9hXEo4xic9Hh2g"] { display: none !important }
                    .yt-tab-shape-wiz { padding: 0 32px !important ; margin-right: 0 !important }
                    .yt-tab-shape-wiz__tab {
                        font-size: 14px !important ; font-weight: 500 !important ;
                        letter-spacing: var(--ytd-tab-system-letter-spacing) !important ; text-transform: uppercase !important
                    }
                    .yt-tab-group-shape-wiz__slider { display: none !important }
                    .yt-tab-shape-wiz__tab-bar { display: none !important }
                    yt-formatted-string.style-scope.yt-chip-cloud-chip-renderer, span.style-scope.ytd-rich-shelf-renderer {
                        font-weight: 400 !important }
                    span.style-scope.ytd-shelf-renderer, ytd-reel-shelf-renderer[modern-typography] #title.ytd-reel-shelf-renderer {
                        font-size: 1.6rem !important ; font-weight: 500 !important }
                    .count-text.ytd-comments-header-renderer {
                        font-size: 1.6rem !important ; line-height: 2.2rem !important ; font-weight: 400 !important }
                    ytd-item-section-renderer.style-scope.ytd-watch-next-secondary-results-renderer
                        > div#contents.style-scope.ytd-item-section-renderer
                        > ytd-reel-shelf-renderer.style-scope.ytd-item-section-renderer,
                    ytd-reel-shelf-renderer.ytd-structured-description-content-renderer
                            { display: none !important }
                    ytd-video-description-infocards-section-renderer.style-scope.ytd-structured-description-content-renderer
                        > #header.ytd-video-description-infocards-section-renderer,
                    ytd-video-description-infocards-section-renderer.style-scope.ytd-structured-description-content-renderer
                        > #action-buttons.ytd-video-description-infocards-section-renderer
                            { display: none !important }
                    ytd-video-description-infocards-section-renderer.style-scope.ytd-structured-description-content-renderer {
                        border-top: 0px !important }
                    button.ytp-button.ytp-jump-button.ytp-jump-button-enabled {display: none !important}
                    ytd-player#ytd-player.style-scope.ytd-watch-flexy > div#container.style-scope.ytd-player > .html5-video-player
                        > div.ytp-chrome-bottom > div.ytp-chrome-controls > div.ytp-left-controls > a.ytp-next-button.ytp-button\
                            { display: block !important }
                    div#chip-bar.style-scope.ytd-search-header-renderer
                        > yt-chip-cloud-renderer.style-scope.ytd-search-header-renderer
                        > div#container.style-scope.yt-chip-cloud-renderer
                            { display: none !important }
                    #play.ytd-moving-thumbnail-renderer { color: #fff !important }
 
                    /* Hide Edit your custom feed chip */
                    yt-chip-cloud-chip-renderer:has(path[d^="M5 0a5 5"]) { display: none }

                    /* Fix Verified badge super big in FF vid pages (even w/o this script) */
                    ${ !env.browser.isFF ? ''
                        : 'yt-metadata-badge-renderer span > div { height: 12px !important ; width: 12px !important }' }
                `
            }
        },

        unround: {
            autoAppend: true,
            get css() {
                return !app.config.unroundCorners ? '' : `
                    yt-thumbnail-view-model, /* homepage thumb */
                    yt-image-banner-view-model, /* channel banner */
                    div.ytPageHeaderViewModelBackground, /* playlist sidebar */
                    yt-content-preview-image-view-model, /* playlist sidebar thumb */
                    :where(div#sponsor-button, div#purchase-button, div.ytPageHeaderViewModelHeadline) button,
                    :where(div#buttons.ytd-masthead, div#action-buttons, yt-flexible-actions-view-model) :is(
                        button, a[class*=Button]),
                    yt-video-metadata-carousel-view-model,
                    ytd-player,
                    ytd-playlist-panel-renderer[modern-panels]:not([within-miniplayer]) #container.ytd-guide-entry-renderer,
                    ytd-mini-guide-entry-renderer,
                    ytd-guide-entry-renderer:hover,
                    .style-scope.ytd-item-section-renderer,
                    div.style-scope.yt-tooltip-renderer,
                    .style-scope.ytd-shared-post-renderer,
                    div#repost-context.style-scope.ytd-shared-post-renderer,
                    ytd-post-renderer.style-scope.ytd-shared-post-renderer,
                    div#dismissed.style-scope.ytd-compact-video-renderer,
                    .style-scope.ytd-brand-video-shelf-renderer,
                    div#dismissible.style-scope.ytd-brand-video-singleton-renderer,
                    #inline-survey-compact-video-renderer,
                    ytd-thumbnail[size="medium"] a.ytd-thumbnail,
                    ytd-thumbnail[size="medium"]::before,
                    ytd-playlist-thumbnail[size="medium"] a.ytd-playlist-thumbnail,
                    ytd-playlist-thumbnail[size="medium"]::before,
                    ytd-playlist-thumbnail[size="large"] a.ytd-playlist-thumbnail,
                    ytd-playlist-thumbnail[size="large"]::before,
                    ytd-playlist-panel-renderer[modern-panels]:not([within-miniplayer]) #container.ytd-playlist-panel-renderer,
                    div#dismissed.style-scope.ytd-rich-grid-media,
                    ytd-thumbnail[size="large"] a.ytd-thumbnail,
                    ytd-thumbnail[size="large"]::before,
                    ytd-compact-link-renderer[compact-link-style=compact-link-style-type-settings-sidebar][active],
                    tp-yt-paper-item.style-scope.ytd-compact-link-renderer::before,
                    div.rich-thumbnail.skeleton-bg-color,
                    ytd-rich-metadata-renderer[rounded],
                    ytd-live-chat-frame[rounded-container],
                    ytd-live-chat-frame[rounded-container] #show-hide-button.ytd-live-chat-frame ytd-toggle-button-renderer.ytd-live-chat-frame,
                    iframe.style-scope.ytd-live-chat-frame,
                    ytd-playlist-panel-renderer,
                    ytd-tvfilm-offer-module-renderer[modern-panels],
                    ytd-donation-shelf-renderer.style-scope.ytd-watch-flexy,
                    ytd-universal-watch-card-renderer[rounded] #header.ytd-universal-watch-card-renderer,ytd-universal-watch-card-renderer[rounded] #hero.ytd-universal-watch-card-renderer,
                    .ytp-ad-overlay-container.ytp-rounded-overlay-ad .ytp-ad-overlay-image img,
                    .ytp-ad-overlay-container.ytp-rounded-overlay-ad .ytp-ad-text-overlay,
                    .ytp-ad-overlay-container.ytp-rounded-overlay-ad .ytp-ad-enhanced-overlay,
                    .ytp-ce-video.ytp-ce-medium-round,
                    .ytp-ce-playlist.ytp-ce-medium-round,
                    .ytp-ce-medium-round .ytp-ce-expanding-overlay-background,
                    .ytp-autonav-endscreen-upnext-thumbnail,
                    .iv-card,
                    .ytp-ce-video.ytp-ce-large-round,
                    .ytp-ce-playlist.ytp-ce-large-round,
                    .ytp-ce-large-round .ytp-ce-expanding-overlay-background,
                    .ytp-flyout-cta .ytp-flyout-cta-icon.ytp-flyout-cta-icon-rounded,
                    .ytp-player-minimized .html5-main-video,
                    .ytp-player-minimized .ytp-miniplayer-scrim,
                    .ytp-player-minimized.html5-video-player,
                    ytd-miniplayer #player-container.ytd-miniplayer,
                    ytd-miniplayer #video-container.ytd-miniplayer .video.ytd-miniplayer,
                    ytd-miniplayer #card.ytd-miniplayer,
                    ytd-miniplayer,
                    ytd-channel-video-player-renderer[rounded] #player.ytd-channel-video-player-renderer,
                    ytd-c4-tabbed-header-renderer[use-page-header-style] .page-header-banner.ytd-c4-tabbed-header-renderer,
                    .image-wrapper.ytd-hero-playlist-thumbnail-renderer
                    {
                        border-radius: 0 !important
                    }

                    /* Subscribe button */
                    :is(ytd-subscribe-button-renderer, /* channel page */
                        yt-subscribe-button-view-model /* video page */
                    ) button {
                        background-color: #cc0000 !important ; color: #fff !important ; border-radius: 2px !important ;
                        text-transform: uppercase !important ; font-weight: 500 !important ; letter-spacing: 0.5px !important
                    }
                    #subscribe-button ytd-subscribe-button-renderer button.yt-spec-button-shape-next--tonal {
                        background-color: #f2f2f2 !important ; color: #606060 !important ; border-radius: 2px !important ;
                        text-transform: uppercase !important ; font-weight: 500 !important ; letter-spacing: 0.5px !important
                    }
                    #subscribe-button ytd-subscribe-button-renderer button.yt-spec-button-shape-next--tonal:hover {
                        background-color: #e5e5e5 !important }
                    yt-button-shape.style-scope.ytd-subscribe-button-renderer,
                    yt-smartimation.ytd-subscribe-button-renderer, .smartimation__content,
                    yt-smartimation.ytd-subscribe-button-renderer, .smartimation__content > __slot-el {
                        display: flex !important
                    }
                    .ytp-sb-subscribe {
                        border-radius: 2px !important ; background-color: #f00 !important ; color: #fff !important ;
                        text-transform: uppercase !important
                    }
                    .ytp-sb-unsubscribe {
                        border-radius: 2px !important ; background-color: #eee !important ; color: #606060 !important ;
                        text-transform: uppercase !important
                    }
                    .ytp-sb-subscribe.ytp-sb-disabled { background-color: #f3908b !important }
                    div#subscribe-button.skeleton-bg-color { border-radius: 4px !important }
                    #subscribe-button ytd-subscribe-button-renderer button.yt-spec-button-shape-next--tonal {
                        background-color: var(--yt-spec-badge-chip-background) !important ;
                        color: var(--yt-spec-text-secondary) !important
                    }

                    /* Notif bell */
                    div.ytSmartImationsContent:has(#notification-preference-toggle-button) { /* sub/bell container */
                        display: flex } /* display bell right of sub btn */
                    div#notification-preference-button button { background: none !important }
                    div#notification-preference-button div.ytSpecButtonShapeNextSecondaryIcon {
                        display: none } /* hide down caret */
                    div#notification-preference-button span.ytIconWrapperHost div { /* color All/None */
                        fill: var(--yt-sys-color-baseline--mono-filled-hover) !important }
                    div.ytSubscribeButtonViewModelContainer svg:has(path[d*="20.104999542236328"]) {
                        filter: invert(100%) } /* whiten Personalized bell on channel */
                `
            }
        }
    }

    window.sync = {
        configToUI(options) {
            if (options?.updatedKey == 'restoreDislikes')
                styles.update({ key: 'dislikes' })
            else if (options?.updatedKey == 'unroundCorners')
                styles.update({ key: 'unround' })
            else if (options?.updatedKey == 'disableShorts') {
                if (app.config.disableShorts && !checkShortsToRedir.id)
                    checkShortsToRedir()
                else if (!app.config.disableShorts && checkShortsToRedir.id) {
                    cancelAnimationFrame(checkShortsToRedir.id) ; checkShortsToRedir.id = null }
            } else if (options?.updatedKey.endsWith('Block'))
                styles.update({ key: 'block' })
            else if (options?.updatedKey == 'idlePrevention') {
                if (app.config.idlePrevention && !preventIdle.id) preventIdle()
                else if (!app.config.idlePrevention && preventIdle.id) {
                    clearInterval(preventIdle.id)
                    preventIdle.id = null
                    delete document.hidden
                    delete document.webkitHidden
                    delete document.visibilityState
                    delete document.webkitVisibilityState
                }
            }
            toolbarMenu.refresh() // prefixes/suffixes
        }
    }

    class YTP {
        static observer = new MutationObserver(this.onNewScript)
        static _config = {}
        static isObject(item) { return (item && typeof item == 'object' && !Array.isArray(item)) }
        static mergeDeep(target, ...sources) {
            if (!sources.length) return target
            const source = sources.shift()
            if (this.isObject(target) && this.isObject(source)) for (const key in source)
                if (this.isObject(source[key])) {
                    if (!target[key]) Object.assign(target, { [key]: {} })
                    this.mergeDeep(target[key], source[key])
                } else Object.assign(target, { [key]: source[key] })
            return this.mergeDeep(target, ...sources)
        }
        static onNewScript(mutations) { if (mutations.some(mut => mut.addedNodes.length)) YTP.bruteforce() }
        static start() { this.observer.observe(document, { childList: true, subtree: true }) }
        static stop() { this.observer.disconnect() }
        static bruteforce() {
            if (!unsafeWindow.yt?.config_) return
            this.mergeDeep(unsafeWindow.yt.config_, this._config)
        }
        static setExpMulti(exps) {
            if (!('EXPERIMENT_FLAGS' in this._config)) this._config.EXPERIMENT_FLAGS = {}
            this.mergeDeep(this._config.EXPERIMENT_FLAGS, exps)
        }
    }

    // Run MAIN routine

    toolbarMenu.register()

    YTP.start()
    Object.keys(EXPFLAGS).filter(key => /_animated_/.test(key))
        .forEach(animationKey => EXPFLAGS[animationKey] = !app.config.reduceAnimations)
    YTP.setExpMulti(EXPFLAGS)
    addEventListener('yt-page-data-updated', function handleDataUpdated() {
        const ytLogo = document.getElementById('logo-icon'),
              ytClassicLogo = dom.create.elem('img', { style: 'margin-left: 5px', height: 65 })
        ytClassicLogo.src = document.querySelector('ytd-masthead').getAttribute('dark') != null
            ? 'https://i.imgur.com/brCETJj.png' // Dark mode
            : 'https://i.imgur.com/rHLcxEs.png' // Light mode
        ytLogo.textContent = '' ; ytLogo.append(ytClassicLogo)
        YTP.stop()
        removeEventListener('yt-page-date-updated', handleDataUpdated)
    })

    styles.update({ keys: ['block', 'dislikes', 'tweaks', 'unround'] })

    if (app.config.disableShorts) checkShortsToRedir()
    function checkShortsToRedir() {
        if (location.pathname.startsWith('/shorts/'))
            return location.replace(`https://www.youtube.com/watch?v=${location.pathname.split('/')[2]}`)
        checkShortsToRedir.id = requestAnimationFrame(checkShortsToRedir)
    }

    if (app.config.idlePrevention) preventIdle()
    function preventIdle() {
        Object.defineProperties(document, { // force page visibility
            hidden: { configurable: true, value: false },
            webkitHidden: { configurable: true, value: false },
            visibilityState: { configurable: true, value: 'visible' },
            webkitVisibilityState: { configurable: true, value: 'visible' }
        })
        preventIdle.id = setInterval(() => // send pulse
            document.dispatchEvent(new KeyboardEvent('keyup', {
                bubbles: true, cancelable: true, keyCode: 143, which: 143 }))
        , 60000)
    }

})()
