:root {
  color-scheme: light dark;
  --bg: #f4f4f2;
  --card: #ffffff;
  --ink: #1c1c1a;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --muted: #6b6b63;
  --stroke: #d7d7d2;
  --shadow: 0 10px 30px rgba(28, 28, 26, 0.08);
  --code-bg: #1a1a19;
  --code-ink: #f2f2ef;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #10100f;
    --card: #181816;
    --ink: #f1f1ed;
    --accent: #6ea8ff;
    --accent-dark: #93c0ff;
    --muted: #a7a79c;
    --stroke: #2a2a27;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
    --code-bg: #0b0b0a;
    --code-ink: #f1f1ed;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
}

.shell {
  max-width: 960px;
  margin: 0 auto;
  padding: 48px 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

.shell > * {
  width: 100%;
}

.hero {
  text-align: center;
}

.hero h1 {
  font-size: 56px;
  margin: 0 0 12px;
  letter-spacing: -1px;
}

.hero p {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 28px;
  box-shadow: var(--shadow);
  text-align: center;
}

.card form {
  text-align: left;
}

.drop {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--stroke);
  border-radius: 20px;
  padding: 32px;
  cursor: pointer;
  background: transparent;
  text-align: center;
}

.drop input {
  display: none;
}

.drop.dragging {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--card), var(--accent) 6%);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

input,
select {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  font-size: 15px;
  font-family: inherit;
  background: transparent;
  color: var(--ink);
}

button,
.primary {
  margin-top: 18px;
  padding: 12px 18px;
  border-radius: 12px;
  border: none;
  background: var(--accent);
  color: #ffffff;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button:hover,
.primary:hover {
  background: var(--accent-dark);
  color: #ffffff;
}

.result {
  margin-top: 20px;
  padding: 16px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--stroke);
}

.result.hidden {
  display: none;
}

.result a {
  color: var(--accent-dark);
  font-weight: 600;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}

.result-actions button {
  background: var(--card);
  border: 1px solid var(--stroke);
  color: var(--ink);
}

.link-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.link-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.link-row input {
  flex: 1;
}

.link-row button {
  margin-top: 0;
  white-space: nowrap;
}

.notes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  text-align: center;
}

.notes h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.notes pre {
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 16px;
  border-radius: 12px;
  overflow: auto;
  text-align: left;
}

.file-meta h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.file-meta p {
  margin: 6px 0;
  color: var(--muted);
}

.expiry {
  color: color-mix(in srgb, var(--accent-dark), var(--ink) 20%);
  font-weight: 600;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
  justify-content: center;
}

.actions button {
  background: var(--card);
  border: 1px solid var(--stroke);
  color: var(--ink);
}

.code {
  margin-top: 20px;
  background: var(--code-bg);
  color: var(--code-ink);
  padding: 16px;
  border-radius: 12px;
}

.code span {
  font-size: 12px;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--accent), white 20%);
}

.code pre {
  margin: 8px 0 0;
  overflow: auto;
}

.warn {
  color: color-mix(in srgb, var(--accent), var(--ink) 20%);
  font-weight: 600;
}

.result h3,
.file-meta {
  text-align: center;
}

@media (max-width: 720px) {
  .hero h1 {
    font-size: 40px;
  }

  .row,
  .notes {
    grid-template-columns: 1fr;
  }

  .link-row {
    flex-direction: column;
    align-items: stretch;
  }
}
