    :root { --color-added: #dff0d8; --color-removed: #f2dede; --color-modified: #fcf8e3; --search-highlight: #ffeb3b; }
    .panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
    @media (max-width: 992px) { .panel-grid { grid-template-columns: 1fr; } }
    .diff-panel { background: white; border: 1px solid #ddd; border-radius: 4px; display: flex; flex-direction: column; height: 500px; }
    .panel-header { padding: 10px 15px; background: #f5f5f5; border-bottom: 1px solid #ddd; display: flex; justify-content: space-between; align-items: center; font-weight: bold; flex-wrap: wrap; gap: 8px; }
    .panel-header .search-box { display: flex; align-items: center; gap: 5px; flex: 1; min-width: 200px; margin-left: 10px; }
    .panel-header .search-box input { height: 28px; padding: 0 8px; font-size: 13px; border: 1px solid #ccc; border-radius: 3px; flex: 1; min-width: 120px; }
    .panel-header .search-box .btn { padding: 2px 8px; font-size: 12px; height: 28px; }
    .panel-header .search-info { font-size: 12px; color: #666; margin-left: 10px; white-space: nowrap; }
    .panel-content { flex: 1; overflow: auto; position: relative; contain: layout style; }
    .text-input { width: 100%; height: 100%; padding: 15px; border: none; resize: none; font-family: Consolas, Monaco, monospace; font-size: 14px; line-height: 1.5; background: transparent; }
    .text-input:focus { outline: none; box-shadow: inset 0 0 0 2px #337ab7; }
    .diff-output { font-family: Consolas, Monaco, monospace; font-size: 14px; line-height: 1.5; padding: 15px; }
    .diff-line { display: flex; padding: 2px 0; min-height: 21px; }
    .line-number { min-width: 45px; padding-right: 12px; text-align: right; color: #777; user-select: none; font-size: 13px; }
    .line-content { flex: 1; white-space: pre-wrap; word-break: break-word; padding-left: 8px; }
    .line-added { background: var(--color-added); border-left: 3px solid #3c763d; }
    .line-removed { background: var(--color-removed); border-left: 3px solid #a94442; }
    .line-modified { background: var(--color-modified); border-left: 3px solid #8a6d3b; }
    .line-empty { background: repeating-linear-gradient(45deg, transparent, transparent 4px, #fafafa 4px, #fafafa 8px); }
    .word-added { background: #c3e6cb; color: #155724; border-radius: 2px; padding: 0 2px; margin: 0 1px; font-weight: 500; }
    .word-removed { background: #f5c6cb; color: #721c24; text-decoration: line-through; border-radius: 2px; padding: 0 2px; margin: 0 1px; }
    .search-match { background: var(--search-highlight); padding: 0 2px; border-radius: 2px; box-shadow: 0 0 0 2px #ffc107 inset; }
    .search-match-active { background: #ffc107; box-shadow: 0 0 0 2px #ff9800 inset; animation: pulse 0.5s ease; }
    @keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.05); } }
    .legend-item { display: inline-block; margin-right: 15px; margin-bottom: 5px; }
    .legend-color { display: inline-block; width: 16px; height: 16px; border: 1px solid #999; margin-right: 5px; vertical-align: middle; }
    .legend-added { background: var(--color-added); border-left: 3px solid #3c763d; }
    .legend-removed { background: var(--color-removed); border-left: 3px solid #a94442; }
    .legend-modified { background: var(--color-modified); border-left: 3px solid #8a6d3b; }
    .loader-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(255,255,255,0.9); display: none; justify-content: center; align-items: center; z-index: 9999; flex-direction: column; }
    .loader-spinner { width: 40px; height: 40px; border: 4px solid #eee; border-top-color: #337ab7; border-radius: 50%; animation: spin 1s linear infinite; margin-bottom: 15px; }
    @keyframes spin { to { transform: rotate(360deg); } }
    .diff-output.updating { opacity: 0.7; pointer-events: none; transition: opacity 0.15s ease; }
    .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
    .history-item { padding: 12px; border: 1px solid #ddd; border-radius: 4px; margin-bottom: 10px; background: #fff; cursor: pointer; transition: border-color 0.2s; }
    .history-item:hover { border-color: #337ab7; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
    .history-item .meta { font-size: 12px; color: #666; margin: 5px 0; }
    .history-item .stats { font-size: 11px; margin-top: 8px; }
    .history-item .stats span { margin-right: 10px; }
    .history-empty { text-align: center; padding: 30px; color: #999; }
    .history-actions { margin-top: 10px; }
    .history-actions .btn { padding: 2px 8px; font-size: 12px; margin-right: 5px; }
    .toast { position: fixed; bottom: 20px; right: 20px; padding: 12px 20px; background: #333; color: #fff; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.3); z-index: 10000; display: none; animation: slideIn 0.2s ease, fadeOut 0.3s ease 2.7s forwards; }
    @keyframes slideIn { from { transform: translateX(100px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
    @keyframes fadeOut { to { opacity: 0; transform: translateY(-10px); } }
    .toast.success { background: #3c763d; }
    .toast.warning { background: #8a6d3b; }
    .toast.error { background: #a94442; }