
        /* ===== GLOBAL RESET ===== */
        * {
            box-sizing: border-box;
        }

        /* ===== FONTS ===== */
        @font-face {
            font-family: 'Bourgeois';
            src: url('Bourgeois-Medium.woff') format('woff');
            font-weight: 500;
            font-display: swap;
            /* show system font immediately, swap when loaded */
        }

        @font-face {
            font-family: 'Bourgeois';
            src: url('Bourgeois-UltraBold.woff') format('woff');
            font-weight: 800;
            font-display: swap;
        }

        html,
        body {
            margin: 0;
            padding: 0;
            height: 100%;
            width: 100%;
            overflow: hidden;
            background: #0e0e10;
        }

        /* VARIABLES GLOBALES */
        :root {
            --chat-zoom: 1;
            --main-size: 2;
            --twitch-purple: #aa43ff;
            --bg-light: #1f1f23;
            --border-color: #2a2a2d;
            --chat-width: 300px;
            --chat-height: 50vh;
        }

        body {
            font-family: 'Bourgeois', Arial, sans-serif;
            color: #efeff1;
            display: grid;
            grid-template-columns: 280px 1fr 0px;
            height: 100vh;
            width: 100vw;
            transition: grid-template-columns 0.2s ease;
        }

        body.chat-visible {
            grid-template-columns: 280px 1fr var(--chat-width);
        }

        body.sidebar-hidden {
            grid-template-columns: 0px 1fr 0px;
        }

        body.sidebar-hidden.chat-visible {
            grid-template-columns: 0px 1fr var(--chat-width);
        }

        body.is-resizing,
        body.is-modifying-streamer {
            transition: none !important;
            user-select: none !important;
        }

        body.is-modifying-streamer iframe {
            pointer-events: none !important;
        }

        body.is-resizing {
            cursor: col-resize !important;
        }

        /* ===== SIDEBAR WRAPPER ===== */
        .sidebar-wrapper {
            background: #18181b;
            border-right: 1px solid var(--border-color);
            height: 100vh;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            position: relative;
            overflow: hidden;
            z-index: 1500;
        }

        body.sidebar-hidden .sidebar-wrapper {
            opacity: 0;
            pointer-events: none;
            border: none;
        }

        .sidebar {
            padding: 12px;
            padding-top: 50px;
            padding-bottom: 50px;
            overflow-y: auto;
            height: 100%;
            box-sizing: border-box;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }

        .sidebar::-webkit-scrollbar {
            display: none;
        }

        .scroll-indicator {
            position: absolute;
            left: 0;
            right: 0;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 500;
            color: var(--twitch-purple);
            font-size: 24px;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.2s ease;
        }

        .scroll-indicator.visible {
            opacity: 1;
            pointer-events: auto;
        }

        .scroll-indicator:hover {
            color: #fff;
        }

        .scroll-up {
            top: 0px;
            background: linear-gradient(to bottom, #18181b 40%, rgba(24, 24, 27, 0) 100%);
            align-items: flex-start;
            padding-top: 50px;
        }

        .scroll-down {
            bottom: 0;
            background: linear-gradient(to top, #18181b 40%, rgba(24, 24, 27, 0) 100%);
            align-items: flex-end;
            padding-bottom: 10px;
        }

        /* ===== TOP BUTTONS ===== */
        .top-buttons {
            position: fixed;
            top: 8px;
            left: 8px;
            display: flex;
            gap: 6px;
            z-index: 1600;
            transition: opacity 0.3s ease-in-out;
        }

        .top-buttons button {
            background: #2a2a2d;
            color: #efeff1;
            border: 1px solid transparent;
            border-radius: 6px;
            padding: 6px 10px;
            cursor: pointer;
            font-size: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
            height: 32px;
            transition: all 0.2s ease;
        }

        .top-buttons button:hover {
            background: #3f3f44;
            transform: translateY(-1px);
        }

        .toggle-modal img {
            width: 16px;
            height: 16px;
        }

        body:not(.sidebar-hidden) .top-buttons {
            flex-direction: row;
        }

        body.sidebar-hidden .top-buttons {
            flex-direction: column;
        }

        /* Mobile Top Bar */
        .mobile-top-bar {
            display: none;
        }

        /* ===== DROPDOWNS ===== */
        .dropdown-wrapper {
            position: relative;
            display: flex;
        }

        .dropdown-menu {
            display: none;
            position: absolute;
            background: #18181b;
            border: 1px solid var(--border-color);
            border-radius: 4px;
            min-width: 220px;
            z-index: 1700;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
            padding: 5px 0;
            margin-top: 5px;
        }

        body:not(.sidebar-hidden) .dropdown-menu {
            top: 100%;
            left: 0;
        }

        body.sidebar-hidden .dropdown-menu {
            top: 0;
            left: calc(100% + 10px);
        }

        .dropdown-menu.active {
            display: block;
            animation: fadeIn 0.15s ease-out;
        }

        /* Custom Buttons Icon Styling */
        .btn-delete-custom,
        .btn-edit-custom {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 4px;
        }

        .btn-delete-custom img,
        .btn-edit-custom img {
            width: 14px;
            height: 14px;
            object-fit: contain;
        }

        .btn-delete-custom,
        #clearGridBtnTop {
            background: #7b0000 !important;
            /* Dark Red background */
            background-color: #7b0000 !important;
        }

        .btn-delete-custom:hover,
        #clearGridBtnTop:hover {
            background: #a00000 !important;
            background-color: #a00000 !important;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(-5px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .dropdown-item {
            padding: 8px 15px;
            cursor: pointer;
            font-size: 14px;
            color: #efeff1;
            transition: all 0.2s;
            white-space: nowrap;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            text-align: left;
            font-family: 'Bourgeois', sans-serif;
            border: none;
            background: none;
            width: 100%;
            box-sizing: border-box;
        }

        .dropdown-item:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        .dropdown-item .link-text {
            flex: 1;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .btn-fav {
            background: none;
            border: none;
            color: #444;
            font-size: 18px;
            cursor: pointer;
            padding: 4px;
            line-height: 1;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .btn-fav:hover {
            color: #888;
            transform: scale(1.2);
        }

        .btn-fav.active {
            color: #ffd700;
            text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
        }

        .dropdown-item:not(:last-child) {
            border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }

        /* ===== TOP RIGHT BUTTON (CHAT) ===== */
        .top-right-btn {
            position: fixed;
            top: 8px;
            right: 8px;
            z-index: 1600;
            transform: scale(0.66);
            transform-origin: top right;
            transition: right 0.2s ease, opacity 0.3s ease-in-out;
        }

        body.chat-visible .top-right-btn {
            right: calc(var(--chat-width) + 8px);
        }

        .top-right-btn button {
            background: #2a2a2d;
            color: #efeff1;
            border: 1px solid transparent;
            border-radius: 6px;
            cursor: pointer;
            font-size: 16px;
            height: 32px;
            width: 44px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
        }

        .top-right-btn button:hover {
            background: #3f3f44;
            transform: translateY(-1px);
        }

        .top-right-btn button:disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }

        /* ===== CHAT SIDEBAR ===== */
        .chat-sidebar {
            background: #18181b;
            border-left: 1px solid var(--border-color);
            height: 100vh;
            box-sizing: border-box;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            position: relative;
            z-index: 1500;
            padding-left: 4px;
            /* Evita solapamiento con el resizer */
        }

        .chat-resizer {
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            cursor: col-resize;
            z-index: 2000;
            transition: background 0.2s;
        }

        .chat-resizer:hover {
            background: var(--twitch-purple);
        }

        .chat-embeds {
            flex: 1;
            display: flex;
            flex-direction: column;
            position: relative;
        }

        .chat-empty-state {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 15px;
            padding: 20px;
            text-align: center;
            color: #adadb8;
        }

        .btn-close-sidebar {
            background: var(--twitch-purple);
            color: white;
            border: none;
            border-radius: 4px;
            padding: 10px 20px;
            font-family: 'Bourgeois', sans-serif;
            font-weight: bold;
            cursor: pointer;
            font-size: 14px;
        }

        .btn-close-sidebar:hover {
            background: #bf94ff;
        }

        .chat-frame {
            flex: 1;
            width: 100%;
            border: none;
            border-top: 1px solid var(--border-color);
            zoom: var(--chat-zoom);
        }

        /* ===== TITLES & HEADERS ===== */
        .sidebar-logo {
            max-width: 85%;
            height: auto;
            margin: 15px auto 10px;
            display: block;
        }

        .subtitle {
            font-size: 13px;
            color: #adadb8;
            margin-bottom: 12px;
        }

        .channels-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            margin-top: 10px;
        }

        .channels-header h4 {
            margin: 0;
            font-size: 15px;
            font-weight: 800;
            color: #efeff1;
        }

        /* ===== SECTION HEADERS (FOLDERS) ===== */
        /* WRAPPER PARA DRAG & DROP DE SECCIONES */
        .sidebar-group {
            display: block;
            margin-bottom: 2px;
            border-radius: 6px;
            transition: transform 0.2s, opacity 0.2s;
        }

        .sidebar-group.dragging {
            opacity: 0.5;
            background: #2a2a2d;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
        }

        .sidebar-group.game-hidden {
            display: none !important;
        }

        .section-header {
            margin-top: 10px;
            background: var(--bg-light);
            font-size: 14px;
            font-weight: 800;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            color: #efeff1;
            padding: 10px 12px;
            border-radius: 6px;
            transition: background 0.2s;
            border: 1px solid transparent;
        }

        .section-header:hover {
            background: #26262c;
            border-color: #3a3a3d;
        }

        .section-header.active {
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
        }

        .hidden {
            display: none !important;
        }

        /* ===== CANALES DESIGN (LISTS) ===== */
        .channel-list-container {
            background: #111113;
            border: 1px solid var(--border-color);
            border-top: none;
            border-bottom-left-radius: 6px;
            border-bottom-right-radius: 6px;
            padding: 6px;
            margin-bottom: 8px;
        }

        .channel {
            display: flex;
            align-items: center;
            padding: 6px 8px;
            margin-bottom: 2px;
            font-size: 14px;
            border-radius: 4px;
            transition: background 0.1s;
            cursor: pointer;
            border-left: 3px solid transparent;
        }

        .channel:hover {
            background: rgba(255, 255, 255, 0.03);
        }

        /* ESTADO ACTIVO (SELECCIONADO) */
        .channel.active {
            background: rgba(169, 112, 255, 0.15);
            border-left-color: var(--twitch-purple);
        }

        /* BOTÓN DE PRINCIPAL (ESTRELLA) */
        .btn-principal {
            background: none;
            border: none;
            color: #444;
            font-size: 16px;
            cursor: pointer;
            margin-right: 8px;
            padding: 0;
            transition: color 0.2s, transform 0.1s;
        }

        .btn-principal:hover {
            color: #888;
            transform: scale(1.1);
        }

        .btn-principal.is-principal {
            color: #ffd700;
            text-shadow: 0 0 5px rgba(255, 215, 0, 0.5);
        }

        /* OCULTAR INPUTS ANTIGUOS */
        .channel input[type="checkbox"],
        .channel input[type="radio"] {
            display: none;
        }

        .shield-container {
            width: auto;
            min-width: 20px;
            height: 20px;
            margin-right: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 4px;
            flex-shrink: 0;
        }

        .team-shield {
            width: 20px;
            height: 20px;
            object-fit: contain;
        }

        .shield-x {
            font-size: 10px;
            font-weight: 800;
            color: #efeff1;
            margin: 0 1px;
            opacity: 0.8;
        }

        .channel label {
            flex: 1;
            cursor: pointer;
            color: #efeff1;
            display: flex;
            flex-direction: column;
            justify-content: center;
            line-height: 1.2;
        }

        .channel-name-hint {
            color: #6d6d72;
            font-size: 10px;
            margin-top: 1px;
            font-weight: normal;
            display: none;
        }

        body.show-channel-names .channel-name-hint {
            display: block;
        }

        /* ===== LIVE TAG ===== */
        .live-tag {
            color: #ff4e45;
            font-size: 10px;
            font-weight: 800;
            margin-left: 8px;
            display: none;
            align-items: center;
            gap: 4px;
        }

        .live-tag::before {
            content: '';
            display: inline-block;
            width: 6px;
            height: 6px;
            background: #ff4e45;
            border-radius: 50%;
            animation: pulse 1.5s infinite;
        }

        @keyframes pulse {
            0% {
                opacity: 1;
                transform: scale(1);
            }

            50% {
                opacity: 0.4;
                transform: scale(1.2);
            }

            100% {
                opacity: 1;
                transform: scale(1);
            }
        }

        /* ===== CONTROLS ===== */
        .btn-reset {
            background: #3a3a3d;
            color: #efeff1;
            border: none;
            border-radius: 4px;
            padding: 4px 8px;
            font-size: 11px;
            font-family: 'Bourgeois', sans-serif;
            cursor: pointer;
        }

        .btn-reset:hover {
            background: #3a0d0d !important;
            cursor: pointer;
        }

        .layout-control {
            padding: 6px 0;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .layout-control:first-of-type {
            border-top: 1px solid var(--border-color);
            margin-top: 10px;
            padding-top: 10px;
        }

        .layout-control select {
            background: #2a2a2d;
            color: #efeff1;
            border: 1px solid #3f3f44;
            border-radius: 4px;
            padding: 4px 24px 4px 10px;
            font-family: 'Bourgeois', sans-serif;
            cursor: pointer;
            appearance: none;
        }

        .select-wrapper {
            position: relative;
            display: inline-flex;
            align-items: center;
        }

        .chat-input-row .select-wrapper {
            flex: 1;
        }

        .select-wrapper::after {
            content: '▾';
            position: absolute;
            right: 8px;
            color: #adadb8;
            pointer-events: none;
        }

        /* ===== CUSTOM SECTION ===== */
        .custom-row {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px;
            background: rgba(255, 255, 255, 0.02);
            border-radius: 4px;
            margin-bottom: 4px;
        }

        .custom-row.active {
            background: rgba(169, 112, 255, 0.15);
            border-left: 3px solid var(--twitch-purple);
            padding-left: 5px;
        }

        .custom-input {
            background: #0e0e10;
            border: 1px solid #3f3f44;
            color: #fff;
            border-radius: 4px;
            padding: 6px 8px;
            font-size: 12px;
            flex: 1;
            font-family: 'Bourgeois', sans-serif;
            min-width: 0;
        }

        .custom-input:focus {
            border-color: var(--twitch-purple);
            outline: none;
            background: #1a1a1d;
        }

        .btn-save-custom {
            background: var(--twitch-purple);
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            padding: 6px 8px;
            font-size: 11px;
            font-weight: bold;
            flex-shrink: 0;
        }

        .btn-delete-custom {
            background: #3a1a1a;
            color: #ff4e45;
            border: 1px solid #5a1a1a;
            border-radius: 4px;
            cursor: pointer;
            padding: 6px 8px;
            font-size: 11px;
            flex-shrink: 0;
        }

        .btn-delete-custom:hover {
            background: #5a1a1a;
            color: #fff;
        }

        .btn-add-custom {
            width: 100%;
            padding: 8px;
            background: #1f1f23;
            color: #adadb8;
            border: 1px dashed #3f3f44;
            margin-top: 6px;
            cursor: pointer;
            border-radius: 4px;
            font-size: 12px;
            font-family: 'Bourgeois', sans-serif;
        }

        .btn-add-custom:hover {
            background: #2a2a2d;
            color: #fff;
            border-color: var(--twitch-purple);
        }

        /* Platform picker button in custom rows */
        .btn-platform-pick {
            position: relative;
            background: rgba(255, 255, 255, 0.06);
            border: 1px solid #3f3f44;
            border-radius: 4px;
            cursor: pointer;
            padding: 4px 6px;
            display: flex;
            align-items: center;
            gap: 3px;
            flex-shrink: 0;
            font-size: 11px;
            color: #adadb8;
            transition: border-color 0.15s;
        }

        .btn-platform-pick:hover {
            border-color: var(--twitch-purple);
        }

        .btn-platform-pick img {
            height: 13px;
            filter: brightness(0.8);
            pointer-events: none;
        }

        .btn-platform-pick .pick-arrow {
            font-size: 8px;
            margin-left: 1px;
        }

        /* Floating dropdown */
        .platform-dropdown {
            position: absolute;
            z-index: 9999;
            background: #1a1a1d;
            border: 1px solid #3f3f44;
            border-radius: 6px;
            padding: 4px;
            display: none;
            flex-direction: column;
            gap: 2px;
            min-width: 130px;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
        }

        .platform-dropdown.open {
            display: flex;
        }

        .platform-dropdown button {
            display: flex;
            align-items: center;
            gap: 8px;
            background: none;
            border: none;
            color: #e0e0e5;
            padding: 7px 10px;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
            font-family: 'Bourgeois', sans-serif;
            text-align: left;
            width: 100%;
            transition: background 0.1s;
        }

        .platform-dropdown button:hover {
            background: rgba(169, 112, 255, 0.15);
            color: #fff;
        }

        .platform-dropdown button img {
            height: 14px;
            filter: brightness(0.85);
        }

        .platform-dropdown button.selected {
            background: rgba(169, 112, 255, 0.2);
            color: #fff;
        }

        .platform-dropdown button.selected img {
            filter: none;
        }

        /* ===== MOBILE/TOUCH RESPONSIVENESS ===== */
        /* Acts on screens under 769px OR any touch-centric device (phones in landscape, tablets) */
        @media (max-width: 768px),
        (pointer: coarse) {
            body {
                grid-template-columns: 1fr 0px 0px !important;
                grid-template-rows: auto !important;
                height: 100vh !important;
                width: 100vw !important;
                overflow: hidden !important;
                display: grid !important;
            }

            .hide-on-mobile {
                display: none !important;
            }

            /* COMMON MOBILE ELEMENTS */
            .sidebar-wrapper {
                position: fixed;
                left: 0;
                top: 0;
                bottom: 0;
                width: 280px;
                padding-top: 56px;
                transform: translateX(-100%);
                transition: transform 0.3s ease;
                box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
                z-index: 1500;
            }

            body:not(.sidebar-hidden) .sidebar-wrapper {
                transform: translateX(0);
                opacity: 1;
                pointer-events: auto;
            }

            .chat-sidebar {
                position: fixed;
                right: 0;
                top: 0;
                bottom: 0;
                width: 100vw;
                z-index: 1400;
                transform: translateX(100%);
                transition: transform 0.3s ease;
                background: #0e0e10;
            }

            body.chat-visible .chat-sidebar {
                transform: translateX(0);
            }

            .streams-container {
                height: 100vh !important;
                width: 100%;
                grid-column: 1 !important;
                grid-row: 1 !important;
                padding-top: 68px !important;
            }

            .mobile-top-bar {
                display: block;
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 68px;
                background: #220E2B;
                z-index: 1550;
                border-bottom: 2px solid rgba(170, 67, 255, 0.3);
                box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
            }

            /* LANDSCAPE OVERRIDES */
            @media (orientation: landscape) {

                body.chat-visible,
                body.sidebar-hidden.chat-visible {
                    grid-template-columns: 1fr var(--chat-width, 30vw) !important;
                    display: grid !important;
                }

                body.chat-visible .streams-container {
                    height: 100vh !important;
                    padding-top: 68px !important;
                }

                body.chat-visible .chat-sidebar {
                    position: relative !important;
                    width: 100% !important;
                    height: calc(100vh - 68px) !important;
                    top: 68px !important;
                    transform: none !important;
                    z-index: 1400 !important;
                    border-left: 1px solid var(--border-color);
                    grid-column: 2 !important;
                    grid-row: 1 !important;
                    overflow: visible !important;
                    /* ALLOW RESIZER TO BE GRABBED */
                }

                body.chat-visible .top-right-btn {
                    right: 12px !important;
                    transition: none !important;
                    /* Stay fixed in the corner */
                }

                body.chat-visible .chat-resizer {
                    display: block !important;
                    width: 20px !important;
                    /* Larger hitbox for mobile landscape */
                    height: 100% !important;
                    left: -10px !important;
                    right: auto !important;
                    top: 0 !important;
                    bottom: 0 !important;
                    cursor: col-resize !important;
                    background: transparent !important;
                    /* TOTAL TRANSPARENCY AS REQUESTED */
                    z-index: 2000;
                }
            }

            /* PORTRAIT OVERRIDES */
            @media (orientation: portrait) {
                body.chat-visible {
                    grid-template-columns: 1fr !important;
                    grid-template-rows: 1fr var(--chat-height, 50vh) !important;
                }

                body.chat-visible .streams-container {
                    height: 100% !important;
                    grid-row: 1 !important;
                    min-height: 0 !important;
                    padding-top: 68px !important;
                }

                body.chat-visible .chat-sidebar {
                    position: relative !important;
                    width: 100% !important;
                    height: 100% !important;
                    transform: none !important;
                    z-index: 1400 !important;
                    border-top: 2px solid var(--twitch-purple);
                    border-left: none !important;
                    padding-left: 0 !important;
                    padding-top: 10px !important;
                    grid-row: 2 !important;
                    grid-column: 1 !important;
                    transition: none !important;
                    /* Avoid sliding popups */
                }

                body.chat-visible .chat-resizer {
                    display: block !important;
                    width: 100% !important;
                    height: 12px !important;
                    top: -6px !important;
                    left: 0 !important;
                    right: 0 !important;
                    bottom: auto !important;
                    cursor: row-resize !important;
                    background: rgba(169, 112, 255, 0.1) !important;
                }

                /* In portrait, the button stays at the top right of the whole grid area/screen */
                body.chat-visible .top-right-btn {
                    right: 12px !important;
                    top: 12px !important;
                }

                body.chat-visible .grid-controls {
                    bottom: calc(var(--chat-height, 50vh) + 10px) !important;
                    transition: none !important;
                    /* Move instantly while resizing */
                }
            }

            /* MOBILE UI Polish */
            .top-right-btn {
                transform: scale(1);
                right: 12px;
                top: 12px;
                transition: right 0.3s ease, bottom 0.3s ease;
                z-index: 3100;
            }

            body.is-resizing .top-right-btn {
                transition: none !important;
            }

            .top-buttons {
                left: 12px;
                top: 12px;
                z-index: 3001;
                flex-direction: row !important;
            }

            .top-buttons button {
                width: 44px;
                height: 44px;
                font-size: 20px;
            }

            .welcome-screen {
                overflow-y: auto !important;
                padding: 100px 20px 40px 20px !important;
                justify-content: flex-start !important;
            }

            .top-right-btn button {
                width: 44px;
                height: 44px;
                font-size: 20px;
            }

            @media (orientation: landscape) {
                .welcome-screen {
                    justify-content: flex-start !important;
                }
            }

            .modal {
                width: 95vw !important;
                max-height: calc(100svh - 110px) !important;
                height: auto !important;
                padding: 10px !important;
                overflow-y: auto !important;
            }

            .modal-overlay {
                align-items: flex-start !important;
                padding-top: 85px !important;
                padding-bottom: 20px !important;
            }

            .modal.modal-lp,
            .modal.modal-leaderboard {
                height: 100% !important;
            }

            .streams {
                padding: 10px !important;
            }

            #btnGridEdit {
                display: flex;
            }

            .stream .stream-actions {
                opacity: 0 !important;
                visibility: hidden !important;
                pointer-events: none !important;
            }

            .stream:hover .stream-actions {
                opacity: 0 !important;
                visibility: hidden !important;
                pointer-events: none !important;
            }

            body.grid-edit-mode .stream .stream-actions {
                opacity: 1 !important;
                visibility: visible !important;
                pointer-events: auto !important;
            }

            body.grid-edit-mode #btnGridEdit {
                background: #a970ff !important;
                border: 1px solid rgba(255, 255, 255, 0.4);
                color: white;
                box-shadow: 0 0 15px rgba(169, 112, 255, 0.4);
            }
        }

        /* ===== STREAM GRID AREA ===== */
        .streams-container {
            position: relative;
            width: 100%;
            height: 100vh;
            overflow: hidden;
        }

        .streams {
            display: grid;
            gap: 6px;
            padding: 20px 50px;
            overflow-y: auto;
            overflow-x: hidden;
            height: 100%;
            width: 100%;
            box-sizing: border-box;
            align-content: center;
            scrollbar-width: none;
            -ms-overflow-style: none;
            /* Se remueve la transición de padding para evitar redimensionados continuos detectados por Twitch */
        }

        .streams::-webkit-scrollbar {
            display: none;
        }

        .streams.mode-fit {
            overflow: hidden !important;
        }


        .search-input {
            width: 0;
            opacity: 0;
            pointer-events: none;
            background: #18181b;
            border: 2px solid var(--twitch-purple);
            color: #fff;
            border-radius: 6px;
            padding: 0px;
            font-size: 18px;
            font-family: 'Bourgeois', sans-serif;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            height: 44px;
            box-sizing: border-box;
        }

        .search-container.active .search-input {
            width: 300px;
            opacity: 1;
            pointer-events: auto;
            padding: 0 15px;
        }

        /* ===== STREAM ELEMENTS ===== */
        .stream {
            background: black;
            aspect-ratio: 16 / 9;
            position: relative;
            width: 100%;
            order: 0;
            animation: streamEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1);
            /* FLIP manejará las transiciones de posición */
        }

        .stream.removing {
            animation: streamExit 0.4s cubic-bezier(0.7, 0, 0.84, 0) forwards;
            pointer-events: none;
            /* Estos valores ayudan a colapsar el espacio visualmente mientras se va */
            width: 0 !important;
            margin-left: 0 !important;
            margin-right: 0 !important;
            overflow: hidden;
            opacity: 0;
        }

        @keyframes streamEntrance {
            from {
                opacity: 0;
                transform: scale(0.92) translateY(10px);
            }

            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }

        @keyframes streamExit {
            from {
                opacity: 1;
                transform: scale(1) translateY(0);
            }

            to {
                opacity: 0;
                transform: scale(0.85) translateY(15px);
            }
        }

        .stream-actions {
            position: absolute;
            top: 8px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            gap: 6px;
            opacity: 0;
            visibility: hidden;
            pointer-events: none;
            transition: opacity 0.2s, visibility 0.2s;
            z-index: 110;
        }

        .stream:hover .stream-actions {
            opacity: 1;
            visibility: visible;
            pointer-events: auto;
        }

        .stream-dropdown-wrapper {
            position: relative;
            display: inline-block;
        }

        .stream-dropdown-menu {
            display: none;
            position: absolute;
            background: rgba(24, 24, 27, 0.95);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            border: 1px solid var(--border-color);
            border-radius: 6px;
            right: 0;
            top: 100%;
            margin-top: 4px;
            min-width: 140px;
            z-index: 1000;
            overflow: hidden;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
        }

        .stream-dropdown-menu.active {
            display: block;
            animation: fadeIn 0.15s ease-out;
        }

        .stream-dropdown-item {
            padding: 8px 12px;
            cursor: pointer;
            font-size: 13px;
            color: #efeff1;
            transition: background 0.2s;
            display: flex;
            align-items: center;
            gap: 8px;
            white-space: nowrap;
            font-family: 'Bourgeois', sans-serif;
            font-weight: 500;
        }

        .stream-dropdown-item:hover {
            background: rgba(255, 255, 255, 0.1);
        }

        /* Grid Edit Mode button - hidden on desktop mouse-only devices */
        @media (min-width: 1025px),
        (min-width: 769px) and (pointer: fine) {
            #btnGridEdit {
                display: none !important;
            }
        }

        .action-btn {
            background: rgba(24, 24, 27, 0.85);
            backdrop-filter: blur(8px);
            -webkit-backdrop-filter: blur(8px);
            color: #efeff1;
            width: 30px;
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 6px;
            cursor: pointer;
            padding: 5px 10px;
            font-size: 13px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s ease;
        }

        .action-btn:hover {
            background: var(--twitch-purple);
            border-color: var(--twitch-purple);
            transform: translateY(-1px);
            box-shadow: 0 3px 8px rgba(170, 67, 255, 0.3);
        }

        .action-btn.btn-chat:hover {
            background: rgba(170, 67, 255, 0.8);
            border-color: rgba(170, 67, 255, 0.6);
        }

        .action-btn.btn-chat.active {
            background: #aa43ff !important;
            color: white !important;
            border-color: #aa43ff !important;
            box-shadow: 0 0 10px rgba(170, 67, 255, 0.4);
        }

        .action-btn.btn-close:hover {
            background: rgba(255, 78, 69, 0.9);
            border-color: rgba(255, 78, 69, 0.6);
            box-shadow: 0 3px 8px rgba(255, 78, 69, 0.3);
        }

        .stream.principal .drag-handle {
            display: none !important;
        }

        .stream iframe {
            width: 100%;
            height: 100%;
            border: none;
        }

        /* FIX PARA TWITCH: Evitar que los controles se superpongan al iframe y Twitch lo pause */
        .stream.twitch-stream iframe {
            transition: height 0s 0.2s, margin-top 0s 0.2s !important; /* Retrasa la subida 0.2s al quitar el hover */
        }

        .stream.twitch-stream:hover iframe,
        body.grid-edit-mode .stream.twitch-stream iframe {
            height: calc(100% - 40px) !important;
            margin-top: 40px !important;
            transition: none !important; /* Baja al instante al hacer hover */
        }
        
        .stream.twitch-stream:hover .stream-dropdown-menu,
        body.grid-edit-mode .stream.twitch-stream .stream-dropdown-menu {
            z-index: 2000 !important;
        }

        /* ORDEN Y TAMAÑO PARA EL PRINCIPAL USANDO CSS SIN CAMBIAR EL DOM */
        .stream.principal {
            order: -1;
            border: 2px solid var(--twitch-purple);
            box-sizing: border-box;
        }

        .streams:not(.grid-1) .stream.principal {
            grid-column: span var(--main-size);
            grid-row: span var(--main-size);
        }

        /* ===== MODALS ===== */
        .modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.8);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 3000;
        }

        .modal-overlay.no-dim {
            background: transparent;
            pointer-events: none;
            align-items: flex-start;
            padding-top: 60px;
        }

        /* LIVE SUGGESTIONS MODAL SLIDE DOWN (Desktop) */
        @media (min-width: 769px) {
            #liveSuggestionsOverlay.modal-overlay.no-dim {
                padding-top: 0;
                height: auto !important;
                bottom: auto !important;
                top: 0;
                left: 0;
                width: 100%;
                transform: translateY(-100%);
                transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
                display: flex !important;
                opacity: 1 !important;
                background: transparent !important;
                pointer-events: none !important; /* Let clicks pass through except to children with auto */
            }

            #liveSuggestionsOverlay.modal-overlay.no-dim.visible {
                transform: translateY(0);
            }

            #liveSuggestionsOverlay.modal-overlay.no-dim .modal {
                margin: 0 auto;
                border-top: none;
                border-radius: 0 0 12px 12px;
                transform: none !important;
                opacity: 1 !important;
                box-shadow: 0 15px 50px rgba(0, 0, 0, 0.8);
                overflow: visible; 
                pointer-events: auto !important;
                width: 90%;
            }

            /* The Toggle Button on Desktop */
            .desktop-live-toggle {
                position: absolute;
                bottom: -32px;
                left: 50%;
                transform: translateX(-50%);
                background: var(--twitch-purple);
                color: white;
                border: none;
                border-radius: 0 0 10px 10px;
                width: 80px;
                height: 32px;
                z-index: 4600;
                cursor: pointer;
                transition: all 0.2s ease;
                display: flex;
                align-items: center;
                justify-content: center;
                box-shadow: 0 4px 15px rgba(170, 67, 255, 0.5);
                pointer-events: auto !important;
            }

            .desktop-live-toggle:hover {
                background: #a970ff;
                padding-top: 4px;
                height: 36px;
                bottom: -36px;
                box-shadow: 0 6px 20px rgba(170, 67, 255, 0.6);
            }

            .desktop-live-toggle .v-icon {
                height: 14px;
                width: auto;
                transition: transform 0.4s ease;
                display: inline-block;
                filter: brightness(0) invert(1); /* Ensure it's white if the PNG is dark */
            }

            body.live-modal-open .desktop-live-toggle .v-icon {
                transform: rotate(180deg);
            }

            /* Hide the mobile button on desktop */
            #openLiveSuggestions {
                display: none !important;
            }
        }

        @media (max-width: 768px) {
            .desktop-live-toggle {
                display: none !important;
            }
        }

        .modal-overlay.no-dim .modal {
            pointer-events: auto;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
            transform: translateY(-20px);
            transition: transform 0.3s ease, opacity 0.3s ease;
            opacity: 0;
        }

        .modal-overlay.no-dim.visible {
            display: flex;
        }

        .modal-overlay.no-dim.visible .modal {
            transform: translateY(0);
            opacity: 1;
        }

        .modal {
            position: relative;
            background: #0e0e10;
            border-radius: 8px;
            overflow: hidden;
            border: 1px solid var(--border-color);
        }

        .modal-lp {
            width: calc(100vw - 100px);
            max-width: 1920px;
            height: calc(100vh - 100px);
        }

        .modal-lp iframe {
            width: 100%;
            height: 100%;
            border: none;
        }

        .modal-leaderboard {
            width: 900px;
            height: 1000px;
            max-width: 95vw;
            max-height: 90vh;
        }

        .modal-leaderboard iframe {
            width: 100%;
            height: 100%;
            border: none;
        }

        .modal-settings {
            width: 500px;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
            padding: 0;
            box-sizing: border-box;
            text-align: center;
        }

        .modal-settings h3 {
            margin: 0;
            padding: 30px 30px 10px;
            font-size: 24px;
            text-transform: uppercase;
        }

        .modal-settings .subtitle {
            padding: 0 30px;
        }

        /* Custom Scrollbar for Modals */
        .settings-content::-webkit-scrollbar,
        .game-toggles-container::-webkit-scrollbar {
            width: 8px;
        }

        .settings-content::-webkit-scrollbar-track,
        .game-toggles-container::-webkit-scrollbar-track {
            background: #0e0e10;
        }

        .settings-content::-webkit-scrollbar-thumb,
        .game-toggles-container::-webkit-scrollbar-thumb {
            background: #3a3a3d;
            border-radius: 4px;
        }

        .settings-content::-webkit-scrollbar-thumb:hover,
        .game-toggles-container::-webkit-scrollbar-thumb:hover {
            background: #4a4a4d;
        }

        /* Firefox support */
        .settings-content,
        .game-toggles-container {
            scrollbar-width: thin;
            scrollbar-color: #3a3a3d #0e0e10;
        }

        .settings-content {
            display: flex;
            flex-direction: column;
            gap: 20px;
            align-items: center;
            overflow-y: auto;
            padding: 10px 30px 30px;
            flex: 1;
        }

        .settings-row {
            width: 100%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 12px 0;
        }

        .settings-row-toggles {
            width: 70%;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 12px 0;
        }

        .settings-row-toggles label {
            color: #efeff1;
            font-weight: 600;
            font-size: 18px;
        }

        .settings-row-vertical {
            flex-direction: column;
            align-items: center;
            border-bottom: none;
        }

        .settings-action-btn {
            width: 85%;
            margin: 5px auto 10px auto;
            padding: 14px;
            background: rgba(170, 67, 255, 0.1);
            border: 1px solid rgba(170, 67, 255, 0.3);
            border-radius: 10px;
            color: #bf94ff;
            font-family: 'Bourgeois', sans-serif;
            text-transform: uppercase;
            letter-spacing: 1px;
            font-size: 14px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 12px;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        .settings-action-btn:hover {
            background: rgba(170, 67, 255, 0.2);
            border-color: rgba(170, 67, 255, 0.6);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(170, 67, 255, 0.2);
            color: #d1b3ff;
        }

        .settings-action-btn:active {
            transform: translateY(0);
        }

        .settings-action-btn img {
            width: 20px;
            height: 20px;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) brightness(1.2);
        }

        .settings-row label {
            color: #efeff1;
            font-weight: 600;
            font-size: 18px;
        }

        /* Segmented Selector */
        .platform-selector {
            display: flex;
            flex-direction: column;
            background: #2a2a2d;
            padding: 8px;
            border-radius: 8px;
            gap: 6px;
            width: 100%;
            max-width: 260px;
            margin: 8px auto 0 auto;
        }

        .platform-option {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            gap: 12px;
            padding: 10px 15px;
            border-radius: 6px;
            cursor: grab;
            transition: all 0.2s ease;
            color: #efeff1;
            font-weight: bold;
            font-size: 16px;
            background: #1f1f23;
            border: 1px solid transparent;
        }

        /* Platform specific colors for drag and drop list */
        .platform-option[data-value="twitch"] {
            background: rgba(169, 112, 255, 0.15);
            border-color: rgba(169, 112, 255, 0.3);
        }

        .platform-option[data-value="youtube"] {
            background: rgba(255, 0, 0, 0.15);
            border-color: rgba(255, 0, 0, 0.3);
        }

        .platform-option[data-value="kick"] {
            background: rgba(83, 252, 24, 0.15);
            border-color: rgba(83, 252, 24, 0.3);
        }

        .platform-option:active {
            cursor: grabbing;
        }

        .platform-option.dragging {
            opacity: 0.5;
            background: #3f3f44;
            border: 1px dashed #723aa0;
        }

        .platform-drag-handle {
            color: #888;
            margin-right: 8px;
            cursor: grab;
        }

        .platform-option img {
            width: 20px;
            height: 20px;
            object-fit: contain;
        }

        .platform-option:hover {
            background: rgba(255, 255, 255, 0.05);
            border-color: #3f3f44;
        }

        .platform-option.active {
            background: var(--twitch-purple);
            color: white;
            box-shadow: 0 2px 8px rgba(169, 112, 255, 0.4);
        }

        .platform-option.active img {
            opacity: 1;
        }

        /* Custom Switch */
        .switch-toggle {
            position: relative;
            display: inline-block;
            width: 40px;
            height: 22px;
        }

        .switch-toggle input {
            opacity: 0;
            width: 0;
            height: 0;
        }

        .slider-round {
            position: absolute;
            cursor: pointer;
            inset: 0;
            background-color: #3f3f44;
            transition: .3s;
            border-radius: 34px;
        }

        .slider-round:before {
            position: absolute;
            content: "";
            height: 16px;
            width: 16px;
            left: 3px;
            bottom: 3px;
            background-color: white;
            transition: .3s;
            border-radius: 50%;
        }

        input:checked+.slider-round {
            background-color: var(--twitch-purple);
        }

        input:checked+.slider-round:before {
            transform: translateX(18px);
        }

        /* Custom Range */
        input[type="range"] {
            -webkit-appearance: none;
            appearance: none;
            width: 120px;
            height: 6px;
            background: #3f3f44;
            border-radius: 5px;
            outline: none;
        }

        input[type="range"]::-webkit-slider-thumb {
            -webkit-appearance: none;
            width: 16px;
            height: 16px;
            background: var(--twitch-purple);
            border-radius: 50%;
            cursor: pointer;
            transition: transform 0.1s;
        }

        input[type="range"]::-webkit-slider-thumb:hover {
            transform: scale(1.2);
        }

        .social-buttons {
            display: flex;
            gap: 10px;
            margin-top: 10px;
            justify-content: center;
            width: 100%;
            flex-wrap: wrap;
        }

        .social-btn {
            padding: 8px 16px;
            border-radius: 4px;
            border: none;
            color: white;
            font-weight: bold;
            cursor: pointer;
            font-family: 'Bourgeois', sans-serif;
            text-decoration: none;
            font-size: 14px;
        }

        .btn-twitch {
            background: #aa43ff;
        }

        .btn-twitter {
            background: #1da1f2;
        }

        .btn-instagram {
            background: #e1306c;
        }

        .btn-donate {
            background: #f0319a;
        }

        /* SIDEBAR DONATE BUTTON */
        .sidebar-footer {
            padding: 20px 10px;
            text-align: center;
            border-top: 1px solid rgba(255, 255, 255, 0.05);
            margin-top: 10px;
        }

        .sidebar-donate-btn {
            display: block;
            width: calc(80% - 20px);
            margin: 0 auto;
            transition: all 0.2s ease;
            text-align: center;
            box-shadow: 0 4px 15px rgba(223, 63, 255, 0.15);
        }

        .sidebar-donate-btn:hover {
            transform: translateY(-2px);
            filter: brightness(1.1);
            box-shadow: 0 6px 20px rgba(225, 0, 255, 0.25);
        }

        .shortcuts-container {
            width: 100%;
            margin-top: 25px;
            padding: 20px;
            background: rgba(0, 0, 0, 0.2);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 12px;
        }

        .shortcuts-header {
            font-family: 'Bourgeois', sans-serif;
            font-size: 13px;
            font-weight: 800;
            color: #bf94ff;
            letter-spacing: 2px;
            margin-bottom: 18px;
            text-align: center;
        }

        .shortcuts-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 14px;
        }

        .shortcut-item {
            display: flex;
            align-items: center;
            gap: 12px;
            color: #adadb8;
            font-size: 12px;
            font-weight: 500;
        }

        .shortcut-keys {
            display: flex;
            gap: 4px;
            min-width: 55px;
            justify-content: flex-end;
        }

        .key-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            background: #2a2a2d;
            border: 1px solid #3f3f44;
            border-bottom: 3px solid #1a1a1d;
            border-radius: 5px;
            padding: 4px 8px;
            color: #efeff1;
            font-family: 'Courier New', Courier, monospace;
            font-weight: 900;
            font-size: 11px;
            min-width: 24px;
            box-shadow: 0 4px 0 rgba(0, 0, 0, 0.4);
            transition: all 0.1s;
        }

        .shortcut-item:hover .key-badge {
            transform: translateY(1px);
            border-bottom-width: 2px;
            background: #3a3a3d;
        }

        /* Modal de Juegos */
        .modal-games {
            width: 500px;
            max-width: 95%;
            height: auto;
            max-height: 90vh;
            display: flex;
            flex-direction: column;
            padding: 0px 20px 10px;
            box-sizing: border-box;
        }

        .game-toggles-container {
            display: flex;
            flex-direction: column;
            gap: 10px;
            overflow-y: auto;
            padding: 15px 15px 25px;
            flex: 1;
        }

        .game-card {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: flex-start;
            background: #2a2a2d;
            border: 2px solid #3f3f44;
            border-radius: 12px;
            padding: 12px 20px;
            cursor: pointer;
            transition: all 0.2s ease;
            box-sizing: border-box;
            gap: 15px;
        }

        .game-card:hover {
            background: #3a3a3d;
            border-color: #5a5a5d;
            transform: translateY(-2px);
        }

        .game-card.active {
            background: rgba(255, 255, 255, 0.05);
            border-color: var(--game-theme-color, var(--twitch-purple));
            box-shadow: 0 4px 15px var(--game-theme-color, rgba(169, 112, 255, 0.2));
        }

        .game-card img {
            width: 36px;
            height: 36px;
            object-fit: contain;
            filter: grayscale(1) opacity(0.5);
            transition: all 0.3s ease;
        }

        .game-card.active img {
            filter: grayscale(0) opacity(1);
            transform: scale(1.05);
        }

        .game-card span {
            font-weight: 700;
            font-size: 14px;
            color: #adadb8;
            text-align: left;
            text-transform: uppercase;
            transition: color 0.3s;
            font-family: 'Bourgeois', sans-serif;
            letter-spacing: 0.5px;
        }

        .game-card.active span {
            color: white;
        }

        .welcome-games-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
            width: 100%;
            max-width: 650px;
            margin: 15px auto 40px;
        }

        .welcome-games-grid .game-card {
            padding: 15px;
            aspect-ratio: 1 / 1;
        }

        .welcome-games-grid .game-card img {
            width: 40px;
            height: 40px;
            margin-bottom: 10px;
        }

        .welcome-games-grid .game-card span {
            font-size: 14px;
        }




        /* ===== MODO STREAMER OVERLAY ===== */
        #streamer-overlay {
            position: fixed;
            border: 2px dashed var(--twitch-purple);
            background: rgba(169, 112, 255, 0.1);
            z-index: 1001;
            /* Por encima de controles pero manejado por lógica */
            cursor: move;
            display: none;
            box-sizing: border-box;
        }

        #streamer-overlay.hidden-overlay {
            display: none !important;
        }

        #streamer-overlay::after {
            content: "ZONA SEGURA PARA CÁMARA \a \a Coloca el rectángulo en un borde de la pantalla";
            white-space: pre-wrap;
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            font-size: 18px;
            font-weight: 800;
            color: var(--twitch-purple);
            text-align: center;
            pointer-events: none;
            opacity: 0.8;
            width: 90%;
        }

        .resizer-handle {
            width: 12px;
            height: 12px;
            background: var(--twitch-purple);
            position: absolute;
            z-index: 10;
        }

        .resizer-handle.top-left {
            top: -6px;
            left: -6px;
            cursor: nw-resize;
        }

        .resizer-handle.top-right {
            top: -6px;
            right: -6px;
            cursor: ne-resize;
        }

        .resizer-handle.bottom-left {
            bottom: -6px;
            left: -6px;
            cursor: sw-resize;
        }

        .resizer-handle.bottom-right {
            bottom: -6px;
            right: -6px;
            cursor: se-resize;
        }

        /* Colores personalizados para los encabezados según data-game */
        .sidebar-group .section-header {
            background: var(--group-bg, #1f1f23);
            border-color: var(--group-border, transparent);
        }

        .sidebar-group .section-header:hover {
            background: var(--group-hover, #26262c);
        }

        .section-header span:first-child {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .section-game-icon {
            height: 18px;
            width: auto;
            object-fit: contain;
        }

        /* Estilización del selector de juegos (Modal de Juegos) */
        .game-toggle-row {
            transition: all 0.2s ease;
            border: 1px solid transparent;
        }

        .game-toggle-row:hover {
            background: rgba(169, 112, 255, 0.1);
            border-color: rgba(169, 112, 255, 0.3);
            transform: translateX(5px);
        }

        .game-toggle-row span {
            letter-spacing: 0.5px;
            color: #efeff1;
        }

        .game-toggle-row input[type="checkbox"] {
            transition: transform 0.2s ease;
        }

        .game-toggle-row input[type="checkbox"]:hover {
            transform: scale(1.2);
        }

        /* ===== WELCOME SCREEN ===== */
        .welcome-screen {
            position: absolute;
            inset: 0;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            text-align: center;
            padding: 60px 20px;
            z-index: 5;
            background: radial-gradient(circle at center, rgba(145, 71, 255, 0.08) 0%, transparent 75%);
            pointer-events: none;
            overflow-y: auto;
            scrollbar-width: thin;
            scrollbar-color: rgba(145, 71, 255, 0.3) transparent;
            opacity: 0;
            transition: opacity 0.4s ease;
        }

        .welcome-screen.visible {
            opacity: 1;
            pointer-events: auto;
        }

        /* TIMELINE EVENTOS */
        .timeline-container {
            width: 90%;
            max-width: 1900px;
            margin-top: 0;
            background: rgba(14, 14, 16, 0.45);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            padding: 18px;
            backdrop-filter: blur(12px);
            opacity: 0;
            transform: translateY(15px);
            transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
        }

        .timeline-container:hover {
            border-color: rgba(145, 71, 255, 0.2);
            box-shadow: 0 10px 50px rgba(145, 71, 255, 0.05);
        }

        .welcome-screen.visible .timeline-container {
            opacity: 1;
            transform: translateY(0);
        }

        .timeline-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 10px;
        }

        .timeline-header span {
            font-size: 22px;
            font-weight: 500;
            color: #adadb8;
            letter-spacing: 2px;
        }

        .timeline-legend {
            gap: 5px;
        }

        .legend-item {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            font-weight: bold;
            color: #efeff1;
        }

        .legend-item::before {
            content: '';
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: var(--color);
            box-shadow: 0 0 6px var(--color);
        }

        .timeline-scroll {
            width: 100%;
            overflow-x: auto;
            padding: 20px 0;
            scrollbar-width: none;
            /* Firefox */
            touch-action: pan-y;
            -webkit-mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
            mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
        }

        .timeline-scroll::-webkit-scrollbar {
            display: none;
            /* Chrome/Safari */
        }

        .timeline-track {
            display: flex;
            flex-direction: column;
            gap: 12px;
            padding: 0 10px;
        }

        .timeline-row {
            display: flex;
            gap: 12px;
            align-items: stretch;
        }

        .timeline-row-header {
            width: 50px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 0 10px;
            height: auto;
            min-height: 105px;
            /* Match new card height */
        }

        .timeline-header-logo {
            width: 30px;
            height: 30px;
            object-fit: contain;
            filter: drop-shadow(0 0 5px var(--row-game-color));
        }

        .timeline-row-events {
            flex: 1;
            display: flex;
            gap: 12px;
            overflow-x: auto;
            padding-bottom: 8px;
            /* Extra spacing for thick scrollbars */
        }

        .timeline-row-events::-webkit-scrollbar {
            height: 6px;
        }

        .timeline-row-events::-webkit-scrollbar-track {
            background: rgba(255, 255, 255, 0.05);
            border-radius: 10px;
        }

        .timeline-row-events::-webkit-scrollbar-thumb {
            background: var(--row-game-color, var(--twitch-purple));
            border-radius: 10px;
            box-shadow: 0 0 5px var(--row-game-color);
        }

        .timeline-row-events {
            scrollbar-width: thin;
            scrollbar-color: var(--row-game-color, var(--twitch-purple)) rgba(255, 255, 255, 0.05);
        }

        .timeline-event {
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
            width: 160px;
            /* Could be auto depending on content, keep fixed for stability */
            height: auto;
            min-height: 105px;
            background: rgba(24, 24, 27, 0.6);
            border-left: 4px solid var(--game-color);
            padding: 10px;
            border-radius: 0 8px 8px 0;
            text-align: left;
            transition: all 0.3s ease;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .timeline-event.is-active {
            border: 2px solid var(--game-color);
            box-shadow: 0 0 15px rgba(var(--game-color-rgb), 0.3);
            background: #1e1e24;
            animation: pulse-active 2s infinite;
        }

        .timeline-event.has-links {
            transition: transform 0.2s, background 0.2s;
        }

        .timeline-event.has-links:hover {
            transform: translateY(-2px);
            background: #25252a;
        }

        @keyframes pulse-active {
            0% {
                box-shadow: 0 0 10px rgba(var(--game-color-rgb, 145, 71, 255), 0.2);
            }

            50% {
                box-shadow: 0 0 20px rgba(var(--game-color-rgb, 145, 71, 255), 0.4);
            }

            100% {
                box-shadow: 0 0 10px rgba(var(--game-color-rgb, 145, 71, 255), 0.2);
            }
        }

        .event-countdown {
            font-size: 10px;
            color: #adadb8;
            margin-top: auto;
            font-weight: bold;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        .event-countdown .countdown-icon {
            font-size: 10px;
            opacity: 0.7;
        }

        /* Custom Scrollbar for Timeline Modal */
        #timelineModal {
            scrollbar-width: thin !important;
            scrollbar-color: rgba(170, 67, 255, 0.4) transparent !important;
        }

        #timelineModal::-webkit-scrollbar {
            width: 6px;
        }

        #timelineModal::-webkit-scrollbar-track {
            background: transparent;
        }

        #timelineModal::-webkit-scrollbar-thumb {
            background: rgba(170, 67, 255, 0.4);
            border-radius: 10px;
        }

        .timeline-modal-scroll-custom {
            scrollbar-width: thin !important;
            scrollbar-color: rgba(170, 67, 255, 0.4) transparent !important;
        }

        .timeline-modal-scroll-custom::-webkit-scrollbar {
            height: 6px;
            width: 6px;
        }

        .timeline-modal-scroll-custom::-webkit-scrollbar-track {
            background: transparent;
        }

        .timeline-modal-scroll-custom::-webkit-scrollbar-thumb {
            background: rgba(170, 67, 255, 0.4);
            border-radius: 10px;
        }

        .live-badge {
            position: absolute;
            bottom: 10px;
            right: 10px;
            background: #ff4655;
            color: white;
            font-size: 8px;
            font-weight: 900;
            padding: 2px 6px;
            border-radius: 4px;
            letter-spacing: 1px;
            animation: blinker 1s linear infinite;
        }

        @keyframes blinker {
            50% {
                opacity: 0.5;
            }
        }

        .timeline-event:hover {
            background: rgba(30, 30, 35, 0.8);
            transform: translateY(-3px);
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
        }

        .timeline-event::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, var(--game-color), transparent);
            opacity: 0.05;
        }

        .event-date {
            font-size: 10px;
            color: #adadb8;
            margin-bottom: 4px;
            font-weight: 500;
        }

        .event-name {
            font-size: 13px;
            font-weight: 700;
            color: #efeff1;
            margin-bottom: 2px;
            line-height: 1.2;
            word-wrap: break-word;
            overflow-wrap: break-word;
            white-space: normal;
        }

        .event-tier {
            position: absolute;
            top: 8px;
            right: 8px;
            font-size: 8px;
            text-transform: uppercase;
            color: var(--game-color);
            font-weight: 800;
            letter-spacing: 0.5px;
        }

        .event-location {
            font-size: 10px;
            color: #adadb8;
            margin-top: 6px;
            display: flex;
            gap: 4px;
            align-items: center;
        }

        /* ===== LIVE SUGGESTIONS ===== */
        .suggestions-container {
            width: 90%;
            max-width: 1900px;
            margin-bottom: 25px;
            background: rgba(14, 14, 16, 0.5);
            border: 1px solid rgba(255, 78, 69, 0.25);
            border-radius: 12px;
            padding: 18px 20px;
            backdrop-filter: blur(12px);
            opacity: 0;
            transform: translateY(15px);
            transition: opacity 0.6s ease, transform 0.6s ease, height 0.4s ease, margin 0.4s ease, padding 0.4s ease;
            box-shadow: 0 8px 30px rgba(255, 78, 69, 0.08);
            min-height: 212px;
            /* Suficiente para el gato (130px) + cabecera + padding */
            display: block;
            position: relative;
            overflow: hidden;
        }

        .suggestions-container.suggestions-hidden {
            min-height: 0;
            height: 0;
            opacity: 0;
            margin-bottom: 0;
            padding-top: 0;
            padding-bottom: 0;
            border-width: 0;
            pointer-events: none;
        }

        .welcome-screen.visible .suggestions-container:not(.suggestions-hidden) {
            opacity: 1;
            transform: translateY(0);
        }

        .suggestions-header {
            font-size: 16px;
            font-weight: 800;
            letter-spacing: 2px;
            color: #ff4e45;
            text-transform: uppercase;
            margin-bottom: 14px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .suggestions-header::before {
            content: '';
            display: inline-block;
            width: 8px;
            height: 8px;
            background: #ff4e45;
            border-radius: 50%;
            animation: pulse 1.5s infinite;
            flex-shrink: 0;
        }

        .suggestions-loading {
            position: absolute;
            top: 60px;
            /* Debajo de la cabecera */
            left: 0;
            right: 0;
            bottom: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            transition: opacity 0.5s ease;
            z-index: 2;
        }

        .suggestions-loading.fade-out {
            opacity: 0;
            pointer-events: none;
        }

        .suggestions-cards {
            display: flex;
            flex-wrap: nowrap;
            gap: 10px;
            overflow-x: auto;
            padding-bottom: 10px;
            scrollbar-width: thin;
            scrollbar-color: rgba(255, 78, 69, 0.3) transparent;
            transition: opacity 0.5s ease;
            opacity: 0;
            margin-top: 5px;
            -webkit-mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
            mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
        }

        .suggestions-cards.fade-in {
            opacity: 1;
        }

        .suggestions-cards::-webkit-scrollbar {
            height: 4px;
        }

        .suggestions-cards::-webkit-scrollbar-track {
            background: transparent;
        }

        .suggestions-cards::-webkit-scrollbar-thumb {
            background: rgba(255, 78, 69, 0.3);
            border-radius: 10px;
        }

        .suggestion-card {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
            padding: 12px 14px;
            background: rgba(255, 78, 69, 0.06);
            border: 1px solid rgba(255, 78, 69, 0.18);
            border-radius: 10px;
            cursor: pointer;
            min-width: 110px;
            max-width: 150px;
            min-height: 132px;
            flex-shrink: 0;
            text-align: center;
            transition: all 0.2s ease;
            position: relative;
            overflow: hidden;
        }

        .suggestion-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: linear-gradient(135deg, rgba(255, 78, 69, 0.05) 0%, transparent 60%);
            pointer-events: none;
        }

        .suggestion-card:hover {
            background: rgba(255, 78, 69, 0.15);
            border-color: rgba(255, 78, 69, 0.5);
            transform: translateY(-3px);
            box-shadow: 0 8px 20px rgba(255, 78, 69, 0.2);
        }

        .suggestion-card:active {
            transform: translateY(-1px);
        }

        .suggestion-card.is-active {
            border-color: #bf94ff;
            background: rgba(170, 67, 255, 0.1);
            box-shadow: 0 0 15px rgba(191, 148, 255, 0.2);
        }

        .suggestion-shields-wrapper {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            min-height: 36px;
        }

        .suggestion-shield {
            width: 36px;
            height: 36px;
            object-fit: contain;
        }

        .suggestion-shield-x {
            font-size: 14px;
            font-weight: 900;
            color: #efeff1;
            opacity: 0.9;
        }

        .suggestion-label {
            font-size: 12px;
            font-weight: 800;
            color: #efeff1;
            line-height: 1.2;
            word-break: break-word;
        }

        .suggestion-twitch {
            font-size: 10px;
            color: #aa43ff;
            font-family: monospace;
        }

        .suggestion-meta {
            font-size: 9px;
            color: #666;
            line-height: 1.3;
            display: block;
            min-height: 24px;
        }

        .suggestion-live-dot {
            position: absolute;
            top: 7px;
            right: 7px;
            width: 7px;
            height: 7px;
            background: #ff4e45;
            border-radius: 50%;
            animation: pulse 1.5s infinite;
        }

        .suggestions-empty {
            color: #555;
            font-size: 13px;
            padding: 10px;
        }

        .suggestions-loading {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100px;
            width: 100%;
        }

        .suggestions-loading img {
            height: 130px;
            opacity: 0.8;
        }

        .welcome-screen h1 {
            font-size: 48px;
            font-weight: 800;
            color: #aa43ff;
            margin-bottom: 20px;
            text-transform: uppercase;
        }

        .welcome-screen p {
            max-width: 600px;
            font-size: 18px;
            color: #adadb8;
            line-height: 1.6;
            margin-bottom: 25px;
        }

        .welcome-logo {
            max-width: 400px;
            height: auto;
            margin-bottom: 30px;
        }

        .welcome-screen .social-buttons {
            margin-top: 20px;
        }

        /* ===== STREAMER MODE UI REFINEMENTS ===== */
        /* Ocultar botones solo si sus respectivas barras están plegadas */
        body.streamer-mode.sidebar-hidden .top-buttons,
        body.streamer-mode:not(.chat-visible) .top-right-btn {
            opacity: 0;
        }

        body.streamer-mode .top-buttons:hover,
        body.streamer-mode .top-right-btn:hover,
        body.streamer-mode.near-tl .top-buttons,
        body.streamer-mode.near-tr .top-right-btn {
            opacity: 1;
        }

        /* ===== SUPER FULLSCREEN MODE ===== */
        /* ===== SUPER FULLSCREEN MODE ===== */
        body.super-fullscreen .sidebar-wrapper,
        body.super-fullscreen .chat-sidebar,
        body.super-fullscreen .top-buttons,
        body.super-fullscreen .top-right-btn,
        body.super-fullscreen .desktop-live-toggle,
        body.super-fullscreen .mobile-top-bar {
            display: none !important;
        }

        /* Hide regular streams in super fullscreen */
        body.super-fullscreen .stream {
            display: none !important;
        }

        /* Show active super fullscreen stream */
        body.super-fullscreen .stream.sf-active {
            display: block !important;
            position: fixed !important;
            inset: 0 !important;
            z-index: 3100 !important;
            width: 100vw !important;
            height: 100vh !important;
            margin: 0 !important;
            padding: 0 !important;
            border: none !important;
            aspect-ratio: auto !important;
            transform: none !important;
            /* Ensure no rotation by default unless sf-rotated-mode is on */
        }

        /* Essential Reset: Parent containers with transforms/perspective break position: fixed */
        body.super-fullscreen #mainContainer,
        body.super-fullscreen #streams {
            transform: none !important;
            perspective: none !important;
            filter: none !important;
            overflow: visible !important;
            margin: 0 !important;
            padding: 0 !important;
        }

        /* Hide controls on the active stream */
        body.super-fullscreen .stream.sf-active .stream-actions {
            display: none !important;
        }

        #superFullscreenOverlay {
            /* Just a container for hints now */
            position: fixed;
            inset: 0;
            z-index: 3200;
            pointer-events: none;
            display: none;
        }

        #superFullscreenOverlay.active {
            display: block;
            pointer-events: none;
            /* Let events pass through to iframe */
        }

        #sfHints {
            display: none !important;
        }

        /* Mobile Super Fullscreen Controls */
        .sf-touch-zone {
            position: absolute;
            top: 0;
            bottom: 0;
            width: 20%;
            z-index: 3205;
            display: none;
            pointer-events: auto;
            /* Catch touch events here */
        }

        /* Fake landscape rotation for portraits: apply to body to catch the video and overlay */
        body.sf-rotated-mode #superFullscreenOverlay,
        body.sf-rotated-mode .stream.sf-active {
            position: fixed !important;
            inset: auto !important;
            margin: 0 !important;
            padding: 0 !important;
            box-sizing: border-box !important;
            overflow: hidden !important;
        }

        body.sf-rotated-mode .stream.sf-active {
            background: black !important;
            z-index: 3100 !important;
        }

        body.sf-rotated-mode #superFullscreenOverlay {
            background: transparent !important;
            z-index: 3200 !important;
            pointer-events: none;
        }

        body.sf-rotated-mode .stream.sf-active iframe {
            position: absolute !important;
            width: 100% !important;
            height: 100% !important;
            top: 0 !important;
            left: 0 !important;
            margin: 0 !important;
            padding: 0 !important;
            border: none !important;
            inset: auto !important;
        }

        /* Mobile Super Fullscreen Controls - Show on phones or small tablets (portrait or landscape) */
        @media (max-width: 1100px) {
            .sf-touch-zone {
                display: block;
            }

            body.super-fullscreen #sfExitBtnMobile {
                display: flex !important;
                position: fixed !important;
                top: 20px !important;
                left: 20px !important;
                width: 44px !important;
                height: 44px !important;
                background: #ff3b30 !important;
                color: white !important;
                border-radius: 6px !important;
                align-items: center !important;
                justify-content: center !important;
                font-weight: bold !important;
                font-size: 22px !important;
                z-index: 9999 !important;
                box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4) !important;
                border: 2px solid white !important;
                cursor: pointer !important;
                pointer-events: auto !important;
            }

            #sfHints {
                display: none !important;
                /* Hide keyboard hints on mobile */
            }
        }

        #sfExitBtnMobile {
            display: none;
        }

        .sf-touch-zone.left {
            left: 0;
        }

        .sf-touch-zone.right {
            right: 0;
        }

        /* Hide native fullscreen in Capacitor */
        body.is-capacitor #toggleFullscreen {
            display: none !important;
        }

        #sfHints.visible {
            opacity: 1;
        }

        .sf-hints-content {
            text-align: center;
            color: white;
            font-family: 'Bourgeois', sans-serif;
            transform: translateY(20px);
            transition: transform 0.5s ease;
        }

        #sfHints.visible .sf-hints-content {
            transform: translateY(0);
        }

        .sf-hint-icon {
            font-size: 48px;
            margin-bottom: 20px;
        }

        .sf-hints-content p {
            font-size: 24px;
            margin: 10px 0;
            opacity: 0.9;
        }

        /* ===== FIRST TIME MODAL ===== */
        .welcome-modal {
            max-width: 500px;
            background: #18181b;
            border: 1px solid #2a2a2d;
            border-radius: 20px;
            margin-left: 40px;
            margin-right: 40px;
            padding: 40px;
            text-align: center;
            box-shadow: 0 30px 90px rgba(0, 0, 0, 0.8);
            position: relative;
            overflow: hidden;
        }

        .welcome-modal::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(145, 71, 255, 0.1) 0%, transparent 60%);
            pointer-events: none;
        }

        .welcome-modal-logo {
            width: 300px;
            margin-bottom: 30px;
        }

        .welcome-tutorial-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
            text-align: left;
            margin: 30px 0;
        }

        .tutorial-item {
            display: flex;
            gap: 12px;
            align-items: flex-start;
        }

        .tutorial-icon {
            font-size: 20px;
        }

        .tutorial-text {
            font-size: 14px;
            color: #adadb8;
            line-height: 1.4;
        }

        .tutorial-text strong {
            color: #efeff1;
            display: block;
            margin-bottom: 2px;
        }

        .welcome-footer {
            margin-top: 30px;
            padding-top: 25px;
            border-top: 1px solid #2a2a2d;
        }

        .welcome-btn-start {
            background: #9147ff;
            color: white;
            border: none;
            padding: 14px 40px;
            font-size: 18px;
            font-weight: bold;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            font-family: 'Bourgeois', sans-serif;
            text-transform: uppercase;
            letter-spacing: 1px;
        }

        .welcome-btn-start:hover {
            background: #a970ff;
            transform: translateY(-2px);
            box-shadow: 0 10px 20px rgba(145, 71, 255, 0.3);
        }

        .welcome-beta-tag {
            display: inline-block;
            position: absolute;
            top: 15px;
            right: 15px;
            background: #eb0400;
            color: white;
            padding: 3px 10px;
            font-size: 11px;
            font-weight: 800;
            border-radius: 4px;
            margin-bottom: 15px;
        }

        @media (max-width: 600px) {
            .welcome-modal {
                padding: 30px 20px;
                width: 95vw;
            }

            .welcome-tutorial-grid {
                grid-template-columns: 1fr;
                gap: 15px;
            }

            .welcome-modal-logo {
                width: 220px;
            }
        }
    
/* ===== EXTRAÍDO DE index.html ===== */

        .dropdown-header {
            font-size: 12px;
            color: #adadb8;
            text-transform: uppercase;
            letter-spacing: 1px;
            padding: 8px 12px 4px;
            margin-top: 10px;
            border-bottom: 1px solid #2a2a2d;
            margin-bottom: 5px;
            font-weight: bold;
        }

        .dropdown-header:first-child {
            margin-top: 0;
        }

        .item-link-container {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 2px 0;
            border-bottom: 1px solid #202024;
            transition: background 0.2s;
        }

        .item-link-container:hover {
            background: #2a2a2d;
        }

        .item-link-content {
            flex: 1;
            padding: 8px 12px;
            font-size: 13px;
            color: #efeff1;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .btn-fav-ctx {
            background: transparent;
            border: none;
            color: #555;
            font-size: 16px;
            cursor: pointer;
            padding: 8px 12px;
            transition: color 0.2s, transform 0.2s;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .btn-fav-ctx:hover {
            color: #f7bc19;
            transform: scale(1.2);
        }

        .btn-fav-ctx.active {
            color: #f7bc19;
            text-shadow: 0 0 8px rgba(247, 188, 25, 0.4);
        }

        /* Selective Dimming for Sidebar */
        body.is-highlighting .sidebar-group:not(.highlighted-now) {
            opacity: 0.6;
            filter: grayscale(0.5);
            pointer-events: none;
        }

        body.is-highlighting .sidebar-logo,
        body.is-highlighting .layout-control,
        body.is-highlighting .sidebar-footer {
            opacity: 0.3;
            pointer-events: none;
        }

        body.is-highlighting #mainContainer {
            opacity: 0.5;
            filter: blur(1px);
            pointer-events: none;
        }

        @keyframes highlight-pop {
            0% {
                transform: scale(1.03);
            }

            50% {
                transform: scale(1.07);
            }

            100% {
                transform: scale(1.05);
            }
        }

        .sidebar-group.highlighted-now {
            animation: highlight-pop 0.5s ease forwards;
        }
    