/* ── APP PAGE ── */
.app-wrap {
  padding-top: 80px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.app-header {
  text-align: center;
  padding: 60px 24px 40px;
  max-width: 640px;
}
.app-header h1 {
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 36px;
  letter-spacing: -1.5px;
  color: var(--fg);
  margin-bottom: 12px;
}
.app-header p {
  font-size: 16px;
  color: var(--fg-2);
  line-height: 1.6;
}

/* Upload zone */
.upload-zone {
  width: 100%;
  max-width: 600px;
  margin: 0 24px;
  border: 2px dashed rgba(255, 87, 34, 0.3);
  border-radius: 20px;
  padding: 60px 40px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: var(--bg-2);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.upload-zone svg {
  display: block;
  margin: 0 auto 20px;
  opacity: 0.7;
}
.upload-zone p {
  font-size: 16px;
  color: var(--fg-2);
  margin-bottom: 6px;
}
.upload-zone small {
  font-size: 13px;
  color: var(--fg-3);
}
.upload-zone input[type="file"] {
  display: none;
}

/* Preview area */
.preview-area {
  width: 100%;
  max-width: 600px;
  margin: 32px 24px 0;
  display: none;
}
.preview-area.visible { display: block; }

.preview-card {
  background: var(--bg-2);
  border: 1px solid rgba(247, 244, 239, 0.08);
  border-radius: 16px;
  overflow: hidden;
}
.preview-header {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(247, 244, 239, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.preview-filename {
  font-family: 'Syne', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--fg);
}
.preview-size {
  font-size: 12px;
  color: var(--fg-3);
}
.preview-img-wrap {
  padding: 20px;
  display: flex;
  justify-content: center;
  background: #fff;
  min-height: 200px;
  align-items: center;
}
.preview-img-wrap img {
  max-width: 100%;
  max-height: 300px;
  display: block;
}
.preview-svg-wrap {
  padding: 20px;
  background: #fff;
  min-height: 200px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.preview-svg-wrap svg {
  max-width: 100%;
  max-height: 300px;
  display: block;
}

/* Status bar */
.status-bar {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--fg-2);
}
.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fg-3);
  flex-shrink: 0;
}
.status-dot.processing { background: var(--accent); animation: pulse 1s infinite; }
.status-dot.done { background: #22c55e; }
.status-dot.error { background: #ef4444; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Download buttons */
.download-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 16px 20px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  font-family: 'IBM Plex Sans', sans-serif;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s;
}
.btn:hover { opacity: 0.85; }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-secondary {
  background: var(--bg-3);
  color: var(--fg-2);
  border: 1px solid rgba(247, 244, 239, 0.1);
}
.btn svg { flex-shrink: 0; }

/* Pricing bar */
.pricing-bar {
  width: 100%;
  max-width: 600px;
  margin: 16px 24px 60px;
  display: none;
}
.pricing-bar.visible { display: block; }
.pricing-inner {
  background: var(--bg-2);
  border: 1px solid rgba(247, 244, 239, 0.07);
  border-radius: 14px;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pricing-label {
  font-size: 13px;
  color: var(--fg-3);
}
.pricing-label strong {
  color: var(--fg);
  font-weight: 500;
}
.pricing-amount {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--accent);
}

/* Error message */
.error-msg {
  padding: 14px 20px;
  font-size: 13px;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.08);
  border-top: 1px solid rgba(239, 68, 68, 0.2);
}

/* Reset button */
.reset-row {
  width: 100%;
  max-width: 600px;
  margin: 16px 24px 40px;
  text-align: center;
  display: none;
}
.reset-row.visible { display: block; }

/* Mobile */
@media (max-width: 600px) {
  .app-header h1 { font-size: 28px; }
  .upload-zone { padding: 40px 20px; margin: 0 16px; }
  .preview-area, .pricing-bar, .reset-row { margin-left: 16px; margin-right: 16px; }
  .download-actions { flex-direction: column; }
}