@import url("https://fonts.googleapis.com/css?family=Lato&display=swap");

:root {
  --black: #0b0c10;
  --dark: #1f2833;
  --gray: #c5c6c7;
  --tur: #66fcf1;
  --darkTur: #27c1b9;
  --blue: linear-gradient(135deg, #54b0f1 10%, #0396ff 100%);
  --sky: #00bbf0;
}

* {
  margin: 0;
  box-sizing: border-box;
}

body {
  font-family: "Lato", sans-serif;
  min-height: 100vh;
  counter-reset: elem -1;
}

button {
  padding: 15px 20px;
  cursor: pointer;
  outline: none;
}

.header {
  /* background-image: var(--blue); */
  text-align: center;
  padding: 25px 0;
  word-spacing: 0.2em;
  font-size: 1.2em;
  color: #eeeeee;
  background-color: #222831;
  width: 100%;
}

.accent {
  color: var(--sky);
}

.visualizer {
  /* background-color: #eeeeee; */
  min-height: 650px;
  display: grid;
  grid-template-columns: 1fr;
}

.array {
  min-height: 350px;
  width: 100%;
  background-color: #eeeeee;
  /* background-image: white; */
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: rgba(255, 255, 255, 0.75);
}

.array::before {
  position: absolute;
  content: "";
  background-image: linear-gradient(
      rgba(255, 255, 255, 0.85),
      rgba(255, 255, 255, 0.85)
    ),
    url(http://cdn.onlinewebfonts.com/svg/img_491257.png);
  background-size: 350px 350px;
  background-repeat: no-repeat;
  width: 350px;
  height: 350px;
}

.array::after {
  content: "";
  position: absolute;
  display: block;
  bottom: 0;
  left: 0;
  background-image: url(wave.svg);
  background-size: cover;
  height: 250px;
  width: 100%;
  background-repeat: no-repeat;
}

.buttons {
  display: flex;
  justify-content: space-around;
  margin: 0 auto;
  align-items: center;
}

.buttons .generate-array #generate {
  font-size: 18px;
  border-radius: 3px;
  background-color: var(--dark);
  border: none;
  margin-right: 20px;
  color: #eeeeee;
  transition: 0.2s all ease-in;
}

.sky {
  color: #eeeeee;
  transition: 0.2s all ease-in;
}

.buttons .generate-array #generate:hover .sky {
  color: var(--sky);
}

.buttons .generate-array #generate:hover {
  color: #eeeeee;
}

.buttons .search-bar {
  border: 3px solid var(--dark);
  position: relative;
  width: auto;
  border-radius: 30px;
}

.buttons .search-bar #target {
  height: 55px;
  font-size: 20px;
  border-radius: 40px;
  border: none;
  outline: none;
  width: 100px;
  padding-left: 10px;
  text-align: center;
  font-size: 18px;
}

.buttons .search-bar #search-btn {
  display: inline-block;
  background-color: var(--dark);
  font-size: 18px;
  color: #eeeeee;
  border-radius: 50%;
  border: none;
  transition: all 0.2s ease-in;
  margin-right: 3px;
  margin-top: 4px;
  width: 50px;
  height: 50px;
  padding: 15px;
}

.buttons .search-bar #search-btn:hover {
  color: var(--sky);
}

.buttons .search-bar #search-btn:active {
  background-color: #232e3d;
}

/* Array element styling */
.element {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--dark);
  color: #eeeeee;
  font-size: 16px;
  display: inline-block;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 10px;
  position: relative;
  font-weight: 700;
  transition: 2s;
}

.element::after {
  position: absolute;
  display: block;
  counter-increment: elem;
  content: counter(elem);
  z-index: 1;
  bottom: -25px;
  color: var(--sky);
  font-weight: 700;
}

.fa-arrow-up {
  height: 30px;
  width: 30px;
  position: absolute;
  font-size: 25px;
  transition: all 1s ease-in;
  bottom: -60px;
  transform-origin: center center;
}

#low {
  color: #f2cc90;
}

#high {
  color: #e3b04b;
}

#middle {
  color: #2b2b28;
  z-index: 1;
}

.found {
  color: var(--dark);
  top: 50px;
  word-spacing: 5px;
  opacity: 0;
  animation-duration: 1.4s;
  animation-name: appear;
  animation-timing-function: ease-in;
  animation-fill-mode: forwards;
}

@keyframes appear {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
