:root {
  color-scheme: light;
  --bg: #f4f7f6;
  --panel: #ffffff;
  --ink: #17211f;
  --muted: #60706b;
  --line: #d7e0dd;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --accent-soft: #e4f3f1;
  --danger: #b42318;
  --danger-soft: #fff1f0;
  --success: #067647;
  --success-soft: #ecfdf3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.08), transparent 34%),
    var(--bg);
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 16px;
}

.panel {
  width: min(100%, 560px);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  box-shadow: 0 18px 45px rgba(23, 33, 31, 0.08);
}

.panel-header {
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.15;
}

.upload-form {
  display: grid;
  gap: 16px;
}

.drop-zone:focus-within {
  outline: 3px solid rgba(15, 118, 110, 0.18);
  border-color: var(--accent);
}

.drop-zone {
  min-height: 190px;
  display: grid;
  place-items: center;
  gap: 10px;
  border: 1px dashed #96aaa4;
  border-radius: 8px;
  padding: 28px 18px;
  text-align: center;
  cursor: pointer;
  background: #fbfdfc;
  transition:
    border-color 160ms ease,
    background 160ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.drop-zone input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.drop-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 800;
}

.drop-title {
  font-size: 18px;
  font-weight: 750;
}

.drop-detail {
  max-width: 100%;
  color: var(--muted);
  font-size: 14px;
  overflow-wrap: anywhere;
}

button {
  height: 46px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.64;
}

.result {
  display: none;
  margin-top: 18px;
  border-radius: 8px;
  padding: 14px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.result.is-success {
  display: block;
  color: var(--ink);
  background: #0f172a;
  border: 1px solid #26324a;
}

.result.is-error {
  display: block;
  color: var(--danger);
  background: var(--danger-soft);
  border: 1px solid #fecdca;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.result h2 {
  margin: 0;
  color: #e5edf0;
  font-size: 15px;
}

.result pre {
  margin: 0;
  color: #d6e2e5;
  white-space: pre-wrap;
  overflow-x: auto;
}

.copy-button {
  width: auto;
  height: 34px;
  padding: 0 12px;
  background: #e4f3f1;
  color: var(--accent-strong);
  font-size: 13px;
}

.copy-button:hover {
  background: #cce8e4;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  padding: 13px 15px;
  border-radius: 8px;
  color: #ffffff;
  background: #17211f;
  box-shadow: 0 16px 36px rgba(23, 33, 31, 0.22);
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  background: var(--danger);
}

@media (max-width: 520px) {
  .panel {
    padding: 22px;
  }

  h1 {
    font-size: 25px;
  }
}
