:root {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  color: #0f172a;
  background: #f8fafc;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  padding: 1.2rem 1.5rem;
  background: linear-gradient(90deg, #1d4ed8, #0f172a);
  color: #fff;
}

.topbar h1 {
  margin: 0;
}

.topbar-title-link,
.topbar-title-link:visited,
.topbar-title-link:hover,
.topbar-title-link:active {
  color: #ffffff;
  text-decoration: none;
}

.version-tag {
  font-size: 0.7em;
  font-weight: 600;
  opacity: 0.9;
}

.layout {
  width: 100%;
  max-width: min(96vw, 1080px);
  margin: 1rem auto;
  padding: 0 0.5rem 1rem;
}

.card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
}

h1,
h2,
h3 {
  margin-top: 0;
}

p {
  color: #475569;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.75rem 0;
}

.btn {
  border: 0;
  border-radius: 0.5rem;
  cursor: pointer;
  padding: 0.7rem 0.95rem;
  font-weight: 600;
  background: #2563eb;
  color: #fff;
}

.btn:hover {
  background: #1d4ed8;
}

.file-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dropzone {
  border: 2px dashed #94a3b8;
  background: #f8fafc;
  border-radius: 0.65rem;
  padding: 1.2rem;
  text-align: center;
  color: #475569;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.dropzone.is-drag-over {
  border-color: #2563eb;
  background: #eff6ff;
}

.preview-row {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.preview-box,
.output-box {
  border: 1px solid #e2e8f0;
  border-radius: 0.65rem;
  padding: 0.85rem;
  background: #fff;
}

.preview-box img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 0.35rem;
}

.output {
  width: 100%;
  min-height: 260px;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  padding: 0.7rem;
  resize: vertical;
  font: inherit;
}

.subtle-text {
  font-size: 0.9rem;
  color: #64748b;
}

.status {
  margin-top: 0.65rem;
  min-height: 1.4rem;
  color: #1e40af;
  font-weight: 600;
}

.status.error {
  color: #b91c1c;
}

.report-bug-hint {
  margin-top: 1rem;
}

.report-bug-hint a {
  color: #1d4ed8;
  font-weight: 600;
  text-decoration: none;
}

.report-bug-hint a:hover {
  text-decoration: underline;
}
