/* style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    background-color: #f0f0f0;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background-color: #f0f0f0;
}

/* 标题栏 */
.title-bar {
    background-color: #2d2d2d;
    color: white;
    padding: 8px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.title {
    font-weight: bold;
}

.version {
    color: #aaa;
    font-size: 12px;
}

/* 菜单栏 */
.menu-bar {
    background-color: #3c3c3c;
    color: white;
    padding: 5px 0;
    display: flex;
    position: relative;
}

.menu-item {
    padding: 5px 15px;
    cursor: pointer;
    font-size: 13px;
    position: relative;
}

.menu-item:hover {
    background-color: #4a4a4a;
}

/* 下拉菜单 */
.dropdown-menu {
    position: absolute;
    background-color: #2d2d2d;
    color: white;
    min-width: 180px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 1000;
    border: 1px solid #444;
    top: 80px;
}

.menu-option {
    padding: 8px 15px;
    cursor: pointer;
    font-size: 13px;
}

.menu-option:hover {
    background-color: #4a4a4a;
}

.menu-divider {
    height: 1px;
    background-color: #444;
    margin: 5px 0;
}

/* 主编辑区域 */
.main-area {
    flex: 1;
    display: flex;
    background-color: white;
    overflow: hidden;
    position: relative;
}

.line-numbers {
    width: 50px;
    background-color: #f8f8f8;
    border-right: 1px solid #ddd;
    padding: 10px 5px;
    text-align: right;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    color: #888;
    overflow-y: hidden;
    line-height: 1.5;
    user-select: none;
}

.code-editor {
    flex: 1;
    border: none;
    outline: none;
    padding: 10px;
    font-family: 'Consolas', monospace;
    font-size: 14px;
    line-height: 1.5;
    resize: none;
    background-color: white;
    color: #333;
    white-space: pre;
    overflow: auto;
}

.code-editor:focus {
    outline: none;
}

/* 输出区域 */
.output-area {
    height: 200px;
    background-color: #1e1e1e;
    border-top: 2px solid #444;
    display: flex;
    flex-direction: column;
}

.output-header {
    background-color: #2d2d2d;
    color: #aaa;
    padding: 5px 10px;
    font-size: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.clear-btn {
    background-color: #444;
    color: white;
    border: none;
    padding: 2px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.clear-btn:hover {
    background-color: #555;
}

.output-content {
    flex: 1;
    padding: 10px;
    font-family: 'Consolas', monospace;
    font-size: 12px;
    color: #0f0;
    overflow: auto;
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 状态栏 */
.status-bar {
    background-color: #007acc;
    color: white;
    padding: 5px 15px;
    font-size: 12px;
}

/* 错误高亮 */
.error-line {
    background-color: #ffcccc;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 对话框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #2d2d2d;
    color: white;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #444;
    width: 400px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.modal-header {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #444;
}

.modal-body {
    margin-bottom: 20px;
    line-height: 1.6;
}

.modal-footer {
    text-align: right;
}

.modal-btn {
    background-color: #007acc;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
}

.modal-btn:hover {
    background-color: #005a9e;
}

/* 海龟画布 */
.turtle-canvas {
    position: fixed;
    right: 20px;
    bottom: 220px;
    width: 400px;
    height: 400px;
    background-color: white;
    border: 2px solid #444;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    display: none;
}

.turtle-canvas canvas {
    width: 100%;
    height: 100%;
}

.turtle-header {
    background-color: #2d2d2d;
    color: white;
    padding: 5px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.turtle-close {
    cursor: pointer;
    padding: 0 5px;
}

.turtle-close:hover {
    color: #ff6b6b;
}