/* CompareFiles.io — Custom Styles (supplements Tailwind) */

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #FFFFFF;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #6C5CE7;
}

/* Selection */
::selection {
  background: rgba(108, 92, 231, 0.3);
  color: #fff;
}

/* Animated gradient background */
.hero-gradient {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 25%, #ffffff 50%, #f8fafc 75%, #f1f5f9 100%);
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

/* Glow orbs */
.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  pointer-events: none;
}

.glow-orb-1 {
  width: 400px;
  height: 400px;
  background: #6C5CE7;
  top: -100px;
  left: -100px;
}

.glow-orb-2 {
  width: 300px;
  height: 300px;
  background: #00D2FF;
  bottom: -80px;
  right: -80px;
}

.glow-orb-3 {
  width: 250px;
  height: 250px;
  background: #FF6B6B;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.1;
}

/* Glass card */
.glass-card {
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.glass-card:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(108, 92, 231, 0.2);
}

/* Tool card hover lift */
.tool-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(108, 92, 231, 0.1);
}

/* Upload dropzone */
.dropzone {
  border: 2px dashed rgba(108, 92, 231, 0.3);
  background: rgba(108, 92, 231, 0.03);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.dropzone::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.05), rgba(0, 210, 255, 0.05));
  opacity: 0;
  transition: opacity 0.3s;
}

.dropzone:hover,
.dropzone.drag-over {
  border-color: rgba(108, 92, 231, 0.6);
  background: rgba(108, 92, 231, 0.08);
}

.dropzone:hover::before,
.dropzone.drag-over::before {
  opacity: 1;
}

.dropzone.has-file {
  border-color: rgba(46, 204, 113, 0.4);
  background: rgba(46, 204, 113, 0.05);
}

/* Diff line styles */
.diff-line {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.diff-added {
  background: rgba(46, 204, 113, 0.12);
  border-left: 3px solid #2ECC71;
}

.diff-removed {
  background: rgba(231, 76, 60, 0.12);
  border-left: 3px solid #E74C3C;
}

.diff-changed {
  background: rgba(243, 156, 18, 0.12);
  border-left: 3px solid #F39C12;
}

.diff-equal {
  border-left: 3px solid transparent;
}

.diff-line-number {
  min-width: 50px;
  text-align: right;
  color: #555;
  user-select: none;
  padding-right: 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.diff-char-added {
  background: rgba(46, 204, 113, 0.3);
  border-radius: 2px;
  padding: 0 1px;
}

.diff-char-removed {
  background: rgba(231, 76, 60, 0.3);
  border-radius: 2px;
  padding: 0 1px;
  text-decoration: line-through;
}

/* Split pane */
.split-pane {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(0, 0, 0, 0.05);
}

.split-pane>div {
  background: #FFFFFF;
}

/* Resizable handle */
.resize-handle {
  width: 6px;
  cursor: col-resize;
  background: rgba(0, 0, 0, 0.05);
  transition: background 0.2s;
}

.resize-handle:hover {
  background: rgba(108, 92, 231, 0.4);
}

/* Toast notification */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  animation: slideInToast 0.3s ease, fadeOutToast 0.3s ease 2.7s forwards;
}

@keyframes slideInToast {
  from {
    transform: translateY(20px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes fadeOutToast {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

/* FAQ accordion */
.faq-item .faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.faq-item.open .faq-answer {
  max-height: 500px;
}

.faq-item .faq-icon {
  transition: transform 0.3s ease;
}

.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* Stat counter animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-value {
  animation: countUp 0.6s ease-out;
}

/* Loading shimmer */
.shimmer {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.03) 25%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* JSON/XML tree view */
.tree-node {
  padding-left: 20px;
}

.tree-toggle {
  cursor: pointer;
  user-select: none;
}

.tree-toggle::before {
  content: '▸';
  display: inline-block;
  margin-right: 4px;
  transition: transform 0.2s;
}

.tree-toggle.open::before {
  transform: rotate(90deg);
}

.tree-key {
  color: #6C5CE7;
}

.tree-string {
  color: #2ECC71;
}

.tree-number {
  color: #00D2FF;
}

.tree-boolean {
  color: #F39C12;
}

.tree-null {
  color: #E74C3C;
}

/* Pulse dot */
.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2ECC71;
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {

  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4);
  }

  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 8px rgba(46, 204, 113, 0);
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .split-pane {
    grid-template-columns: 1fr;
  }

  .diff-line {
    font-size: 11px;
  }
}

/* Dark mode overrides */
.dark .hero-gradient {
  background: linear-gradient(135deg, #0F0F1A 0%, #1A1A2E 25%, #16213E 50%, #0F0F1A 75%, #1A1A2E 100%);
}

.dark .glass-card {
  background: rgba(26, 26, 46, 0.6);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

.dark .glass-card:hover {
  background: rgba(26, 26, 46, 0.8);
}

.dark .split-pane {
  background: rgba(255, 255, 255, 0.05);
}

.dark .split-pane>div {
  background: #0F0F1A;
}

.dark .resize-handle {
  background: rgba(255, 255, 255, 0.05);
}