.container {
  max-width: 600px; /* Reduced from 800px */
  margin: 20px auto; /* Reduced from 40px */
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  min-height: auto;
  color: #333;
}

/* Add responsive design */
@media (max-width: 768px) {
  .container {
    max-width: 95%;
    margin: 10px auto;
    padding: 20px;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #2b2b2b;
  color: #fff;
  margin: 0;
  min-height: 100vh;
  padding: 20px 0;
}

.upload-zone {
  border: 2px dashed #ddd;
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 20px;
  border-radius: 8px;
  transition: all 0.3s ease;
  background: #fafafa;
}

.upload-zone:hover {
  border-color: #007bff;
  background: #f8f9ff;
}

.upload-zone.drag-over {
  background: #e3f2fd;
  border-color: #007bff;
}

.upload-icon {
  color: #666;
  margin-bottom: 16px;
}

.browse-btn, .process-btn {
  padding: 12px 24px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s ease;
  margin-top: 12px;
}

.browse-btn:hover, .process-btn:hover {
  background: #0056b3;
}

.browse-btn:disabled, .process-btn:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #c3e6cb;
  margin-top: 10px;
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #f5c6cb;
  margin-top: 10px;
}

.step-section {
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  background: #fff;
}

.step-section h2 {
  margin-top: 0;
  color: #333;
  font-size: 18px;
}

.sub-text {
  font-size: 14px;
  color: #666;
  margin: 8px 0;
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 12px;
  margin-top: 20px;
}

.images-grid .thumb {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

.images-grid .thumb img {
  max-width: 100%;
  max-height: 80px;
  object-fit: cover;
  border-radius: 4px;
}

.images-grid .thumb .pdf-placeholder {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e9ecef;
  color: #555;
  font-size: 14px;
  border-radius: 4px;
}

.images-grid .thumb .filename {
  margin-top: 4px;
  font-size: 12px;
  text-align: center;
  word-break: break-word;
}

.status-icon {
  margin-left: 4px;
  font-size: 12px;
}

.status-icon.success {
  color: #28a745;
}

.status-icon.error {
  color: #dc3545;
}

.process-btn {
  background: #28a745;
  font-size: 16px;
  padding: 14px 28px;
  display: block;
  margin: 0 auto;
}

.process-btn:hover {
  background: #218838;
}

.download-section {
  text-align: center;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-top: 20px;
}

.download-section a {
  display: inline-block;
  margin: 0 10px;
  padding: 10px 20px;
  background: #007bff;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  transition: background 0.2s;
}

.download-section a:hover {
  background: #0056b3;
}

.file-info {
  margin-top: 10px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.6);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-left: 8px;
}

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

.uploading-indicator {
  display: flex;
  align-items: center;
  margin-top: 10px;
  color: #007bff;
  font-size: 14px;
}

.spinner-blue {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0,123,255,0.2);
  border-top-color: #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 8px;
}

.progress-section {
  text-align: center;
  margin-top: 20px;
  color: #333;
}

.footer {
  text-align: center;
  font-size: 8px;
  color: #888;
  margin-top: 20px;
}
