:root {
  --text: #6b6375;
  --text-h: #08060d;
  --bg: #fff;
  --border: #e5e4e7;
  --code-bg: #f4f3ec;
  --accent: #aa3bff;
  --accent-bg: rgba(170, 59, 255, 0.1);
  --accent-border: rgba(170, 59, 255, 0.5);
  --social-bg: rgba(244, 243, 236, 0.5);
  --shadow:
    rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px;

  --sans: system-ui, 'Segoe UI', Roboto, sans-serif;
  --heading: system-ui, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, Consolas, monospace;

  font: 18px/145% var(--sans);
  letter-spacing: 0.18px;
  color-scheme: light dark;
  color: var(--text);
  background: var(--bg);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  @media (max-width: 1024px) {
    font-size: 16px;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #9ca3af;
    --text-h: #f3f4f6;
    --bg: #16171d;
    --border: #2e303a;
    --code-bg: #1f2028;
    --accent: #c084fc;
    --accent-bg: rgba(192, 132, 252, 0.15);
    --accent-border: rgba(192, 132, 252, 0.5);
    --social-bg: rgba(47, 48, 58, 0.5);
    --shadow:
      rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px;
  }

  #social .button-icon {
    filter: invert(1) brightness(2);
  }
}

#root {
  width: 1126px;
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  border-inline: 1px solid var(--border);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

body {
  margin: 0;
}

h1,
h2 {
  font-family: var(--heading);
  font-weight: 500;
  color: var(--text-h);
}

h1 {
  font-size: 56px;
  line-height: 1.12;
  letter-spacing: -1.68px;
  margin: 32px 0;
  @media (max-width: 1024px) {
    font-size: 36px;
    margin: 20px 0;
  }
}
h2 {
  font-size: 24px;
  line-height: 118%;
  letter-spacing: -0.24px;
  margin: 0 0 8px;
  @media (max-width: 1024px) {
    font-size: 20px;
  }
}
p {
  margin: 0;
}

code,
.counter {
  font-family: var(--mono);
  display: inline-flex;
  border-radius: 4px;
  color: var(--text-h);
}

code {
  font-size: 15px;
  line-height: 135%;
  padding: 4px 8px;
  background: var(--code-bg);
}
.app-shell {
  min-height: 100%;
  padding: 72px 40px 48px;
  text-align: left;
  background:
    radial-gradient(circle at top left, rgba(170, 59, 255, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(72, 187, 120, 0.12), transparent 24%);

  @media (max-width: 768px) {
    padding: 32px 20px 24px;
  }
}

.hero-panel {
  max-width: 760px;
  margin-bottom: 36px;
}

.eyebrow {
  margin-bottom: 16px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 13px;
  font-weight: 700;
}

.hero-copy {
  max-width: 60ch;
}

.uploader-grid {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;

  @media (max-width: 900px) {
    grid-template-columns: 1fr;
  }
}

.dropzone,
.preview-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  box-shadow: var(--shadow);
}

.dropzone {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;

  &:hover,
  &:focus-within {
    border-color: var(--accent-border);
    transform: translateY(-2px);
  }
}

.dropzone-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-bg) 60%, var(--bg));
}

.file-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dropzone-icon {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: var(--accent-bg);
  color: var(--accent);
  font-size: 28px;
  font-weight: 700;
}

.dropzone-title {
  color: var(--text-h);
  font-size: 28px;
  line-height: 1.1;
}

.dropzone-subtitle,
.dropzone-footnote {
  max-width: 26ch;
  text-align: center;
}

.dropzone-footnote {
  font-size: 14px;
  color: var(--text-h);
  opacity: 0.75;
}

.preview-card {
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 18px;

  @media (max-width: 900px) {
    grid-template-columns: 1fr;
  }
}

.preview-card-full {
  grid-column: 1 / -1;
}

.preview-frame {
  min-height: 420px;
  border-radius: 22px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(170, 59, 255, 0.08), transparent),
    color-mix(in srgb, var(--code-bg) 70%, var(--bg));
  display: grid;
  place-items: center;

  img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
}

.preview-placeholder {
  padding: 32px;

  span {
    display: block;
    color: var(--text-h);
    font-size: 26px;
    margin-bottom: 12px;
  }

  p {
    max-width: 28ch;
  }
}

.details-panel {
  padding: 18px 8px 8px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.status-panel {
  max-width: 520px;
}

.poll-pill {
  align-self: flex-start;
  margin: 0;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-h);
  background: var(--accent-bg);
  border: 1px solid var(--accent-border);
}

.job-id {
  margin: 0;
  color: var(--text-h);
  font-size: 14px;
  opacity: 0.75;
}

.error-message {
  margin: 0;
  padding: 12px 14px;
  border-radius: 14px;
  color: #b42318;
  background: rgba(217, 45, 32, 0.12);
}

.file-details {
  margin: 0;
  display: grid;
  gap: 12px;

  div {
    padding: 14px 16px;
    border-radius: 16px;
    background: var(--social-bg);
  }

  dt {
    margin-bottom: 4px;
    color: var(--text-h);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
  }

  dd {
    margin: 0;
    overflow-wrap: anywhere;
  }
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.primary-button,
.secondary-button {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;

  &:hover:not(:disabled),
  &:focus-visible {
    transform: translateY(-1px);
  }

  &:disabled {
    cursor: not-allowed;
    opacity: 0.45;
  }
}

.action-link {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.primary-button {
  color: white;
  background: var(--accent);

  &:hover:not(:disabled),
  &:focus-visible {
    border-color: var(--accent-border);
  }
}

.secondary-button {
  color: var(--text-h);
  background: transparent;
  border-color: var(--border);
}
