* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    overflow: hidden;
    font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
    font-size: 16px;
}

.header {
    padding: 6px 15px;
    background-color: #35373c;
    color: white;
    font-weight: bold;
    text-align: center;
    border-bottom: 2px solid #666;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.total-diff-stats {
    padding: 2px 8px;
    border-radius: 4px;
    margin: 0 5px;
}

.diff-present {
    color: #ffc7a6;
    background-color: rgba(255, 255, 255, 0.1);
}

.diff-absent {
    color: #4caf50;
    background-color: rgba(76, 175, 80, 0.2);
}

/* 差异导航区域样式 */
.diff-nav-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.diff-nav-btn {
    padding: 3px 10px;
    border: none;
    border-radius: 4px;
    background-color: #444;
    color: white;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.diff-nav-btn:disabled {
    background-color: #666;
    cursor: not-allowed;
    color: #aaa;
}

.diff-nav-btn:not(:disabled):hover {
    background-color: #555;
}

/* 当前差异序号显示 */
.diff-index-display {
    font-size: 14px;
    color: #ccc;
    min-width: 80px;
}

.editor-container {
    display: flex;
    height: calc(100vh - 42px);
    background-color: #f8f8f8;
}

.editor-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: white;
    overflow: hidden;
    border-right: 1px solid #ddd;
}

.editor-wrapper:last-child {
    border-right: none;
}

.editor-info {
    padding: 6px 15px;
    background-color: #f5f5f5;
    color: #666;
    font-size: 14px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
}

/* 左侧编辑器：统计在右上 */
.left-editor-info {
    justify-content: flex-end;
}

/* 右侧编辑器：统计在左上 */
.right-editor-info {
    justify-content: flex-start;
}

.editor {
    flex: 1;
    border: none;
}

.CodeMirror {
    font-family: "Microsoft YaHei", "微软雅黑", "SimHei", "黑体", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    height: 100% !important;
}

.CodeMirror-linenumber {
    font-family: "Microsoft YaHei", "微软雅黑", monospace;
    font-size: 14px;
}

.diff-line-highlight {
    background-color: #fffbd3 !important;
}

.diff-line-active {
    background-color: #3572b0 !important;
    color: white !important;
}

.diff-added,
.diff-removed,
.diff-modified {
    background-color: #ff000d !important;
    border-radius: 2px;
    border: none !important;
    text-decoration: none !important;
}

/* 核心4：文本选中颜色#3572b0，最高优先级 */
.CodeMirror-selected,
.CodeMirror-selectedtext {
    background-color: #3572b0 !important;
    color: white !important;
    z-index: 10 !important;
}

/* 额外兼容：差异区域内选中样式 */
.diff-added .CodeMirror-selectedtext,
.diff-removed .CodeMirror-selectedtext,
.diff-modified .CodeMirror-selectedtext {
    background-color: #3572b0 !important;
    color: white !important;
}

#right-stats {
    margin-left: 15px;
}

.CodeMirror-lines{
	padding: 0;
}
.CodeMirror {
    height: calc(100vh - 170px) !important;
    overflow: hide !important;
}