/* Global layout + theme (matching your other tools) */
* {
  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 titles */
.section-title {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  color: #007bff;
  position: relative;
}

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

/* Upload area */
.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 ease;
}

.upload-area:hover {
  background: #e3f2fd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.upload-icon {
  font-size: 3rem;
  margin-bottom: 0.75rem;
}

.upload-hint {
  font-size: 0.9rem;
  color: #555;
}

.file-input-offscreen {
  position: absolute;
  left: -9999px;
  opacity: 0;
}

/* Buttons */
.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;
}

/* Progress section */
.progress-section {
  display: none;
  text-align: center;
  margin-top: 1.5rem;
}

.progress-section.show {
  display: block;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
  margin: 0.75rem 0 0;
}

.progress-fill {
  height: 100%;
  background: #007bff;
  width: 0%;
  transition: width 0.3s ease;
}

/* Preview grid */
.preview-section {
  display: none;
  margin-top: 2rem;
}

.preview-section.show {
  display: block;
}

.preview-section h3 {
  margin-top: 0;
  color: #007bff;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.image-item {
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
  background: #fdfdfd;
}

.image-item img {
  width: 100%;
  height: 160px;
  object-fit: contain;
  border-radius: 6px;
  background: #fafafa;
}

.image-item .file-name {
  margin: 0.5rem 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 600;
  word-break: break-all;
}

.image-item .file-size {
  font-size: 0.8rem;
  color: #666;
}

.image-item .download-link {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  background: #007bff;
  color: #fff;
  font-size: 0.9rem;
  text-decoration: none;
}

.image-item .download-link:hover {
  background: #0056b3;
}

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

/* Steps */
.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;
  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; }

.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;
}

/* Benefits */
.benefits-grid ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.benefits-grid li {
  background: #f8f9fa;
  padding: 1rem;
  border-left: 4px solid #007bff;
  border-radius: 6px;
  font-size: 1rem;
}

/* FAQ */
#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 */
footer {
  background: #f1f1f1;
  text-align: center;
  padding: 2rem 1rem;
  color: #666;
}

footer a {
  color: #007bff;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

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

/* Responsive tweaks */
@media (max-width: 768px) {
  .section-title {
    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;
  }
}
