* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #1e1e1e;
    color: #d4d4d4;
    overflow: hidden;
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    background-color: #2d2d30;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3e3e42;
}

.title {
    font-size: 14px;
    font-weight: 600;
}

.controls {
    display: flex;
    gap: 10px;
}

button {
    background-color: #0e639c;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 2px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

button:hover {
    background-color: #1177bb;
}

button.run {
    background-color: #55aa55;
}

button.run:hover {
    background-color: #66bb66;
}

.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 250px;
    background-color: #252526;
    border-right: 1px solid #3e3e42;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3e3e42;
}

.sidebar-title {
    font-size: 13px;
    text-transform: uppercase;
    color: #cccccc;
}

.sidebar-tools {
    display: flex;
    gap: 8px;
}

.sidebar-tools button {
    background: none;
    padding: 4px;
    font-size: 14px;
}

.file-tree {
    flex: 1;
    overflow-y: auto;
    padding: 5px;
}

.file-item {
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
    border-radius: 3px;
    display: flex;
    align-items: center;
    gap: 5px;
    user-select: none;
}

.file-item:hover {
    background-color: #2a2d2e;
}

.file-item.active {
    background-color: #37373d;
}

.file-item .icon {
    width: 16px;
    text-align: center;
}

.folder-children {
    padding-left: 16px;
    display: none;
}

.folder.expanded .folder-children {
    display: block;
}

.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.editor-tabs {
    display: flex;
    background-color: #2d2d30;
    border-bottom: 1px solid #3e3e42;
    overflow-x: auto;
}

.editor-tab {
    padding: 8px 15px;
    font-size: 13px;
    background-color: #2d2d30;
    border-right: 1px solid #1e1e1e;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 120px;
}

.editor-tab.active {
    background-color: #1e1e1e;
}

.editor-tab-close {
    margin-left: 5px;
    padding: 2px;
    border-radius: 2px;
}

.editor-tab-close:hover {
    background-color: #e81123;
}

#editor {
    flex: 1;
}

.resize-handle {
    position: absolute;
    top: 0;
    right: -5px;
    width: 10px;
    height: 100%;
    cursor: col-resize;
    z-index: 10;
}

.output-resize {
    height: 5px;
    background-color: #3e3e42;
    cursor: row-resize;
    display: flex;
    align-items: center;
    justify-content: center;
}

.output-resize::after {
    content: "";
    width: 30px;
    height: 2px;
    background-color: #858585;
    border-radius: 1px;
}

.output-container {
    height: 200px;
    background-color: #1e1e1e;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.output-header {
    background-color: #252526;
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #cccccc;
    font-size: 12px;
}

.output-tools button {
    padding: 3px 6px;
    font-size: 12px;
}

#output {
    flex: 1;
    padding: 10px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.status-bar {
    background-color: #007acc;
    padding: 3px 10px;
    font-size: 12px;
    display: flex;
    justify-content: space-between;
}

.lib-indicator {
    display: flex;
    gap: 15px;
}

/* 文件上传 */
#file-upload {
    display: none;
}

/* 上下文菜单 */
.context-menu {
    position: absolute;
    background-color: #252526;
    border: 1px solid #454545;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: none;
}

.context-menu-item {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.context-menu-item:hover {
    background-color: #094771;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #252526;
}

::-webkit-scrollbar-thumb {
    background: #424245;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4e4e50;
}

/* 海龟画图窗口 */
.turtle-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid #0e639c;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.turtle-header {
    background: #0e639c;
    color: white;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.turtle-close {
    cursor: pointer;
    font-size: 16px;
}

.turtle-canvas {
    display: block;
}

/* 空状态提示 */
.empty-state {
    padding: 20px;
    text-align: center;
    color: #858585;
    font-size: 13px;
}

/* 代码提示状态 */
.suggestion-status {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    color: #ccc;
    z-index: 100;
}