#movie-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(1fr, 1fr));/*to 180 min after loading screen*/
  gap: 40px;
  padding-top: 10px;
  padding-bottom: 30px;
  justify-items: center;
  text-align: center;
  margin: auto;
  margin-left: 40px;
  margin-right: 40px;
  margin-top: 0px; /*change to 50px after loading screen*/

  transition: margin-top 1s;
}

#movie-display .loading {
  height: 60vh;
  flex: 1;
  flex-direction: column;
  align-content: center;
}

.movie-box {
  position: relative;
  width: 180px;
  height: 270px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-color: #000;
  cursor: pointer;
  border: 2px solid grey;
  user-select: none;
}

@media (max-width:480px){
    .movie-box {
        width: 120px;
        height: 180px;
    }
}
.movie-box:hover {
  transform: scale(1.05);
}

.movie-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.movie-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  padding: 15px 10px;
  opacity: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  transition: opacity 0.3s ease;
  font-size: 0.85em;
}

.movie-box:hover .movie-info {
  opacity: 1;
}

.movie-info h3 {
  margin: 0 0 5px;
  text-align:left;
  font-size: 0.9em;
}

.movie-info p {
  margin: 0;
  font-size: 0.8em;
}

.pagination {
  display: flex;
  justify-content: center;
}

.pagination div {
  width: 35px;
  height: 40px;

  border: 2px solid grey;
  background-color: rgb(104, 98, 98);
  color: black;

  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 10px;
  cursor: pointer;
  user-select: none;
}

.pagination div:hover {
  background-color: rgba(162, 162, 162);
}