/* ── JPG to SVG – Simple Converter ───────────────── */
#jsc {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  max-width: 640px;
  margin: 2.5rem auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0,0,0,.10);
  overflow: hidden;
  color: #1e293b;
}

/* Header */
.jsc__header {
  background: linear-gradient(135deg, #6366f1 0%, #818cf8 100%);
  padding: 2.2rem 2rem 2rem;
  text-align: center;
  color: #fff;
}
.jsc__icon {
  width: 56px; height: 56px;
  background: rgba(255,255,255,.2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
}
.jsc__icon svg { width: 28px; height: 28px; }
.jsc__title { font-size: 1.5rem; font-weight: 700; margin-bottom: .3rem; }
.jsc__sub   { font-size: .9rem; opacity: .85; }

/* Steps container */
.jsc__step { padding: 2.5rem 2rem; }

/* ── Upload zone ── */
.jsc__drop {
  border: 2.5px dashed #c7d2fe;
  border-radius: 16px;
  background: #f8f9ff;
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.jsc__drop:hover,
.jsc__drop.over {
  border-color: #6366f1;
  background: #eef2ff;
}
.jsc__drop-body {
  padding: 3rem 2rem;
  display: flex; flex-direction: column; align-items: center; gap: 1rem;
  text-align: center;
}
.jsc__upload-icon svg { width: 52px; height: 52px; display: block; }
.jsc__drop-title  { font-size: 1.1rem; font-weight: 600; }
.jsc__drop-hint   { font-size: .82rem; color: #94a3b8; }

/* ── Converting ── */
.jsc__converting {
  display: flex; flex-direction: column; align-items: center;
  gap: 1.2rem; padding: 2rem 0;
}
.jsc__ring {
  width: 56px; height: 56px;
  border: 4px solid #e0e7ff;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: jsc-spin .9s linear infinite;
}
@keyframes jsc-spin { to { transform: rotate(360deg); } }
.jsc__converting-text { font-size: 1rem; font-weight: 600; color: #4f46e5; }
.jsc__converting-sub  { font-size: .82rem; color: #94a3b8; }

/* ── Done ── */
.jsc__done { display: flex; flex-direction: column; gap: 1.8rem; }

.jsc__done-preview {
  display: flex; align-items: center; gap: 1.2rem;
}
.jsc__preview-box {
  flex: 1; border: 1.5px solid #e2e8f0; border-radius: 12px; overflow: hidden;
  background: repeating-conic-gradient(#f1f5f9 0% 25%, #fff 0% 50%) 0 0 / 16px 16px;
}
.jsc__preview-label {
  display: block; padding: .35rem .75rem;
  font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px;
  color: #64748b; background: #fff; border-bottom: 1px solid #e2e8f0;
}
.jsc__preview-box img {
  width: 100%; height: 150px; object-fit: contain; display: block; padding: .5rem;
}
.jsc__arrow {
  display: flex; flex-direction: column; align-items: center; gap: .35rem;
  color: #6366f1; font-size: .7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; flex-shrink: 0;
}
.jsc__arrow svg { width: 40px; }

.jsc__done-actions {
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
}
.jsc__done-meta {
  font-size: .78rem; color: #94a3b8; text-align: center;
}

/* ── Buttons ── */
.jsc__btn {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .7rem 1.5rem; border-radius: 10px;
  font-size: .9rem; font-weight: 600; font-family: inherit;
  cursor: pointer; text-decoration: none; border: none;
  transition: all .15s;
}
.jsc__btn--primary {
  background: #6366f1; color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,.35);
}
.jsc__btn--primary:hover { background: #4f46e5; transform: translateY(-1px); color: #fff; }
.jsc__btn--outline {
  background: #fff; color: #6366f1;
  border: 2px solid #6366f1;
}
.jsc__btn--outline:hover { background: #6366f1; color: #fff; }
.jsc__btn--ghost {
  background: transparent; color: #64748b;
  border: 1.5px solid #e2e8f0;
}
.jsc__btn--ghost:hover { border-color: #6366f1; color: #6366f1; }

/* ── Error ── */
.jsc__error {
  display: flex; align-items: flex-start; gap: .75rem;
  margin: 0 2rem 1.5rem; padding: 1rem 1.2rem;
  background: #fef2f2; border: 1.5px solid #fecaca;
  border-radius: 12px; color: #dc2626; font-size: .88rem;
}
.jsc__error svg { flex-shrink: 0; margin-top: 1px; }
.jsc__error-retry {
  margin-left: auto; background: none; border: none; color: #6366f1;
  font-size: .82rem; font-weight: 600; cursor: pointer; white-space: nowrap;
  font-family: inherit; padding: 0;
}
.jsc__error-retry:hover { text-decoration: underline; }

@media (max-width: 500px) {
  .jsc__step { padding: 1.8rem 1.2rem; }
  .jsc__done-preview { flex-direction: column; }
  .jsc__arrow { flex-direction: row; }
  .jsc__done-actions { flex-direction: column; }
  .jsc__btn { width: 100%; justify-content: center; }
}
