:root {
  --primary: #10b981;
  --primary-hover: #059669;
  --surface: #ffffff;
  --bg: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius-lg: 16px;
  --radius-md: 10px;
  --shadow-lg: 0 16px 32px -4px rgba(15, 23, 42, 0.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.hero-sec {
  max-width: 1080px;
  margin: 1.5rem auto 1rem auto;
  padding: 0 1.25rem;
  text-align: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #047857;
  background: #d1fae5;
  padding: 3px 12px;
  border-radius: 20px;
  margin-bottom: 0.6rem;
  border: 1px solid #a7f3d0;
}
.hero-title {
  font-size: 1.95rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.4rem;
  color: #0f172a;
}
.hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto;
}

.container {
  max-width: 1080px;
  margin: 0 auto 3rem auto;
  padding: 0 1.25rem;
}
.main-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 1.5rem;
}

/* Upload Dropzone */
.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 3rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  transition: all 0.2s ease;
  position: relative;
}
.dropzone:hover, .dropzone.dragover {
  border-color: #10b981;
  background: #f0fdf4;
}
.dropzone-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem auto;
  color: #10b981;
  display: block;
}
.dropzone-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.35rem;
}
.dropzone-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dropzone-area {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Real Photo Showcase with On-Image Metadata Overlays */
.sample-showcase-stage {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #0f172a;
  box-shadow: 0 10px 28px -4px rgba(15, 23, 42, 0.16);
  border: 1px solid #cbd5e1;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.sample-showcase-stage:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 36px -4px rgba(15, 23, 42, 0.22);
  border-color: #94a3b8;
}
.sample-showcase-img-wrap {
  position: relative;
  width: 100%;
  min-height: 280px;
  max-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0f172a;
}
.sample-showcase-img {
  width: 100%;
  height: 100%;
  max-height: 380px;
  object-fit: cover;
  display: block;
  filter: brightness(0.9);
  transition: transform 0.35s ease, filter 0.35s ease;
}
.sample-showcase-stage:hover .sample-showcase-img {
  transform: scale(1.02);
  filter: brightness(0.95);
}
.showcase-top-row {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}
.showcase-badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.badge-dot-live {
  width: 6px;
  height: 6px;
  background: #10b981;
  border-radius: 50%;
  box-shadow: 0 0 6px #10b981;
  animation: livePulse 2s infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.btn-showcase-try {
  background: #ffffff;
  color: #0f172a;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 16px;
  border: none;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-showcase-try:hover {
  background: #10b981;
  color: #ffffff;
  transform: translateY(-1px);
}
.showcase-hud-grid {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 6px;
  z-index: 20;
  pointer-events: none;
}
.hud-chip {
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.hud-chip.hud-danger {
  background: rgba(185, 28, 28, 0.78);
  border-color: rgba(254, 202, 202, 0.35);
  box-shadow: 0 3px 12px rgba(185, 28, 28, 0.3);
}
.hud-icon {
  font-size: 0.95rem;
  line-height: 1;
}
.hud-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.hud-label {
  font-size: 0.58rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 450;
  letter-spacing: 0.2px;
}
.hud-val {
  font-size: 0.72rem;
  font-weight: 500;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Metadata Workspace */
.meta-workspace {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Overview Card: Preview + Status Banner */
.meta-overview-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  gap: 1.25rem;
  align-items: center;
}
@media (max-width: 640px) {
  .meta-overview-card {
    flex-direction: column;
    align-items: flex-start;
  }
}
.meta-preview-col {
  width: 140px;
  height: 100px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.meta-thumb-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.meta-summary-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.meta-file-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}
.meta-file-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
  word-break: break-all;
}
.meta-file-specs {
  font-size: 0.78rem;
  color: #64748b;
  font-family: monospace;
}
.meta-status-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
}
.meta-status-banner.danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.meta-status-banner.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
}
.meta-status-banner.safe {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.meta-status-icon {
  font-size: 1.4rem;
  line-height: 1;
}
.meta-status-text strong {
  font-size: 0.88rem;
  display: block;
}
.meta-status-text p {
  font-size: 0.76rem;
  opacity: 0.9;
  margin-top: 2px;
}

.meta-report-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.meta-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 0.85rem;
}
.meta-header-row h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #0f172a;
}
.meta-item-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}
.meta-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.9rem 1rem;
}
.meta-item.danger {
  border-color: #fca5a5;
  background: #fff5f5;
}
.meta-item-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #334155;
  margin-bottom: 4px;
}
.meta-item-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #0f172a;
  word-break: break-all;
}
.meta-item.danger .meta-item-val {
  color: #b91c1c;
}
.meta-item-hint {
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 4px;
}

/* Action Bottom */
.meta-action-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.btn-primary-action {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  border: none;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.75rem 1.8rem;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}
.btn-secondary-action {
  background: #ffffff;
  color: #334155;
  border: 1px solid #cbd5e1;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.75rem 1.4rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
