body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  margin: 0;
  font-family: monospace;
  background-color: #fff;
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 40px;
}

ul {
  display: flex;
  list-style: none;
}

ul a,
a {
  position: relative;
  color: inherit;
  text-decoration: none;
  font-size: 1.2rem;
  margin-right: 20px;
  transition: color 0.3s ease;
}

a::before {
  content: "";
  position: absolute;
  display: block;
  width: 100%;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #000;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

a:hover::before {
  transform: scaleX(1);
}

h1 {
  font-size: 1.5rem;
  text-transform: uppercase;
}

.main {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  flex-grow: 1;
  justify-content: center;
  align-items: center;
  padding: 40px 80px;
}

.item {
  border-radius: 0px;
  padding: 20px;
  border: 2px solid #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 500ms, transform 500ms;
}

.item_view {
  padding: 20px;
  border-radius: 5px;
  margin-bottom: 10px;
}

.button_wrap {
  display: flex;
  align-items: start;
}

.button_wrap button,
#search-button {
  padding: 10px 20px;
  font-size: 1rem;
  border: none;
  background-color: #000;
  color: #fff;
  cursor: pointer;
  margin-left: 10px;
  border-radius: 0px;
  transition: background-color 0.3s ease;
}

.button_wrap button:hover,
#search-button:hover {
  background-color: #444;
}

.search {
  justify-content: space-evenly;
  align-self: center;
  margin-top: 20px;
}

#search {
  padding: 10px;
  font-size: 1rem;
  border-radius: 0px;
  border: 1px solid #000;
  width: 300px;
  outline: none;
}

h2 {
  text-align: center;
}

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

#loading {
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  background: black;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.4rem;
  padding: 40px;
}

@media (max-width: 768px) {
  .main {
    grid-template-columns: repeat(2, 1fr);
  }
  nav {
    padding: 10px 20px;
  }
  h1 {
    font-size: 1.2rem;
  }
  ul a {
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .main {
    grid-template-columns: repeat(1, 1fr);
    padding: 40px;
  }
  #search {
    width: 50%;
  }
}

