                :root {
                    --bg-0: #373737;
                    --bg-1: #202020;
                    --surface-0: #1f1f1ff1;
                    --surface-1: #1f1f1ff1;
                    --border-soft: rgba(255, 255, 255, 0.08);
                    --text-main: #edf1ff;
                    --text-muted: #f3f3f3;
                    --brand-twitch: #584c4c; /*outline*/
                    --brand-discord: #000000;
                    --bs-border-radius: 4px;
                    --bs-border-radius-sm: 4px;
                    --bs-border-radius-lg: 4px;
                    --bs-border-radius-xl: 4px;
                    --bs-border-radius-xxl: 4px;
                    --bs-border-radius-pill: 4px;
                    --bs-body-bg: transparent;
                    --navbar-offset: 92px;
                }

                input[type="range"] {
                    border-radius: initial;
                }

                html {
                    height: 100%;
                    overflow-x: hidden;
                    overflow-y: scroll;
                    scrollbar-gutter: stable;
                    background:
                        radial-gradient(900px 500px at -5% -20%, rgba(35, 35, 35, 0.84), transparent 55%),
                        radial-gradient(800px 450px at 120% 0%, rgba(7, 5, 9, 0.83), transparent 60%),
                        linear-gradient(170deg, var(--bg-0), var(--bg-1));
                    background-attachment: fixed;
                }
                body {
                    box-sizing: border-box;
                    color: var(--text-main);
                    min-height: 100%;
                    height: auto;
                    font-family: 'Segoe UI', 'Inter', sans-serif;
                    padding-top: var(--navbar-offset);
                    overflow-x: hidden;
                    display: flex;
                    flex-direction: column;
                }
                body.no-navbar {
                    --navbar-offset: 0px;
                }
                .container-fluid {
                    overflow-x: hidden;
                    flex: 1 0 auto;
                    display: flex;
                    flex-direction: column;
                    min-height: calc(100vh - var(--navbar-offset));
                }
                footer {
                    margin-top: auto !important;
                    flex-shrink: 0;
                    width: 100%;
                }

                .bg-custom-navbar {
                    background: linear-gradient(135deg, rgba(37, 44, 69, 0.95), rgba(27, 31, 49, 0.98));
                    border-bottom: 1px solid var(--border-soft);
                    backdrop-filter: blur(8px);
                }

                .navbar-brand {
                    font-size: 0.95rem !important;
                }

                .hero-panel {
                    background: linear-gradient(145deg, rgba(30, 37, 58, 0.88), rgba(20, 25, 41, 0.9));
                    border: 1px solid var(--border-soft);
                    backdrop-filter: blur(5px);
                }

                .card {
                    background: linear-gradient(160deg, var(--surface-0), var(--surface-1));
                    border-top: 4px solid var(--brand-twitch);
                    border: 1px solid var(--border-soft);
                    transition: transform 0.18s ease, border-color 0.18s ease;
                }

                .card:hover {
                    transform: translateY(-0.2px);
                    border-color: rgba(117, 53, 235, 0.35);
                }

                .table th {
                    color: var(--text-muted);
                    font-size: 0.78rem;
                    text-transform: uppercase;
                    letter-spacing: 0.06em;
                }

                .table-dark {
                    --bs-table-bg: transparent;
                }

                .table-hover > tbody > tr:hover > * {
                    color: var(--text-main);
                    background-color: rgba(255, 255, 255, 0.03);
                }

                .highlight-user {
                    background-color: rgba(143, 83, 255, 0.12) !important;
                    font-weight: bold;
                    border-left: 4px solid var(--brand-twitch);
                }

                .text-twitch { color: var(--brand-twitch); }
                .text-discord { color: var(--brand-discord); }

                .btn {
                    border-radius: 4px;
                    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
                }

                .btn:hover {
                    transform: translateY(-1px);
                    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.25);
                }

                .btn-twitch { background-color: var(--brand-twitch); color: white; }
                .btn-twitch:hover { background-color: #7a3ffc; color: white; }
                .btn-discord { background-color: var(--brand-discord); color: white; }
                .btn-discord:hover { background-color: #5768f3; color: white; }

                .nav-tabs {
                    border: 1px solid var(--border-soft);
                    border-radius: 4px;
                    padding: 0.4rem;
                    background: rgba(19, 25, 40, 0.72);
                    backdrop-filter: blur(6px);
                }

                .nav-tabs .nav-link {
                    border-radius: 4px;
                    border: 0;
                }

                .navbar-tab-nav {
                    border: 1px solid var(--border-soft);
                    border-radius: 4px;
                    padding: 0.01rem;
                    background: rgba(19, 25, 40, 0.72);
                    backdrop-filter: blur(6px);
                    gap: 0.2rem;
                }

                .navbar-tab-nav .nav-link {
                    border-radius: 4px;
                }

                .navbar-tab-nav .nav-link.active {
                    background-color: var(--brand-twitch);
                }

                .badge {
                    border-radius: 4px;
                }

                .settings-accordion .accordion-item {
                    background: rgba(15, 19, 32, 0.65);
                    border: 1px solid var(--border-soft);
                    border-radius: 4px !important;
                    overflow: hidden;
                    margin-bottom: 0.6rem;
                }

                .settings-accordion .accordion-item:last-child {
                    margin-bottom: 0;
                }

                .settings-accordion .accordion-button {
                    background: transparent;
                    color: var(--text-main);
                    font-weight: 700;
                    font-size: 0.92rem;
                    padding: 0.85rem 1rem;
                    box-shadow: none;
                }

                .settings-accordion .accordion-button:not(.collapsed) {
                    background: rgba(143, 83, 255, 0.1);
                    color: var(--text-main);
                    box-shadow: inset 0 -1px 0 var(--border-soft);
                }

                .settings-accordion .accordion-button:focus {
                    box-shadow: none;
                    border-color: transparent;
                }

                .settings-accordion .accordion-button::after {
                    filter: invert(1) brightness(1.8);
                }

                .settings-accordion .accordion-body {
                    background: rgba(9, 11, 19, 0.4);
                    padding: 1rem;
                }

                .setting-card {
                    background: rgba(53, 53, 53, 0.93);
                    border: 1px solid var(--border-soft);
                    border-radius: 5px;
                    overflow: hidden;
                    height: 100%;
                }
                .setting-card-compact {
                    min-height: 110px;
                    cursor: pointer;
                    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
                }
                .setting-card-compact:hover {
                    transform: translateY(-2px);
                    border-color: rgba(143, 83, 255, 0.45);
                    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
                }
                .setting-modal .modal-content {
                    background: #222222;
                    border: 1px solid var(--border-soft);
                    color: var(--text-main);
                }
                .setting-modal .modal-header {
                    border-bottom: 1px solid var(--border-soft);
                }
                .setting-modal .modal-footer {
                    border-top: 1px solid var(--border-soft);
                }
                body:has(.setting-modal.show) .modal-backdrop {
                    backdrop-filter: blur(16px);
                    -webkit-backdrop-filter: blur(16px);
                }
                .setting-cards-row .setting-card-compact .setting-card-body {
                    display: none;
                }
                .setting-cards-row .setting-card-compact {
                    display: flex;
                    flex-direction: column;
                    align-items: center;
                    justify-content: center;
                    text-align: center;
                    padding: 0.5rem;
                    position: relative;
                }
                .setting-cards-row .setting-card-compact .setting-card-header {
                    box-shadow: none;
                    flex-direction: column;
                    gap: 0.35rem;
                    padding: 0.6rem;
                    font-size: 0.88rem;
                }
                .setting-card-quick-toggles {
                    width: 100%;
                    display: flex;
                    flex-direction: column;
                    gap: 0.3rem;
                    padding: 0 0.7rem 0.6rem;
                    cursor: default;
                }
                .setting-card-quick-toggles .form-check-label {
                    color: #9ca3af;
                    font-size: 0.72rem;
                    cursor: pointer;
                }
                .setting-card-quick-toggles .form-check-input {
                    cursor: pointer;
                }
                .setting-cards-row {
                    overflow: hidden;
                }
                .module-card-icon {
                    width: 38px;
                    height: 38px;
                    object-fit: contain;
                }
                .module-quick-toggle {
                    position: absolute;
                    top: 0.5rem;
                    right: 0.5rem;
                    z-index: 2;
                    background: transparent;
                    border: none;
                    color: #666;
                    font-size: 1.4rem;
                    line-height: 1;
                    padding: 0;
                    cursor: pointer;
                    transition: color 0.2s ease, transform 0.2s ease;
                }
                .module-quick-toggle:hover {
                    color: #9ca3af;
                    transform: scale(1.08);
                }
                .module-quick-toggle.aktiv {
                    color: #22c55e;
                }
                .module-quick-toggle.aktiv:hover {
                    color: #16a34a;
                }
                .module-quick-toggle:disabled {
                    opacity: 0.5;
                    cursor: default;
                    transform: none;
                }
                .tab-content .row {
                    overflow-x: hidden;
                    margin-left: 0;
                    margin-right: 0;
                }
                .setting-modal .modal-body,
                .chat-timer-card-body,
                .setting-card-body {
                    scrollbar-width: none;
                    -ms-overflow-style: none;
                }
                body.modal-open {
                    overflow: visible !important;
                    padding-right: 0 !important;
                }
                .setting-modal .modal-body::-webkit-scrollbar,
                .chat-timer-card-body::-webkit-scrollbar,
                .setting-card-body::-webkit-scrollbar {
                    display: none;
                }

                .setting-card-header {
                    padding: 0.85rem 1rem;
                    font-weight: 700;
                    font-size: 0.92rem;
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    gap: 0.5rem;
                    box-shadow: inset 0 -1px 0 var(--border-soft);
                }

                .setting-card-body {
                    background: rgba(9, 11, 19, 0.4);
                    padding: 1rem;
                }

                .chat-timer-card-body {
                    max-height: 520px;
                    overflow-y: auto;
                }

                .live-chat-box {
                    height: 480px;
                    overflow-y: auto;
                    background: rgba(9, 11, 19, 0.5);
                    border: 1px solid var(--border-soft);
                    border-radius: 4px;
                    padding: 0.75rem;
                    display: flex;
                    flex-direction: column;
                    gap: 0.5rem;
                }

                .live-chat-msg {
                    font-size: 0.88rem;
                    line-height: 1.4;
                    padding-bottom: 0.5rem;
                    border-bottom: 1px solid var(--border-soft);
                }

                .live-chat-msg:last-child {
                    border-bottom: none;
                    padding-bottom: 0;
                }

                .live-chat-msg .live-chat-name {
                    color: var(--brand-twitch);
                    font-weight: 700;
                }

                .live-chat-msg .live-chat-translation {
                    display: block;
                    margin-top: 0.25rem;
                    color: #6ee7a8;
                    font-style: italic;
                }

                .avatar-slot-preview {
                    width: 100%;
                    height: 90px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    background: rgba(0, 0, 0, 0.3);
                    border-radius: 4px;
                    overflow: hidden;
                }

                .avatar-slot-preview img {
                    max-width: 100%;
                    max-height: 100%;
                    object-fit: contain;
                }

                .avatar-upload-btn {
                    cursor: pointer;
                }

                .format-hint code {
                    color: var(--brand-twitch);
                    background: rgba(143, 83, 255, 0.1);
                    padding: 0.1rem 0.35rem;
                    border-radius: 4px;
                }

                .footer-link {
                    color: var(--text-muted);
                    text-decoration: none;
                }

                .footer-link:hover {
                    color: var(--text-main);
                    text-decoration: underline;
                }

                .site-gallery-image {
                    cursor: zoom-in;
                }

                .site-image-lightbox {
                    display: none;
                    position: fixed;
                    inset: 0;
                    z-index: 1050;
                    align-items: center;
                    justify-content: center;
                    padding: 4rem 2rem 2rem;
                    background: rgba(0, 0, 0, 0.88);
                }

                .site-image-lightbox.is-open {
                    display: flex;
                }

                .site-image-lightbox img {
                    max-width: min(1100px, 95vw);
                    max-height: 85vh;
                    object-fit: contain;
                    border-radius: 4px;
                    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.55);
                }

                .site-image-lightbox-close {
                    position: absolute;
                    top: 1rem;
                    right: 1.25rem;
                    width: 2.75rem;
                    height: 2.75rem;
                    border: 1px solid rgba(255, 255, 255, 0.35);
                    border-radius: 50%;
                    background: rgba(0, 0, 0, 0.55);
                    color: #fff;
                    font-size: 2rem;
                    line-height: 1;
                    cursor: pointer;
                }

                .site-image-lightbox-close:hover {
                    background: var(--brand-twitch);
                }

                @media (max-width: 768px) {
                    html { background-attachment: scroll; }
                    .navbar-brand { font-size: 1.15rem !important; }
                }

                .dashboard-content-col {
                    padding-top: 1.25rem;
                }
                .sidebar-panel {
                    position: sticky;
                    top: 0;
                    height: 100vh;
                    z-index: 20;
                    display: flex;
                    flex-direction: column;
                    overflow-y: auto;
                    background: rgba(24, 24, 24, 0.88);
                    border: 1px solid var(--border-soft);
                    border-radius: 4px;
                    backdrop-filter: blur(8px);
                    align-self: flex-start;
                }

                .sidebar-header {
                    padding: 1rem 0.75rem;
                    border-bottom: 1px solid var(--border-soft);
                    flex-shrink: 0;
                }

                .sidebar-icon-btn {
                    display: inline-flex;
                    align-items: center;
                    justify-content: center;
                    padding: 0.1rem;
                    width: 1.2rem;
                    height: 1.9rem;
                    font-size: 0.95rem;
                    line-height: 1;
                    border: none;
                }

                .sidebar-icon-btn.btn-outline-secondary:hover,
                .sidebar-icon-btn.btn-outline-danger:hover {
                    background-color: transparent !important;
                    box-shadow: none;
                    transform: none;
                }

                .nav-subitem {
                    overflow: hidden;
                    max-height: 0;
                    opacity: 0;
                    margin-bottom: 0 !important;
                    transition: max-height 0.22s ease, opacity 0.18s ease, margin-bottom 0.2s ease;
                }

                .nav-subitem.offen {
                    max-height: 2.5rem;
                    opacity: 1;
                    margin-bottom: 0.4rem !important;
                }

                .sidebar-header .sidebar-view-tabs a {
                    font-size: 0.68rem;
                    padding: 0.25rem 0.5rem;
                }

                .page-subnav {
                    display: flex;
                    flex-wrap: wrap;
                    padding: 0.75rem;
                    flex: 1 1 auto;
                }

                .page-subnav > .nav-item {
                    margin-bottom: 0.4rem;
                }

.page-subnav .nav-link {
                    color: var(--text-muted);
                    font-weight: 700;
                    font-size: 0.85rem;
                    padding: 0.5rem 1rem;
                    border-radius: 4px;
                    border: 1px solid transparent;
                    background-color: transparent;
                    transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
                }

                .page-subnav .nav-link:hover {
                    color: var(--text-main);
                    border-color: var(--border-soft);
                }

                .page-subnav .nav-link.active {
                    color: var(--text-main);
                    background-color: var(--brand-twitch);
                    border-color: var(--brand-twitch);
                }

                .kanalpunkte-sound-box {
                    width: 160px;
                    background-color: var(--surface-0);
                    border: 1px solid var(--border-soft);
                    border-radius: 6px;
                    padding: 8px;
                    display: flex;
                    flex-direction: column;
                    gap: 4px;
                }

                .kanalpunkte-sound-box-top {
                    display: flex;
                    align-items: center;
                    gap: 6px;
                }

                .kanalpunkte-sound-play-btn {
                    flex-shrink: 0;
                    width: 24px;
                    height: 24px;
                    border-radius: 50%;
                    border: 1px solid var(--border-soft);
                    background-color: var(--surface-1);
                    color: var(--text-main);
                    font-size: 0.65rem;
                    line-height: 1;
                    cursor: pointer;
                }

                .kanalpunkte-sound-play-btn:hover {
                    background-color: var(--brand-twitch);
                }

                .jumpscare-vorlage-box {
                    width: 220px;
                    background-color: var(--surface-0);
                    border: 1px solid var(--border-soft);
                    border-radius: 6px;
                    padding: 8px;
                }

                .jumpscare-vorlage-video {
                    width: 100%;
                    max-height: 140px;
                    border-radius: 4px;
                    background-color: #000;
                }

                .spielaktionen-spiel-thumb {
                    flex-shrink: 0;
                    width: 30px;
                    height: 40px;
                    object-fit: cover;
                    border-radius: 3px;
                }

                .kanalpunkte-sound-box-name {
                    flex: 1;
                    min-width: 0;
                    font-size: 0.8rem;
                    font-weight: 600;
                    color: var(--text-main);
                }

                .kanalpunkte-sound-delete-btn {
                    flex-shrink: 0;
                    background: none;
                    border: none;
                    color: #ff6b6b;
                    font-size: 1rem;
                    line-height: 1;
                    cursor: pointer;
                    padding: 0 2px;
                }

                .kanalpunkte-sound-box-meta {
                    font-size: 0.7rem;
                }

                .kanalpunkte-sound-add-box {
                    width: 60px;
                    height: 60px;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    font-size: 1.5rem;
                    background-color: transparent;
                    border: 1px dashed var(--border-soft);
                    border-radius: 6px;
                    color: var(--text-muted);
                    cursor: pointer;
                }

                .kanalpunkte-sound-add-box:hover {
                    background-color: var(--surface-0);
                    color: var(--text-main);
                }

                .kanalpunkte-sound-search-result {
                    width: 150px;
                    padding: 6px 8px;
                    border: 1px solid var(--border-soft);
                    border-radius: 6px;
                    cursor: pointer;
                    font-size: 0.75rem;
                    display: flex;
                    align-items: center;
                    gap: 6px;
                    background-color: var(--surface-0);
                }

                .kanalpunkte-sound-search-result .kanalpunkte-sound-search-result-titel {
                    flex: 1;
                    min-width: 0;
                    overflow: hidden;
                    text-overflow: ellipsis;
                    white-space: nowrap;
                }

                .kanalpunkte-sound-search-result.selected {
                    border-color: #f5c518;
                    background-color: rgba(245, 197, 24, 0.12);
                }

                .minispiele-layout-canvas {
                    position: relative;
                    width: 100%;
                    max-width: 640px;
                    aspect-ratio: 16 / 9;
                    margin: 0 auto;
                    background-color: #0d0d0d;
                    background-image:
                        linear-gradient(45deg, #1a1a1a 25%, transparent 25%),
                        linear-gradient(-45deg, #1a1a1a 25%, transparent 25%),
                        linear-gradient(45deg, transparent 75%, #1a1a1a 75%),
                        linear-gradient(-45deg, transparent 75%, #1a1a1a 75%);
                    background-size: 20px 20px;
                    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
                    border: 1px solid var(--border-soft);
                    border-radius: 8px;
                    overflow: hidden;
                    touch-action: none;
                    user-select: none;
                }

                .minispiele-layout-box {
                    position: absolute;
                    box-sizing: border-box;
                    border: 2px solid;
                    border-radius: 4px;
                    background-color: transparent;
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    cursor: move;
                }

                .minispiele-layout-icon {
                    font-size: 2.5rem;
                    pointer-events: none;
                }

                .minispiele-layout-icon-img {
                    max-width: 45%;
                    max-height: 45%;
                    object-fit: contain;
                    pointer-events: none;
                }

                .minispiele-layout-label {
                    position: absolute;
                    top: 0;
                    left: 0;
                    font-size: 0.7rem;
                    font-weight: bold;
                    color: #111;
                    padding: 1px 5px;
                    border-bottom-right-radius: 4px;
                    white-space: nowrap;
                    pointer-events: none;
                }

                .minispiele-layout-resize-handle {
                    position: absolute;
                    right: -2px;
                    bottom: -2px;
                    width: 20px;
                    height: 20px;
                    background-color: rgba(255, 255, 255, 0.55);
                    border-top-left-radius: 4px;
                    cursor: nwse-resize;
                }
