* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: sans-serif;
}

:root {
  --main: rgb(0, 136, 255);
  --text: white;
}

body {
  background-color: aliceblue;
}

.wrapper {
  margin: 0 auto;
  padding: 0.5em;
  max-width: 1200px;
  width: 100%;
}

header {
  background-color: rgb(0, 136, 255);
  color: white;
  text-align: center;
  padding: 4rem 0;
  width: 100%;
}

h2 {
  border-bottom: 2px solid black;
  padding-bottom: 1rem;
  font-size: 1rem;
}

main {
  padding: 4rem 0;
  .wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
  }

  section {
    min-height: 30vh;
    gap: 2rem;
    display: flex;
    flex-direction: column;
  }
}

ol {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0 2rem;
}

label {
  display: flex;
  align-items: center;
  gap: 1rem;
}

input {
  width: 10rem;
  height: 3rem;
  border-radius: 0.4rem;
  border: none;
  padding: 1rem;
  font-weight: 600;
  border: 1px solid #007bff;
}

button {
  width: 10rem;
  height: 3rem;
  border-radius: 0.4rem;
  border: none;
  cursor: pointer;
  transition: 0.1s ease-in;
  font-weight: 600;
  background-color: var(--main);
  color: var(--text);
}

button:hover {
  background-color: rgb(55, 108, 255);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  transform: scale(1.03);
}

button:active {
  background-color: rgb(26, 196, 253);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.4) inset;
  transform: scale(0.97);
}

.bit-number {
  background-color: white;
  width: 16rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.4rem;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.number-result {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.valid-result {
  display: flex;
  align-items: center;
  padding: 1rem 0;
  margin: 1rem 0;
  flex-direction: column;
  gap: 0.5rem;
  max-height: 350px;
  overflow-y: scroll;
  border-radius: 0.4rem;
  background-color: #0000000b;
  box-shadow: 0 0 20px 10px #0000000b;
}

.controls {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin: 20px 0;
  padding: 15px;
  background: #ffffff;
  border-radius: 5px;
}

.controls label {
  margin-right: 15px;
}

.controls input {
  border: 1px solid #007bff;
}

.result {
  margin-top: 5px;
  padding: 5px;
  font-weight: bold;
}

.test-results {
  margin-top: 20px;
  padding: 15px;
  background: #ffffff;
  border-radius: 0.4rem;
  overflow-y: scroll;
  max-height: 570px;
}

input[readonly] {
  background-color: #f8f9fa;
  border: 1px solid #ced4da;
  border: 1px solid #007bff;
}

.row {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.b-table-m {
  border-collapse: collapse;
  margin: 12px 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  width: 100%;
  border-radius: 0.4rem;
  overflow: hidden;
}

.b-table-m th {
  width: 50%;
  text-align: center;
  padding: 8px 12px;
  background-color: #87c4fd;
}

.b-table-m td {
  padding: 8px 12px;
  background-color: #c0e2ff;

  text-align: center;
}

.test-case {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  margin: 10px 0;
  background: #f9f9f9;
}

.test-steps {
  margin: 10px 0;
  padding: 10px;
  background: white;
  border-radius: 3px;
}

.step {
  padding: 5px 0;
  border-bottom: 1px solid #eee;
  font-family: monospace;
  font-size: 14px;
}

.test-passed {
  color: green;
  font-weight: bold;
  padding: 10px;
  background: #e8f5e8;
  border-radius: 3px;
}

.test-failed {
  color: red;
  font-weight: bold;
  padding: 10px;
  background: #ffe8e8;
  border-radius: 3px;
}

.final-result {
  text-align: center;
  padding: 15px;
  border-radius: 5px;
  margin-top: 20px;
}

@media (max-width: 1200px) {
  .wrapper {
    width: 876px;
  }
}

@media (max-width: 876px) {
  .wrapper {
    width: 576px;
  }
}

@media (max-width: 576px) {
  body {
    font-size: 12px;
  }

  h1 {
    font-size: 16px;
  }

  h2 {
    font-size: 14px;
  }

  .bit-number {
    width: 12rem;
    height: 3rem;
  }

  .wrapper {
    width: 100%;
    padding: 0.5em 1em;
  }

  button {
    font-size: 10px;
    width: 7rem;
    height: 2.5rem;
  }

  input {
    width: 7rem;
    height: 2.5rem;
    font-size: 12px;
  }

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

  header {
    padding: 2rem 0;
  }

  main {
    padding: 2rem 0;
  }
}
