* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #1e1e1e;
    color: #d4d4d4;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.main-content {
    display: flex;
    flex: 1;
    min-height: 0;
    position: relative;
}

.project-nav {
    width: 250px;
    min-width: 200px;
    max-width: 500px;
    background: #252526;
    border-right: 1px solid #3c3c3c;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-header {
    height: 35px;
    background: #333333;
    border-bottom: 1px solid #3c3c3c;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    color: #cccccc;
    font-size: 13px;
    flex-shrink: 0;
}

.editor-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #1e1e1e;
    position: relative;
    overflow: hidden;
}

.console-container {
    background: #1e1e1e;
    border-top: 1px solid #3c3c3c;
    min-height: 100px;
    max-height: 50vh;
    overflow: hidden;
}

.editor-container.empty-editor {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1e1e1e;
    position: relative;
    overflow: hidden;
}

.editor-container.empty-editor::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23858585"><path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>');
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.5;
    margin-bottom: 16px;
    animation: float 3s ease-in-out infinite;
}

.editor-container.empty-editor::after {
    content: '没有打开的文件';
    color: #858585;
    font-size: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    position: absolute;
    top: calc(50% + 40px);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    line-height: 1.5;
}

.editor-container.empty-editor .empty-hint {
    position: absolute;
    top: calc(50% + 80px);
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-size: 14px;
    text-align: center;
    line-height: 1.5;
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
    animation-delay: 0.3s;
}

@keyframes float {
    0% {
        transform: translate(-50%, -50%);
    }
    50% {
        transform: translate(-50%, calc(-50% - 10px));
    }
    100% {
        transform: translate(-50%, -50%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, 10px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.editor-tabs {
    background: #252526;
    border-bottom: 1px solid #3c3c3c;
    height: 35px;
    display: flex;
    align-items: center;
    padding: 0 10px;
    flex-shrink: 0;
}

.editor-main {
    flex: 1;
    position: relative;
    overflow: hidden;
}

#editor {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.status-bar {
    height: 22px;
    background: #007acc;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    font-size: 12px;
    user-select: none;
    flex-shrink: 0;
}

.splitter {
    width: 5px;
    background: #1e1e1e;
    cursor: col-resize;
    flex-shrink: 0;
}

.splitter:hover,
.splitter.dragging {
    background: #007acc;
}

/* 拖动时禁用文本选择 */
body.dragging {
    user-select: none;
    cursor: col-resize;
}

/* 确保拖动时不会出现白线 */
.splitter.dragging,
.splitter.dragging::after {
    background-color: #0e639c !important;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #1e1e1e;
}

::-webkit-scrollbar-thumb {
    background: #424242;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #4f4f4f;
}

.tabs {
    display: flex;
    background-color: #3c3f41;
    border-bottom: 1px solid #4c5052;
}

.tab {
    padding: 8px 15px;
    color: #a9b7c6;
    cursor: pointer;
    border-right: 1px solid #4c5052;
}

.tab.active {
    background-color: #2b2b2b;
    color: #ffffff;
}

.tab-close {
    margin-left: 8px;
    color: #808080;
}

.tab-close:hover {
    color: #ffffff;
}

.empty-card {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #cccccc;
    padding: 20px;
    max-width: 800px;
}

.empty-main-title {
    font-size: 24px;
    margin-bottom: 10px;
    color: #ffffff;
}

.empty-main-desc {
    font-size: 14px;
    margin-bottom: 30px;
    color: #999999;
}

.empty-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.feature-box {
    background: #252526;
    padding: 20px;
    border-radius: 6px;
    text-align: center;
}

.feature-icon {
    font-size: 24px;
    color: #007acc;
    margin-bottom: 10px;
}

.feature-title {
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 10px;
}

.feature-desc {
    font-size: 12px;
    color: #999999;
    line-height: 1.4;
}

.project-tree {
    flex: 1;
    overflow-y: auto;
    padding: 5px 0;
}

/* 拖放区域样式 */
.drag-over {
    border: 2px dashed #007acc;
}

/* 响应式：适配手机端 */
@media (max-width: 768px) {
  .container {
    height: 100dvh;
    min-height: 100dvh;
    overflow: auto;
  }
  .main-content {
    flex-direction: column;
    min-height: 0;
    height: auto;
  }
  .project-nav {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box;
    overflow: visible !important;
    flex: none !important;
    border-right: none;
    border-bottom: 1px solid #3c3c3c;
    flex-direction: row;
    height: 48px;
    z-index: 10;
    position: sticky;
    top: 0;
    background: #252526;
  }
  .project-header {
    width: 100vw !important;
    min-width: 100vw !important;
    max-width: 100vw !important;
    box-sizing: border-box;
    overflow: visible !important;
    flex: none !important;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: #222; /* 更深色背景 */
    border-bottom: 1px solid #333;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    padding: 0 12px;
    gap: 10px;
    position: relative;
  }
  .project-header span {
    flex: 1;
    text-align: left;
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    letter-spacing: 1px;
  }
  .project-actions {
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: none !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    position: absolute;
    right: 12px;
    top: 0;
    height: 100%;
  }
  .action-button.upload-button {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #007acc !important;
    color: #fff !important;
    border-radius: 50% !important;
    font-size: 18px !important;
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08) !important;
  }
  .project-tree {
    display: none;
  }
  .splitter {
    display: none;
  }
  .editor-container {
    min-height: 300px;
    height: calc(100dvh - 48px - 22px);
    width: 100vw;
    position: relative;
    left: 0;
    top: 0;
    border-radius: 0;
    margin: 0;
    padding: 0;
  }
  #editor {
    position: relative;
    min-height: 300px;
    height: 60dvh;
    width: 100vw;
  }
  .empty-card {
    max-width: 95vw;
    padding: 10px;
  }
  .empty-main-title {
    font-size: 18px;
  }
  .empty-main-desc {
    font-size: 13px;
  }
  .empty-features {
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 10px;
  }
  .feature-box {
    padding: 10px;
  }
  .status-bar {
    height: 32px;
    font-size: 13px;
    padding: 0 6px;
    position: sticky;
    bottom: 0;
    width: 100vw;
    z-index: 20;
  }
  .console-container {
    min-height: 80px;
    max-height: 30vh;
    font-size: 12px;
  }

} 