/* Image Forge: Advanced Image Conversion Tool
 * Author: Mohd Mahmodi
 * License: MIT
 */

/* ===== Global Styles ===== */

/* Animated gradient background */
@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Smooth scrolling behavior */
html {
  scroll-behavior: smooth;
}

/* Body styles with animated background */
body {
  font-family: 'Inter', sans-serif;
  background: #1a1a1a;
  background-size: 200% 200%;
  animation: gradientBG 15s ease infinite;
}

/* ===== Custom Scrollbar Styles ===== */
::-webkit-scrollbar {
  width: 8px;
}

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

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

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

/* ===== Utility Classes ===== */
.hidden {
  display: none;
}

/* ===== Component Styles ===== */

/* Drop Area */
#drop-area {
  transition: all 0.3s ease;
}

#drop-area.highlight {
  border-color: #3b82f6;
  background-color: rgba(59, 130, 246, 0.1);
}

/* Buttons and Select elements */
button, select {
  transition: all 0.3s ease;
}

/* Custom select styling */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}

/* ===== Swiper Styles ===== */
.swiper {
  width: 100%;
  height: 300px;
}

.swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #1a1a1a;
  border-radius: 8px;
  overflow: hidden;
}

.swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.swiper-button-next, .swiper-button-prev {
  color: #fff;
}

.swiper-pagination-bullet {
  background: #fff;
}

/* ===== Stats and Conversion Results Styles ===== */
.stats-card {
  background-color: #1f2937;
  padding: 0.75rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
}

.stats-icon {
  font-size: 1.25rem;
  color: #60a5fa;
  margin-right: 0.75rem;
}

.stats-label {
  font-size: 0.75rem;
  color: #9ca3af;
}

.stats-value {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
}

.conversion-card {
  background-color: #1f2937;
  padding: 1rem;
  border-radius: 0.5rem;
}

.conversion-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #fff;
}

.conversion-value {
  font-size: 1.125rem;
  font-weight: 700;
}

#stats-section, #conversion-stats-section {
  padding: 1rem;
}

#image-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

#conversion-stats {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

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

  main {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .swiper {
    height: 200px;
  }

  #file-list-section {
    overflow-x: auto;
  }

  #file-list-section table {
    min-width: 600px;
  }

  #image-stats {
    grid-template-columns: 1fr;
  }
}

/* ===== Animation Styles ===== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.fade-in {
  animation: fadeIn 0.5s ease-out;
}

.slide-in {
  animation: slideIn 0.5s ease-out;
}

/* ===== Scroll Button Styles ===== */
#scroll-button {
  z-index: 1000;
  transition: background-color 0.3s;
}

#scroll-icon {
  transition: transform 0.3s;
}

#scroll-icon.up {
  transform: rotate(180deg);
}