/* ══════════════════════════════════════════════════════════════
   LOTTIE TO GIF CONVERTER (l2g) - Salient Minimal Standard
   Scoped: .l2g-*
   ══════════════════════════════════════════════════════════════ */

.l2g-container {
  max-width: 1040px;
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Pretendard", sans-serif;
  color: #0f172a;
}

/* ── Header HUD ────────────────────────────────────────────── */
.l2g-header {
  text-align: center;
  margin-bottom: 24px;
}

.l2g-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}

.l2g-badge svg {
  color: #6366f1;
}

.l2g-title {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f172a;
  margin: 0 0 8px;
  line-height: 1.25;
}

.l2g-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: #64748b;
  margin: 0 auto;
  max-width: 600px;
}

/* ── Dropzone Area ─────────────────────────────────────────── */
.l2g-dropzone {
  border: 2px dashed rgba(99, 102, 241, 0.32);
  background: #f8fafc;
  border-radius: 16px;
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.2, 1, 0.3, 1);
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03);
  margin-bottom: 20px;
}

.l2g-dropzone:hover,
.l2g-dropzone.l2g-dragover {
  border-color: #6366f1;
  background: #f5f7ff;
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -4px rgba(99, 102, 241, 0.12);
}

.l2g-drop-icon-bubble {
  width: 60px;
  height: 60px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e0e7ff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6366f1;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
  transition: transform 0.2s ease;
}

.l2g-dropzone:hover .l2g-drop-icon-bubble {
  transform: scale(1.08);
}

.l2g-drop-icon-bubble svg {
  width: 28px;
  height: 28px;
}

.l2g-drop-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a !important;
  margin: 0 0 6px;
}

.l2g-drop-sub {
  font-size: 0.88rem;
  color: #64748b !important;
  margin: 0 0 20px;
}

.l2g-drop-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.l2g-drop-footnote {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #94a3b8 !important;
}

.l2g-drop-footnote span {
  color: #94a3b8 !important;
}

/* ── Buttons ───────────────────────────────────────────────── */
.l2g-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.2, 1, 0.3, 1);
  border: none;
  font-family: inherit;
  white-space: nowrap;
}

.l2g-btn svg {
  width: 17px;
  height: 17px;
}

.l2g-btn-primary {
  background: #4f46e5;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.28);
}

.l2g-btn-primary:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.38);
}

.l2g-btn-outline {
  background: #ffffff;
  color: #475569 !important;
  border: 1px solid #cbd5e1;
}

.l2g-btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a !important;
}

.l2g-btn-success {
  background: #10b981;
  color: #ffffff !important;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.28);
}

.l2g-btn-success:hover {
  background: #059669;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.38);
}

.l2g-btn-large {
  padding: 13px 24px;
  font-size: 0.95rem;
  width: 100%;
}

/* ── Workspace 2-Column Grid ───────────────────────────────── */
.l2g-workspace {
  animation: l2gFadeIn 0.25s ease-out forwards;
}

.l2g-work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}

.l2g-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 22px;
  box-shadow: 0 4px 18px -2px rgba(0, 0, 0, 0.04);
}

/* ── Left Column: Preview Stage ────────────────────────────── */
.l2g-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.l2g-card-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a !important;
}

/* Background Switcher */
.l2g-bg-switcher {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f1f5f9;
  padding: 3px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.l2g-bg-btn {
  width: 24px;
  height: 24px;
  padding: 2px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.l2g-bg-btn.active {
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.l2g-checker-preview {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background-image: repeating-linear-gradient(45deg, #cbd5e1 25%, transparent 25%, transparent 75%, #cbd5e1 75%, #cbd5e1), repeating-linear-gradient(45deg, #cbd5e1 25%, #ffffff 25%, #ffffff 75%, #cbd5e1 75%, #cbd5e1);
  background-size: 8px 8px;
  background-position: 0 0, 4px 4px;
}

.l2g-color-swatch {
  display: block;
  width: 16px;
  height: 16px;
  border-radius: 4px;
}

.l2g-custom-swatch {
  background: linear-gradient(135deg, #6366f1, #ec4899);
}

.l2g-bg-picker-label {
  position: relative;
  overflow: hidden;
}

.l2g-color-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

/* Stage Canvas Wrapper */
.l2g-stage-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background-color 0.2s ease;
}

.l2g-bg-checkerboard {
  background-image: repeating-linear-gradient(45deg, #e2e8f0 25%, transparent 25%, transparent 75%, #e2e8f0 75%, #e2e8f0), repeating-linear-gradient(45deg, #e2e8f0 25%, #f8fafc 25%, #f8fafc 75%, #e2e8f0 75%, #e2e8f0);
  background-size: 16px 16px;
  background-position: 0 0, 8px 8px;
}

.l2g-lottie-target {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.l2g-lottie-target canvas,
.l2g-lottie-target svg {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* Timeline Controls */
.l2g-timeline-hud {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 16px;
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.l2g-play-btn {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #0f172a;
  flex-shrink: 0;
}

.l2g-play-btn:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.l2g-play-btn svg {
  width: 15px;
  height: 15px;
}

.l2g-scrubber {
  flex: 1;
  accent-color: #4f46e5;
  cursor: pointer;
}

.l2g-frame-counter {
  font-size: 0.78rem;
  font-weight: 700;
  color: #64748b;
  font-variant-numeric: tabular-nums;
  min-width: 65px;
  text-align: right;
  flex-shrink: 0;
}

/* Metadata Chips */
.l2g-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.l2g-chip {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 600;
  color: #475569;
}

/* ── Right Column: Settings HUD ────────────────────────────── */
.l2g-settings-heading {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a !important;
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f1f5f9;
}

.l2g-form-group {
  margin-bottom: 16px;
}

.l2g-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}

.l2g-form-col {
  display: flex;
  flex-direction: column;
}

.l2g-label-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.l2g-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #334155 !important;
  display: block;
  margin-bottom: 6px;
}

.l2g-label-sub {
  font-size: 0.74rem;
  color: #64748b !important;
  font-weight: 500;
}

/* Pill Selectors */
.l2g-pill-selector {
  display: flex;
  background: #f1f5f9;
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
}

.l2g-pill {
  flex: 1;
  min-width: 60px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 7px 6px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.16s ease;
  white-space: nowrap;
  font-family: inherit;
  text-align: center;
}

.l2g-pill:hover {
  color: #0f172a;
}

.l2g-pill.active {
  background: #ffffff;
  color: #4f46e5;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.l2g-actions-block {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* ── Progress Card ─────────────────────────────────────────── */
.l2g-result-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 32px 24px;
  box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.04);
  margin-top: 20px;
  animation: l2gFadeIn 0.25s ease-out forwards;
}

.l2g-progress-status-wrap {
  text-align: center;
  margin-bottom: 20px;
}

.l2g-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid #e2e8f0;
  border-top-color: #6366f1;
  border-radius: 50%;
  animation: l2gSpin 0.75s linear infinite;
  margin: 0 auto 12px;
}

.l2g-progress-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px;
}

.l2g-progress-sub {
  font-size: 0.84rem;
  color: #64748b;
  margin: 0;
}

.l2g-progress-track {
  width: 100%;
  max-width: 480px;
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  margin: 0 auto;
  overflow: hidden;
}

.l2g-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border-radius: 4px;
  transition: width 0.2s ease-out;
}

/* ── Result Card ───────────────────────────────────────────── */
.l2g-result-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.l2g-metric-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 20px;
  min-width: 140px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.l2g-metric-box-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.l2g-metric-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #64748b;
  letter-spacing: 0.05em;
}

.l2g-metric-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #0f172a;
}

.l2g-metric-box-success .l2g-metric-val {
  color: #059669;
}

.l2g-metric-ext {
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
}

.l2g-metric-box-success .l2g-metric-ext {
  color: #10b981;
}

.l2g-metric-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: #94a3b8;
}

.l2g-metric-arrow svg {
  width: 22px;
  height: 22px;
}

.l2g-metric-badge {
  background: #e0e7ff;
  color: #4338ca;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
}

.l2g-result-preview-wrap {
  width: 100%;
  max-width: 380px;
  height: 260px;
  margin: 0 auto 24px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.l2g-result-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.l2g-result-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes l2gFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes l2gSpin {
  to { transform: rotate(360deg); }
}

.l2g-zip-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 36px 20px;
  text-align: center;
}

.l2g-zip-placeholder svg {
  width: 52px;
  height: 52px;
  color: #4f46e5;
  filter: drop-shadow(0 4px 10px rgba(79, 70, 229, 0.25));
}

.l2g-zip-placeholder span {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a !important;
}

/* ── Mobile Responsive ─────────────────────────────────────── */
@media (max-width: 768px) {
  .l2g-work-grid {
    grid-template-columns: 1fr;
  }
  .l2g-stage-wrapper {
    height: 260px;
  }
  .l2g-result-metrics {
    flex-direction: column;
    gap: 10px;
  }
  .l2g-metric-arrow svg {
    transform: rotate(90deg);
  }
}

@media (max-width: 640px) {
  .l2g-dropzone {
    padding: 36px 14px;
  }
  .l2g-drop-title {
    font-size: 1.05rem;
  }
  .l2g-drop-sub {
    font-size: 0.8rem;
  }
  .l2g-card {
    padding: 16px;
  }
  .l2g-form-row {
    grid-template-columns: 1fr;
  }
  .l2g-result-actions .l2g-btn {
    width: 100%;
  }
}
