body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f7f4;
  color: #222;
}

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px;
}

.hero {
  margin-bottom: 32px;
}

.hero h1 {
  font-size: 48px;
  margin: 0;
}

.hero p {
  font-size: 20px;
  color: #666;
}

.dropzone {
  border: 2px dashed #bbb;
  background: white;
  border-radius: 18px;
  padding: 36px;
  text-align: center;
}

.dropzone.dragover {
  border-color: #333;
  background: #fafafa;
}

button {
  border: 0;
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
  background: #222;
  color: white;
}

button:hover {
  opacity: 0.86;
}

#status {
  margin-top: 18px;
  color: #555;
}

.results {
  margin-top: 32px;
  background: white;
  border-radius: 18px;
  padding: 24px;
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid #ddd;
  border-radius: 12px;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  background: #f1f1ee;
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid #ddd;
  white-space: nowrap;
}

.data-table td {
  padding: 10px;
  border-bottom: 1px solid #eee;
  white-space: nowrap;
}

.data-table td:focus {
  outline: 2px solid #222;
  background: #fffdf2;
}

pre {
  white-space: pre-wrap;
  background: #f1f1ee;
  padding: 18px;
  border-radius: 12px;
  overflow-x: auto;
}

.input-preview {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  background: #f1f1ee;
  border-radius: 14px;
  padding: 14px;
}

.input-preview-info {
  text-align: left;
}

.input-preview-label {
  font-weight: 700;
}

.input-preview-subtitle {
  font-size: 13px;
  color: #666;
}

.input-preview-thumb {
  width: 86px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: white;
}

.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 9999;
  display: flex;
  flex-direction: column;
}

.image-modal-header {
  height: 64px;
  background: #111;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-weight: 700;
}

.image-modal-body {
  flex: 1;
  overflow: auto;
  padding: 28px;
  display: block;
}

.image-modal-img {
  display: block;
  max-width: none;
  max-height: none;
  width: auto;
  height: auto;
  background: white;
  border-radius: 10px;
}

.text-output {
  background: #f1f1ee;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 18px;
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.5;
}

.loading-state {
  background: #f1f1ee;
  border-radius: 12px;
  padding: 24px;
  color: #555;
  font-size: 16px;
}