:root {
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;

  color: #171717;
  background: #f7f7f5;

  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

.page {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
}

.hero {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 48px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  margin-bottom: 36px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #171717;
  color: white;
}

.hero h1 {
  margin: 0;
  font-size: clamp(40px, 7vw, 72px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.hero h1 span {
  display: block;
  color: #777;
}

.hero-description {
  max-width: 580px;
  margin: 24px auto 0;
  color: #6b6b6b;
  font-size: 18px;
  line-height: 1.6;
}

.upload-section {
  max-width: 820px;
  margin: 0 auto;
}

.drop-zone {
  min-height: 380px;
  border: 2px dashed #cfcfc9;
  border-radius: 28px;
  background: white;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  padding: 40px;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.drop-zone.dragging {
  border-color: #171717;
  background: #f0f0ec;
  transform: scale(1.01);
}

.upload-icon {
  width: 68px;
  height: 68px;

  display: grid;
  place-items: center;

  border-radius: 20px;

  background: #171717;
  color: white;

  font-size: 30px;
  margin-bottom: 24px;
}

.drop-zone h2 {
  margin: 0;
  font-size: 28px;
}

.drop-zone p {
  margin: 10px 0;
  color: #999;
}

.browse-button,
.primary-button {
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  padding: 13px 22px;
  font-weight: 700;
}

.browse-button {
  background: #171717;
  color: white;
}

.supported {
  margin-top: 22px;
  color: #999;
  font-size: 13px;
}

.editor-section,
.results-section {
  margin-top: 48px;
}

.hidden {
  display: none !important;
}

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

.section-header h2 {
  margin: 0 0 6px;
}

.section-header p {
  margin: 0;
  color: #777;
}

.text-button {
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #666;
  font-weight: 600;
}

.editor {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
}

.preview-wrapper {
  min-height: 500px;

  display: grid;
  place-items: center;

  padding: 24px;

  border-radius: 20px;
  background: #171717;
  overflow: hidden;
}

.preview-wrapper img {
  display: block;
  max-width: 100%;
  max-height: 500px;
  object-fit: contain;
}

.editor-controls {
  background: white;
  border-radius: 20px;
  padding: 24px;

  display: flex;
  flex-direction: column;
  gap: 20px;
}

.editor-controls label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.editor-controls input,
.editor-controls select {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 11px 12px;
  background: white;
}

.primary-button {
  margin-top: auto;
  background: #171717;
  color: white;
  min-height: 48px;
}

.results-list {
  display: grid;
  gap: 14px;
}

.result-card {
  background: white;
  border-radius: 18px;
  padding: 18px;

  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.result-thumbnail {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  background: #eee;
}

.result-name {
  margin: 0 0 6px;
  font-weight: 700;
  word-break: break-word;
}

.result-stats {
  color: #777;
  font-size: 14px;
}

.result-saved {
  font-weight: 800;
  margin-top: 6px;
}

.download-button {
  border: 0;
  background: #171717;
  color: white;
  border-radius: 10px;
  padding: 11px 16px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

footer {
  text-align: center;
  color: #999;
  font-size: 13px;
  padding: 60px 0 20px;
}

@media (max-width: 760px) {
  .page {
    padding: 28px 0;
  }

  .drop-zone {
    min-height: 320px;
  }

  .editor {
    grid-template-columns: 1fr;
  }

  .preview-wrapper {
    min-height: 320px;
  }

  .result-card {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .result-thumbnail {
    width: 56px;
    height: 56px;
  }

  .download-button {
    grid-column: 1 / -1;
    width: 100%;
    text-align: center;
  }
}