body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 40px;
  color: #1d1d1f;
  background-color: #f5f5f7;
}

main {
  max-width: 800px;
  margin: 0 auto;
  background: #fff;
  padding: 32px;
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

h1 {
  margin-top: 0;
  font-size: 28px;
}

textarea {
  width: 100%;
  min-height: 140px;
  padding: 12px;
  font-family: "SFMono-Regular", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 14px;
  border: 1px solid #d2d2d7;
  border-radius: 8px;
  resize: vertical;
  box-sizing: border-box;
}

button {
  margin-top: 16px;
  padding: 12px 18px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  background-color: #0071e3;
  color: white;
  cursor: pointer;
}

button:hover {
  background-color: #005bb5;
}

button:disabled {
  background-color: #b8b8be;
  cursor: not-allowed;
}

.result,
.error {
  margin-top: 24px;
  padding: 18px;
  border-radius: 12px;
}

.result {
  background-color: #f0f8ff;
  border: 1px solid #b3d6ff;
}

.error {
  background-color: #fff2f0;
  border: 1px solid #ffb5a1;
}

.result h2 {
  margin-top: 0;
  font-size: 22px;
}

dl {
  margin: 0;
}

dt {
  font-weight: 600;
  margin-top: 14px;
}

dd {
  margin-left: 0;
  margin-top: 4px;
}

footer {
  margin-top: 32px;
  font-size: 13px;
  color: #6e6e73;
}

footer a {
  color: #0071e3;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

footer a:visited {
  color: #5b2d91;
}

@media (prefers-color-scheme: dark) {
  body {
    color: #f5f5f7;
    background-color: #1c1c1e;
  }

  main {
    background: #2c2c2e;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  }

  textarea {
    background-color: #3a3a3c;
    color: #f5f5f7;
    border-color: #5a5a5c;
  }

  button {
    background-color: #0a84ff;
  }

  button:hover {
    background-color: #0060df;
  }

  button:disabled {
    background-color: #5a5a5c;
  }

  .result {
    background-color: rgba(10, 132, 255, 0.12);
    border-color: rgba(10, 132, 255, 0.4);
  }

  .error {
    background-color: rgba(255, 69, 58, 0.18);
    border-color: rgba(255, 69, 58, 0.4);
  }

  footer {
    color: #9a9a9e;
  }

  footer a {
    color: #64b8ff;
  }

  footer a:visited {
    color: #d0a8ff;
  }
}
