*, *::before, *::after {
  box-sizing: border-box;
}

body {
  font-family: system-ui, sans-serif;
  margin: 0;
  padding: 0;
  color: #111;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  padding: 1rem;
  flex-shrink: 0;
}

header nav a {
  font-weight: bold;
  text-decoration: none;
  color: inherit;
}

main {
  flex: 1;
  display: flex;
  flex-direction: column;
}

footer {
  padding: 1rem;
  flex-shrink: 0;
}

/* ── Drop zone ── */

.drop-zone {
  border: none;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
  padding: 2rem;
}

.drop-zone:hover,
.drop-zone--over {
  background: #fafafa;
}

.drop-icon {
  width: 48px;
  height: 48px;
  color: #aaa;
  margin-bottom: 1rem;
}

.drop-label {
  font-size: 1.1rem;
  font-weight: 500;
  margin: 0 0 0.4rem;
}

.drop-sub {
  color: #888;
  font-size: 0.9rem;
  margin: 0;
}

.drop-link {
  color: #333;
  text-decoration: underline;
  cursor: pointer;
}

/* ── Upload progress ── */

.upload-filename {
  font-weight: 500;
  margin: 0 0 1rem;
  word-break: break-all;
}

.progress-bar {
  background: #e8e8e8;
  border-radius: 6px;
  height: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.progress-bar__fill {
  background: #333;
  height: 100%;
  width: 0;
  transition: width 0.1s ease;
}

.upload-percent {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

/* ── File info page ── */

.file-info {
  max-width: 520px;
  margin: 3rem auto;
}

.file-name {
  word-break: break-all;
  margin-bottom: 1.5rem;
}

.info-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.info-table th,
.info-table td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid #ebebeb;
  font-size: 0.95rem;
}

.info-table th {
  color: #888;
  font-weight: 500;
  width: 28%;
}

.info-table code {
  font-size: 0.8rem;
  background: #f4f4f4;
  padding: 0.15rem 0.35rem;
  border-radius: 3px;
}

/* ── Image preview ── */

.file-preview {
  display: block;
  max-width: 100%;
  max-height: 480px;
  object-fit: contain;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  background: #f4f4f4;
}

/* ── Download button ── */

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.4rem;
  background: #111;
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: background 0.15s;
}

.btn-download:hover {
  background: #333;
}
