@import url('https://fonts.googleapis.com/css?family=Open+Sans&display=swap');

body {
  margin: 0;
  min-height: 100vh;
  overflow: auto;
  overflow-x: hidden;
  font-family: 'Open Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background-image: linear-gradient(180deg, rgba(30, 30, 30, 1) 0%, rgba(60, 60, 60, 1) 100%);
  color: #ffffff;
}

.results {
  display: flex;
  align-items: center;
  justify-content: center;
}

.result {
  background-color: #444;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px;
  height: 30vh;
  width: 40vw;
  max-width: 600px;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  transition: width 0.5s, height 0.5s;
}

.result img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  border-radius: 8px;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.5s ease-in-out;
  opacity: 0;
  z-index: 1;
}

.result img.active {
  opacity: 1;
  z-index: 2;
}

.buttons {
  display: flex;
  align-items: center;
  justify-content: center;
}

button {
  background-color: #6495ED;
  border: 0;
  border-radius: 4px;
  color: #fff;
  font-size: 18px;
  padding: 10px 20px;
  margin: 10px;
  max-width: 300px;
  max-height: 60px;
  box-sizing: border-box;
  cursor: pointer;
}

button:active {
  transform: scale(0.98);
}

button:focus {
  outline: none;
}

.loader {
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top: 2px solid #ffffff;
  border-radius: 50%;
  width: 10px;
  height: 10px;
  animation: spin 0.5s linear infinite;
  position: absolute;
  bottom: 5px;
  right: 5px;
  z-index: 10;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@media (max-width: 600px) {
  button {
    font-size: 14px;
  }
  .result {
    height: 50vh;
    width: 80vw;
  }
}