/* Modern UI Theme for IDE */

body {
    font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
    margin: 0;
    background: linear-gradient(135deg, #232526 0%, #414345 100%);
    color: #f4f4f4;
    min-height: 100vh;
}

textarea, .terminal {
    width: 100%;
    height: 120px;
    margin-bottom: 12px;
    font-size: 15px;
    border-radius: 8px;
    border: none;
    background: #23272e;
    color: #e0e0e0;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}

textarea:focus, .terminal:focus {
    outline: none;
    box-shadow: 0 0 0 2px #00e6d0;
}

button, .run-button {
    padding: 10px 22px;
    font-size: 15px;
    border-radius: 6px;
    border: none;
    background: linear-gradient(90deg, #00e6d0 0%, #007cf0 100%);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: background 0.2s, transform 0.1s;
}

button:hover, .run-button:hover {
    background: linear-gradient(90deg, #007cf0 0%, #00e6d0 100%);
    transform: translateY(-2px) scale(1.03);
}

.container {
    display: flex;
    background: transparent;
    flex-grow: 1;
    overflow: hidden;
    width: 100%;
}

.left-sidebar {
    width: 240px;
    height: 100%;
    background: #23272e;
    color: #f4f4f4;
    position: fixed;
    border: none;
    top: 56px;
    left: -240px;
    overflow-y: auto;
    transition: left 0.3s;
    box-shadow: 2px 0 12px rgba(0,0,0,0.12);
    border-radius: 0 12px 12px 0;
}

.left-sidebar.open {
    left: 0;
}

.main-content {
    flex-grow: 1;
    padding: 0 20px;
    margin-top: 0;
    margin-left: 0;
    height: calc(100vh - 56px); /* Full viewport height minus navbar */
    background: rgba(36, 41, 46, 0.98);
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    transition: margin-left 0.3s, margin-right 0.3s;
    overflow-y: auto;
}

.main-content.left-shift {
    margin-left: 240px;
}

/* Removed margin-bottom adjustment as sidebar is now on the right */

.bottom-sidebar {
    width: 300px;
    height: 100vh;
    background: #181c20;
    color: #f4f4f4;
    position: fixed;
    top: 56px;
    right: -300px;
    transition: right 0.3s;
    box-shadow: -2px 0 12px rgba(0,0,0,0.12);
    border-radius: 12px 0 0 12px;
}

.bottom-sidebar.open {
    right: 0;
}

.main-content.right-shift {
    margin-right: 300px;
}

.terminal-container {
    width: 100%;
    height: calc(100vh - 56px); /* Full viewport height minus navbar */
    padding: 10px;
}

.terminal {
    width: 100%;
    height: 100%;
    background: #181c20;
    border: none;
    color: #00e6d0;
    font-size: 16px;
    font-family: 'Fira Mono', 'Courier New', monospace;
    padding: 12px;
    border-radius: 8px;
    resize: none;
    outline: none;
    overflow-y: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    display: block;
}

#editor-container {
    width: 100%;
    height: calc(100vh - 76px); /* Full viewport height minus navbar (56px) and some padding */
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    margin: 10px 0;
}


#editor-container.expanded {
    /* Removed min-height as we're using full height always */
    height: calc(100vh - 76px);
}
.CodeMirror {
    height: 100% !important;
    min-height: 600px !important;
    font-size: 15px;
    background: #23272e;
    color: #f4f4f4;
}

.navbar {
    background: #23272e !important;
    border-bottom: 1px solid #222;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    color: #00e6d0 !important;
    letter-spacing: 1px;
}

.navbar-nav .nav-link {
    color: #f4f4f4 !important;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.navbar-toggler-icon {
    height: 16px;
}

/* Tree View Styling */
.tree-view ul {
    list-style: none;
    padding-left: 1rem;
}

.tree-view li {
    margin: 8px 0;
}

.tree-view .toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 1rem;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background 0.2s;
}

.tree-view .toggle:hover {
    background: #2d323a;
}

.tree-view .toggle::before {
    content: "▶";
    font-size: 0.9rem;
    margin-right: 8px;
    transition: transform 0.2s;
}

.tree-view .collapse.show + .toggle::before {
    transform: rotate(90deg);
}

.tree-view .toggle {
    color: #00e6d0;
}

.tree-view li span.toggle {
    font-weight: bold;
}

.tree-view ul.collapse li {
    color: #adb5bd;
    margin-left: 1rem;
}

/* Scrollbar Styling */
.left-sidebar::-webkit-scrollbar {
    width: 8px;
}

.left-sidebar::-webkit-scrollbar-thumb {
    background: #2d323a;
    border-radius: 4px;
}

.left-sidebar::-webkit-scrollbar-track {
    background: #23272e;
}