:root {
  --bg: #15141b;
  --surface: #1e1c26;
  --surface-2: #262432;
  --ink: #ede9e3;
  --muted: #9691a0;
  --line: rgba(237, 233, 227, 0.12);
  --accent: #d6a24c;
  --error: #e08a7a;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-head {
  padding: 40px 24px 8px;
  text-align: center;
}

.wordmark {
  font-family: "Huninn", sans-serif;
  font-weight: 600;
  font-size: 32px;
  margin: 0;
}

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

main {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

.dropzone {
  position: relative;
  border: 2px dashed var(--line);
  border-radius: 12px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--accent);
  background: var(--surface-2);
}

.dropzone-inner {
  text-align: center;
  padding: 24px;
}

.drop-hint {
  font-size: 15px;
  margin: 0 0 6px;
}

.drop-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0;
}

.preview-img {
  max-width: 100%;
  max-height: 320px;
  display: block;
  margin: 0 auto;
}
.preview-img[hidden] {
  display: none;
}

.options {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.options[hidden] {
  display: none;
}

.option-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.option-row[hidden] {
  display: none;
}

.option-row label {
  font-size: 13px;
  color: var(--muted);
}

.option-row select,
.option-row input[type="number"] {
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 14px;
}

.option-row input[type="range"] {
  accent-color: var(--accent);
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

button {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: 100px;
  padding: 10px 20px;
  cursor: pointer;
  border: none;
}

#convert-btn {
  background: var(--accent);
  color: #221a0c;
  flex: 1;
}
#convert-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.secondary {
  background: none;
  border: 1px solid var(--line);
  color: var(--muted);
}
.secondary:hover { color: var(--ink); }

.msg {
  font-size: 13px;
  color: var(--muted);
  min-height: 16px;
  margin: 0;
}
.msg.is-error { color: var(--error); }

.result {
  margin-top: 22px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  text-align: center;
}

.result-label {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: var(--muted);
}

.download-btn {
  display: inline-block;
  background: var(--accent);
  color: #221a0c;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 22px;
  border-radius: 100px;
  font-size: 14px;
}

.site-foot {
  text-align: center;
  padding: 20px;
  font-size: 12px;
  color: var(--muted);
}
