/* --- BASE RESET & THEME --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: "Segoe UI", Arial, sans-serif; 
    background-color: #1d1f26; 
    color: #dfdfdf; 
    height: 100vh; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
    font-size: 13px; 
}

::-webkit-scrollbar { 
    width: 12px; 
    height: 12px; 
}

::-webkit-scrollbar-track { 
    background: #1d1f26; 
}

::-webkit-scrollbar-thumb { 
    background: #3c404d; 
    border: 3px solid #1d1f26; 
    border-radius: 6px; 
}

::-webkit-scrollbar-thumb:hover { 
    background: #555555; 
}

/* Restored 3D background wrapper */
#three-container { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    z-index: -1; 
    opacity: 0.15; 
    pointer-events: none; 
}

/* Font Awesome Reset */
.fa, .fas, .far, .fab { 
    color: #dfdfdf; 
}

/* --- TOP MENU BAR --- */
.obs-menu { 
    background-color: #1c1c1c; 
    display: flex; 
    border-bottom: 1px solid #111; 
    z-index: 2000; 
    position: relative; 
}

.menu-item { 
    position: relative; 
}

.menu-title { 
    cursor: default; 
    padding: 6px 10px; 
    display: inline-block; 
}

.menu-item.active .menu-title, .menu-title:hover { 
    background-color: #1e50a0; 
    color: white; 
}

.dropdown-content { 
    display: none; 
    position: absolute; 
    top: 100%; 
    left: 0; 
    background-color: #1c1c1c; 
    border: 1px solid #333; 
    box-shadow: 2px 2px 10px rgba(0,0,0,0.7); 
    min-width: 220px; 
    padding: 4px 0; 
    z-index: 2000; 
}

.menu-item.active .dropdown-content { 
    display: block; 
}

.dropdown-row { 
    display: flex; 
    align-items: center; 
    padding: 4px 10px 4px 5px; 
    cursor: default; 
    color: #dfdfdf; 
}

.dropdown-row:hover { 
    background-color: #383838; 
}

.dropdown-row.disabled { 
    color: #666; 
    pointer-events: none; 
}

.menu-icon { 
    width: 20px; 
    text-align: center; 
    font-size: 11px; 
    color: #dfdfdf; 
    display: inline-block; 
}

.menu-text { 
    flex-grow: 1; 
    white-space: nowrap; 
}

.menu-shortcut { 
    margin-left: 20px; 
    color: #999; 
    font-size: 11px; 
}

.menu-arrow { 
    margin-left: 15px; 
    font-size: 10px; 
    color: #999; 
}

.menu-separator { 
    height: 1px; 
    background-color: #333; 
    margin: 4px 0; 
}

/* --- WORKSPACE & CANVAS --- */
.obs-workspace { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    padding: 5px; 
    gap: 5px; 
    overflow: hidden; 
}

.obs-preview-container { 
    flex: 1; 
    background-color: #272a33; 
    border: 1px solid #3c404d; 
    border-radius: 8px; 
    display: flex; 
    flex-direction: column; 
    min-height: 0; 
    overflow: hidden; 
    padding: 5px;
}

.preview-header { 
    background-color: #3c404d; 
    padding: 4px 8px; 
    text-align: center; 
    border-bottom: 1px solid #3c404d; 
    font-weight: 600; 
    display: none; 
}

.preview-wrapper { 
    flex: 1; 
    position: relative; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    background-color: #1d1f26; 
    overflow: hidden; 
    min-height: 0; 
    min-width: 0; 
    border: 1px solid #3c404d; 
    border-radius: 4px;
}

/* UPDATED CANVAS LAYERING CSS */
#obsCanvas, #obsCanvasTop { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
    background-color: transparent; 
    aspect-ratio: 16/9; 
    cursor: default; 
    position: absolute;
}

#obsCanvas { 
    box-shadow: 0 0 15px rgba(0,0,0,0.8); 
    z-index: 1; 
}

#obsCanvasTop { 
    z-index: 3; 
    pointer-events: none; 
}

#domOverlayContainer { 
    z-index: 2; 
}

.preview-placeholder { 
    position: absolute; 
    color: #666; 
    font-size: 24px; 
    z-index: 4; 
    pointer-events: none; 
}

/* --- DOCKS & LISTS --- */
.obs-docks { 
    height: 250px; 
    display: flex; 
    gap: 5px; 
}

.dock { 
    flex: 1; 
    background-color: #272a33; 
    border: 1px solid #3c404d; 
    border-radius: 8px; 
    display: flex; 
    flex-direction: column; 
}

.dock-wide { 
    flex: 1.5; 
}

.controls-dock { 
    flex: 1.2; 
}

.dock-header { 
    background-color: #3c404d; 
    padding: 6px 10px; 
    font-weight: 600; 
    font-size: 13px; 
    color: #e0e0e0; 
    border-top-left-radius: 7px; 
    border-top-right-radius: 7px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.dock-content { 
    flex: 1; 
    padding: 5px; 
    overflow-y: auto; 
    overflow-x: hidden; 
    background: #272a33; 
    border-top: 1px solid #3c404d;
}

.dock-toolbar { 
    background-color: #272a33; 
    padding: 4px 6px; 
    display: flex; 
    gap: 4px; 
    align-items: center; 
    border-top: 1px solid #3c404d; 
    border-bottom-left-radius: 7px; 
    border-bottom-right-radius: 7px;
}

/* CSS for Popped-Out Docks */
.dock.popped-out {
    position: absolute;
    z-index: 5000;
    width: 300px;
    height: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    border: 1px solid #555;
    border-radius: 8px;
    resize: both;
    overflow: hidden;
}

.dock.popped-out .dock-header {
    cursor: move;
}

/* --- SOURCES & SCENES LIST UI --- */
.list-box { 
    padding: 4px; 
}

.list-item { 
    padding: 4px 8px; 
    cursor: default; 
    border: 1px solid transparent; 
    color: #dfdfdf; 
    margin-bottom: 2px; 
}

.list-item:hover { 
    background-color: #3c404d; 
    border-radius: 4px; 
}

.list-item.active { 
    background-color: #1a50a1; 
    color: white; 
    border-radius: 4px; 
}

.source-list-item { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 4px 8px; 
    cursor: pointer; 
    border: 1px solid transparent; 
    color: #dfdfdf; 
    margin-bottom: 2px; 
    user-select: none;
}

.source-list-item:hover { 
    background-color: #3c404d; 
    border-radius: 4px; 
}

.source-list-item.active { 
    background-color: #1a50a1; 
    color: white; 
    border-radius: 4px; 
}

.source-list-item.dragging { 
    opacity: 0.4; 
    border: 1px dashed #dfdfdf; 
}

.source-list-item.drag-over { 
    border-top: 2px solid #1e50a0; 
}

.source-icon { 
    width: 24px; 
    text-align: center; 
    font-size: 14px;
}

.source-name { 
    flex: 1; 
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    padding: 0 8px; 
}

.source-actions { 
    display: flex; 
    gap: 6px; 
}

.source-action-btn { 
    background: none; 
    border: none; 
    color: #999; 
    cursor: pointer; 
    font-size: 14px; 
    width: 18px; 
    text-align: center;
}

.source-action-btn:hover { 
    color: #fff; 
}

.source-action-btn .fa, .source-action-btn .fas { 
    color: inherit; 
    pointer-events: none; 
}

/* Audio Filters List Specific */
.audio-filter-item {
    display: flex; 
    align-items: center; 
    padding: 6px 10px; 
    cursor: pointer; 
    color: #dfdfdf; 
    border-radius: 4px; 
    margin-bottom: 2px;
}

.audio-filter-item:hover { 
    background-color: #3c404d; 
}

.audio-filter-item.active { 
    background-color: #1e50a0; 
    color: white; 
}

.audio-filter-item .fa-eye, .audio-filter-item .fa-eye-slash { 
    margin-right: 10px; 
    width: 16px; 
    text-align: center; 
    color: #dfdfdf; 
}

.audio-filter-item.active .fa-eye { 
    color: white; 
}

/* --- DUAL AUDIO MIXER UI --- */
.audio-mixer { 
    display: flex; 
    flex-direction: column; 
    gap: 5px; 
    padding: 0 !important; 
}

.audio-track { 
    background: #272a33; 
    padding: 8px 12px; 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    border-bottom: 1px solid #3c404d; 
}

.audio-header { 
    display: flex; 
    justify-content: space-between; 
    font-size: 12px; 
    font-weight: 500; 
    color: #dfdfdf; 
    margin-bottom: 4px;
}

.audio-body { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.audio-left-icons { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    justify-content: center; 
}

.audio-menu-btn { 
    cursor: pointer; 
    padding: 2px 4px; 
    font-weight: bold; 
    background: #3c404d; 
    border-radius: 3px; 
    height: 22px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.audio-speaker-btn { 
    cursor: pointer; 
    font-size: 16px; 
    height: 22px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.audio-controls { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}

.audio-meter-container { 
    display: flex; 
    flex-direction: column; 
    width: 100%; 
    margin-bottom: 2px;
}

.audio-meter { 
    height: 8px; 
    background: #1d1f26; 
    border-radius: 2px; 
    overflow: hidden; 
    display: block; 
}

.audio-meter-spacer { 
    height: 2px; 
    background: transparent; 
}

.audio-meter-fill { 
    height: 100%; 
    background: linear-gradient(90deg, #4caf50 60%, #ffeb3b 85%, #f44336 100%); 
    width: 0%; 
    transition: width 0.1s linear; 
}

.audio-ticks { 
    display: flex; 
    justify-content: space-between; 
    font-size: 9px; 
    color: #888; 
    font-family: monospace; 
    margin-top: 1px; 
    letter-spacing: normal;
}

.audio-slider { 
    width: 100%; 
    margin-top: 4px; 
    cursor: pointer; 
    accent-color: #1e50a0; 
}

/* --- BUTTONS & CONTROLS --- */
.controls-box { 
    display: flex; 
    flex-direction: column; 
    gap: 4px; 
    padding: 8px; 
    background: #272a33; 
    border-top: 1px solid #3c404d;
}

.obs-btn { 
    background-color: #3c404d; 
    color: #dfdfdf; 
    border: 1px solid #3c404d; 
    border-radius: 4px; 
    padding: 0 10px; 
    cursor: pointer; 
    width: 100%; 
    text-align: center;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    font-size: 12px;
    height: 26px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    gap: 6px;
}

.obs-btn:hover:not(:disabled) { 
    background-color: #4b4e50; 
}

.obs-btn:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

.obs-btn.hidden { 
    display: none; 
}

.controls-divider { 
    height: 1px; 
    background: #3c404d; 
    margin: 2px 0; 
}

.icon-btn { 
    background-color: #2b2e38; 
    border: 1px solid #3c404d; 
    color: #dfdfdf; 
    width: 24px; 
    height: 24px; 
    cursor: pointer; 
    border-radius: 4px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.icon-btn:hover { 
    background-color: #3c404d; 
}

.icon-btn i { 
    pointer-events: none; 
}

.text-icon-btn {
    background-color: #3c404d; 
    color: #dfdfdf; 
    border: 1px solid #3c404d; 
    border-radius: 4px;
    padding: 4px 10px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    gap: 6px;
    height: 28px; 
    white-space: nowrap;
}
/* --- SQUARE MEDIA BUTTONS --- */
.obs-btn-square {
    background-color: #3c404d; 
    color: #dfdfdf; 
    border: 1px solid #3c404d; 
    border-radius: 4px; 
    width: 28px; 
    height: 28px; 
    cursor: pointer; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    flex-shrink: 0;
}

.obs-btn-square:hover {
    background-color: #4b4e50; 
}

.obs-btn-square i {
    pointer-events: none;
}

/* --- MEDIA TOOLBAR DIVIDER --- */
.media-divider {
    width: 1px;
    height: 20px;
    background-color: #3c404d;
    margin: 0 5px;
}
.text-icon-btn:hover { 
    background-color: #4b4e50; 
}

.text-icon-btn.active { 
    background-color: #1e50a0; 
    border-color: #1e50a0; 
    color: white; 
}

.transitions-box { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
    padding: 10px;
}

.obs-select, .obs-input { 
    background-color: #1d1f26; 
    color: white; 
    border: 1px solid #3c404d; 
    padding: 4px; 
    width: 100%; 
    border-radius: 3px; 
}

.obs-input-small { 
    background-color: #1d1f26; 
    color: white; 
    border: 1px solid #3c404d; 
    padding: 4px; 
    border-radius: 3px; 
    width: 60px; 
}

.obs-select:disabled, .obs-input:disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

.obs-textarea { 
    background-color: #1d1f26; 
    color: white; 
    border: 1px solid #3c404d; 
    padding: 6px; 
    width: 100%; 
    border-radius: 3px; 
    font-family: monospace; 
    height: 120px; 
    resize: vertical;
}

.duration-box { 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}

input[type="number"] { 
    color-scheme: dark; 
}

.chk-label { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    cursor: pointer; 
    color: #dfdfdf; 
}

.chk-label.disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

/* --- CONTEXT MENUS & PROPERTIES --- */
.context-menu { 
    display: none; 
    position: absolute; 
    bottom: 100%; 
    left: 0; 
    background-color: #272a33; 
    border: 1px solid #3c404d; 
    box-shadow: 2px 2px 10px rgba(0,0,0,0.7); 
    min-width: 250px; 
    padding: 4px 0; 
    z-index: 3000; 
    border-radius: 4px;
}

.context-menu.active { 
    display: block; 
}

.context-item { 
    padding: 6px 15px; 
    cursor: pointer; 
    color: #dfdfdf; 
    display: flex; 
    align-items: center;
}

.context-item i { 
    width: 20px; 
    text-align: center; 
    margin-right: 8px; 
    pointer-events: none; 
}

.context-item:hover:not(.disabled) { 
    background-color: #1e50a0; 
    color: white; 
}

.context-item.disabled { 
    color: #666; 
    cursor: default; 
}

.context-separator { 
    height: 1px; 
    background-color: #3c404d; 
    margin: 4px 0; 
}

.properties-bar { 
    background-color: #272a33; 
    border: 1px solid #3c404d; 
    border-radius: 8px; 
    padding: 8px 12px; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-top: 5px;
}

.obs-color { 
    width: 30px; 
    height: 24px; 
    padding: 0; 
    cursor: pointer; 
    border-radius: 3px; 
    border: 1px solid #3c404d;
}

.obs-color.disabled { 
    opacity: 0.5; 
    cursor: not-allowed; 
}

.media-controls-bar { 
    background-color: #272a33; 
    border: 1px solid #3c404d; 
    border-radius: 4px; 
    padding: 8px 12px; 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    margin-top: 5px; 
    flex-shrink: 0;
}

.prop-row { 
    display: flex; 
    margin-bottom: 8px; 
    align-items: flex-start;
}

.prop-label { 
    width: 140px; 
    text-align: right; 
    margin-right: 15px; 
    color: #dfdfdf; 
    font-size: 13px; 
    padding-top: 3px; 
    flex-shrink: 0;
}

.prop-input-container { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
}

.prop-input-container label { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    cursor: pointer; 
    color: #dfdfdf;
}

.prop-preview-area { 
    background: #000; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    height: 300px; 
    min-height: 300px; 
    flex-shrink: 0; 
    border: 1px solid #3c404d; 
    border-radius: 4px; 
    margin-bottom: 15px; 
    overflow: hidden; 
}

.prop-preview-area video, .prop-preview-area canvas, .prop-preview-area img, .prop-preview-area div { 
    max-width: 100%; 
    max-height: 100%; 
    object-fit: contain; 
}

/* --- DRAGGABLE MODALS --- */
.modal { 
    display: none; 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    background: rgba(0,0,0,0.6); 
    z-index: 4000; 
}

.modal.active { 
    display: block; 
}

.obs-window { 
    background-color: #272a33; 
    border: 1px solid #3c404d; 
    box-shadow: 0 4px 20px rgba(0,0,0,0.5); 
    width: 800px; 
    max-width: 95%; 
    display: flex; 
    flex-direction: column; 
    border-radius: 8px; 
    position: absolute; 
    resize: both; 
    overflow: auto; 
    max-height: 95vh; 
}

.window-header { 
    background-color: #3c404d; 
    padding: 8px 12px; 
    display: flex; 
    justify-content: space-between; 
    border-bottom: 1px solid #3c404d; 
    font-weight: 600; 
    cursor: move; 
}

.close-btn { 
    background: none; 
    border: none; 
    color: white; 
    cursor: pointer; 
}

.close-btn:hover { 
    color: #f44336; 
}

.window-body { 
    padding: 15px; 
}

.flex-col { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
}

/* --- NLE STYLES --- */
.nle-layout { 
    display: grid; 
    grid-template-columns: 250px 1fr 280px; 
    grid-template-rows: 1fr 250px; 
    gap: 10px; 
    height: 100%; 
    padding: 10px; 
}

.nle-panel { 
    background: #1d1f26; 
    border: 1px solid #3c404d; 
    border-radius: 4px; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden; 
}

.nle-panel-header { 
    background: #3c404d; 
    padding: 6px 10px; 
    font-weight: 600; 
    font-size: 12px; 
    color: #dfdfdf; 
}

.nle-media-pool { 
    grid-column: 1; 
    grid-row: 1; 
}

.nle-pool-grid { 
    display: grid; 
    grid-template-columns: repeat(2, 1fr); 
    gap: 8px; 
    overflow-y: auto; 
    padding: 10px; 
    flex: 1; 
}

.video-thumbnail { 
    aspect-ratio: 16/9; 
    background: #000; 
    border: 2px solid transparent; 
    cursor: pointer; 
    position: relative; 
    border-radius: 4px; 
    overflow: hidden; 
}

.video-thumbnail video, .video-thumbnail img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    pointer-events: none; 
}

.duration-badge { 
    position: absolute; 
    bottom: 2px; 
    right: 2px; 
    background: rgba(0,0,0,0.7); 
    padding: 2px 4px; 
    font-size: 10px; 
    border-radius: 2px; 
    color: white; 
}

.nle-preview { 
    grid-column: 2; 
    grid-row: 1; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    background: #000; 
    position: relative;
}

.nle-properties { 
    grid-column: 3; 
    grid-row: 1 / span 2; 
}

.nle-timeline-area { 
    grid-column: 1 / span 2; 
    grid-row: 2; 
    display: flex; 
    flex-direction: column; 
}

.nle-timeline-toolbar { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    background: #272a33; 
    padding: 6px 10px; 
    border-bottom: 1px solid #3c404d; 
}

.nle-timeline-container { 
    flex: 1; 
    background: #16181d; 
    position: relative; 
    overflow-x: auto; 
    overflow-y: auto; 
}

.nle-timeline-ruler { 
    height: 24px; 
    background: #272a33; 
    border-bottom: 1px solid #3c404d; 
    position: sticky; 
    top: 0; 
    z-index: 50; 
}

.nle-tracks-wrapper { 
    display: flex; 
    flex-direction: column; 
    gap: 2px; 
    padding: 10px 0; 
}

.nle-track { 
    position: relative; 
    height: 60px; 
    background: #1d1f26; 
    border-top: 1px solid #3c404d; 
    border-bottom: 1px solid #3c404d; 
    min-width: 100%; 
    display: flex; 
}

.nle-track-header { 
    width: 60px; 
    background: #272a33; 
    border-right: 1px solid #3c404d; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: bold; 
    color: #888; 
    position: sticky; 
    left: 0; 
    z-index: 40; 
}

.nle-track-content { 
    flex: 1; 
    position: relative; 
}

.nle-playhead { 
    position: absolute; 
    top: 0; 
    bottom: 0; 
    width: 1px; 
    background: red; 
    z-index: 60; 
    pointer-events: none; 
    left: 60px; 
}

.nle-playhead::before { 
    content: ''; 
    position: absolute; 
    top: 0; 
    left: -5px; 
    width: 11px; 
    height: 11px; 
    background: red; 
    clip-path: polygon(0 0, 100% 0, 50% 100%); 
}

.nle-clip { 
    position: absolute; 
    height: 100%; 
    top: 0; 
    background: #1e50a0; 
    border: 1px solid #4daafc; 
    color: white; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    cursor: move; 
    font-size: 11px; 
    overflow: hidden; 
    user-select: none; 
    border-radius: 4px; 
    z-index: 10; 
}

.nle-clip.selected-clip { 
    background: #0078d7; 
    border: 2px solid #fff; 
    box-shadow: 0 0 8px rgba(255,255,255,0.5); 
    z-index: 15; 
}

.nle-trim-handle { 
    position: absolute; 
    width: 8px; 
    height: 100%; 
    background: rgba(255,255,255,0.2); 
    cursor: ew-resize; 
    top: 0; 
    z-index: 15; 
}

.nle-trim-handle:hover { 
    background: #4daafc; 
}

.nle-trim-handle.left { 
    left: 0; 
    border-right: 1px solid rgba(255,255,255,0.5); 
}

.nle-trim-handle.right { 
    right: 0; 
    border-left: 1px solid rgba(255,255,255,0.5); 
}

/* --- STATUS BAR --- */
.obs-status { 
    background-color: #3c404d; 
    color: #a0a0a0; 
    padding: 4px 10px; 
    display: flex; 
    justify-content: space-between; 
    font-size: 12px; 
    border-top: 1px solid #3c404d;
}

.status-right { 
    display: flex; 
    gap: 20px; 
    align-items: center;
}

/* --- STATS WINDOW STYLES --- */
.stats-body { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    background-color: #272a33; 
    padding: 15px; 
}

.stats-top-grid { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 40px; 
    margin-bottom: 5px; 
}

.stats-col { 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.stat-row { 
    display: flex; 
    justify-content: space-between; 
    font-size: 13px; 
}

.stat-row span:first-child { 
    color: #dfdfdf; 
}

.stat-row span:last-child { 
    color: #fff; 
    text-align: right; 
}

.stats-table-container { 
    background-color: #1d1f26; 
    border-radius: 4px; 
    overflow: hidden; 
}

.stats-table { 
    width: 100%; 
    border-collapse: collapse; 
    text-align: left; 
    font-size: 13px; 
}

.stats-table th { 
    font-weight: 700; 
    padding: 10px; 
    color: #dfdfdf; 
    border-bottom: 1px solid #3c404d; 
}

.stats-table td { 
    padding: 10px; 
    color: #fff; 
}

.stats-footer { 
    display: flex; 
    justify-content: flex-end; 
    gap: 10px; 
    margin-top: 10px; 
}

/* --- SCENE TRANSITION UI --- */
.transition-item { 
    padding: 8px 15px; 
    cursor: pointer; 
    border-bottom: 1px solid #2a2d36; 
    color: #dfdfdf; 
}

.transition-item:hover { 
    background-color: #3c404d; 
}

.transition-item.active { 
    background-color: #1e50a0; 
    color: white; 
}

/* --- STUDIO MODE STYLES --- */
.preview-layout-wrapper { 
    display: flex; 
    flex: 1; 
    min-height: 0; 
    overflow: hidden; 
    width: 100%; 
}

.studio-pane { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    min-width: 0; 
    min-height: 0; 
}

.studio-pane-header { 
    background: #1d1f26; 
    text-align: center; 
    padding: 6px; 
    font-weight: 600; 
    font-size: 13px; 
    letter-spacing: 1px; 
    color: #dfdfdf; 
    border-bottom: 1px solid #3c404d; 
}

.studio-controls { 
    width: 140px; 
    background: #272a33; 
    border-left: 1px solid #3c404d; 
    border-right: 1px solid #3c404d; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    padding: 15px 10px; 
    gap: 15px; 
}

.studio-quick-transitions { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    width: 100%; 
    border-top: 1px solid #3c404d; 
    border-bottom: 1px solid #3c404d; 
    padding: 15px 0; 
}

.studio-tbar-container { 
    flex: 1; 
    display: flex; 
    justify-content: center; 
    align-items: center; 
    position: relative; 
    width: 100%; 
    min-height: 150px; 
}

.studio-tbar-track { 
    width: 4px; 
    height: 150px; 
    background: #1d1f26; 
    border-radius: 2px; 
    position: relative; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
}

.studio-tbar { 
    -webkit-appearance: slider-vertical; 
    appearance: slider-vertical; 
    width: 30px; 
    height: 150px; 
    margin: 0; 
    cursor: grab; 
    background: transparent; 
    outline: none; 
}

@supports not (appearance: slider-vertical) {
    .studio-tbar { 
        appearance: auto; 
        width: 150px; 
        height: 30px; 
        position: absolute; 
        transform: rotate(270deg); 
    }
}

/* ========================================================================= */
/* ==================== NEW FULL SETTINGS MODAL UI ========================= */
/* ========================================================================= */

.settings-window { 
    display: flex; 
    flex-direction: column; 
}

.settings-body { 
    display: flex; 
    flex: 1; 
    overflow: hidden; 
}

/* Sidebar Menu */
.settings-sidebar { 
    width: 200px; 
    background-color: #272a33; 
    border-right: 1px solid #3c404d; 
    display: flex; 
    flex-direction: column; 
    padding-top: 10px; 
}

.settings-tab { 
    padding: 10px 20px; 
    cursor: pointer; 
    font-size: 14px; 
    color: #dfdfdf; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    border-left: 3px solid transparent; 
}

.settings-tab i { 
    width: 20px; 
    text-align: center; 
}

.settings-tab:hover { 
    background-color: #3c404d; 
}

.settings-tab.active { 
    background-color: #1e50a0; 
    color: white; 
    border-left: 3px solid #4daafc; 
}

/* Main Content Area */
.settings-main { 
    flex: 1; 
    background-color: #1d1f26; 
    overflow-y: auto; 
    padding: 20px; 
}

.settings-section { 
    display: none; 
    flex-direction: column; 
    gap: 20px; 
}

.settings-section.active { 
    display: flex; 
}

.settings-group { 
    background-color: #272a33; 
    border: 1px solid #3c404d; 
    border-radius: 6px; 
    padding: 15px; 
    display: flex; 
    flex-direction: column; 
    gap: 10px; 
}

.settings-group-title { 
    font-size: 16px; 
    font-weight: 600; 
    color: white; 
    margin-bottom: 10px; 
    border-bottom: 1px solid #3c404d; 
    padding-bottom: 5px; 
}

.settings-row { 
    display: flex; 
    align-items: center; 
    margin-bottom: 5px; 
}

.settings-row label:first-child { 
    width: 160px; 
    text-align: left; 
    flex-shrink: 0; 
    color: #dfdfdf; 
}

/* Footer Buttons */
.settings-footer { 
    display: flex; 
    justify-content: flex-end; 
    gap: 10px; 
    padding: 15px; 
    background-color: #272a33; 
    border-top: 1px solid #3c404d; 
}

.hotkey-box { 
    flex: 1; 
    height: 26px; 
    background: #16181d; 
    border: 1px solid #3c404d; 
    border-radius: 4px; 
    display: flex; 
    align-items: center; 
    padding: 0 10px; 
    color: #888; 
}

.hotkey-box:empty::before { 
    content: ''; 
}