/* --- Globale Variablen & Reset --- */
:root {
    /* VS Code Design Tokens */
    --bg-main: #1e1e1e;
    /* Main background */
    --sidebar-bg: #10100F;
    /* Activity Bar background */
    --pane-bg: #252526;
    /* Explorer / Side Bar background */
    --pane-header-bg: #252526;
    /* Header background */
    --accent-color: #007acc;
    /* VS Code Blue */
    --text-main: #cccccc;
    /* Dark theme text */
    --text-muted: #858585;
    /* Dimmed text */
    --border-color: #3c3c3c;
    /* Border color */
    --gutter-bg: #1e1e1e;
    /* Gutter background */
    --gutter-hover: #333333;

    /* Light Theme for Editors (as requested) */
    --editor-bg: #ffffff;
    --editor-text: #334155;
    --editor-border: #cbd5e1;
    --editor-header: #f1f5f9;
}

/* --- VS Code Style Scrollbars --- */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(121, 121, 121, 0.4);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 100, 100, 0.7);
    background-clip: content-box;
}

::-webkit-scrollbar-corner {
    background: transparent;
}


* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    color: var(--text-main);
    background-color: var(--bg-main);
}

body.is-dragging iframe {
    pointer-events: none;
}



.app-wrapper {
    display: flex;
    flex-direction: row;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
}


/* --- Main Menu (Left Sidebar) --- */
.main-menu {
    width: 50px;
    /* Slimmer Like VS Code */
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    flex-shrink: 0;
    border-right: 1px solid var(--border-color);
}

.circular-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s;
    font-size: 1.5rem;
    color: var(--text-muted);
    border-radius: 0;
    /* Square icons like VS Code Activity Bar */
}

.circular-icon.active,
.circular-icon:hover {
    color: white;
}

.circular-icon.active {
    border-left: 2px solid white;
}

.app-icon img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}


.user-icon {
    color: var(--text-muted);
}


/* --- Splitter Container --- */
.splitter-container {
    flex-grow: 1;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    min-height: 0;
    min-width: 0;
    background: var(--bg-main);
}

.split-pane {
    display: flex;
    flex-direction: column;
    background: var(--pane-bg);
    height: 100%;
    overflow: hidden;
}

.floating-pane {
    display: none !important;
}

.pane-header {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    background: var(--pane-header-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 35px;
}

.pane-header h3 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-main);
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

#new-project-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#new-project-btn:hover {
    background: #3c3c3c;
    color: white;
}

.pane-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pane-close-btn:hover {
    background: #3c3c3c;
    color: white;
}

.pane-action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pane-action-btn.success {
    color: #10b981;
}

.pane-action-btn.success:hover {
    background: #10b98122;
}

.pane-action-btn.danger {
    color: #ef4444;
}

.pane-action-btn.danger:hover {
    background: #ef444422;
}

.pane-content {
    flex-grow: 1;
    overflow: auto;
    position: relative;
    padding: 0;
    /* Let content handle padding */
}

/* Split.js Gutter Styling */
.gutter {
    background-color: var(--gutter-bg);
    background-repeat: no-repeat;
    background-position: center;
}

.gutter:hover {
    background-color: var(--accent-color);
    /* Highlight color like VS Code */
}


.gutter.gutter-horizontal {
    cursor: col-resize;
    width: 8px;
}

/* --- Tool Bar (Right Sidebar) --- */
.tool-bar {
    width: 50px;
    background: var(--sidebar-bg);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    gap: 8px;
    flex-shrink: 0;
}

.tool-bar button {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: background 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.tool-bar button:hover {
    background: #3c3c3c;
    color: white;
}

.tool-bar hr {
    width: 30px;
    border: 0;
    border-top: 1px solid var(--border-color);
    margin: 4px 0;
}


/* --- Specific Pane Styles --- */
#project-list {
    list-style: none;
}

#project-list li {
    padding: 6px 16px;
    cursor: pointer;
    transition: background 0.1s;
    font-size: 0.85rem;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#project-list li:hover {
    background: #2a2d2e;
}

#project-list li.active {
    background: #37373d;
    color: white;
}


.header-status {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: #64748b;
}

#save-indicator {
    opacity: 0.6;
}

.editor-container {
    padding: 0;
    /* Remove padding to let Quill fill */
    display: flex;
    flex-direction: column;
}

#editor {
    flex-grow: 1;
}

.ql-container {
    font-size: 16px !important;
    border: none !important;
}

.ql-toolbar {
    border: none !important;
    border-bottom: 1px solid var(--border-color) !important;
    background: white;
}

#editor-stats {
    padding: 8px 16px;
    background: var(--editor-header);
    border-top: 1px solid var(--editor-border);
    display: flex;
    gap: 20px;
    font-size: 0.8rem;
    color: var(--editor-text);
    opacity: 0.8;
}

#editor-stats span {
    font-weight: bold;
    color: var(--accent-color);
}


/* --- Context Dialogs Layout --- */
.context-dialogs-wrapper {
    display: grid;
    grid-template-columns: 50px auto;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: var(--pane-bg);
}

.context-dialogs-switcher {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 0;
    gap: 15px;
    z-index: 10;
}


.context-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.context-btn:hover {
    color: white;
}

.context-btn.active {
    color: white;
    background: var(--pane-bg);
}



.context-dialogs-container {
    position: relative;
    flex-grow: 1;
    overflow: hidden;
}

.context-dialog {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    background: var(--editor-bg);
    color: var(--editor-text);
}


.context-dialog.active {
    display: flex;
}

.andocker-iframe-container,
.manual-iframe-container {
    flex-grow: 1;
    overflow: hidden;
}

/* --- Internal Chat Styles --- */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--editor-bg);
}


.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
}

.message.system {
    align-self: center;
    background: #e2e8f0;
    color: #1e293b;
    font-size: 0.85rem;
    text-align: center;
    border-radius: 20px;
    font-weight: 500;
}

.message.user {
    align-self: flex-end;
    background: var(--accent-color);
    color: white;
    border-bottom-right-radius: 2px;
}

.message.assistant {
    align-self: flex-start;
    background: #f1f5f9;
    color: #000;
    border-bottom-left-radius: 2px;
    border: 1px solid #cbd5e1;
}

.delete-msg-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 0.7rem;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message:hover .delete-msg-btn {
    display: flex;
}

.edit-msg-input {
    width: 100%;
    min-height: 60px;
    border: 1px solid var(--accent-color);
    border-radius: 4px;
    padding: 5px;
    font-family: inherit;
    font-size: inherit;
    resize: vertical;
}

.chat-input-area {
    padding: 15px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    background: white;
}

.chat-input-area input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}

.chat-input-area input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.chat-input-area button {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-input-area button:hover {
    background: #2563eb;
}

/* --- TODO Dummy Styles --- */
.dummy-todo-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #64748b;
    text-align: center;
    padding: 40px;
}

/* --- TODO & Stopwatch Styles --- */
.todo-stopwatch-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 20px;
    padding: 20px;
}

.stopwatch-display {
    font-size: 3rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
    color: var(--text-main);
}

.stopwatch-btn {
    padding: 12px 30px;
    font-size: 1.1rem;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.stopwatch-btn.start {
    background-color: #10b981;
    color: white;
}

.stopwatch-btn.stop {
    background-color: #ef4444;
    color: white;
}

.stopwatch-status {
    font-size: 0.9rem;
    color: #333;
}

.todo-sections-wrapper {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    min-height: 100%;
    background: var(--editor-bg);
}

.todo-stopwatch-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 300px;
    gap: 20px;
    padding: 20px;
    border-right: 1px solid var(--border-color);
}

.manual-time-container {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    min-width: 300px;
}

.manual-time-container h4 {
    margin: 0;
    font-size: 0.9rem;
    color: #000;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.manual-time-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field-group label {
    font-size: 0.8rem;
    color: #333 !important;
    font-weight: 600;
}

.field-group input {
    padding: 8px 12px;
    border: 1px solid #999;
    border-radius: 6px;
    background: white;
    font-family: inherit;
    font-size: 0.9rem;
    color: #000 !important;
}

.field-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.manual-entry-btn {
    padding: 10px 20px;
    background-color: var(--sidebar-bg);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background 0.2s;
}

.manual-entry-btn:hover {
    background-color: #3e3e42;
}

/* Hourglass icon for tree nodes */
ol.tree li.has-timer span::after {
    content: "\f252";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    margin-left: 8px;
    color: #f59e0b;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.5;
    }
}


/* --- Icon Menu --- */
.icon-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.icon-menu button {
    width: 36px;
    height: 36px;
    font-size: 16px;
    color: #333;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.icon-menu button:hover {
    background-color: #e0e0e0;
}

.icon-menu hr {
    width: 80%;
    border: none;
    border-top: 1px solid #ccc;
    margin: 5px 0;
}

/* --- TreeView Basis-Stile (Wiederhergestellt) --- */
ol.tree {
    position: absolute;
    list-style: none;
    line-height: 1.5;
    margin: 0;
    padding: 0.25em 0.25em 2em 0.25em;
    width: 100%;
    min-height: 100%;
}

ol.tree * {
    -webkit-user-select: none;
    user-select: none;
}

ol.tree.drop-inside:before {
    position: absolute;
    content: "";
    border-top: 1px solid #888;
    left: 0.25em;
    right: 0.25em;
    top: 0.25em;
}

ol.tree ol.children {
    list-style: none;
    margin: 0;
    padding-left: 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    margin-left: 11px;
}



ol.tree ol:last-of-type.drop-below {
    border-bottom: 1px solid #888;
    padding-bottom: 0;
}

ol.tree li.item,
ol.tree li.group {
    background-clip: border-box;
    cursor: default;
    display: flex;
    align-items: center;
    min-height: 28px;
    padding: 2px 4px;
    position: relative;
    width: fit-content;
    min-width: 100%;
    box-sizing: border-box;
}

ol.tree li.item>.icon,
ol.tree li.group>.icon,
ol.tree li.item>.toggle,
ol.tree li.group>.toggle {
    margin: -1px;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    /* Verhindert, dass Icons schrumpfen */
}

ol.tree li.item span,
ol.tree li.group span {
    align-self: center;
    padding: 0.25em;
}

ol.tree li.item:hover,
ol.tree li.group:hover {
    background-color: #2a2d2e;
}


ol.tree li.item.drop-above,
ol.tree li.group.drop-above {
    border-top: 1px solid #888;
}

ol.tree li.item.drop-inside,
ol.tree li.group.drop-inside {
    border: 1px solid #888;
}

ol.tree li.item.selected,
ol.tree li.group.selected {
    background: #37373d;
    color: white;
}


ol.tree li.item>.icon {
    background-image: url("item.svg");
}

ol.tree li.item.drop-below {
    border-bottom: 1px solid #888;
}

ol.tree li.group {
    color: var(--text-main);
}


ol.tree li.group>.toggle {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23cccccc'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-size: 16px;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    opacity: 0.7;
    transition: transform 0.1s ease;
}

ol.tree li.group>.toggle:hover {
    opacity: 1;
}



ol.tree li.group.drop-below+ol {
    border-bottom: 1px solid #888;
}

ol.tree li.group.drop-below+ol:empty {
    margin-top: -1px;
    pointer-events: none;
}

ol.tree li.group.collapsed>.toggle {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23cccccc'%3E%3Cpath fill-rule='evenodd' d='M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
}



ol.tree li.group.collapsed+ol>ol,
ol.tree li.group.collapsed+ol>li {
    display: none;
}


/* --- Node Content Type Stile --- */
.content_type_Container {
    border-left: var(--content-node-border-size) solid var(--content-node-color-Container);
}

.content_type_Label {
    border-left: var(--content-node-border-size) solid var(--content-node-color-Label);
}

.content_type_Input {
    border-left: var(--content-node-border-size) solid var(--content-node-color-Input);
}

.content_type_Button {
    border-left: var(--content-node-border-size) solid var(--content-node-color-Button);
}

.content_type_HTML {
    border-left: var(--content-node-border-size) solid var(--content-node-color-HTML);
}

.content_type_Iframe {
    border-left: var(--content-node-border-size) solid var(--content-node-color-Iframe);
}

.content_type_PropContainer {
    border-left: var(--content-prop-node-border-size) solid var(--content-node-color-PropContainer);
}

.content_type_PropObject {
    border-left: var(--content-prop-node-border-size) solid var(--content-node-color-PropObject);
}

.content_type_PropList {
    border-left: var(--content-prop-node-border-size) solid var(--content-node-color-PropList);
}

.content_type_PropNumber {
    border-left: var(--content-prop-node-border-size) solid var(--content-node-color-PropNumber);
}

.content_type_PropString {
    border-left: var(--content-prop-node-border-size) solid var(--content-node-color-PropString);
}


/* --- Stile für FileSystem Node Types --- */
li[class*="fstype-"] span::before {
    font-weight: 900;
    /* Default auf Solid setzen */
    margin-right: 8px;
    width: 20px;
    display: inline-block;
    text-align: center;
}

/* KORREKTUR: Zuweisung der korrekten Font Family pro Icon-Typ */

/* Typen aus "Font Awesome 6 Free" (Solid Style) */
.fstype-Folder span::before,
.fstype-txt span::before {
    font-family: "Font Awesome 6 Free";
}

/* Typen aus "Font Awesome 6 Brands" (Eigene Schriftart) */
.fstype-js span::before,
.fstype-css span::before,
.fstype-html span::before {
    font-family: "Font Awesome 6 Brands";
    font-weight: 400;
    /* Brand-Icons haben eine normale Schriftstärke */
}

/* Unicode-Werte und Farben bleiben gleich */
.fstype-Folder span::before {
    content: "\f07c";
    color: #ffb703;
}

.fstype-txt span::before {
    content: "\f15c";
    color: #555;
}

.fstype-js span::before {
    content: "\f3b8";
    color: #000;
}

.fstype-css span::before {
    content: "\f38b";
    color: #264de4;
}

.fstype-html span::before {
    content: "\f13b";
    color: #e34f26;
}


/* --- Kontextmenü Stile --- */
.context-menu {
    position: absolute;
    background: var(--pane-bg);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 4px 0;
    list-style: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
    z-index: 2000;
    margin: 0;
    border-radius: 3px;
    font-size: 0.85rem;
}

.context-menu li {
    padding: 6px 16px;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    /* Wichtig für Untermenüs */
    color: var(--text-main);
}

.context-menu li:hover {
    background: #004b72;
    /* VS Code blue-ish hover */
    color: white;
}

/* Untermenü-Stile */
.context-menu ul {
    display: none;
    position: absolute;
    left: 100%;
    top: -1px;
    margin: 0;
    padding: 4px 0;
    list-style: none;
    background: var(--pane-bg);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.4);
}

.context-menu li:hover>ul {
    display: block;
}

.context-menu .submenu-arrow::after {
    content: '►';
    position: absolute;
    right: 8px;
    top: 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
}


/* --- Modal & Sonstige Stile --- */
.modal-overlay {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 700px;
    border-radius: 8px;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-content h2 {
    margin-top: 0;
}

.modal-content textarea {
    width: 98%;
    height: 120px;
    font-family: monospace;
    font-size: 14px;
    padding: 10px;
}

.modal-content label {
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-footer button {
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
}

#run-find-replace-btn {
    background-color: #4CAF50;
    color: white;
}

#close-modal-btn,
#close-export-modal-btn {
    background-color: #f44336;
    color: white;
}

#copy-ai-to-manual-btn {
    background-color: #6c757d;
    color: white;
    display: none;
    /* Standardmäßig unsichtbar */
}

#find-replace-status {
    margin-top: 10px;
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-height: 20px;
    font-family: monospace;
}

#jsonFileInput {
    display: none;
}

/* Neue Stile für den Modus-Umschalter */
.mode-switcher {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 15px;
}

.mode-switcher label {
    cursor: pointer;
}

#ai-inputs {
    display: none;
    /* Standardmäßig ausgeblendet */
}

#ai-prompt {
    height: 120px;
    /* Gleiche Höhe wie die anderen Textareas */
}

/* --- Stile für Export Modal --- */
.export-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.export-option-btn {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    text-align: left;
    background-color: #f9f9f9;
    transition: background-color 0.2s, border-color 0.2s;
    width: 100%;
    font-family: sans-serif;
    font-size: 1em;
}

.export-option-btn:hover {
    background-color: #f1f1f1;
    border-color: #999;
}

.export-option-btn i {
    font-size: 24px;
    margin-right: 15px;
    width: 30px;
    text-align: center;
    color: #337ab7;
}

.export-option-btn span {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
}

.export-option-btn small {
    display: block;
    color: #555;
    font-weight: normal;
    margin-top: 4px;
}

/* --- NEU: Stile für Google Drive Export --- */
#gdrive-export-area {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#gdrive-folder-selection {
    padding: 8px 12px;
    background-color: #e7f0fe;
    border: 1px solid #a9c7f5;
    border-radius: 5px;
    font-size: 0.9em;
}

#gdrive-folder-selection strong {
    margin-left: 5px;
    font-weight: bold;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .app-wrapper {
        flex-direction: row;
        overflow: hidden;
    }

    .main-menu {
        width: 50px !important;
        height: 100vh !important;
        height: 100dvh !important;
        flex-direction: column;
        padding: 10px 0;
        order: 2;
        /* Move to right */
        flex-shrink: 0;
        background: var(--sidebar-bg);
        z-index: 1000;
        justify-content: space-between;
        border-left: 1px solid var(--border-color);
    }



    .menu-middle {
        display: flex !important;
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }

    .menu-top,
    .menu-bottom {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .splitter-container {
        flex-direction: row;
        width: calc(100vw - 50px);
        height: 100vh;
        height: 100dvh;
        order: 1;
        position: relative;
    }



    .tool-bar {
        display: none !important;
    }

    .gutter {
        display: none !important;
    }

    /* Normal split-panes logic on mobile */
    .split-pane {
        display: none;
    }

    /* Tree Scroller is always background base on mobile */
    #tree-scroller {
        display: flex !important;
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        z-index: 1;
    }

    /* Floating Sidebars */
    #project-explorer,
    #editor-section,
    #mobile-tools-pane {
        position: fixed;
        top: 0;
        left: 0;
        width: calc(100vw - 50px) !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 1900;
        background: var(--pane-bg);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.3);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex !important;
    }

    .floating-pane {
        display: flex !important;
    }


    #editor-section {
        background: var(--editor-bg);
        /* Keep editors light */
    }


    /* Active State */
    #project-explorer.pane-visible,
    #editor-section.pane-visible,
    #mobile-tools-pane.pane-visible {
        transform: translateX(0) !important;
    }

    /* Context area adjustments */
    .context-dialogs-wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: 60px auto;
    }

    .context-dialogs-switcher {
        flex-direction: row;
        width: 100%;
        height: 50px;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        justify-content: center;
        padding: 0;
        gap: 15px;
    }


    .context-btn {
        width: 44px;
        height: 44px;
    }

    /* Tools List Styling */
    .mobile-tools-list {
        display: flex;
        flex-direction: column;
        padding: 15px;
        gap: 10px;
        overflow-y: auto;
    }

    .mobile-tool-item {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 12px 15px;
        border: 1px solid var(--border-color);
        border-radius: 4px;
        background: #2a2d2e;
        cursor: pointer;
        gap: 15px;
        font-size: 0.95rem;
        color: var(--text-main);
        transition: background 0.2s;
        text-align: left;
    }

    .mobile-tool-item:active {
        background: #37373d;
    }


    .mobile-tool-item i {
        font-size: 1.2rem;
        width: 24px;
        text-align: center;
        color: var(--accent-color);
    }

    .mobile-tool-item hr {
        width: 100%;
        margin: 5px 0;
        border: none;
        border-top: 1px solid var(--border-color);
    }
}

/* Media Support in Editor */
.ql-editor img,
.ql-editor video,
.ql-editor audio {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 10px 0;
}

.ql-editor audio {
    width: 100%;
}

.header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

#new-project-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

#new-project-btn:hover {
    background: #3c3c3c;
    color: white;
}

.project-list-separator {
    height: 1px;
    background: var(--border-color);
    margin: 8px 16px;
    opacity: 0.5;
    pointer-events: none;
}

/* Helpdesk & HelpChat Styling */
#helpdesk-pane {
    background: #1e1e1e;
}

.helpdesk-header {
    padding: 0 12px;
}

.helpdesk-tabs {
    display: flex;
    height: 100%;
}

.helpdesk-tab {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 0 15px;
    cursor: pointer;
    height: 35px;
    border-bottom: 2px solid transparent;
}

.helpdesk-tab.active {
    color: white;
    border-bottom-color: var(--accent-color);
}

.helpdesk-content {
    position: relative;
    background: #0f0f0f;
    /* Darker for HelpChat */
}

.helpdesk-view {
    display: none;
    height: 100%;
    width: 100%;
}

.helpdesk-view.active {
    display: block;
}

#help-chat-container {
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.help-chat-message {
    background: #252526;
    border: 1px solid #333;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 0.85rem;
    color: #d4d4d4;
    animation: fadeIn 0.2s ease-out;
}

.msg-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-size: 0.7rem;
    opacity: 0.6;
}

.msg-time {
    font-family: monospace;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}