* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    background-color: #2b2b2b;
    color: #ccc;
    overflow: hidden;
}

.ide-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.menu-bar {
    display: flex;
    background-color: #333;
    padding: 5px;
    border-bottom: 1px solid #444;
}

.menu-item {
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 3px;
}

.menu-item:hover {
    background-color: #444;
}

.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100px;
    position: relative;
}

.code-editor {
    flex: 1;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.editor-wrapper {
    position: relative;
    flex: 1;
}

.editor-toolbar {
    background-color: #333;
    padding: 5px 10px;
    flex-direction: column;
    border-bottom: 1px solid #444;
}

.output-container {
    height: 400px;
    display: flex;
    flex-direction: column;
    border-top: 1px solid #444;
}

.output-toolbar {
    display: flex;
    justify-content: space-between;
    background-color: #3c3c3c;
    padding: 5px 10px;
    border-bottom: 1px solid #444;
}

.clear-btn {
    background: #555;
    border: none;
    color: #ccc;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
}

.clear-btn:hover {
    background: #666;
}

.output-content {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    background-color: #1e1e1e;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
}

.output-line {
    margin-bottom: 5px;
    white-space: pre-wrap;
    line-height: 1.4;
}

.output-info {
    color: #569cd6;
}

.output-error {
    color: #f44747;
}

.output-success {
    color: #6a9955;
}

.output-input {
    color: #ce9178;
}

.output-prompt {
    color: #d7ba7d;
}

#current-filename {
    color: #888;
    font-size: 0.9em;
}

.input-area {
    display: flex;
    padding: 8px;
    background: #252526;
    border-top: 1px solid #444;
    flex-shrink: 0;
}

#user-input {
    flex: 1;
    background: #1e1e1e;
    border: 1px solid #444;
    color: #ccc;
    padding: 5px 10px;
    font-family: 'JetBrains Mono', monospace;
    outline: none;
}

#user-input:focus {
    border-color: #007acc;
}

.input-area button {
    background: #0e639c;
    color: white;
    border: none;
    padding: 5px 12px;
    margin-left: 8px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
}

.input-area button:hover {
    background: #1177bb;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #3c3c3c;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #555;
    width: 300px;
    border-radius: 5px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #fff;
}

#filename-input {
    width: 100%;
    padding: 8px;
    margin: 10px 0;
    background: #2b2b2b;
    border: 1px solid #555;
    color: #ccc;
    border-radius: 3px;
}

#modal-action {
    background: #4b6eaf;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    width: 100%;
}

#modal-action:hover {
    background: #5a7fbf;
}

/* 禁用状态的按钮样式 */
.menu-item:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.menu-item:disabled:hover {
    background-color: transparent;
}

/* 运行按钮状态指示 */
.running {
    background-color: #f44747 !important;
}

.running:hover {
    background-color: #ff6b6b !important;
}