/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* CSS 变量定义 - 白色主题 */
:root {
    /* 背景色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #eeeeee;
    --bg-hover: #e8e8e8;
    --bg-selected: #3875d7;
    --bg-active: #d4e5ff;
    
    /* 文字颜色 */
    --text-primary: #000000;
    --text-secondary: #666666;
    --text-muted: #999999;
    --text-inverse: #ffffff;
    
    /* 边框颜色 */
    --border-primary: #d9d9d9;
    --border-secondary: #e6e6e6;
    --border-focus: #3875d7;
    
    /* 按钮颜色 */
    --btn-primary: #4a9eff;
    --btn-primary-hover: #3d8ce6;
    --btn-secondary: #f0f0f0;
    --btn-secondary-hover: #e0e0e0;
    
    /* 状态颜色 */
    --color-success: #059862;
    --color-warning: #f57c00;
    --color-error: #e53e3e;
    --color-info: #1976d2;
    
    /* 阴影 */
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 2px 8px rgba(0, 0, 0, 0.15);
    --shadow-heavy: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* 深色主题 */
[data-theme="dark"] {
    /* 背景色 */
    --bg-primary: #2b2b2b;
    --bg-secondary: #3c3f41;
    --bg-tertiary: #4c5052;
    --bg-hover: #4c5052;
    --bg-selected: #365880;
    --bg-active: #2d3748;
    
    /* 文字颜色 */
    --text-primary: #bbbbbb;
    --text-secondary: #888888;
    --text-muted: #666666;
    --text-inverse: #000000;
    
    /* 边框颜色 */
    --border-primary: #555555;
    --border-secondary: #444444;
    --border-focus: #4a9eff;
    
    /* 按钮颜色 */
    --btn-primary: #4a9eff;
    --btn-primary-hover: #3d8ce6;
    --btn-secondary: #4c5052;
    --btn-secondary-hover: #5a5d5f;
    
    /* 状态颜色 */
    --color-success: #51cf66;
    --color-warning: #ffd43b;
    --color-error: #ff6b6b;
    --color-info: #4a9eff;
    
    /* 阴影 */
    --shadow-light: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-medium: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-heavy: 0 4px 20px rgba(0, 0, 0, 0.5);
}

body {
    font-family: 'Inter', 'Segoe UI', 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* IDE 容器 */
.ide-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    transition: background-color 0.3s ease;
}

/* 菜单栏 */
.menu-bar {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: 0 10px;
    height: 32px;
    display: flex;
    align-items: center;
    position: relative;
    box-shadow: var(--shadow-light);
}

.menu-items {
    display: flex;
    gap: 20px;
}

.menu-item {
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
    border-radius: 4px;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.menu-item:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

/* 主题切换按钮 */
.theme-toggle {
    position: absolute;
    right: 15px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 16px;
}

.theme-toggle:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

/* 工具栏 */
.toolbar {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    padding: 8px 12px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-light);
}

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

.toolbar-btn {
    background: var(--btn-secondary);
    border: 1px solid var(--border-primary);
    color: var(--text-primary);
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: var(--shadow-light);
}

.toolbar-btn:hover {
    background-color: var(--btn-secondary-hover);
    border-color: var(--border-focus);
    transform: translateY(-1px);
    box-shadow: var(--shadow-medium);
}

.toolbar-btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-light);
}

.toolbar-btn.primary {
    background-color: var(--btn-primary);
    color: var(--text-inverse);
    border-color: var(--btn-primary);
}

.toolbar-btn.primary:hover {
    background-color: var(--btn-primary-hover);
    border-color: var(--btn-primary-hover);
}

.separator {
    width: 1px;
    height: 24px;
    background-color: var(--border-primary);
    margin: 0 8px;
}

.project-name {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-name::before {
    content: "📁";
    font-size: 16px;
}

/* 主要内容区域 */
.main-content {
    flex: 1;
    display: flex;
    overflow: hidden;
    background-color: var(--bg-primary);
    height: calc(100vh - 76px); /* 减去菜单栏(32px)和工具栏(44px)的高度 */
}

/* 左侧面板 */
.left-panel {
    width: 300px;
    min-width: 200px;
    max-width: 600px;
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-light);
}

/* 可拖拽的分隔条 */
.resizer {
    width: 4px;
    background-color: var(--border-primary);
    cursor: col-resize;
    position: relative;
    transition: background-color 0.2s ease;
}

.resizer:hover {
    background-color: var(--btn-primary);
}

.resizer:active {
    background-color: var(--btn-primary);
}

/* 中央编辑器区域 */
.center-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-primary);
    min-width: 400px;
    height: 100%;
}

/* 面板头部 */
.panel-header {
    background-color: var(--bg-tertiary);
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    box-shadow: var(--shadow-light);
}

.panel-title {
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title::before {
    content: "🗂️";
    font-size: 14px;
}

.panel-actions {
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.panel-actions:hover {
    color: var(--text-primary);
    background-color: var(--bg-hover);
}

/* 项目树 */
.project-tree {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
    background-color: var(--bg-secondary);
}

.tree-item {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 2px;
    transition: all 0.2s ease;
    color: var(--text-primary);
    position: relative;
}

.tree-item:hover {
    background-color: var(--bg-hover);
    transform: translateX(2px);
}

.tree-item.selected {
    background-color: var(--bg-selected);
    color: var(--text-inverse);
    box-shadow: var(--shadow-light);
}

.tree-item.folder {
    font-weight: 500;
}

.tree-item .icon {
    margin-right: 10px;
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.tree-item.selected .icon {
    color: var(--text-inverse);
}

.tree-item .name {
    flex: 1;
    font-weight: 400;
}

.tree-item.nested {
    margin-left: 20px;
    position: relative;
}

.tree-item.nested::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: var(--border-primary);
}

.editor-tabs {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    min-height: 40px;
    overflow-x: auto;
    box-shadow: var(--shadow-light);
}

.editor-tab {
    background-color: var(--bg-secondary);
    border: none;
    border-right: 1px solid var(--border-primary);
    color: var(--text-primary);
    padding: 10px 16px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    min-width: 120px;
}

.editor-tab:hover {
    background-color: var(--bg-hover);
}

.editor-tab.active {
    background-color: var(--bg-primary);
    border-bottom: 2px solid var(--btn-primary);
    color: var(--text-primary);
    font-weight: 500;
}

.editor-tab .file-icon {
    font-size: 14px;
    color: var(--text-secondary);
}

.editor-tab.active .file-icon {
    color: var(--btn-primary);
}

.editor-tab .close-btn {
    margin-left: 8px;
    padding: 2px 4px;
    border-radius: 3px;
    opacity: 0.6;
    transition: all 0.2s ease;
    font-size: 12px;
}

.editor-tab .close-btn:hover {
    opacity: 1;
    background-color: var(--bg-hover);
    color: var(--color-error);
}

.editor-content {
    flex: 1;
    position: relative;
    overflow: hidden;
    background-color: var(--bg-primary);
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 欢迎屏幕 */
.welcome-screen {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 40px;
}

.welcome-content {
    text-align: center;
    max-width: 600px;
}

.welcome-content h2 {
    color: var(--text-primary);
    margin-bottom: 20px;
    font-size: 32px;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.welcome-content p {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 16px;
    line-height: 1.6;
}

.quick-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(135deg, var(--btn-primary) 0%, var(--btn-primary-hover) 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
    text-decoration: none;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-heavy);
    background: linear-gradient(135deg, var(--btn-primary-hover) 0%, var(--btn-primary) 100%);
}

.action-btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
}

.action-btn.secondary:hover {
    background: var(--bg-hover);
    border-color: var(--btn-primary);
}

/* CodeMirror 编辑器样式 */
.CodeMirror {
    height: 100% !important;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border: none;
    flex: 1;
}

.CodeMirror-gutters {
    background-color: var(--bg-secondary) !important;
    border-right: 1px solid var(--border-primary) !important;
    padding-right: 10px;
}

.CodeMirror-linenumber {
    color: var(--text-secondary) !important;
    font-size: 12px;
    padding: 0 8px;
}

.CodeMirror-cursor {
    border-left: 2px solid var(--btn-primary) !important;
}

.CodeMirror-selected {
    background-color: var(--bg-selected) !important;
}

.CodeMirror-line {
    padding: 0 4px;
}

.CodeMirror-activeline-background {
    background-color: var(--bg-hover) !important;
}

/* 语法高亮 */
.cm-keyword { color: var(--syntax-keyword) !important; }
.cm-string { color: var(--syntax-string) !important; }
.cm-comment { color: var(--syntax-comment) !important; }
.cm-number { color: var(--syntax-number) !important; }
.cm-variable { color: var(--text-primary) !important; }
.cm-type { color: var(--syntax-type) !important; }
.cm-builtin { color: var(--syntax-builtin) !important; }
.cm-atom { color: var(--syntax-atom) !important; }

/* 右侧面板 */
.right-panel {
    width: 250px;
    background-color: var(--bg-secondary);
    border-left: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-light);
}

.structure-view {
    flex: 1;
    padding: 8px;
    overflow-y: auto;
    background-color: var(--bg-secondary);
}

.structure-item {
    display: flex;
    align-items: center;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 2px;
    transition: all 0.2s ease;
    color: var(--text-primary);
}

.structure-item:hover {
    background-color: var(--bg-hover);
}

.structure-item i {
    margin-right: 10px;
    width: 18px;
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.structure-item .name {
    flex: 1;
    font-weight: 400;
}

.structure-item.method {
    color: var(--syntax-method);
}

.structure-item.field {
    color: var(--syntax-field);
}

.structure-item.class {
    color: var(--syntax-class);
    font-weight: 500;
}

/* 底部控制台 */
.bottom-panel {
    height: 200px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-light);
}

.console-tabs {
    display: flex;
    background-color: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
    min-height: 35px;
    box-shadow: var(--shadow-light);
}

.console-tab {
    padding: 8px 16px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-right: 1px solid var(--border-primary);
    transition: all 0.2s ease;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    font-weight: 500;
}

.console-tab:hover {
    background-color: var(--bg-hover);
}

.console-tab.active {
    background-color: var(--bg-secondary);
    border-bottom: 2px solid var(--btn-primary);
    color: var(--text-primary);
}

.console-tab .icon {
    font-size: 14px;
    color: var(--text-secondary);
}

.console-tab.active .icon {
    color: var(--btn-primary);
}

.console-content {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    font-family: 'JetBrains Mono', 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.console-output {
    height: 100%;
}

.console-line {
    margin-bottom: 4px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 2px 0;
    word-wrap: break-word;
}

.timestamp {
    color: var(--text-secondary);
    font-weight: 500;
    min-width: 50px;
    font-size: 12px;
}

.message {
    color: var(--text-primary);
    flex: 1;
}

.error {
    color: var(--color-error);
}

.success {
    color: var(--color-success);
}

.warning {
    color: var(--color-warning);
}

.info {
    color: var(--color-info);
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 10% auto;
    padding: 30px;
    border-radius: 12px;
    width: 600px;
    max-width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: var(--shadow-heavy);
    border: 1px solid var(--border-primary);
    animation: slideIn 0.3s ease;
    position: relative;
}

.modal-header {
    background-color: transparent;
    padding: 0 0 15px 0;
    border-bottom: 1px solid var(--border-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    color: var(--text-primary);
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.close {
    color: var(--text-secondary);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 4px;
    border-radius: 6px;
    background: none;
    border: none;
    line-height: 1;
}

.close:hover {
    color: var(--color-error);
    background-color: var(--bg-hover);
}

.modal-body {
    padding: 0;
    color: var(--text-primary);
    line-height: 1.6;
}

.project-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

.project-option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: var(--bg-secondary);
    position: relative;
    overflow: hidden;
}

.project-option:hover {
    border-color: var(--btn-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.project-option:active {
    transform: translateY(0);
}

.project-option i {
    font-size: 24px;
    color: var(--btn-primary);
    margin-right: 15px;
    width: 40px;
    text-align: center;
}

.option-info h4 {
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.option-info p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
}

.tech-stack {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tech-tag {
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid var(--border-primary);
}

/* 动画 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .left-panel {
        width: 250px;
    }
    
    .right-panel {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .ide-container {
        flex-direction: column;
    }
    
    .main-content {
        flex-direction: column;
    }
    
    .left-panel,
    .right-panel {
        width: 100%;
        height: 200px;
        border: none;
        border-bottom: 1px solid var(--border-primary);
    }
    
    .center-panel {
        flex: 1;
        min-height: 400px;
    }
    
    .bottom-panel {
        height: 150px;
    }
    
    .toolbar-left {
        gap: 8px;
    }
    
    .menu-items {
        gap: 10px;
    }
    
    .menu-item {
        padding: 5px 8px;
        font-size: 12px;
    }
    
    .welcome-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 200px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .toolbar {
        padding: 8px 10px;
    }
    
    .toolbar-left {
        gap: 8px;
    }
    
    .toolbar-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .welcome-content h2 {
        font-size: 24px;
    }
    
    .welcome-content p {
        font-size: 14px;
    }
    
    .modal-content {
        padding: 20px;
        margin: 10px;
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--border-primary);
    border-radius: 4px;
    transition: background 0.2s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

::-webkit-scrollbar-corner {
    background: var(--bg-secondary);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

/* 运行状态指示器 */
.running-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #51cf66;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* 运行状态显示 */
.run-status {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 20px;
    padding: 6px 12px;
    background-color: var(--bg-tertiary);
    border-radius: 6px;
    border: 1px solid var(--border-primary);
    font-size: 13px;
    color: var(--text-primary);
}

.run-status .status-icon {
    color: #51cf66;
    font-size: 10px;
    animation: pulse 1.5s infinite;
}

.run-status .status-text {
    font-weight: 500;
}

/* 状态栏 */
.status-bar {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    height: 28px;
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--text-secondary);
    box-shadow: var(--shadow-light);
}

.status-content {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
}

.status-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-message {
    color: var(--text-primary);
    font-weight: 500;
}

.build-info {
    color: var(--text-secondary);
}

/* 通知系统 */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.notification {
    background-color: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: var(--shadow-heavy);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    animation: slideInRight 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.notification::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
}

.notification.info::before {
    background-color: var(--color-info);
}

.notification.success::before {
    background-color: var(--color-success);
}

.notification.warning::before {
    background-color: var(--color-warning);
}

.notification.error::before {
    background-color: var(--color-error);
}

.notification-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.notification.info .notification-icon {
    color: var(--color-info);
}

.notification.success .notification-icon {
    color: var(--color-success);
}

.notification.warning .notification-icon {
    color: var(--color-warning);
}

.notification.error .notification-icon {
    color: var(--color-error);
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    font-size: 14px;
}

.notification-message {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 16px;
    flex-shrink: 0;
}

.notification-close:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

.notification.removing {
    animation: slideOutRight 0.3s ease-in forwards;
}

/* 调整主内容区域高度以适应状态栏和控制台 */
.main-content.with-status {
    height: calc(100vh - 104px); /* 减去菜单栏(32px)、工具栏(44px)和状态栏(28px)的高度 */
}

.ide-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.main-content {
    flex: 1;
    min-height: 0; /* 允许flex子项收缩 */
}

/* 底部控制台面板 */
.bottom-panel {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-primary);
    height: 250px;
    min-height: 150px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    position: relative;
    resize: vertical;
    overflow: hidden;
}

.bottom-panel.hidden {
    height: 0;
    min-height: 0;
    border-top: none;
}

/* 控制台分隔条 */
.console-resizer {
    height: 4px;
    background-color: var(--bg-secondary);
    cursor: row-resize;
    border-bottom: 1px solid var(--border-primary);
    position: relative;
    transition: background-color 0.2s ease;
}

.console-resizer:hover {
    background-color: var(--color-primary);
}

.console-resizer::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 2px;
    background-color: var(--text-tertiary);
    border-radius: 1px;
}

/* 控制台标签栏 */
.console-tabs {
    display: flex;
    align-items: center;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
    height: 36px;
    padding: 0 10px;
    gap: 2px;
}

.console-tab {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: transparent;
    border: none;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    position: relative;
}

.console-tab:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

.console-tab.active {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-primary);
    border-bottom: 1px solid var(--bg-primary);
    margin-bottom: -1px;
}

.console-tab i {
    font-size: 12px;
}

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

.console-action-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-size: 14px;
}

.console-action-btn:hover {
    background-color: var(--bg-hover);
    color: var(--text-primary);
}

/* 控制台内容 */
.console-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.console-panel {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    flex-direction: column;
}

.console-panel.active {
    display: flex;
}

.console-output {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.4;
    background-color: var(--bg-primary);
}

/* 控制台消息样式 */
.console-message {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 4px;
    padding: 2px 0;
}

.console-message .timestamp {
    color: var(--text-tertiary);
    font-size: 11px;
    min-width: 70px;
    flex-shrink: 0;
}

.console-message .message {
    flex: 1;
    word-wrap: break-word;
}

.console-message.info .message {
    color: var(--text-primary);
}

.console-message.success .message {
    color: var(--color-success);
}

.console-message.warning .message {
    color: var(--color-warning);
}

.console-message.error .message {
    color: var(--color-error);
}

.console-message.debug .message {
    color: var(--color-info);
}

/* 控制台输入区域（终端模式） */
.console-input {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
    gap: 8px;
}

.console-prompt {
    color: var(--color-success);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    flex-shrink: 0;
}

.console-input-field {
    flex: 1;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    outline: none;
}

.console-input-field::placeholder {
    color: var(--text-tertiary);
}

/* 控制台滚动条 */
.console-output::-webkit-scrollbar {
    width: 8px;
}

.console-output::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.console-output::-webkit-scrollbar-thumb {
    background: var(--text-tertiary);
    border-radius: 4px;
}

.console-output::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* 响应式设计 */
@media (max-height: 600px) {
    .bottom-panel {
        height: 150px;
        min-height: 100px;
        max-height: 200px;
    }
}