* {
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  background: #f8f9fa;
  color: #333;
  margin: 0;
  line-height: 1.6;
}
header {
  text-align: center;
  background: #007bff;
  color: #fff;
  padding: 2rem 1rem;
}
header h1 {
  margin: 0;
  font-size: 2.5rem;
}
header p.intro {
  margin: 0.5rem 0 0;
  font-size: 1.1rem;
  opacity: 0.95;
}
main {
  max-width: 1200px;
  margin: auto;
  padding: 2rem 1rem;
}
section {
  background: #fff;
  padding: 2rem;
  margin-bottom: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}
.section-title {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  color: #007bff;
}
.upload-area {
  display: block;
  border: 2px dashed #007bff;
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  background: #f8f9ff;
  cursor: pointer;
  transition: all 0.3s;
}
.upload-area:hover {
  background: #e3f2fd;
}
.upload-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}
.file-input-offscreen {
  position: absolute;
  left: -9999px;
  opacity: 0;
}
.btn-primary,
.btn-secondary {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  margin: 0.25rem;
  transition: 0.2s;
}
.btn-primary {
  background: #007bff;
  color: #fff;
}
.btn-primary:hover {
  background: #0056b3;
  transform: translateY(-2px);
}
.btn-secondary {
  background: #6c757d;
  color: #fff;
}
.btn-secondary:hover {
  background: #545b62;
}
.preview-section {
  display: none;
}
.preview-section.show {
  display: block;
  animation: fadeIn 0.3s;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.image-item {
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 8px;
  text-align: center;
}
.image-item img {
  width: 100%;
  height: 150px;
  object-fit: contain;
  border-radius: 6px;
  background: #fafafa;
}
.file-info {
  font-size: 0.85rem;
  color: #666;
  margin-top: 0.5rem;
}
.progress-section {
  display: none;
  text-align: center;
}
.progress-section.show {
  display: block;
}
.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
}
.progress-fill {
  height: 100%;
  background: #007bff;
  width: 0%;
  transition: width 0.3s;
}
.download-section {
  display: none;
  text-align: center;
}
.download-section.show {
  display: block;
}
.success-icon {
  font-size: 3rem;
  color: #28a745;
  margin-bottom: 1rem;
}
.note-box {
  text-align: center;
  margin: 2rem auto;
  padding: 1rem 1.5rem;
  max-width: 800px;
  border: 2px solid #007bff;
  border-radius: 8px;
  background: #e9f5ff;
  font-weight: 500;
  color: #0056b3;
}
.download-link {
  display: inline-block;
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  margin: 4px;
}
.download-link:hover {
  background: #0056b3;
}
#faq {
  margin-top: 2rem;
}
.faq-question {
  width: 100%;
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 6px;
  padding: 1rem;
  font-weight: bold;
  text-align: left;
  cursor: pointer;
  color: #007bff;
}
.faq-answer {
  display: none;
  padding: 1rem;
  border-left: 3px solid #007bff;
  margin-top: 0.5rem;
  background: #fff;
  border-radius: 4px;
}
.faq-item.active .faq-answer {
  display: block;
}
footer {
  background: #f1f1f1;
  text-align: center;
  padding: 2rem 1rem;
  color: #666;
}
footer a {
  color: #007bff;
  text-decoration: none;
}
footer a:hover {
  text-decoration: underline;
}
#zipOverlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-direction: column;
}
.loader {
  border: 6px solid #f3f3f3;
  border-top: 6px solid #007bff;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
/* ========== How to Use Section (Enhanced for SVG to WebP Converter) ========== */
section h2 {
  text-align: center;
  color: #007bff;
  font-size: 1.9rem;
  margin-bottom: 2rem;
  font-weight: 600;
  position: relative;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #007bff;
  border-radius: 2px;
  opacity: 0.8;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.step {
  background: #ffffff;
  border: 1px solid #e1e8ef;
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step:hover {
  transform: translateY(-6px);
  box-shadow: 0 6px 15px rgba(0, 123, 255, 0.15);
}

.step-number {
  width: 65px;
  height: 65px;
  background: linear-gradient(145deg, #007bff, #0056b3);
  color: #fff;
  font-size: 1.6rem;
  font-weight: 600;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  box-shadow: 0 4px 8px rgba(0, 123, 255, 0.25);
  transition: background 0.3s ease, transform 0.3s ease;
}

.step:hover .step-number {
  background: linear-gradient(145deg, #0069d9, #004d9f);
  transform: scale(1.05);
}

.step h3 {
  color: #333;
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.step p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Note box below steps */
.note-box {
  background: #e9f5ff;
  border: 2px solid #007bff;
  color: #0056b3;
  border-radius: 8px;
  text-align: center;
  padding: 1.2rem 1.5rem;
  margin-top: 2.5rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.1);
}

.note-box p {
  margin: 0;
  font-size: 1rem;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  section h2 {
    font-size: 1.6rem;
  }

  .step {
    padding: 1.5rem 1rem;
  }

  .step-number {
    width: 55px;
    height: 55px;
    font-size: 1.3rem;
  }

  .note-box {
    font-size: 0.95rem;
    padding: 1rem;
  }
}
.step {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.8s ease forwards;
}

.step:nth-child(1) { animation-delay: 0.1s; }
.step:nth-child(2) { animation-delay: 0.3s; }
.step:nth-child(3) { animation-delay: 0.5s; }

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

/* Related Tools Section */
.related-tools {
  margin-top: 3rem;
  padding: 1.5rem;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.related-tools h2 {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: #007bff;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  background: #f9f9f9;
  border-radius: 8px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}

.tool-card .icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
/* ========== End of How to Use Section ========== */

