/* Additional custom styles for the image converter */

/* Author credit styling */
.author-credit {
  margin: 10px;
}

.author-link {
  text-decoration: none;
  color: inherit;
  font-family: Courier, monospace;
}

.author-bracket {
  color: red;
}

/* Smooth transitions for all interactive elements */
* {
  transition: all 0.2s ease-in-out;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Custom range slider styling */
#qualitySlider {
  background: linear-gradient(
    to right,
    #4299e1 0%,
    #4299e1 90%,
    #e2e8f0 90%,
    #e2e8f0 100%
  );
}

#qualitySlider::-webkit-slider-thumb {
  appearance: none;
  height: 20px;
  width: 20px;
  background: #4299e1;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

#qualitySlider::-moz-range-thumb {
  height: 20px;
  width: 20px;
  background: #4299e1;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Image preview animations */
.preview-image {
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Button hover effects */
.format-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Loading state for convert button */
.convert-btn-loading {
  position: relative;
  color: transparent;
}

.convert-btn-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .format-btn {
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
  }
}

/* Print styles */
@media print {
  body {
    background: white;
  }

  .no-print {
    display: none;
  }
}
