.code-editor-container { height: 100%; display: flex; flex-direction: column; } .editor-header { display: flex; justify-content: space-between; align-items: center; width: 100%; } .file-path { font-family: 'Monaco', 'Consolas', 'Courier New', monospace; font-size: 14px; color: #666; } .editor-content { position: relative; display: flex; height: 600px; border: 1px solid #d9d9d9; border-radius: 6px; overflow: hidden; } .vulnerability-sidebar { position: relative; width: 20px; background-color: #f5f5f5; border-right: 1px solid #d9d9d9; } .vulnerability-marker { position: absolute; left: 2px; width: 12px; height: 12px; border-radius: 50%; cursor: pointer; border: 2px solid white; box-shadow: 0 0 4px rgba(0, 0, 0, 0.3); z-index: 10; } .vulnerability-marker:hover { transform: scale(1.2); transition: transform 0.2s; } .line-numbers { background-color: #f5f5f5; color: #999; font-family: 'Monaco', 'Consolas', 'Courier New', monospace; font-size: 12px; line-height: 20px; padding: 8px 4px; border-right: 1px solid #d9d9d9; user-select: none; min-width: 40px; text-align: right; } .line-number { height: 20px; line-height: 20px; } .editor-main { flex: 1; position: relative; } .code-textarea { width: 100%; height: 100%; border: none; outline: none; resize: none; font-size: 12px; line-height: 20px; padding: 8px; font-family: 'Monaco', 'Consolas', 'Courier New', monospace; background-color: #fff; tab-size: 2; } .code-textarea:focus { outline: none; } .vulnerability-header { display: flex; align-items: center; } .vulnerability-details { font-size: 14px; line-height: 1.6; } .vulnerability-details p { margin-bottom: 8px; } .ai-suggestion { margin-top: 16px; padding: 12px; background-color: #f6ffed; border: 1px solid #b7eb8f; border-radius: 6px; } .suggestion-content { background-color: #fff; padding: 8px; border-radius: 4px; margin: 8px 0; font-family: 'Monaco', 'Consolas', 'Courier New', monospace; font-size: 12px; white-space: pre-wrap; border: 1px solid #d9d9d9; } .confidence { margin-top: 8px; font-size: 12px; color: #666; } /* 语法高亮样式 */ .keyword { color: #0000ff; } .string { color: #008000; } .comment { color: #808080; } .number { color: #ff0000; } .function { color: #800080; } /* 响应式设计 */ @media (max-width: 768px) { .editor-content { height: 400px; } .file-path { font-size: 12px; } .code-textarea { font-size: 11px; } } /* 滚动条样式 */ .code-textarea::-webkit-scrollbar { width: 8px; height: 8px; } .code-textarea::-webkit-scrollbar-track { background: #f1f1f1; } .code-textarea::-webkit-scrollbar-thumb { background: #c1c1c1; border-radius: 4px; } .code-textarea::-webkit-scrollbar-thumb:hover { background: #a8a8a8; }