/* 全局样式重置 */
@font-face {
  font-family: "iconfont"; /* Project id 5007233 */
  src: url('/font/iconfont.woff2?t=1761390387822') format('woff2'),
       url('/font/iconfont.woff?t=1761390387822') format('woff'),
       url('/font/iconfont.ttf?t=1761390387822') format('truetype');
}

.iconfont {
  font-family: "iconfont" !important;
  font-size: 20px;
  font-style: normal;
  font-weight: bolder;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-quanping1:before {
  content: "\e8fa";
}
.icon-quxiaoquanping:before {
  content: "\e656";
}

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

/* 通知容器样式 */
.notification-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

/* 通知基础样式 */
.notification {
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(100%);
    transition: all 0.3s ease;
    max-width: 350px;
    word-wrap: break-word;
}

/* 通知显示动画 */
.notification.show {
    opacity: 1;
    transform: translateX(0);
}

/* 不同类型通知的颜色 */
.notification-success {
    background-color: #28a745;
}

.notification-error {
    background-color: #dc3545;
}

.notification-warning {
    background-color: #ffc107;
    color: #212529;
}

.notification-info {
    background-color: #17a2b8;
}

/* 基础样式设置 */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}


/* 标题样式 */
h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #214c98;
    font-weight: 600;
}



/* Tab样式 */
.tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    padding: 0 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tab-btn {
    flex: 1;
    padding: 12px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
    border-radius: 6px 6px 0 0;
}

.tab-btn:hover {
    color: #214c98;
    background: rgba(33, 76, 152, 0.05);
}

.tab-btn.active {
    color: #214c98;
    background: white;
    box-shadow: 0 -2px 0 0 #214c98 inset;
}

/* Tab内容区域 */
.tab-content {
    background: white;
    border-radius: 0 0 12px 12px;
    padding: 0px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    border-top: none;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

/* 工具容器样式 */
.tool-container {
    display: block;
    background: white;
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-top: 20px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* 比对功能样式 */
.compare-container {
    background: white;
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    margin-top: 20px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    background-color: var(--bg-color);
    color: var(--text-color);
}

/* 按钮容器靠右 */
.compare-header .button-group {
    display: flex;
    align-items: center;
}

.compare-header h2 {
    margin: 0;
    color: #214c98;
    font-weight: 600;
}

/* 比对窗口按钮样式 */
.compare-header button {
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 8px;
}

/* 压缩按钮样式（同时适用于JSON格式化和JSON比对） */
#minify-btn, #minify-target-btn, #sync-minify-btn, #minify-btn-bottom {
    background-color: #ffc107;
    color: #212529;
}

#minify-btn:hover, #minify-target-btn:hover, #sync-minify-btn:hover {
    background-color: #e0a800;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

/* 格式化按钮样式（同时适用于JSON格式化和JSON比对） */
#format-btn, #format-target-btn, #sync-format-btn {
    background-color: #17a2b8;
    color: white;
}

#format-btn:hover, #format-target-btn:hover, #sync-format-btn:hover {
    background-color: #138496;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

/* 转义按钮样式（同时适用于JSON格式化和JSON比对） */
#escape-btn, #escape-target-btn, #sync-escape-btn, #escape-btn-bottom {
    background-color: #fd7e14;
    color: white;
}

#escape-btn:hover, #escape-target-btn:hover, #sync-escape-btn:hover {
    background-color: #e06c14;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.3);
}

/* 关闭按钮样式 */
#close-compare-btn {
    background-color: #dc3545;
    color: white;
}

#close-compare-btn:hover {
    background-color: #c82333;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.3);
}

/* 粘贴按钮样式 */
#paste-btn {
    background-color: #28a745;
    color: white;
}

#paste-btn:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* 复制按钮样式 */
#copy-original-btn, #copy-target-btn, .copy-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    margin-left: 10px;
    transition: all 0.2s ease;
}
#copy-btn {
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    margin-left: 10px;
    transition: all 0.2s ease;
}

#copy-btn:hover, #copy-original-btn:hover, #copy-target-btn:hover, .copy-btn:hover {
    background-color: #0069d9;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

/* 格式化按钮样式 */
.format-btn, #format-original-btn, #format-target-btn, #sync-format-btn {
    background-color: #17a2b8;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.format-btn:hover, #format-original-btn:hover, #format-target-btn:hover, #sync-format-btn:hover {
    background-color: #138496;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.3);
}

/* 压缩按钮样式 */
.minify-btn, #minify-original-btn, #minify-target-btn, #sync-minify-btn {
    background-color: #ffc107;
    color: #212529;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.minify-btn:hover, #minify-original-btn:hover, #minify-target-btn:hover, #sync-minify-btn:hover {
    background-color: #e0a800;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}

/* 清除内容按钮样式 */
.clear-btn, #clear-original-btn, #clear-target-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.clear-btn:hover, #clear-original-btn:hover, #clear-target-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* 折叠按钮样式 */
#collapse-btn {
    background-color: #6f42c1;
    color: white;
}

#collapse-btn:hover {
    background-color: #5a32a3;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.3);
}

/* 转义按钮样式 */
#escape-btn {
    background-color: #fd7e14;
    color: white;
}

#escape-btn:hover {
    background-color: #e06c14;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(253, 126, 20, 0.3);
}

/* 清空按钮样式 */
#clear-btn {
    background-color: #6c757d;
    color: white;
}

#clear-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* 清除内容按钮样式 */
#clear-compare-btn {
    background-color: #6c757d;
    color: white;
}

#clear-compare-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* JSON转Java Bean按钮样式 */
#json-to-bean-btn {
    background-color: #4361ee;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 8px;
    /* text-transform: uppercase; */
    letter-spacing: 0.5px;
}

#json-to-bean-btn:hover {
    background-color: #3a0ca3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.4);
}

#json-to-bean-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(67, 97, 238, 0.4);
}

/* Java Bean转JSON按钮样式 */
#bean-to-json-btn {
    background-color: #3a86ff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#bean-to-json-btn:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 134, 255, 0.4);
}

#bean-to-json-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(58, 134, 255, 0.4);
}

/* 清空按钮样式优化 */
#clear-bean-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-left: 8px;
}

#clear-bean-btn:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(108, 117, 125, 0.3);
}

/* 开始比对按钮样式 */
#start-compare-btn {
    background-color: #28a745;
    color: white;
}

#start-compare-btn:hover {
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

/* 按钮活动效果 */
.compare-header button:active {
    transform: translateY(0);
    box-shadow: none;
}

.compare-content {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.compare-box {
    flex: 1;
    min-width: 300px;
}

.compare-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #495057;
    font-size: 16px;
}

.compare-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

#start-compare-btn {
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

#start-compare-btn:hover {
    background-color: #218838;
}

.compare-result {    flex: 1;    font-size: 14px;    color: #495057;    line-height: 1.6;
}

.compare-result .match {    color: #28a745;    font-weight: 500;
}

.compare-result .diff-title {    color: #dc3545;    font-weight: 600;    font-size: 16px;
}

/* 差异列表样式 */
.diff-list {    list-style: none;    padding: 0;    margin: 10px 0;
}

.diff-item {    padding: 10px;    margin-bottom: 8px;    border-radius: 6px;    border-left: 4px solid #6c757d;    background-color: #f8f9fa;    transition: all 0.2s ease;
}

.diff-item:hover {    background-color: #e9ecef;    
    /* transform: translateX(2px); */
}

/* 不同类型差异的样式 */
.diff-added {    border-left-color: #28a745;    background-color: rgba(40, 167, 69, 0.08);
}

.diff-removed {    border-left-color: #dc3545;    background-color: rgba(220, 53, 69, 0.08);
}

.diff-modified {    border-left-color: #ffc107;    background-color: rgba(255, 193, 7, 0.08);
}

.diff-type {    border-left-color: #17a2b8;    background-color: rgba(23, 162, 184, 0.08);
}

.diff-other {    border-left-color: #6c757d;    background-color: rgba(108, 117, 125, 0.08);
}

/* 差异路径和描述样式 */
.diff-path {    font-weight: 600;    color: #495057;    margin-right: 8px;    background-color: rgba(0, 0, 0, 0.05);    padding: 2px 6px;    border-radius: 3px;
}

.diff-description {    font-weight: 500;
}

/* 差异比较样式 */
.diff-comparison {    display: flex;    align-items: center;    gap: 8px;    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed #dee2e6;
}

.diff-old {    color: #dc3545;    background-color: rgba(220, 53, 69, 0.1);    padding: 2px 6px;    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
}

.diff-new {    color: #28a745;    background-color: rgba(40, 167, 69, 0.1);    padding: 2px 6px;    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
}

.diff-arrow {    color: #6c757d;    font-weight: bold;
}

/* 差异统计样式 */
.diff-stats {    display: flex;    flex-wrap: wrap;    gap: 10px;    margin-top: 15px;
    padding: 10px;    background-color: #f8f9fa;
    border-radius: 6px;
    font-size: 13px;
}

.stat-item {    font-weight: 500;
}

.stat-added {    color: #28a745;
    font-weight: 500;
}

.stat-removed {    color: #dc3545;
    font-weight: 500;
}

.stat-modified {    color: #ffc107;
    font-weight: 500;
}

.stat-type {    color: #17a2b8;
    font-weight: 500;
}

/* JSON编辑器语法高亮样式 */
.json-editor {    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
}

.json-key {    color: #0066cc;
    font-weight: 500;
}

.json-string {    color: #008000;
}

.json-number {    color: #ff0000;
}

.json-boolean {    color: #0000ff;
}

.json-null {    color: #666666;
    font-style: italic;
}

/* 差异节点高亮样式 */
.diff-key {    background-color: #fff3cd;
    padding: 1px 2px;
    border-radius: 2px;
}

.diff-key-added {    background-color: #d4edda;
    color: #155724;
    font-weight: bold;
    padding: 1px 2px;
    border-radius: 2px;
}

.diff-key-removed {    background-color: #f8d7da;
    color: #721c24;
    font-weight: bold;
    padding: 1px 2px;
    border-radius: 2px;
    text-decoration: line-through;
}

.diff-key-modified {    background-color: #fff3cd;
    color: #856404;
    font-weight: bold;
    padding: 1px 2px;
    border-radius: 2px;
}

/* 确保错误信息样式 */
.compare-result .error {    color: #dc3545;    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .compare-content {
        flex-direction: column;
    }
    
    .compare-actions {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* 输入框样式 */
.input-box {
    flex: 1;
    min-width: 300px;
    background: white;
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: box-shadow 0.3s ease;
	background: var(--card-bg);
}

.input-box:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* 结果面板样式 */
.result-panel {
    flex: 1;
    min-width: 300px;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: box-shadow 0.3s ease;
}

.result-panel:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

/* 编辑器容器样式 */
.editor-container {
    position: relative;
    display: flex;
    width: 100%;
    height: 90vh;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

/* 全屏按钮样式 */
.fullscreen-btn {
	position: relative;
	background-color: #697d90;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 16px;
    color: white;
    transition: all 0.3s ease;
}

.fullscreen-btn:hover {
    background-color: #e9ecef;
    color: #007bff;
    border-color: #007bff;
}

/* 全屏模式样式 */
.compare-container.fullscreen-mode {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    background-color: #f8f9fa;
    padding: 10px;
}

.compare-content.fullscreen-mode {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 1000 !important;
    background-color: #f8f9fa !important;
    padding: 10px !important;
    height: 100vh !important;
    width: 100vw !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    display: flex !important;
    gap: 5px !important;
}

/* 移除所有可能的高度限制 */
.compare-content.fullscreen-mode .compare-box {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    height: calc(100vh - 20px) !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.compare-content.fullscreen-mode .editor-container-wrapper {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
    height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
}

.compare-content.fullscreen-mode .editor-container {
    flex: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    position: relative !important;
    display: flex !important;
}

.compare-content.fullscreen-mode .json-editor {
    flex: 1 !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    width: 100% !important;
    overflow: auto !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    padding: 5px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border: none !important;
    resize: none !important;
    white-space: pre-wrap !important;
    word-break: break-all !important;
    background-color: #C7EDCC !important;
}

.compare-content.fullscreen-mode .line-numbers {
    flex-shrink: 0 !important;
    height: 100% !important;
    min-height: 100% !important;
    overflow: hidden !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    padding: 15px 5px !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    border: none !important;
    background-color: #f8f9fa !important;
    border-right: 1px solid #ddd !important;
    width: 40px !important;
    text-align: right !important;
}

/* 确保全屏模式下编辑器标题不会占用太多空间 */
.compare-content.fullscreen-mode .compare-box h3 {
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
}

.compare-container.fullscreen-mode .compare-content {
    height: calc(100vh - 120px);
}

.compare-container.fullscreen-mode .editor-container {
    height: 100%;
}

.compare-container.fullscreen-mode .fullscreen-btn i:before {
    content: "\e601"; /* 退出全屏图标，需要根据实际图标字体调整 */
}


/* 编辑器容器包装器样式 */
.editor-container-wrapper {
    position: relative;
    width: 100%;
}

/* 全屏按钮样式 */
.fullscreen-button {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #697d90;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 10px 10px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    opacity: 1;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

.fullscreen-button:hover {
    opacity: 1;
    background-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.4);
}

/* 最大化模式样式 */
.editor-container.maximized {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    z-index: 9999 !important;
    margin: 0 !important;
    padding: 0 !important;
    background-color: white;
}

/* 全屏模式样式 */
.editor-container.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1000;
    border-radius: 0;
    border: none;
}

.editor-container.fullscreen .fullscreen-button {
    background-color: #dc3545;
}

.editor-container.fullscreen .fullscreen-button:hover {
    background-color: #c82333;
}

/* 行号区域样式 width: 50px; */
.line-numbers {
    background-color: #f5f5f5;
    border-right: 1px solid #ddd;
    padding: 15px 8px 15px 5px;
    text-align: right;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    color: #999;
    user-select: none;
    overflow: auto;
    flex-shrink: 0;
    box-sizing: border-box;
}

.line-number {
    height: 21px;
    line-height: 1.5;
    font-size: 14px;
    color: #999;
    margin-bottom: 0;
}

/* 文本输入区域样式 */
.json-editor {
    flex: 1;
    min-height: 100%;
    padding: 15px 10px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    border: none;
    outline: none;
    white-space: pre-wrap;
    word-break: break-all;
    background-color: #C7EDCC;
    overflow-y: auto;
    resize: none;
    box-sizing: border-box;
}

/* 占位符文本样式 */
.json-editor:empty:before {
    content: attr(data-placeholder);
    color: #999;
    pointer-events: none;
    background-color: #C7EDCC;
}

/* JSON编辑器样式 */
#raw-json {
    width: 100%;
    height: 100%;
    padding: 15px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.5;
    border: 2px solid #ccc;
    border-radius: 4px;
    background-color: #C7EDCC;
    white-space: pre;
    overflow-y: auto;
    /* overflow-x: hidden !important; */
    resize: none;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.3s;
    scrollbar-width: thin;
}

/* 错误消息样式 */
#error-message {
    display: none;
    margin-top: 10px;
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    font-size: 14px;
    transition: opacity 0.3s ease;
}

#error-message.show {
    display: block;
}

/* 错误上下文样式 */
.error-context {
    margin-top: 10px;
    padding: 10px;
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.4;
}

.error-context pre {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    color: #495057;
    /* 允许HTML标签在pre标签中生效 */
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 错误位置高亮样式 */
.error-highlight {
    background-color: #ffdddd;
    color: #dc3545;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 2px;
    border: 1px solid #dc3545;
}

/* 错误高亮样式 */
.error-highlight {
    background-color: #ffcccc;
    color: #d32f2f;
    border: 1px solid #f44336;
    padding: 0 2px;
    border-radius: 2px;
    cursor: help;
}


/* 折叠内容样式 */
.collapsed {
    background-color: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    user-select: none;
}

.collapsed:hover {
    background-color: #dee2e6;
}

/* 通知样式已移至文件顶部，使用notification-container和多类型通知样式 */

/* 按钮区域样式 */
.buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* 底部按钮区域样式 */
.bottom-buttons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    justify-content: center;
}

/* 按钮样式 */
.buttons button,
.bottom-buttons button {
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 500;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.buttons button:hover,
.bottom-buttons button:hover {
    background-color: #1f8c19;
}

.buttons #clear-btn,
.bottom-buttons #clear-btn-bottom {
    background-color: #B65426;
}

.buttons #format-btn,
.bottom-buttons #format-btn-bottom {
    background-color: #9CB727;
}

.buttons #copy-btn,
.bottom-buttons #copy-btn-bottom,
.copy-btn {
    background-color: #2779B7;
}

button:active {
    transform: scale(0.98);
}

/* JSON语法高亮样式 */
.string {
    color: #a31515;
}

.number {
    color: #098658;
}

.boolean {
    color: #0000ff;
}

.null {
    color: #7f7f7f;
}

.key {
    color: #001080;
}

.bracket {
    font-weight: bold;
}

/* 添加-符号在[和{前面的样式 */
.bracket:contains('[')::before,
.bracket:contains('{')::before {
    content: '- ';
    color: #333;
    font-weight: normal;
}

/* JSON差异高亮样式 */
.highlight-diff {
    background-color: #ffeb3b;
    border: 1px solid #ffc107;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold;
}

/* 比对结果样式 */
.diff-summary {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.diff-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 300px;
    overflow-y: auto;
}

.diff-item {
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 13px;
}

.diff-added {
    background-color: #e8f5e9;
    border-left: 3px solid #4caf50;
}

.diff-removed {
    background-color: #ffebee;
    border-left: 3px solid #f44336;
}

.diff-changed {
    background-color: #fff3e0;
    border-left: 3px solid #ff9800;
}

.diff-path {
    font-weight: bold;
    margin-right: 10px;
    display: inline-block;
}

.diff-type {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-right: 10px;
}

.diff-added .diff-type {
    background-color: #4caf50;
    color: white;
}

.diff-removed .diff-type {
    background-color: #f44336;
    color: white;
}

.diff-changed .diff-type {
    background-color: #ff9800;
    color: white;
}

.no-diff {
    text-align: center;
    padding: 20px;
    color: #4caf50;
    font-weight: bold;
}

/* 美化滚动条 */
/* Webkit浏览器滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

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

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

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

/* Firefox滚动条样式 */
* {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* 确保编辑器区域的滚动条也应用样式 */
.editor-container, .editor-content, #line-numbers, 
#original-json, #target-json, 
#original-line-numbers, #target-line-numbers,
#compare-result, .tab-content {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

/* 左侧线和折叠图标样式 */
.json-container {
    position: relative;
}

/* 左侧线样式 */
.json-left-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    cursor: pointer;
}

/* 折叠图标样式 - 优化样式，使其显示在左侧线上 */
.collapse-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
    vertical-align: middle;
}

/* 红色图标样式 - 用户需求的标红折叠图标 */
.red-icon {
    background-color: #ff0000;
    border-radius: 2px;
}

/* 折叠状态图标 */
.collapse-icon.collapsed {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"></polyline></svg>');
}

/* 展开状态图标 */
.collapse-icon.expanded {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23fff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 9 9 15 15 21"></polyline></svg>');
}

/* JSON内容项样式 */
.json-item {
    position: relative;
    padding-left: 0;
    margin-left: 16px;
    line-height: 1.5;
}

/* JSON容器样式 */
.json-container {
    position: relative;
    display: flex;
    flex-direction: column;
    padding-left: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .tool-container {
        /* 保持为块级元素，不改变其基本布局 */
    }

    .input-box,
    .result-panel {
        min-width: auto;
        width: 100%;
    }

    textarea,
    pre {
        height: 250px;
    }

    .buttons,
    .bottom-buttons {
        display: flex;
        gap: 1px;
        margin-bottom: 10px;
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .buttons.bottom-buttons {
        justify-content: center;
        flex: 1;
        padding-bottom: 10px;
    }

    .buttons button,
    .bottom-buttons button {
        border-radius: 40px;
        margin: 5px;
        padding: 10px;
        font-size: 3vw;
    }

    .buttons button:hover,
    .bottom-buttons button:hover {
        background-color: #1f8c19;
    }

    .buttons #clear-btn,
    .bottom-buttons #clear-btn-bottom {
        background-color: #B65426;
    }

    .buttons #format-btn,
    .bottom-buttons #format-btn-bottom {
        background-color: #9CB727;
    }

    .buttons #copy-btn,
    .bottom-buttons #copy-btn-bottom {
        background-color: #2779B7;
    }
}/* JSON姣斿琛屽彿鏍峰紡 */
.diff-line-number {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
    padding: 2px 6px;
    background-color: #f0f0f0;
    border-radius: 3px;
}
