:root {
  --bg-1: #f7efe1;
  --bg-2: #f3d7b2;
  --bg-3: #f8f6f0;
  --ink: #1c1b19;
  --muted: #5b5852;
  --accent: #d4452f;
  --accent-2: #1b6a52;
  --panel: #fff7ea;
  --panel-strong: #fbe7c8;
  --border: rgba(0, 0, 0, 0.12);
  --shadow: 0 24px 60px rgba(35, 25, 10, 0.18);
  --mono: "IBM Plex Mono", "Courier New", monospace;
  --display: "Space Grotesk", "Segoe UI", sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--display);
  color: var(--ink);
  background: radial-gradient(circle at top, var(--bg-2), var(--bg-1) 55%, var(--bg-3));
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before,
body::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(212, 69, 47, 0.12), rgba(27, 106, 82, 0.1));
  mix-blend-mode: multiply;
  pointer-events: none;
}

body::after {
  background: radial-gradient(circle at 15% 25%, rgba(255, 255, 255, 0.7), transparent 45%);
  opacity: 0.7;
}

.app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 64px;
  position: relative;
  z-index: 1;
}

.hero {
  margin-bottom: 32px;
  animation: float-in 0.7s ease-out;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 12px;
  color: var(--accent-2);
  font-weight: 600;
  margin: 0 0 12px;
}

.hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  margin: 0 0 12px;
}

.lede {
  max-width: 620px;
  font-size: 16px;
  color: var(--muted);
  margin: 0;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
}

.upload {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 28px;
  animation: float-in 0.8s ease-out 0.1s both;
}

.drop-zone {
  border: 2px dashed rgba(28, 27, 25, 0.2);
  border-radius: 18px;
  padding: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(251, 231, 200, 0.6));
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease;
  cursor: pointer;
}

.drop-zone.is-dragover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(212, 69, 47, 0.08));
  transform: translateY(-2px);
}

.drop-zone input {
  display: none;
}

.drop-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.drop-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

button {
  border: none;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 12px 24px rgba(212, 69, 47, 0.25);
}

button:hover {
  transform: translateY(-1px);
}

button:disabled {
  background: #b5a9a1;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
  font-weight: 600;
  color: var(--muted);
}

.field input {
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-family: var(--mono);
  width: 120px;
}

.status {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  animation: float-in 0.9s ease-out 0.2s both;
}

.output {
  background: #11100f;
  color: #f6f2ec;
  display: grid;
  gap: 16px;
  grid-template-rows: auto 1fr;
}

.output h2 {
  margin: 0;
  font-size: 20px;
}

.output p {
  margin: 6px 0 0;
  color: rgba(246, 242, 236, 0.7);
  font-size: 14px;
}

pre {
  margin: 0;
  padding: 18px;
  border-radius: 14px;
  background: #0b0a09;
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.5;
  overflow: auto;
  max-height: 420px;
  white-space: pre;
}

@media (max-width: 900px) {
  .drop-zone {
    flex-direction: column;
    align-items: flex-start;
  }
}

@keyframes float-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
