@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap");

* {
  font-size: 16px;
  font-family: "JetBrains Mono", monospace;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  --background: #101010;
  --foreground: #eeeeee;
  --foreground-muted: #bbbbbb;
  --primary: #14b8a6;
  --secondary: #0d9488;
}
body {
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1 {
  font-size: 3rem;
  margin: 1rem 0;
  font-weight: 700;
}

h2 {
  font-size: 1.8rem;
  margin: 1rem 0;
  font-weight: 500;
}

.text-muted {
  font-size: 1.2rem;
  margin: 1rem 0;
  color: var(--foreground-muted);
  line-height: 1.25;
}

footer {
  margin-top: auto;
  width: 100%;
}

hr {
  margin-top: 50px;
  border-color: #737373;
}

footer > p {
  padding: 2rem 0;
  text-align: center;
  color: var(--foreground-muted);
}

.container {
  margin-top: 0rem;
  margin-right: auto;
  margin-left: auto;
  width: 100%;
  padding: 0 1rem;
  min-width: 360px;
  max-width: 56rem;
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.array-input {
  display: block;
  height: 3rem;
  box-sizing: border-box;
  outline: none;
  width: 36rem;
  max-width: 100%;
  padding-left: 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--foreground);
  background-color: var(--background);
  color: var(--foreground);
  font: inherit;
  margin-bottom: 1rem;
}

.submit-array {
  height: 3rem;
  border-radius: 0.5rem;
  border: none;
  color: white;
  background-color: var(--primary);
  font: inherit;
  width: 36rem;
  max-width: 100%;
  transition: all 0.2s ease-in-out;
}

.submit-array:hover {
  background-color: var(--secondary);
  transform: scale(1.02);
}

.array-input:focus {
  border: 1px solid var(--primary);
  box-shadow: 0 0 5px var(--primary);
}

.input-error {
  color: red;
}

.array {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.array-element {
  box-sizing: border-box;
  height: 50px;
  padding: 10px;
  border: 1px solid var(--foreground);
  border-radius: 5px;
  margin-right: 10px;
  margin-bottom: 10px;
}

.array-element.swapped {
  border-color: red;
  box-shadow: 0 0 5px red;
}

.array-element.compared {
  border-color: var(--primary);
  box-shadow: 0 0 5px var(--primary);
}

.comparing,
.merging {
  color: var(--primary);
}

.swapping {
  color: red;
}
