* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #1e1e1e;
    color: #cccccc;
    height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Menu Bar */
.menu-bar {
    height: 35px;
    background-color: #323233;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    border-bottom: 1px solid #2d2d30;
    flex-shrink: 0;
}

.vscode-logo {
    height: 20px;
    width: 20px;
    margin-right: 8px;
}

.menu-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-dropdown {
    position: relative;
}

.menu-item {
    color: #cccccc;
    font-size: 13px;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: 3px;
    display: block;
}

.menu-item:hover {
    background-color: #2a2a2b;
}

.menu-dropdown:hover .menu-item {
    background-color: #2a2a2b;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #252526;
    min-width: 240px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #454545;
    z-index: 1000;
    padding: 4px 0;
}

.menu-dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-item {
    padding: 6px 20px;
    color: #cccccc;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-item:hover {
    background-color: #2a2d2e;
}

.dropdown-divider {
    height: 1px;
    background-color: #454545;
    margin: 4px 0;
}

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

.menu-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.window-title {
    color: #cccccc;
    font-size: 13px;
}

.menu-right {
    display: flex;
    gap: 12px;
}

.menu-icon {
    color: #cccccc;
    font-size: 14px;
    cursor: pointer;
    padding: 4px 8px;
}

.menu-icon:hover {
    background-color: #2a2a2b;
}

/* Main Container */
.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Activity Bar */
.activity-bar {
    width: 48px;
    background-color: #333333;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 8px;
    gap: 12px;
    border-right: 1px solid #2d2d30;
}

.activity-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #858585;
    cursor: pointer;
    position: relative;
}

.activity-icon:hover {
    color: #ffffff;
}

.activity-icon.active {
    color: #ffffff;
}

.activity-icon.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #007acc;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #252526;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #2d2d30;
}

.sidebar-header {
    padding: 8px 16px;
    color: #cccccc;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #2d2d30;
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.folder-tree {
    padding: 0 8px;
}

.tree-item {
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #cccccc;
    font-size: 13px;
    cursor: pointer;
    border-radius: 3px;
}

.tree-item:hover {
    background-color: #2a2d2e;
}

.tree-item.active {
    background-color: #37373d;
}

.tree-icon {
    font-size: 12px;
    width: 16px;
}

/* Editor Area */
.editor-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: #1e1e1e;
}

/* Tab Bar */
.tab-bar {
    height: 35px;
    background-color: #252526;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #2d2d30;
    padding: 0 8px;
}

.tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    height: 35px;
    background-color: transparent;
    color: #969696;
    cursor: pointer;
    border-right: 1px solid #2d2d30;
    font-size: 13px;
}

.tab:hover {
    color: #ffffff;
}

.tab.active {
    background-color: #1e1e1e;
    color: #ffffff;
}

.tab-icon {
    font-size: 14px;
}

.tab-close {
    font-size: 11px;
    opacity: 0;
    margin-left: 4px;
}

.tab:hover .tab-close {
    opacity: 1;
}

.tab-actions {
    margin-left: auto;
    display: flex;
    gap: 4px;
}

.icon-btn {
    background: transparent;
    border: none;
    color: #cccccc;
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}

.icon-btn:hover {
    background-color: #2a2d2e;
}

.run-btn {
    color: #4ec9b0;
}

.run-btn:hover {
    background-color: #0e639c;
}

/* Editor Content */
.editor-content {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.editor-main {
    flex: 1;
    display: flex;
    background-color: #1e1e1e;
}

.line-numbers {
    background-color: #1e1e1e;
    color: #858585;
    padding: 12px 8px;
    text-align: right;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 20px;
    user-select: none;
    min-width: 50px;
    overflow: hidden;
}

.editor-wrapper {
    flex: 1;
    position: relative;
    overflow: auto;
}

.highlighted-code {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 12px;
    margin: 0;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 20px;
    white-space: pre;
    tab-size: 4;
    pointer-events: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    z-index: 0;
    overflow: hidden;
}

.code-editor {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    color: #d4d4d4;
    -webkit-text-fill-color: transparent;
    caret-color: #aeafad;
    border: none;
    padding: 12px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 20px;
    resize: none;
    outline: none;
    white-space: pre;
    tab-size: 4;
    z-index: 1;
    overflow: auto;
}

.code-editor::placeholder {
    color: #6a6a6a;
    -webkit-text-fill-color: #6a6a6a;
}

.code-editor::selection,
.code-editor::-moz-selection {
    background-color: #264f78 !important;
}

/* Make text visible when selected */
.code-editor:focus::selection {
    -webkit-text-fill-color: #ffffff;
    color: #ffffff;
}

.code-editor:focus::-moz-selection {
    color: #ffffff;
}

/* Python Syntax Highlighting */
.keyword { color: #569cd6; }
.string { color: #ce9178; }
.comment { color: #6a9955; }
.number { color: #b5cea8; }
.function { color: #dcdcaa; }
.builtin { color: #4ec9b0; }
.operator { color: #d4d4d4; }
.decorator { color: #4ec9b0; }
.class-name { color: #4ec9b0; }

/* Panel (Terminal/Output) */
.panel {
    height: 200px;
    background-color: #181818;
    border-top: 1px solid #2d2d30;
    display: flex;
    flex-direction: column;
}

.panel-header {
    height: 35px;
    background-color: #252526;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    border-bottom: 1px solid #2d2d30;
}

.panel-tabs {
    display: flex;
    gap: 0;
}

.panel-tab {
    background: transparent;
    border: none;
    color: #969696;
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid transparent;
}

.panel-tab:hover {
    color: #ffffff;
}

.panel-tab.active {
    color: #ffffff;
    border-bottom: 1px solid #007acc;
}

.panel-actions {
    display: flex;
    gap: 4px;
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 8px 12px;
    background-color: #1e1e1e;
}

.console-output {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #cccccc;
}

.console-output .error-text {
    color: #f48771;
}

.console-output .success-text {
    color: #4ec9b0;
}

.console-output .output-text {
    color: #cccccc;
}

/* Status Bar */
.status-bar {
    height: 22px;
    background-color: #007acc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    font-size: 12px;
    color: #ffffff;
    flex-shrink: 0;
}

.status-left,
.status-right {
    display: flex;
    gap: 12px;
}

.status-item {
    cursor: pointer;
    padding: 0 4px;
}

.status-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Scrollbar Styling */
.code-editor::-webkit-scrollbar,
.console-output::-webkit-scrollbar,
.sidebar-content::-webkit-scrollbar,
.panel-content::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.code-editor::-webkit-scrollbar-track,
.console-output::-webkit-scrollbar-track,
.sidebar-content::-webkit-scrollbar-track,
.panel-content::-webkit-scrollbar-track {
    background: #1e1e1e;
}

.code-editor::-webkit-scrollbar-thumb,
.console-output::-webkit-scrollbar-thumb,
.sidebar-content::-webkit-scrollbar-thumb,
.panel-content::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 5px;
}

.code-editor::-webkit-scrollbar-thumb:hover,
.console-output::-webkit-scrollbar-thumb:hover,
.sidebar-content::-webkit-scrollbar-thumb:hover,
.panel-content::-webkit-scrollbar-thumb:hover {
    background: #4e4e4e;
}
