/* --- GLOBALE MATRIX STYLES --- */

/* Layout & Wrapper */
.page, main { display: block; width: 100%; height: 100%; position: relative; z-index: 1; }
.panel-wrapper { position: fixed; top: 60px; left: 0; width: 100%; height: calc(100% - 100px); display: flex; justify-content: center; align-items: center; z-index: 10; padding: 20px; box-sizing: border-box; overflow-y: auto; }
.login-wrapper { position: fixed; top: 0; left: 0; width: 100%; height: 100%; display: flex !important; justify-content: center; align-items: center; z-index: 10; padding: 80px 20px 60px 20px; box-sizing: border-box; overflow-y: auto; }

/* Glass Box Design */
.glass-box {
    background: rgba(0, 0, 0, 0.5);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    color: white;
    font-family: 'Courier New', Courier, monospace;
}

/* Header Styles */
.top-header { position: fixed; top: 0; left: 0; width: 100%; height: 60px; background-color: rgba(0, 0, 0, 0.5); z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; color: white; font-family: 'Courier New', Courier, monospace; backdrop-filter: blur(2px); border-bottom: 1px solid rgba(255, 255, 255, 0.1); box-sizing: border-box; }
.logo-container { display: flex; align-items: center; gap: 15px; }
.logo-img { height: 40px; width: auto; }
.logo-text { font-size: 1.5rem; font-weight: bold; letter-spacing: 2px; }
.header-nav { display: flex; gap: 15px; align-items: center; }
.nav-btn { background: transparent; border: none; cursor: pointer; padding: 8px; transition: transform 0.2s; display: flex; align-items: center; justify-content: center; }
.nav-btn img { width: 24px; height: 24px; object-fit: contain; filter: invert(1); }
.nav-btn svg { width: 24px; height: 24px; fill: white; }
.nav-btn i { font-size: 24px; color: white; }
.nav-btn:hover { transform: scale(1.15); opacity: 0.8; }

/* Footer Styles */
.bottom-footer { position: fixed; bottom: 0; left: 0; width: 100%; height: 40px; color: white; font-family: 'Courier New', Courier, monospace; font-size: 0.8rem; z-index: 100; display: flex; justify-content: center; align-items: center; }

/* Language Dropdown */
.language-dropdown { position: fixed; top: 70px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 1001; min-width: 120px; padding: 20px; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; backdrop-filter: blur(10px); align-items: center; }
.language-dropdown button { background: transparent; border: none; color: white; text-align: center; font-family: 'Courier New', Courier, monospace; cursor: pointer; font-size: 1rem; transition: all 0.2s; padding: 5px; width: 100%; }
.language-dropdown button:hover { color: #00aaff; text-shadow: 0 0 8px #00aaff; transform: translateX(5px); }
.lang-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 1000; background: transparent; cursor: default; }

/* Login & Auth Styles */
.box-row { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0; }
.login-box { width: clamp(300px, 30vw, 500px); height: clamp(500px, 65vh, 700px); text-align: center; justify-content: center; z-index: 2; display: flex; flex-direction: column; }
.login-box h2 { font-size: 2.5rem; margin-bottom: 30px; letter-spacing: 3px; font-weight: normal; text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); text-align: center; margin-top: 0; }
.info-box { width: clamp(300px, 30vw, 500px); height: clamp(300px, 45vh, 500px); margin-top: 0; margin-left: -10px; z-index: 1; justify-content: center; align-items: center; display: flex; }
.info-box img { width: 100%; height: 100%; object-fit: contain; }
.input-group { position: relative; margin-bottom: 20px; }
.input-group input { font-size: 16px; padding: 10px 10px 10px 40px; display: block; width: 100%; border: none; border-bottom: 1px solid #757575; background: transparent; color: white; font-family: 'Courier New', Courier, monospace; }
.input-group input:focus { outline: none; border-bottom: 1px solid #fff; }
.input-icon { position: absolute; left: 5px; top: 16px; width: 24px; height: 24px; filter: invert(1); opacity: 0.8; }
i.input-icon { filter: none; color: white; font-size: 18px; display: flex; align-items: center; justify-content: center; text-shadow: 0 0 1px white; }
.login-submit-btn { margin: 10px auto; background: rgba(0, 0, 255, 0.5); border: none; color: white; padding: 10px 30px; font-family: 'Courier New', Courier, monospace; font-size: 1rem; cursor: pointer; transition: all 0.3s ease; letter-spacing: 2px; width: 70%; border-radius: 25px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.login-submit-btn:hover { background: rgba(0, 0, 255, 0.8); color: white; box-shadow: 0 0 15px rgba(0, 0, 255, 0.8); }
.btn-icon { width: 20px; height: 20px; filter: invert(1); }
i.btn-icon { filter: none; color: white; font-size: 18px; text-shadow: 0 0 1px white; }
.forgot-pass { text-align: right; margin-bottom: 20px; font-size: 0.8rem; }
.forgot-pass a { color: rgba(255, 255, 255, 0.7); text-decoration: none; transition: color 0.3s; }
.forgot-pass a:hover { color: white; }
.login-divider { margin: 20px 0 10px 0; font-size: 0.9rem; opacity: 0.8; }
.coming-soon-btn { background: rgba(255, 255, 255, 0.1); border: 1px dashed rgba(255, 255, 255, 0.5); color: rgba(255, 255, 255, 0.6); padding: 10px; width: 70%; font-family: 'Courier New', Courier, monospace; cursor: not-allowed; border-radius: 25px; }

/* Auth Check & Verify Styles */
.center-box { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); text-align: center; color: white; font-family: 'Courier New', monospace; }
.blink { animation: blinker 1.5s linear infinite; margin-bottom: 20px; }
@keyframes blinker { 50% { opacity: 0; } }
.loader { border: 4px solid rgba(255, 255, 255, 0.3); border-radius: 50%; border-top: 4px solid white; width: 40px; height: 40px; animation: spin 1s linear infinite; margin: 0 auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Panel Styles */
.menu-btn { position: fixed; top: 80px; left: 20px; right: auto; background: transparent; border: none; cursor: pointer; z-index: 101; transition: opacity 0.3s ease, visibility 0.3s; }
.menu-btn img { width: 30px; height: 30px; filter: invert(1); transition: transform 0.2s; }
.menu-btn i { font-size: 30px; color: white; transition: transform 0.2s; }
.menu-btn:hover img { transform: scale(1.1); }
.menu-btn:hover i { transform: scale(1.1); }
.menu-btn.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.sidebar-menu { position: fixed; top: 80px; bottom: 60px; left: -350px; right: auto; width: 300px; transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); z-index: 110; padding: 20px; padding-top: 70px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; }
.sidebar-menu.open { left: 0px; right: auto; }
.sidebar-content { width: 100%; display: flex; flex-direction: column; align-items: center; }
.sidebar-title { margin: 0 0 10px 0; font-size: 1.5rem; letter-spacing: 3px; text-align: center; display: flex; align-items: center; justify-content: center; }
.sidebar-divider { width: 100%; height: 1px; background: rgba(255, 255, 255, 0.2); margin: 15px 0; }
.sidebar-nav-btn { background: transparent; border: none; color: rgba(255, 255, 255, 0.8); padding: 12px 20px; font-family: 'Courier New', Courier, monospace; font-size: 1.2rem; cursor: pointer; transition: all 0.3s ease; width: 100%; text-align: center; border-radius: 5px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.sidebar-nav-btn:hover { 
    background: rgba(0, 136, 255, 0.1); 
    letter-spacing: 1px; 
    background-image: linear-gradient(135deg, #aa00ff, #0088ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 5px rgba(0, 136, 255, 0.5));
}
.sidebar-nav-btn img { width: 24px; height: 24px; object-fit: contain; filter: invert(1); }
.sidebar-nav-btn i { font-size: 24px; width: 24px; text-align: center; color: inherit; }
.sidebar-nav-btn.logout-btn { color: #ff4444; }
.sidebar-nav-btn.logout-btn img { filter: invert(38%) sepia(93%) saturate(3083%) hue-rotate(336deg) brightness(100%) contrast(107%); }
.sidebar-nav-btn.logout-btn:hover { background: rgba(255, 0, 0, 0.15); color: #ff6666; text-shadow: 0 0 10px #ff0000; }

.right-sidebar-menu { position: fixed; top: 80px; bottom: 60px; left: 70px; right: 0px; z-index: 106; padding: 20px; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; transition: left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.5s ease; transform: translateX(0); opacity: 1; overflow-y: auto; }
.right-sidebar-menu.shifted { left: 320px; }
.right-sidebar-menu.off-screen { transform: translateX(120vw); opacity: 0; pointer-events: none; }
.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: 105; background: transparent; cursor: default; }

.panel-close-btn { position: absolute; top: 20px; left: 20px; width: 32px; height: 32px; background: transparent; border: none; cursor: pointer; padding: 0; display: flex; align-items: center; justify-content: center; transition: transform 0.2s; z-index: 10; }
.panel-close-btn img { width: 24px; height: 24px; filter: invert(1); transition: filter 0.3s ease; }
.panel-close-btn i { font-size: 24px; color: white; transition: color 0.3s ease; }
.panel-close-btn:hover { transform: scale(1.2); }
.panel-close-btn:hover img { filter: invert(38%) sepia(93%) saturate(3083%) hue-rotate(336deg) brightness(100%) contrast(107%); }
.panel-close-btn:hover i { color: #ff4444; }
.title-icon { width: 32px; height: 32px; margin-right: 15px; object-fit: contain; filter: invert(1); }
i.title-icon { font-size: 28px; width: 32px; text-align: center; color: white; filter: none; display: inline-block; }

.content-limiter { width: 100%; max-width: 1400px; display: flex; flex-direction: row; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 20px; }
.panel-card { flex: 1 1 300px; min-width: 300px; background: rgba(0, 0, 0, 0.3); padding: 25px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.08); box-shadow: 0 4px 15px rgba(0,0,0,0.2); }
.card-title { margin: 0 0 20px 0; font-size: 1rem; color: rgba(255,255,255,0.5); letter-spacing: 2px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 10px; }
.info-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.info-label { color: rgba(255,255,255,0.6); font-size: 0.95rem; }
.info-value { font-weight: bold; font-size: 1.1rem; color: #0088ff; text-shadow: 0 0 5px rgba(0,136,255,0.3); }
.role-badge { color: #0088ff; text-shadow: 0 0 5px rgba(0,136,255,0.3); }

.modern-input-group { position: relative; margin-bottom: 20px; width: 100%; }
.panel-input { width: 100%; padding: 15px; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1); color: white; font-family: inherit; border-radius: 8px; box-sizing: border-box; transition: all 0.3s; font-size: 1rem; }
.panel-input:focus { outline: none; border-color: #0088ff; background: rgba(0, 0, 0, 0.4); }
.modern-input-group label { position: absolute; left: 15px; top: 16px; color: rgba(255,255,255,0.5); pointer-events: none; transition: all 0.3s ease; }
.panel-input:focus ~ label, .panel-input:not(:placeholder-shown) ~ label { top: -10px; left: 10px; font-size: 0.8rem; color: #0088ff; background: #111; padding: 0 5px; }
.panel-action-btn { width: 100%; padding: 15px; background: rgba(0, 136, 255, 0.1); color: #0088ff; border: 1px solid #0088ff; border-radius: 8px; cursor: pointer; font-weight: bold; transition: all 0.3s; margin-top: 10px; letter-spacing: 1px; }
.panel-action-btn:hover { background: #0088ff; color: black; box-shadow: 0 0 15px #0088ff; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0, 0, 0, 0.7); z-index: 20000 !important; display: flex; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.modal-box { width: clamp(300px, 90vw, 400px); border: 1px solid #0088ff; display: flex; flex-direction: column; }

@media (max-width: 950px) {
    .box-row { align-items: center; gap: 20px; }
    .info-box { margin-top: 20px; margin-left: 0; }
}

/* Custom Scrollbar Design */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.02); border-radius: 4px; }
::-webkit-scrollbar-thumb { background: rgba(0, 136, 255, 0.3); border-radius: 4px; transition: background 0.3s; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 136, 255, 0.8); box-shadow: 0 0 10px rgba(0, 136, 255, 0.5); }
::-webkit-scrollbar-corner { background: transparent; }

/* --- RECONNECT MODAL (RESET & NEU) --- */
#components-reconnect-modal {
    /* Overlay erzwingen & Blazor Styles überschreiben */
    position: fixed !important; inset: 0 !important; z-index: 99999 !important;
    width: 100vw !important; height: 100vh !important;
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(5px) !important;
    
    /* Flexbox für Zentrierung */
    display: none;
    align-items: center; justify-content: center;
    
    /* Reset von Störfaktoren */
    opacity: 1 !important; margin: 0 !important; padding: 0 !important;
    border: none !important; box-shadow: none !important; animation: none !important;
}

/* Anzeigen bei Status-Klassen */
#components-reconnect-modal.components-reconnect-show,
#components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected {
    display: flex !important;
}

/* Alle Standard-Inhalte (die "3 Fenster") hart ausblenden */
#components-reconnect-modal > * { display: none !important; }

/* Das EINE Fenster (Box) via ::before */
#components-reconnect-modal::before {
    content: var(--reconnect-interrupted, "Verbindung unterbrochen");
    
    /* Box Design */
    width: 400px; height: 250px;
    background: rgba(40, 0, 0, 0.85);
    border: 2px solid #ff0000;
    border-radius: 20px;
    box-shadow: 0 0 50px rgba(255, 0, 0, 0.4);
    
    /* Text & Layout */
    color: #ff4444; font-family: 'Courier New', Courier, monospace;
    font-size: 1.3rem; font-weight: bold; text-align: center;
    display: flex; flex-direction: column; justify-content: center;
    padding-top: 70px; box-sizing: border-box;
    
    /* Icon */
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 50 50' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='25' cy='25' r='20' fill='none' stroke='%23ff4444' stroke-width='4' stroke-dasharray='31.4 31.4'%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 25 25' to='360 25 25' dur='1s' repeatCount='indefinite'/%3E%3C/circle%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: center 40px; background-size: 60px;
}

/* Status-Text unten rechts via ::after */
#components-reconnect-modal::after {
    content: var(--reconnect-wait, "Bitte Warten"); 
    
    /* Positionierung relativ zur Mitte (Box ist 400x250) */
    position: absolute;
    top: 50%; left: 50%;
    margin-top: 95px; margin-left: 180px;
    transform: translateX(-100%);
    
    font-size: 0.9rem;
    color: #ff8888;
    animation: blinker 1.5s infinite; 
    white-space: nowrap;
}

/* Status Updates */
#components-reconnect-modal.components-reconnect-failed::after { 
    content: var(--reconnect-failed, "Fehlgeschlagen");
    color: red; animation: none;
}
#components-reconnect-modal.components-reconnect-rejected::after { 
    content: var(--reconnect-rejected, "Abgelehnt");
    color: red; animation: none;
}

/* --- ACTION ICON BUTTONS (Hover Effects) --- */
.action-icon-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-icon-btn:hover { transform: scale(1.15); opacity: 0.8; }

/* --- HEADER PROFILE --- */
.header-profile-box {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-left: 15px;
    cursor: pointer;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.header-profile-box:hover { border-color: #0088ff; box-shadow: 0 0 10px rgba(0, 136, 255, 0.5); transform: scale(1.1); }
.header-profile-box img { width: 100%; height: 100%; object-fit: cover; }
.header-profile-box i { font-size: 20px; color: rgba(255,255,255,0.5); }
.header-profile-box:hover i { color: #0088ff; }

/* --- PROFILE DROPDOWN --- */
.profile-dropdown { position: fixed; top: 70px; right: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 1001; min-width: 200px; padding: 20px; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; backdrop-filter: blur(10px); box-shadow: 0 0 20px rgba(0,0,0,0.5); align-items: center; }
.profile-info { font-family: 'Courier New', Courier, monospace; font-size: 0.9rem; color: white; margin-bottom: 5px; display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; }
.profile-menu-btn {
    background: transparent;
    border: none;
    color: white;
    text-align: center;
    font-family: 'Courier New', Courier, monospace;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
    padding: 8px;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    border-radius: 5px;
    width: 100%;
}
.profile-menu-btn:hover { background: rgba(255, 255, 255, 0.1); color: #00aaff; text-shadow: 0 0 8px #00aaff; }
.profile-menu-btn.logout { color: #ff4444; }
.profile-menu-btn.logout:hover { background: rgba(255, 0, 0, 0.1); color: #ff6666; text-shadow: 0 0 8px #ff0000; }

/* --- CUSTOM VIDEO PLAYER --- */
.video-wrapper { position: relative; width: 100%; height: 100%; background: black; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.custom-video { width: 100%; height: 100%; object-fit: contain; }

/* Overlay Container (erscheint bei Hover) */
.video-controls-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
    padding: 0 20px 10px 20px; /* Platz für Timeline unten */
    display: flex; flex-direction: column;
    opacity: 0; transition: opacity 0.3s ease-in-out;
    box-sizing: border-box;
    z-index: 30; /* WICHTIG: Damit die Zeitleiste immer klickbar ist */
}
.video-wrapper:hover .video-controls-overlay { opacity: 1; }

/* Button Reihe */
.controls-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; color: white; font-family: 'Courier New', monospace; }
.controls-left { display: flex; align-items: center; gap: 20px; }
.controls-right { display: flex; align-items: center; gap: 20px; }

/* Buttons */
.player-btn { background: none; border: none; color: white; cursor: pointer; font-size: 1.6rem; font-weight: bold; display: flex; align-items: center; justify-content: center; transition: transform 0.2s, color 0.2s, text-shadow 0.2s; width: 45px; height: 45px; }
.player-btn:hover { 
    transform: scale(1.15); 
    background: linear-gradient(135deg, #aa00ff, #0088ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    filter: drop-shadow(0 0 8px rgba(0, 136, 255, 0.6));
}

/* Zeit Anzeige */
.time-display { font-size: 0.9rem; color: rgba(255,255,255,0.8); font-weight: bold; letter-spacing: 1px; min-width: 100px; }

/* Timeline (Ganz unten) */
.timeline-container {
    width: 100%; height: 6px; background: rgba(255,255,255,0.2);
    cursor: pointer; transition: height 0.2s ease; position: relative;
    border-radius: 3px;
    margin-bottom: 5px;
}
.timeline-container:hover { height: 12px; }

.timeline-progress {
    height: 100%; background: linear-gradient(90deg, #aa00ff, #0088ff); width: 0%;
    box-shadow: 0 0 15px #0088ff; position: relative;
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* Timeline Handle (Knopf) */
.timeline-progress::after {
    content: ''; position: absolute; right: -6px; top: 50%; transform: translateY(-50%);
    width: 0; height: 0; border-radius: 50%; background: white; 
    transition: all 0.2s; box-shadow: 0 0 5px black;
}
.timeline-container:hover .timeline-progress::after { width: 16px; height: 16px; }

/* Header im Player ausblenden wenn Controls inaktiv sind (optional, hier lassen wir ihn statisch) */
.player-header { transition: opacity 0.3s; }
.video-wrapper:hover .player-header { opacity: 1; }
.video-wrapper:not(:hover) .player-header { opacity: 0; }

/* --- VOLUME SLIDER (Hover Effect) --- */
.volume-container { display: flex; align-items: center; position: relative; }

.volume-slider {
    -webkit-appearance: none; appearance: none;
    width: 0; height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px; outline: none;
    transition: width 0.3s ease, margin 0.3s ease, opacity 0.3s ease;
    cursor: pointer; margin-left: 0; opacity: 0;
}

/* Slider beim Hover über den Container (Icon + Slider) anzeigen */
.volume-container:hover .volume-slider { width: 80px; margin-left: 15px; opacity: 1; }

/* Slider Knopf (Thumb) Styling */
.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 14px; height: 14px; border-radius: 50%;
    background: #0088ff; cursor: pointer; box-shadow: 0 0 8px #0088ff;
}
.volume-slider::-moz-range-thumb {
    width: 14px; height: 14px; border-radius: 50%;
    background: #0088ff; cursor: pointer; box-shadow: 0 0 8px #0088ff; border: none;
}

/* --- VIDEO PLAYER SETTINGS MENU --- */
.settings-menu {
    position: absolute;
    top: 0;
    right: -350px; /* Versteckt (außerhalb) */
    width: 320px;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transition: right 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 40; /* Muss höher sein als das Overlay (30) */
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-sizing: border-box;
    box-shadow: -5px 0 20px rgba(0,0,0,0.5);
}
.settings-menu.open { right: 0; }

.settings-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 30px; padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-family: 'Courier New', monospace; color: white; font-size: 1.4rem; font-weight: bold;
}

.setting-item { margin-bottom: 25px; }
.setting-label {
    color: #0088ff; margin-bottom: 8px; font-family: 'Courier New', monospace;
    font-size: 1rem; font-weight: bold; display: flex; align-items: center; gap: 10px;
}
.setting-select {
    width: 100%; padding: 12px;
    background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.2);
    color: white; border-radius: 5px; font-family: 'Courier New', monospace; font-size: 0.95rem;
    cursor: pointer; transition: border-color 0.3s;
}
.setting-select:focus { outline: none; border-color: #0088ff; background: rgba(0,0,0,0.5); }
.setting-select option { background: #111; color: white; padding: 10px; }

/* --- PLAYER LOADER --- */
.player-loader {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 15; pointer-events: none;
    background: rgba(0,0,0,0.5); padding: 20px; border-radius: 10px;
    backdrop-filter: blur(5px);
    display: none; /* Standardmäßig aus, wird per JS aktiviert */
}

/* --- MATRIX SETTINGS TOGGLE (Unten Links) --- */
.matrix-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 255, 0, 0.3);
    border-radius: 50%;
    color: #00ff00;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2000; /* Über dem Footer */
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.matrix-settings-btn:hover {
    background: rgba(0, 255, 0, 0.15);
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.4);
    transform: rotate(90deg) scale(1.1);
    border-color: #00ff00;
}

.matrix-settings-btn i {
    font-size: 22px;
    text-shadow: 0 0 5px rgba(0, 255, 0, 0.8);
}

/* Wenn deaktiviert: Canvas ausblenden */
/* HINWEIS: Das blendet ALLE Canvas-Elemente im Hintergrund aus */
body.matrix-disabled canvas {
    display: none !important;
}