.version-diff-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 10001;
  display: flex;
  justify-content: center;
  align-items: center;
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}
.diff-modal-content {
  background: #1e1e1e;
  color: #fff;
  width: 95%;
  height: 95%;
  max-width: 1400px;
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  overflow: hidden;
  border: 1px solid #333;
}
.diff-modal-header {
  background: #252526;
  padding: 15px 20px;
  border-bottom: 1px solid #333;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.diff-header-info {
  flex: 1;
}
.diff-header-title {
  margin: 0 0 5px 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #fff;
}
.diff-header-meta {
  font-size: 0.9rem;
  color: #aaa;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.diff-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.diff-meta-icon {
  opacity: 0.7;
}
.diff-legend {
  display: flex;
  gap: 15px;
  font-size: 0.85rem;
  margin-top: 5px;
  background: #111;
  padding: 5px 10px;
  border-radius: 4px;
  display: inline-flex;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-color {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.legend-color.added {
  background: rgba(40, 167, 69, 0.6);
  border: 1px solid #28a745;
}
.legend-color.removed {
  background: rgba(220, 53, 69, 0.6);
  border: 1px solid #dc3545;
}
.close-diff-btn {
  background: #333;
  border: 1px solid #555;
  color: #fff;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}
.close-diff-btn:hover {
  background: #444;
  border-color: #666;
}
.diff-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.diff-nav-buttons {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #111;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #333;
}
.diff-nav-btn {
  width: 32px;
  height: 32px;
  background: #333;
  border: 1px solid #444;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.diff-nav-btn:hover:not(:disabled) {
  background: #4a4a4a;
  border-color: #666;
}
.diff-nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.diff-nav-btn svg {
  width: 16px;
  height: 16px;
}
.diff-nav-counter {
  font-size: 12px;
  font-weight: 500;
  color: #aaa;
  min-width: 60px;
  text-align: center;
  padding: 0 4px;
}
.diff-line.diff-change-highlight {
  position: relative;
}
.diff-line.diff-change-highlight::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #ffcc00;
  animation: highlightPulse 1s ease-in-out;
}
.diff-line.added.diff-change-highlight {
  background-color: rgba(40, 167, 69, 0.3);
}
.diff-line.removed.diff-change-highlight {
  background-color: rgba(220, 53, 69, 0.3);
}
@keyframes highlightPulse {
  0% {
    opacity: 0;
    transform: scaleY(0.8);
  }
  50% {
    opacity: 1;
    transform: scaleY(1);
  }
  100% {
    opacity: 1;
    transform: scaleY(1);
  }
}
.diff-viewer-container {
  flex: 1;
  overflow-y: auto;
  background: #1e1e1e;
  padding: 20px;
}
.diff-file-entry {
  margin-bottom: 15px;
  border: 1px solid #333;
  border-radius: 6px;
  overflow: hidden;
  background: #252526;
}
.diff-file-summary {
  padding: 10px 15px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  background: #2d2d2d;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}
.diff-file-summary:hover {
  background: #353535;
}
.diff-file-summary::-webkit-details-marker {
  display: none;
}
.diff-file-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Consolas", monospace;
  font-weight: 600;
  color: #e0e0e0;
}
.diff-file-chevron {
  transition: transform 0.2s;
  opacity: 0.7;
}
details[open] .diff-file-chevron {
  transform: rotate(90deg);
}
.diff-content {
  border-top: 1px solid #333;
  font-family:
    "Consolas",
    "Monaco",
    monospace;
  font-size: 13px;
  line-height: 1.5;
  overflow-x: auto;
  background: #1e1e1e;
}
.diff-line {
  display: flex;
  width: 100%;
}
.diff-line:hover {
  background: rgba(255, 255, 255, 0.03);
}
.diff-line-number {
  color: #555;
  padding: 0 10px;
  text-align: right;
  min-width: 50px;
  -webkit-user-select: none;
  user-select: none;
  border-right: 1px solid #333;
  background: #252526;
  font-size: 12px;
  line-height: 1.6;
}
.diff-line-content {
  padding-left: 15px;
  white-space: pre-wrap;
  flex: 1;
  color: #d4d4d4;
  -moz-tab-size: 4;
  tab-size: 4;
}
.diff-line.added {
  background-color: rgba(40, 167, 69, 0.15);
}
.diff-line.added .diff-line-number {
  background-color: rgba(40, 167, 69, 0.1);
  color: #85c994;
  border-right-color: rgba(40, 167, 69, 0.3);
}
.diff-line.added .diff-line-content {
  color: #b4fbb4;
}
.diff-line.removed {
  background-color: rgba(220, 53, 69, 0.15);
}
.diff-line.removed .diff-line-number {
  background-color: rgba(220, 53, 69, 0.1);
  color: #e9808a;
  border-right-color: rgba(220, 53, 69, 0.3);
}
.diff-line.removed .diff-line-content {
  color: #ffb3b3;
}
.diff-status-badge {
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 3px;
  font-weight: bold;
  text-transform: uppercase;
}
.diff-status-badge.added {
  background: rgba(40, 167, 69, 0.2);
  color: #4cd964;
  border: 1px solid rgba(40, 167, 69, 0.3);
}
.diff-status-badge.removed {
  background: rgba(220, 53, 69, 0.2);
  color: #ff5f5f;
  border: 1px solid rgba(220, 53, 69, 0.3);
}
.diff-status-badge.modified {
  background: rgba(255, 193, 7, 0.2);
  color: #ffc107;
  border: 1px solid rgba(255, 193, 7, 0.3);
}
.diff-viewer-container::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
.diff-viewer-container::-webkit-scrollbar-track {
  background: #1e1e1e;
}
.diff-viewer-container::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 5px;
}
.diff-viewer-container::-webkit-scrollbar-thumb:hover {
  background: #555;
}
.diff-content::-webkit-scrollbar {
  height: 8px;
}
@media (max-width: 768px) {
  .diff-modal-content {
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
  .diff-modal-header {
    flex-direction: column;
    gap: 10px;
  }
  .close-diff-btn {
    width: 100%;
    justify-content: center;
    background: #444;
    margin-top: 10px;
  }
  .diff-header-meta {
    font-size: 0.8rem;
    gap: 10px;
  }
  .diff-line-number {
    min-width: 35px;
    padding: 0 5px;
  }
}
body:not(.dark-theme) .version-diff-modal {
  background: rgba(0, 0, 0, 0.5);
}
body:not(.dark-theme) .diff-modal-content {
  background: #ffffff;
  color: #333;
  border: 1px solid #ddd;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
body:not(.dark-theme) .diff-modal-header {
  background: #f8f9fa;
  border-bottom: 1px solid #e0e0e0;
}
body:not(.dark-theme) .diff-header-title {
  color: #1a1a1a;
}
body:not(.dark-theme) .diff-header-meta {
  color: #666;
}
body:not(.dark-theme) .diff-legend {
  background: #f0f0f0;
  border: 1px solid #e0e0e0;
}
body:not(.dark-theme) .legend-color.added {
  background: rgba(40, 167, 69, 0.3);
  border: 1px solid #28a745;
}
body:not(.dark-theme) .legend-color.removed {
  background: rgba(220, 53, 69, 0.3);
  border: 1px solid #dc3545;
}
body:not(.dark-theme) .close-diff-btn {
  background: #e9ecef;
  border: 1px solid #ced4da;
  color: #333;
}
body:not(.dark-theme) .close-diff-btn:hover {
  background: #dee2e6;
  border-color: #adb5bd;
}
body:not(.dark-theme) .diff-viewer-container {
  background: #ffffff;
}
body:not(.dark-theme) .diff-file-entry {
  border: 1px solid #e0e0e0;
  background: #f8f9fa;
}
body:not(.dark-theme) .diff-file-summary {
  background: #f0f2f5;
}
body:not(.dark-theme) .diff-file-summary:hover {
  background: #e8eaed;
}
body:not(.dark-theme) .diff-file-title {
  color: #333;
}
body:not(.dark-theme) .diff-content {
  border-top: 1px solid #e0e0e0;
  background: #ffffff;
}
body:not(.dark-theme) .diff-line:hover {
  background: rgba(0, 0, 0, 0.02);
}
body:not(.dark-theme) .diff-line-number {
  color: #999;
  border-right: 1px solid #e0e0e0;
  background: #f8f9fa;
}
body:not(.dark-theme) .diff-line-content {
  color: #333;
}
body:not(.dark-theme) .diff-line.added {
  background-color: rgba(40, 167, 69, 0.12);
}
body:not(.dark-theme) .diff-line.added .diff-line-number {
  background-color: rgba(40, 167, 69, 0.08);
  color: #28a745;
  border-right-color: rgba(40, 167, 69, 0.25);
}
body:not(.dark-theme) .diff-line.added .diff-line-content {
  color: #1e7e34;
}
body:not(.dark-theme) .diff-line.removed {
  background-color: rgba(220, 53, 69, 0.1);
}
body:not(.dark-theme) .diff-line.removed .diff-line-number {
  background-color: rgba(220, 53, 69, 0.06);
  color: #dc3545;
  border-right-color: rgba(220, 53, 69, 0.2);
}
body:not(.dark-theme) .diff-line.removed .diff-line-content {
  color: #bd2130;
}
body:not(.dark-theme) .diff-status-badge.added {
  background: rgba(40, 167, 69, 0.15);
  color: #28a745;
  border: 1px solid rgba(40, 167, 69, 0.3);
}
body:not(.dark-theme) .diff-status-badge.removed {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
  border: 1px solid rgba(220, 53, 69, 0.3);
}
body:not(.dark-theme) .diff-status-badge.modified {
  background: rgba(255, 193, 7, 0.15);
  color: #d68f00;
  border: 1px solid rgba(255, 193, 7, 0.3);
}
body:not(.dark-theme) .diff-viewer-container::-webkit-scrollbar-track {
  background: #f0f0f0;
}
body:not(.dark-theme) .diff-viewer-container::-webkit-scrollbar-thumb {
  background: #c0c0c0;
}
body:not(.dark-theme) .diff-viewer-container::-webkit-scrollbar-thumb:hover {
  background: #a0a0a0;
}
@media (max-width: 768px) {
  body:not(.dark-theme) .close-diff-btn {
    background: #e9ecef;
  }
}
body:not(.dark-theme) .diff-nav-buttons {
  background: #f0f0f0;
  border-color: #e0e0e0;
}
body:not(.dark-theme) .diff-nav-btn {
  background: #e9ecef;
  border-color: #ced4da;
  color: #333;
}
body:not(.dark-theme) .diff-nav-btn:hover:not(:disabled) {
  background: #dee2e6;
  border-color: #adb5bd;
}
body:not(.dark-theme) .diff-nav-counter {
  color: #666;
}
body:not(.dark-theme) .diff-line.diff-change-highlight::before {
  background: #ff9900;
}
body:not(.dark-theme) .diff-line.added.diff-change-highlight {
  background-color: rgba(40, 167, 69, 0.25);
}
body:not(.dark-theme) .diff-line.removed.diff-change-highlight {
  background-color: rgba(220, 53, 69, 0.2);
}
