:root {
  color-scheme: light dark;
  font-family: Inter, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  padding: 8vh 20px;
  background: #0b1220;
  color: #e5edf8;
}

main {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: 32px;
  border: 1px solid #334155;
  border-radius: 18px;
  background: #111b2e;
  box-shadow: 0 24px 60px #0006;
}

h1,
h2 {
  margin-top: 0;
}

.intro {
  color: #aebed3;
}

label {
  display: block;
  margin: 16px 0 8px;
  font-weight: 650;
}

textarea,
select,
button,
output {
  width: 100%;
  border: 1px solid #475569;
  border-radius: 10px;
  padding: 12px;
  font: inherit;
}

textarea,
select {
  background: #0b1220;
  color: inherit;
}

.controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: end;
}

.controls label {
  grid-column: 1 / -1;
  margin-bottom: -4px;
}

button {
  width: auto;
  cursor: pointer;
  border-color: #38bdf8;
  background: #0284c7;
  color: white;
  font-weight: 700;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

section {
  margin-top: 28px;
}

output {
  display: block;
  min-height: 52px;
  overflow-wrap: anywhere;
  background: #0b1220;
}

@media (max-width: 520px) {
  main {
    padding: 22px;
  }

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

  button {
    width: 100%;
  }
}
