:root {
  --primary-color: #2563eb;
  --text-color: #1f2937;
  --bg-color: #ffffff;
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --max-width: 1200px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  color: var(--text-color);
  background-color: var(--bg-color);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 1rem;
}

body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: #f3f6fb;
}

main {
  width: min(100%, 34rem);
  padding: 2rem;
  background: var(--bg-color);
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 1rem 3rem rgb(15 23 42 / 8%);
}

h1 {
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
}

form {
  display: flex;
  gap: 0.75rem;
}

input {
  min-width: 0;
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #aebdce;
  border-radius: 4px;
}

button {
  padding: 0.75rem 1rem;
  color: #fff;
  background: var(--primary-color);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

button:hover {
  background: #1d4ed8;
}

#form-message,
#short-link-result {
  margin-top: 1rem;
  overflow-wrap: anywhere;
}

#form-message {
  color: #b42318;
}

#short-link {
  color: #1d4ed8;
}

@media (max-width: 30rem) {
  form {
    flex-direction: column;
  }
}
