#discord-ui {
            display: none !important;
        }

body.theme-discord #discord-ui {
            display: grid !important;
            grid-template-columns: 72px 240px 1fr 240px;
            grid-template-rows: 1fr;
            /* FORZATURA ALTEZZA: impedisce il collasso */
            height: 100vh;
            width: 100vw;
            overflow: hidden;
        }

body.theme-discord .chat-bubble-btn {
            display: none !important;
        }

/* =========================================================
           🎮 TEMA DISCORD
           ========================================================= */
        body.theme-discord {
            --bg-tertiary: #1E1F22;
            --bg-secondary: #2B2D31;
            --bg-primary: #313338;
            --bg-message-hover: #2E3035;
            --bg-modifier-hover: #35373C;
            --bg-modifier-active: #404249;
            --text-normal: #DBDEE1;
            --text-muted: #949BA4;
            --text-bright: #F2F3F5;
            --brand: #5865F2;
            --green: #23A559;
            --red: #DA373C;
            --channel-icon: #80848E;
            background-color: var(--bg-primary);
            color: var(--text-normal);
            font-family: 'gg sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
        }

/* Server Bar */
        body.theme-discord .discord-servers {
            background: var(--bg-tertiary);
            display: flex;
            flex-direction: column;
            align-items: center;
            padding-top: 12px;
            gap: 8px;
        }

body.theme-discord .server-icon {
            width: 48px;
            height: 48px;
            border-radius: 24px;
            background: var(--bg-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            cursor: pointer;
            transition: 0.2s;
            color: var(--text-normal);
            position: relative;
        }

body.theme-discord .server-icon:hover {
            border-radius: 16px;
            background: var(--brand);
            color: #fff;
        }

body.theme-discord .server-icon.active {
            border-radius: 16px;
            background: var(--brand);
            color: #fff;
        }

body.theme-discord .server-icon.active::before {
            content: "";
            position: absolute;
            left: -12px;
            top: 8px;
            bottom: 8px;
            width: 4px;
            background: #fff;
            border-radius: 0 4px 4px 0;
        }

body.theme-discord .server-separator {
            width: 32px;
            height: 2px;
            background: #35363C;
            border-radius: 1px;
            margin: 4px 0;
        }

/* Left Sidebar Wrappers for Desktop */
        body.theme-discord .discord-left-drawer {
            display: contents;
            /* Desktop grid behavior */
        }

/* Left Sidebar (Timer/Channels) */
        body.theme-discord .discord-sidebar {
            background: var(--bg-secondary);
            display: flex;
            flex-direction: column;
            border-top-left-radius: 8px;
        }

body.theme-discord .discord-sidebar-header {
            height: 48px;
            padding: 0 16px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid #1F2023;
            font-weight: 600;
            color: var(--text-bright);
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
            cursor: pointer;
            transition: 0.2s;
        }

body.theme-discord .discord-sidebar-header:hover {
            background: var(--bg-modifier-hover);
        }

body.theme-discord .discord-sidebar-content {
            flex: 1;
            overflow-y: auto;
            padding: 12px 8px;
        }

body.theme-discord .discord-sidebar-content::-webkit-scrollbar {
            width: 4px;
        }

body.theme-discord .discord-sidebar-content::-webkit-scrollbar-thumb {
            background: #1A1B1E;
            border-radius: 4px;
        }

body.theme-discord .discord-timer-box {
            background: var(--bg-tertiary);
            border-radius: 8px;
            padding: 16px;
            margin-bottom: 16px;
            text-align: center;
        }

body.theme-discord .discord-timer-display {
            font-weight: 700;
            color: var(--text-bright);
            font-family: 'JetBrains Mono', monospace;
            line-height: 1;
        }

body.theme-discord .discord-timer-mode {
            font-size: 12px;
            font-weight: 600;
            color: var(--brand);
            text-transform: uppercase;
            margin-top: 4px;
            letter-spacing: 1px;
        }

body.theme-discord .discord-controls {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
            margin-top: 12px;
        }

body.theme-discord .discord-btn {
            background: var(--brand);
            color: white;
            border: none;
            padding: 8px;
            border-radius: 4px;
            font-weight: 500;
            cursor: pointer;
            transition: 0.2s;
            font-size: 13px;
        }

body.theme-discord .discord-btn:hover {
            background: #4752C4;
        }

body.theme-discord .discord-btn.start-btn {
            grid-column: span 2;
            padding: 12px;
            font-size: 15px;
            font-weight: bold;
        }

body.theme-discord .discord-btn.start-btn.paused {
            background: var(--bg-modifier-active);
            color: var(--text-normal);
        }

body.theme-discord .discord-btn.secondary {
            background: var(--bg-modifier-active);
            color: var(--text-normal);
        }

body.theme-discord .discord-btn.secondary:hover {
            background: #4E5058;
        }

body.theme-discord .discord-channel-category {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            margin: 16px 0 4px 8px;
            display: flex;
            align-items: center;
            gap: 4px;
        }

body.theme-discord .discord-channel-category::before {
            content: "▼";
            font-size: 8px;
        }

body.theme-discord .discord-channel {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 8px;
            border-radius: 4px;
            color: var(--text-muted);
            cursor: pointer;
            margin-bottom: 2px;
            font-size: 15px;
            font-weight: 500;
            border: none;
            background: transparent;
            width: 100%;
            text-align: left;
        }

body.theme-discord .discord-channel:hover {
            background: var(--bg-modifier-hover);
            color: var(--text-normal);
        }

body.theme-discord .discord-channel.active {
            background: var(--bg-modifier-active);
            color: var(--text-bright);
        }

body.theme-discord .discord-channel .hash {
            color: var(--channel-icon);
            font-size: 18px;
            font-weight: 400;
            margin-right: 2px;
        }

body.theme-discord .discord-tracker {
            margin-top: 20px;
            padding: 12px;
            background: var(--bg-tertiary);
            border-radius: 8px;
            font-size: 12px;
            color: var(--text-muted);
            text-align: center;
        }

body.theme-discord .discord-leds {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin-top: 8px;
        }

body.theme-discord .cycle-led {
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: #404249;
            border: none;
            box-shadow: none;
        }

body.theme-discord .cycle-led.on {
            background: var(--green);
            box-shadow: 0 0 8px rgba(35, 165, 89, 0.4);
        }

body.theme-discord .discord-user-panel {
            background: #232428;
            height: 52px;
            display: flex;
            align-items: center;
            padding: 0 8px;
            gap: 8px;
            flex-shrink: 0;
        }

body.theme-discord .discord-my-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--bg-primary);
            position: relative;
        }

body.theme-discord .discord-my-avatar img {
            width: 100%;
            height: 100%;
            border-radius: 50%;
        }

body.theme-discord .discord-my-status {
            position: absolute;
            bottom: -2px;
            right: -2px;
            width: 10px;
            height: 10px;
            background: var(--green);
            border-radius: 50%;
            border: 2px solid #232428;
        }

body.theme-discord .discord-user-details {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            justify-content: center;
            cursor: pointer;
        }

body.theme-discord .discord-username {
            font-size: 14px;
            font-weight: 600;
            color: var(--text-bright);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.2;
            border: none;
            background: transparent;
            padding: 0;
            text-align: left;
        }

body.theme-discord .discord-status-text {
            font-size: 12px;
            color: var(--text-muted);
            line-height: 1.2;
        }

body.theme-discord .discord-user-actions {
            display: flex;
            gap: 4px;
        }

body.theme-discord .discord-action-btn {
            width: 32px;
            height: 32px;
            border-radius: 4px;
            background: transparent;
            border: none;
            color: var(--text-normal);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: 0.2s;
        }

body.theme-discord .discord-action-btn:hover {
            background: var(--bg-modifier-hover);
        }

/* Main Chat */
        body.theme-discord .discord-chat {
            background: var(--bg-primary);
            display: flex;
            flex-direction: column;
            min-width: 0;
            min-height: 0;
        }

body.theme-discord .discord-chat-header {
            height: 48px;
            border-bottom: 1px solid #2B2D31;
            padding: 0 16px;
            display: flex;
            align-items: center;
            gap: 8px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
            flex-shrink: 0;
        }

body.theme-discord .discord-chat-header .hash {
            color: var(--channel-icon);
            font-size: 24px;
            font-weight: 300;
        }

body.theme-discord .discord-chat-title {
            font-size: 16px;
            font-weight: 600;
            color: var(--text-bright);
            text-transform: lowercase;
        }

body.theme-discord .discord-chat-desc {
            font-size: 14px;
            font-weight: 500;
            color: var(--text-muted);
            margin-left: 8px;
            border-left: 1px solid #404249;
            padding-left: 12px;
        }

body.theme-discord .discord-messages {
            flex: 1 1 0%;
            min-height: 0;
            overflow-y: auto;
            padding: 16px 0;
            display: flex;
            flex-direction: column;
            scrollbar-width: thin;
            scrollbar-color: #1A1B1E transparent;
        }

body.theme-discord .discord-messages::-webkit-scrollbar {
            width: 8px;
        }

body.theme-discord .discord-messages::-webkit-scrollbar-thumb {
            background: #1A1B1E;
            border-radius: 4px;
        }

/* DISCORD MSG OVERRIDES */
        body.theme-discord .msg {
            flex-direction: row;
            align-items: flex-start;
            max-width: 100%;
            margin-top: 17px;
            padding: 2px 16px;
            gap: 16px;
        }

body.theme-discord .msg:hover {
            background-color: var(--bg-message-hover);
        }

body.theme-discord .msg-avatar-wrapper {
            display: block;
            width: 40px;
            height: 40px;
            flex-shrink: 0;
            border-radius: 50%;
            overflow: hidden;
            background: var(--bg-tertiary);
            cursor: pointer;
        }

body.theme-discord .msg-avatar {
            width: 100%;
            height: 100%;
        }

body.theme-discord .msg-content-wrapper {
            flex: 1;
            min-width: 0;
            align-items: flex-start !important;
        }

body.theme-discord .msg-header {
            display: flex;
            gap: 8px;
            align-items: baseline;
            margin-bottom: 4px;
        }

body.theme-discord .msg-name {
            font-size: 16px;
            font-weight: 500;
            color: var(--text-bright);
            display: inline-block !important;
            cursor: pointer;
        }

body.theme-discord .msg-name:hover {
            text-decoration: underline;
        }

body.theme-discord .msg-time {
            font-size: 12px;
            font-weight: 400;
            color: var(--text-muted);
            font-family: inherit;
        }

body.theme-discord .msg-bubble {
            background: transparent;
            border: none;
            padding: 0;
            color: var(--text-normal);
            font-size: 15px;
            box-shadow: none;
            border-radius: 0;
            line-height: 1.375rem;
            text-shadow: none;
            white-space: pre-wrap; /* NUOVO: preserva spazi e a capo */
        }

body.theme-discord .discord-chat-input-wrapper {
            padding: 0 16px 24px 16px;
            flex-shrink: 0;
        }

body.theme-discord .discord-chat-input {
            background: #383A40;
            border-radius: 8px;
            display: flex;
            align-items: center;
            padding: 0 16px;
            gap: 12px;
            min-height: 44px;
        }

body.theme-discord .discord-attach-btn {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: var(--text-muted);
            color: #383A40;
            border: none;
            font-size: 18px;
            font-weight: bold;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: 0.2s;
            flex-shrink: 0;
        }

body.theme-discord .discord-attach-btn:hover {
            background: var(--text-normal);
        }

body.theme-discord .discord-chat-input textarea {
            flex: 1;
            background: transparent;
            border: none;
            color: var(--text-normal);
            font-size: 15px;
            outline: none;
            padding: 12px 0;
            resize: none;
            overflow: hidden;
            font-family: inherit;
            line-height: 1.375rem;
        }

body.theme-discord .discord-chat-input textarea::placeholder {
            color: #80848E;
        }

/* Members Sidebar */
        body.theme-discord .discord-members-sidebar {
            background: var(--bg-secondary);
            display: flex;
            flex-direction: column;
            flex-shrink: 0;
        }

body.theme-discord .discord-members-header {
            font-size: 12px;
            font-weight: 600;
            color: var(--text-muted);
            padding: 24px 16px 8px 16px;
        }

body.theme-discord .discord-members-list {
            flex: 1;
            overflow-y: auto;
            padding: 0 8px;
        }

body.theme-discord .discord-members-list::-webkit-scrollbar {
            width: 4px;
        }

body.theme-discord .discord-members-list::-webkit-scrollbar-thumb {
            background: #1A1B1E;
            border-radius: 4px;
        }

/* DISCORD ONLINE USERS OVERRIDE */
        body.theme-discord .classic-dot {
            display: none;
        }

body.theme-discord .user-pill {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 6px 8px;
            border-radius: 4px;
            background: transparent;
            border: none;
            box-shadow: none;
            color: var(--text-muted);
            margin-bottom: 2px;
            width: 100%;
            cursor: pointer;
        }

body.theme-discord .user-pill:hover {
            background: var(--bg-modifier-hover);
            color: var(--text-bright);
        }

body.theme-discord .user-pill-avatar-wrapper {
            display: block;
            position: relative;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            flex-shrink: 0;
            background: var(--bg-tertiary);
        }

body.theme-discord .user-pill-avatar {
            width: 100%;
            height: 100%;
            border-radius: 50%;
        }

body.theme-discord .user-pill-avatar-wrapper .status-dot {
            position: absolute;
            bottom: -2px;
            right: -2px;
            border: 3px solid var(--bg-secondary);
            width: 14px;
            height: 14px;
            background: var(--green);
            border-radius: 50%;
            z-index: 2;
            box-shadow: none;
        }

body.theme-discord .user-pill-name {
            font-size: 15px;
            font-weight: 500;
        }

body.theme-discord .alert-box .theme-opt.active {
            box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
        }

body.theme-discord .alert-box .preset-btn.active {
            box-shadow: 0 0 0 2px rgba(88, 101, 242, 0.3);
        }

/* Adattamento Tema Discord */
        body.theme-discord .scroll-bottom-btn {
            background: var(--bg-modifier-active);
            border: none;
            color: var(--text-normal);
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

body.theme-discord .scroll-bottom-btn:hover {
            background: #4E5058;
            color: var(--text-bright);
        }
