/* Smart Optimizer Styles */
#compressionRulesSection {
  display: block !important;
}
#smartOptimizerSection {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.optimizer-header {
  text-align: left;
  margin-bottom: 16px;
}

.optimizer-header h2 {
  color: var(--fg);
  margin: 0 0 8px 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.optimizer-description {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
}

/* Compression Rules Section */
.compression-rules-section {
  margin-top: 16px;
  padding: 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.rules-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.rules-header h3 {
  margin: 0;
  color: var(--fg);
  font-size: 1.1rem;
  font-weight: 600;
}

/* Compact Mode Selection */
.mode-selection-compact {
  display: flex;
  gap: 4px;
  background: var(--bg);
  padding: 2px;
  border-radius: 6px;
  border: 1px solid var(--border);
}

.mode-selector-compact {
  background: transparent;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  transition: all 0.2s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mode-selector-compact:hover {
  background: var(--bg-secondary);
  color: var(--fg);
}

.mode-selector-compact.active {
  background: var(--bg-secondary);
  color: var(--fg);
  border: 1px solid var(--primary);
  box-shadow: none;
}

.mode-info-compact {
  margin-bottom: 12px;
  padding: 8px;
  background: var(--bg);
  border-radius: 6px;
  border-left: 2px solid var(--primary);
}

.mode-info-compact p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.mode-suggestion {
  margin-top: 6px !important;
  font-style: italic;
  color: var(--accent) !important;
}

/* Compression Rules Grid */
.compression-rules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
}

.rule-category {
  background: var(--bg);
  border-radius: 8px;
  padding: 12px;
  border: 1px solid var(--border);
}

.rule-category h4 {
  margin: 0 0 8px 0;
  color: var(--fg);
  font-size: 0.95rem;
  font-weight: 600;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.rule-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rule-toggle {
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: all 0.2s ease;
}

.rule-toggle:hover {
  background: var(--bg-secondary);
  border-color: var(--primary);
}

.rule-toggle input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.rule-name {
  font-weight: 500;
  color: var(--fg);
  font-size: 0.85rem;
}

.rule-description {
  color: var(--muted);
  font-size: 0.75rem;
  margin-top: 2px;
}

/* Input Area */
.optimizer-input-area {
  margin-bottom: 1rem;
}

.drop-zone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 8px;
  transition: all 0.3s ease;
}

.drop-zone.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.drop-zone textarea {
  width: 100%;
  border: none;
  background: transparent;
  resize: vertical;
  min-height: 160px;
}

.drop-zone-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(var(--primary-rgb), 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.2rem;
  pointer-events: none;
}

.drop-zone.drag-over .drop-zone-overlay {
  display: flex;
}

/* Optimization Controls */
.optimization-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.control-group {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 8px;
}

.control-group label {
  display: block;
}

.control-group label > span {
  display: block;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Slider */
input[type="range"] {
  width: 100%;
  margin: 0.5rem 0;
}

.slider-label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

/* Legacy Compression Rules (for backward compatibility) */
.compression-rules {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

/* Action Buttons */
.optimizer-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.optimizer-actions button {
  min-width: 120px;
}

/* Metrics Dashboard */
.metrics-dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.metric {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
}

.metric-label {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.metric-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text);
}

.metric-value.low-reduction {
  color: var(--warning);
}

.metric-value.medium-reduction {
  color: var(--info);
}

.metric-value.high-reduction {
  color: var(--success);
}

/* Results Section */
.optimization-results {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 6px;
  margin-top: 1rem;
  display: none;
}

.optimization-results.show {
  display: block;
}

.optimization-results h3 {
  margin-top: 0;
  color: var(--primary);
}

/* Comparison View */
.comparison-view {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1rem 0;
}

.comparison-pane {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
}

.comparison-pane h4 {
  margin: 0 0 0.75rem 0;
  color: var(--primary);
  font-size: 1rem;
}

.content-preview {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.75rem;
  background: var(--bg-secondary);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-wrap: break-word;
  margin: 0;
}

/* Diff/Highlight styles */
.diff-view .content-preview {
  background: var(--bg);
}

.diff-line {
  display: block;
  padding: 0.125rem 0.5rem;
  border-left: 4px solid transparent;
}

.diff-line.addition {
  background: rgba(0, 200, 0, 0.08);
  border-left-color: rgba(0, 200, 0, 0.6);
}

.diff-line.deletion {
  background: rgba(200, 0, 0, 0.08);
  border-left-color: rgba(200, 0, 0, 0.6);
}

.diff-line.context {
  color: var(--text-muted);
}

.diff-inline-add {
  background: rgba(0, 200, 0, 0.18);
}

.diff-inline-del {
  background: rgba(200, 0, 0, 0.18);
  text-decoration: line-through;
}

/* Result Actions */
.result-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 768px) {
  .mode-selection {
    flex-direction: column;
  }
  
  .mode-selector {
    max-width: none;
  }
  
  .optimization-controls {
    grid-template-columns: 1fr;
  }
  
  .compression-rules {
    grid-template-columns: 1fr;
  }
  
  .comparison-view {
    grid-template-columns: 1fr;
  }
  
  .metrics-dashboard {
    grid-template-columns: 1fr 1fr;
  }
}

/* Dark Mode Adjustments */
body.dark-mode .mode-selector {
  background: var(--bg-secondary);
}

body.dark-mode .mode-selector.active {
  background: rgba(var(--primary-rgb), 0.2);
}

body.dark-mode .drop-zone {
  border-color: var(--border);
}

body.dark-mode .content-preview {
  background: var(--bg);
}

/* Loading State */
.optimizer-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Export Modal Enhancement */
.export-options {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin: 1.5rem 0;
}

/* Progress Indicator */
.optimization-progress {
  margin: 1rem 0;
  text-align: center;
  display: none;
}

.optimization-progress.show {
  display: block;
}

.progress-bar {
  width: 100%;
  height: 12px;
  background: var(--bg-secondary);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-fill {
  height: 100%;
  background: var(--primary);
  width: 0%;
  transition: width 0.3s ease;
  animation: progress-pulse 1.5s ease-in-out infinite;
}

@keyframes progress-pulse {
  0% { opacity: 0.8; }
  50% { opacity: 1; }
  100% { opacity: 0.8; }
}

.progress-text {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0;
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 6px;
  color: white;
  font-weight: 500;
  z-index: 1000;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  max-width: 300px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.show {
  transform: translateX(0);
}

.notification.success {
  background-color: #10b981;
}

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

.notification.info {
  background-color: #3b82f6;
}

/* Export modal styles */
.export-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.export-modal-content {
  background: var(--card);
  padding: 30px;
  border-radius: 12px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.export-modal h3 {
  margin: 0 0 20px 0;
  color: var(--fg);
}

.export-options {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 20px 0;
}

.export-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  background: var(--brand);
  color: var(--bg);
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.export-btn:hover {
  filter: brightness(0.95);
}

.close-modal {
  margin-top: 20px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}

.close-modal:hover {
  background: var(--bg-secondary);
  border-color: var(--border);
}

/* Rule Customization Panels */
.rule-customization {
  margin-top: 12px;
  margin-left: 16px;
  padding: 12px;
  background: var(--bg-primary);
  border-radius: 6px;
  border: 1px solid var(--border-color);
  border-left: 3px solid var(--primary-color);
  transition: all 0.3s ease;
  overflow: hidden;
}

.rule-customization.expanded {
  display: block !important;
  animation: slideDown 0.3s ease-out;
}

.rule-customization.collapsed {
  animation: slideUp 0.3s ease-out;
}

@keyframes slideDown {
  from {
    max-height: 0;
    opacity: 0;
  }
  to {
    max-height: 300px;
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    max-height: 300px;
    opacity: 1;
  }
  to {
    max-height: 0;
    opacity: 0;
  }
}

.customization-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Custom Options */
.custom-option {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.option-label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.85rem;
  margin-bottom: 2px;
  display: block;
}

.option-help {
  font-size: 0.75rem;
  color: var(--text-secondary);
  line-height: 1.3;
  margin-top: 4px;
  display: block;
}

/* Slider Components */
.slider-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rule-slider {
  width: 100%;
  height: 6px;
  background: var(--bg-secondary);
  border-radius: 3px;
  outline: none;
  appearance: none;
  cursor: pointer;
}

.rule-slider::-webkit-slider-thumb {
  appearance: none;
  width: 18px;
  height: 18px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.rule-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  background: var(--primary-color);
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.slider-value {
  font-weight: 500;
  color: var(--primary-color);
  background: var(--bg-secondary);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
}

/* Select Components */
.rule-select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rule-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.rule-select:hover {
  border-color: var(--primary-color);
}

/* Textarea Components */
.rule-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: var(--font-mono);
  resize: vertical;
  min-height: 60px;
  transition: all 0.2s ease;
}

.rule-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.rule-textarea::placeholder {
  color: var(--text-secondary);
  font-style: italic;
}

/* Radio Group Components */
.radio-group {
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  background: var(--card-bg);
  margin: 0;
}

.radio-group legend {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  padding: 0 8px;
  margin-bottom: 8px;
}

.radio-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  margin-bottom: 8px;
}

.radio-option:hover {
  background: var(--hover-bg);
}

.radio-option:last-child {
  margin-bottom: 0;
}

.radio-option input[type="radio"] {
  margin: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--primary-color);
  align-self: flex-start;
}

.radio-label {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.9rem;
  margin-left: 24px;
  margin-top: -18px;
}

.radio-help {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-left: 24px;
  line-height: 1.2;
}

/* Rule Toggle Enhancement */
.rule-toggle.has-customization {
  border-left: 3px solid transparent;
  transition: border-left-color 0.2s ease;
}

.rule-toggle.has-customization.enabled {
  border-left-color: var(--primary-color);
}

.rule-toggle.has-customization.enabled .rule-customization {
  display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
  .rule-customization {
    margin-left: 0;
    margin-top: 8px;
  }
  
  .slider-labels {
    font-size: 0.75rem;
  }
  
  .radio-group {
    padding: 8px;
  }
  
  .customization-content {
    gap: 12px;
  }
}

/* Dark mode adjustments for new elements */
.dark-mode .notification {
  color: white;
}

.dark-mode .export-modal-content {
  background: var(--card);
  color: var(--fg);
}

.dark-mode .export-modal h3 {
  color: var(--fg);
}

.dark-mode .close-modal {
  background: var(--bg-secondary);
  border-color: var(--border);
  color: var(--muted);
}

.dark-mode .close-modal:hover {
  background: var(--hover-bg, #2a2a2a);
  border-color: var(--border);
}

/* Dark mode customization adjustments */
.dark-mode .rule-slider::-webkit-slider-thumb {
  border-color: var(--bg-secondary);
}

.dark-mode .rule-slider::-moz-range-thumb {
  border-color: var(--bg-secondary);
}

/* Validation Feedback Styles */
.validation-feedback {
  margin-top: 6px;
  padding: 8px 12px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.4;
  animation: slideDown 0.2s ease-out;
}

.validation-error {
  color: var(--danger, #dc2626);
  display: block;
}

.rule-slider.invalid,
.rule-textarea.invalid,
.rule-select.invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px #dc2626;
}

.dark-mode .validation-feedback {
  background-color: #450a0a;
  border-color: #7f1d1d;
}

.dark-mode .validation-error {
  color: #fca5a5;
}

.dark-mode .rule-slider.invalid,
.dark-mode .rule-textarea.invalid,
.dark-mode .rule-select.invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px #dc2626;
}

/* Save Status Indicator */
.save-status-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 1000;
  display: none;
  animation: slideInRight 0.3s ease-out;
}

.save-status-indicator.saving {
  background-color: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.save-status-indicator.saved {
  background-color: #d1fae5;
  color: #059669;
  border: 1px solid #6ee7b7;
}

.save-status-indicator.error {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.dark-mode .save-status-indicator.saving {
  background-color: #1e3a8a;
  color: #93c5fd;
  border-color: #3730a3;
}

.dark-mode .save-status-indicator.saved {
  background-color: #064e3b;
  color: #6ee7b7;
  border-color: #047857;
}

.dark-mode .save-status-indicator.error {
  background-color: #450a0a;
  color: #fca5a5;
  border-color: #7f1d1d;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Validation Feedback Styles */
.validation-feedback {
  margin-top: 6px;
  padding: 8px 12px;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 6px;
  font-size: 0.875rem;
  line-height: 1.4;
  animation: slideDown 0.2s ease-out;
}

.validation-error {
  color: #dc2626;
  display: block;
}

.rule-slider.invalid,
.rule-textarea.invalid,
.rule-select.invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px #dc2626;
}

.dark-mode .validation-feedback {
  background-color: #450a0a;
  border-color: #7f1d1d;
}

.dark-mode .validation-error {
  color: #fca5a5;
}

.dark-mode .rule-slider.invalid,
.dark-mode .rule-textarea.invalid,
.dark-mode .rule-select.invalid {
  border-color: #dc2626;
  box-shadow: 0 0 0 1px #dc2626;
}

/* Save Status Indicator */
.save-status-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  z-index: 1000;
  display: none;
  animation: slideInRight 0.3s ease-out;
}

.save-status-indicator.saving {
  background-color: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
}

.save-status-indicator.saved {
  background-color: #d1fae5;
  color: #059669;
  border: 1px solid #6ee7b7;
}

.save-status-indicator.error {
  background-color: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.dark-mode .save-status-indicator.saving {
  background-color: #1e3a8a;
  color: #93c5fd;
  border-color: #3730a3;
}

.dark-mode .save-status-indicator.saved {
  background-color: #064e3b;
  color: #6ee7b7;
  border-color: #047857;
}

.dark-mode .save-status-indicator.error {
  background-color: #450a0a;
  color: #fca5a5;
  border-color: #7f1d1d;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Subtle borders and harmonized colors for export preview and modal */
.export-modal .export-preview {
  /* ensure consistent background and border in light theme */
  background: var(--bg-secondary);
  border: 1px solid var(--border);
}

/* Scrollable areas - light-themed custom scrollbars for WebKit */
.export-modal .export-preview,
.history-entry-preview pre,
#mdPreview pre,
.file-list {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: var(--muted) transparent; /* Firefox */
}

.export-modal .export-preview::-webkit-scrollbar,
.history-entry-preview pre::-webkit-scrollbar,
#mdPreview pre::-webkit-scrollbar,
.file-list::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.export-modal .export-preview::-webkit-scrollbar-track,
.history-entry-preview pre::-webkit-scrollbar-track,
#mdPreview pre::-webkit-scrollbar-track,
.file-list::-webkit-scrollbar-track {
  background: transparent;
}

.export-modal .export-preview::-webkit-scrollbar-thumb,
.history-entry-preview pre::-webkit-scrollbar-thumb,
#mdPreview pre::-webkit-scrollbar-thumb,
.file-list::-webkit-scrollbar-thumb {
  background-color: var(--muted);
  border-radius: 8px;
  border: 2px solid var(--bg-secondary);
}

/* Hover state for better affordance */
.export-modal .export-preview::-webkit-scrollbar-thumb:hover,
.history-entry-preview pre::-webkit-scrollbar-thumb:hover,
#mdPreview pre::-webkit-scrollbar-thumb:hover,
.file-list::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in srgb, var(--muted) 80%, var(--fg) 20%);
}

/* Light theme preview areas (optimizer) */
#beforePreview,
#afterPreview,
.content-preview {
  background: var(--bg-secondary);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

/* Extend custom scrollbars to optimizer previews */
#beforePreview,
#afterPreview,
.content-preview {
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: var(--muted) transparent; /* Firefox */
}

#beforePreview::-webkit-scrollbar,
#afterPreview::-webkit-scrollbar,
.content-preview::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

#beforePreview::-webkit-scrollbar-track,
#afterPreview::-webkit-scrollbar-track,
.content-preview::-webkit-scrollbar-track {
  background: transparent;
}

#beforePreview::-webkit-scrollbar-thumb,
#afterPreview::-webkit-scrollbar-thumb,
.content-preview::-webkit-scrollbar-thumb {
  background-color: var(--muted);
  border-radius: 8px;
  border: 2px solid var(--bg-secondary);
}

#beforePreview::-webkit-scrollbar-thumb:hover,
#afterPreview::-webkit-scrollbar-thumb:hover,
.content-preview::-webkit-scrollbar-thumb:hover {
  background-color: color-mix(in srgb, var(--muted) 80%, var(--fg) 20%);
}
