/* modern card design · responsive grid · clean extractor UI */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

body {
  background: #f6f9fc;
  padding: 2rem 1.5rem;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}

.container {
  max-width: 1400px;
  width: 100%;
}

h1 {
  font-size: 2rem;
  font-weight: 600;
  color: #0a2e4a;
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.trust-note {
  background: #e6f7e6;
  color: #1e5e2e;
  padding: 0.85rem 1.5rem;
  border-radius: 60px;
  font-size: 0.95rem;
  font-weight: 500;
  display: inline-block;
  margin-bottom: 2rem;
  border: 1px solid #b8e0b8;
  box-shadow: 0 2px 6px rgba(0,80,20,0.04);
}

.upload-card {
  background: white;
  border-radius: 28px;
  padding: 2.2rem 2rem;
  box-shadow: 0 12px 30px rgba(0,20,50,0.08);
  margin-bottom: 2.5rem;
  border: 1px solid #ffffff50;
  backdrop-filter: blur(2px);
}

.drop-zone {
  background: #f0f6fd;
  border: 2px dashed #9bb7d4;
  border-radius: 24px;
  padding: 2.8rem 1.5rem;
  text-align: center;
  transition: all 0.2s ease;
  cursor: pointer;
  color: #1e3b5c;
}

.drop-zone:hover {
  background: #e3ecf5;
  border-color: #3a7ca5;
}

.drop-zone p {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
  font-weight: 500;
}

.or-divider {
  color: #5e7e9c;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

.select-btn {
  background: #1a5a8c;
  color: white;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 40px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-top: 0.5rem;
  border: 1px solid #ffffff30;
  box-shadow: 0 4px 10px rgba(0,60,130,0.15);
}

.select-btn:hover {
  background: #0f4370;
  transform: scale(0.98);
}

.file-info {
  margin-top: 1.5rem;
  padding: 0.75rem 1.25rem;
  background: #eef4fa;
  border-radius: 100px;
  font-size: 0.95rem;
  color: #173e5c;
  font-weight: 500;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
}

.error {
  margin-top: 1rem;
  padding: 0.75rem 1.25rem;
  background: #ffe3e0;
  border-radius: 100px;
  color: #a12b2b;
  font-size: 0.9rem;
  font-weight: 500;
  border-left: 6px solid #d14;
}

.action-bar {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn {
  padding: 0.9rem 2rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  transition: 0.15s;
  border: 1px solid transparent;
}

.btn.primary {
  background: #0e4b7a;
  color: white;
  box-shadow: 0 6px 14px rgba(20,80,150,0.25);
}

.btn.primary:hover:not(:disabled) {
  background: #06385b;
  transform: translateY(-2px);
}

.btn.primary:disabled {
  background: #a2bbd1;
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.6;
}

.btn.secondary {
  background: #eaeef2;
  color: #1e405e;
  border: 1px solid #b8ccda;
}

.btn.secondary:hover {
  background: #d8e0e7;
}

/* image grid – responsive card layout */
.image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.8rem;
  margin-top: 1.2rem;
}

/* image card */
.image-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  border: 1px solid #edf2f7;
}

.image-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 30px rgba(30,60,90,0.08);
  border-color: #cbdde9;
}

.image-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  background: #f1f7fc;
  border-bottom: 1px solid #e0ecf5;
  padding: 0.5rem;
}

.image-meta {
  padding: 1rem 1rem 1.2rem;
  background: white;
}

.image-meta p {
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  color: #2b506e;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.download-btn {
  background: #f0f6fa;
  border: 1px solid #b8d1e3;
  color: #0e4b7a;
  padding: 0.6rem 1.2rem;
  border-radius: 40px;
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 0.6rem;
  cursor: pointer;
  transition: 0.15s;
  width: 100%;
  text-decoration: none;
  color: inherit;
}

.download-btn:hover {
  background: #1a5a8c;
  border-color: #1a5a8c;
  color: white;
}

/* loading / empty state */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 4rem 2rem;
  color: #5f7d99;
  font-size: 1.1rem;
  background: #f6fbfe;
  border-radius: 40px;
  border: 1px dashed #b0c8da;
}

/* responsive small */
@media (max-width: 600px) {
  body { padding: 1rem; }
  .upload-card { padding: 1.5rem; }
  .action-bar { flex-direction: column; }
  .btn { justify-content: center; }
}