
/* Immersive Mode / Desktop Environment */
body.immersive-mode {
    overflow: hidden; /* Hide scrollbars on body, we handle scaling */
    background-color: #101010;
}

body.immersive-mode #workspace {
    position: absolute;
    top: 0;
    left: 0;
    width: 5736px;
    height: 2640px;
    background-color: #202020;
    background-image: radial-gradient(#333 1px, transparent 1px);
    background-size: 40px 40px; /* Dot grid pattern */
    transform-origin: 0 0;
    /* Transformation is handled via JS */
}

/* Hide default mobile optimizations in immersive mode if they conflict */
body.immersive-mode .d-md-none {
    display: none !important;
}
body.immersive-mode .d-md-flex {
    display: flex !important;
}

/* Window Styles */
body.immersive-mode .immersive-window {
    position: absolute !important;
    display: flex !important;
    flex-direction: column !important;
    background-color: #1e1e1e;
    border: 2px solid #454545;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    z-index: 100;
    overflow: hidden;
    /* Default sizes will be set by JS or inline styles */
}

body.immersive-mode .immersive-window.active-window {
    z-index: 101;
    border-color: #007fd4;
    box-shadow: 0 15px 40px rgba(0,0,0,0.7);
}

/* Window Title Bar (We'll repurpose existing headers or add one) */
body.immersive-mode .window-drag-handle {
    cursor: grab;
    background-color: #2d2d2d;
    padding: 5px 10px;
    user-select: none;
}
body.immersive-mode .window-drag-handle:active {
    cursor: grabbing;
}

/* Specific Pane Adjustments for Window Mode */
body.immersive-mode #sidebar {
    width: 800px !important; /* Larger default sidebar for huge screen */
    max-width: none !important;
    height: 1200px !important;
    top: 100px;
    left: 100px;
}

body.immersive-mode #terminal-pane {
    height: 800px !important;
    width: 1400px !important;
    top: 100px;
    left: 1000px;
}

body.immersive-mode #editor-pane {
    width: 2000px !important;
    height: 1500px !important;
    top: 1000px;
    left: 1000px;
    /* In normal mode, editor-pane is inside a flex container.
       In immersive mode, we might need to detach it or style its parent.
       Actually, editor-pane is inside a flex row with preview-pane.
       We should probably make the PARENT of editor/preview the window,
       OR split them into separate windows.
       Let's split them.
    */
}

body.immersive-mode #preview-pane {
    position: absolute !important;
    width: 1200px !important;
    height: 1200px !important;
    top: 100px;
    left: 3200px;
    display: flex !important; /* Force show */
}
