/* Custom touches on top of Tailwind */
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

/* Result reveal animation */
#result {
  animation: fadeUp 0.4s ease-out both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Quality card hover */
.quality-card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.quality-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -10px rgba(220, 38, 38, 0.25);
  border-color: #fca5a5;
}

/* Thumbnail preview skeleton while loading */
#previewImg {
  min-height: 120px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
}
#previewImg.loaded {
  animation: none;
  background: transparent;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Download button pulse on success */
.btn-download.success {
  background-color: #16a34a !important;
}
.btn-download.success:hover {
  background-color: #15803d !important;
}

/* Focus visible for accessibility */
button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid #dc2626;
  outline-offset: 2px;
}

/* Accordion smooth open */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details[open] summary { border-bottom: 1px solid #e2e8f0; }

/* Mobile: make input tap-friendly */
@media (max-width: 640px) {
  input, button { font-size: 16px; } /* prevent iOS zoom */
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
