.json-compare-tool-container {
    /* 可选，用于微调整体布局 */
}

.json-compare-card {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border-radius: 28px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    transition: all 0.2s ease;
}

.json-compare-header {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9edf4;
}

.json-compare-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    background: linear-gradient(145deg, #1e293b, #0f172a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.json-compare-header p {
    color: #475569;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.json-compare-header p span {
    background: #eef2ff;
    color: #1e40af;
    padding: 0.2rem 0.8rem;
    border-radius: 30px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.json-compare-main-panel {
    padding: 2rem;
    background: #ffffff;
}

.json-compare-editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.8rem;
}

@media (max-width: 680px) {
    .json-compare-editor-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

.json-compare-input-area,
.json-compare-output-area {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.json-compare-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.json-compare-label-row label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1e293b;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.json-compare-label-row label i {
    font-style: normal;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 400;
    color: #475569;
}

.json-compare-clear-btn {
    background: none;
    border: 1px solid #e2e8f0;
    font-size: 0.75rem;
    padding: 0.3rem 1rem;
    border-radius: 40px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s;
    background: white;
}

.json-compare-clear-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.json-compare-textarea {
    width: 100%;
    height: 280px;
    padding: 1.2rem 1.3rem;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', 'Roboto Mono', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    background: #fafcff;
    border: 1.5px solid #e2e8f0;
    border-radius: 20px;
    resize: vertical;
    outline: none;
    transition: 0.15s;
    color: #0b1e33;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.02);
}

.json-compare-textarea:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.15);
}

.json-compare-output-box {
    background: #f1f5f9;
    border-color: #d1d9e6;
    color: #1e293b;
    resize: none;
}

.json-compare-output-box:focus {
    border-color: #3b82f6;
    background: #fefefe;
}

.json-compare-action-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: 0.5rem;
    margin-bottom: 0.2rem;
    justify-content: space-between;
}

.json-compare-btn-group {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.json-compare-btn {
    background: white;
    border: 1px solid #cbd5e1;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.json-compare-btn-primary {
    background: #1e293b;
    border-color: #1e293b;
    color: white;
    box-shadow: 0 8px 16px -6px rgba(30, 41, 59, 0.3);
}

.json-compare-btn-primary:hover {
    background: #0f172a;
    border-color: #0f172a;
    transform: translateY(-1px);
}

.json-compare-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
}

.json-compare-copy-btn {
    background: #ffffff;
    border-color: #3b82f6;
    color: #3b82f6;
}

.json-compare-copy-btn:hover {
    background: #eef2ff;
    border-color: #2563eb;
    color: #1d4ed8;
}

.json-compare-error-message {
    background: #fee2e2;
    border-left: 5px solid #ef4444;
    color: #b91c1c;
    padding: 0.9rem 1.5rem;
    border-radius: 18px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 0.8rem;
    word-break: break-word;
}

.json-compare-error-message.hidden {
    display: none;
}

.json-compare-footer-note {
    margin-top: 1.2rem;
    text-align: center;
    color: #94a3b8;
    font-size: 0.75rem;
    border-top: 1px dashed #e2e8f0;
    padding-top: 1.2rem;
}

.json-compare-stats {
    font-size: 0.75rem;
    background: #ecfdf5;
    color: #065f46;
    padding: 0.2rem 1rem;
    border-radius: 30px;
    border: 1px solid #a7f3d0;
}

.json-compare-icon {
    font-size: 1.1rem;
    line-height: 1;
}

/* 差异高亮样式 */
.diff-added {
    background-color: #dcfce7;
    color: #166534;
    padding: 2px 4px;
    border-radius: 3px;
}

.diff-removed {
    background-color: #fee2e2;
    color: #991b1b;
    padding: 2px 4px;
    border-radius: 3px;
    text-decoration: line-through;
}

.diff-changed {
    background-color: #fef3c7;
    color: #92400e;
    padding: 2px 4px;
    border-radius: 3px;
}

.diff-path {
    font-family: 'SF Mono', monospace;
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 4px;
}

/* 差异结果容器 */
.diff-result-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.diff-result-title {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.diff-result-item {
    padding: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
    font-family: 'SF Mono', monospace;
    font-size: 0.85rem;
}

.diff-result-item:last-child {
    border-bottom: none;
}

/* 对比选项 */
.compare-options {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.compare-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.compare-option label {
    font-size: 0.85rem;
    color: #475569;
    cursor: pointer;
}

.compare-option input[type="checkbox"] {
    cursor: pointer;
}