@import url("https://fonts.googleapis.com/css2?family=Exo+2:ital,wght@0,100..900;1,100..900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  user-select: none;
  font-family: "Exo 2", sans-serif;
}

body {
  min-height: 100dvh;
  background: linear-gradient(#148d90, #012) 0 100dvh / 100% calc(100% - 100dvh) no-repeat;
}

.container {
  position: relative;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  padding: 2rem;
}

.content {
  position: relative;
  display: inline-block;
  font-size: clamp(1rem, 1vw, 2rem);
  color: #fff;
  padding: 0.8rem 1.2rem;
  border-radius: 10px;
  cursor: pointer;
  text-shadow: 2px 2px 5px black, -2px 2px 5px black, 2px -2px 5px black, -2px -2px 5px black;
  background: rgba(0, 0, 0, 0.3);
  text-align: center;
  min-width: 10%;
  z-index: auto;

  opacity: 0;
  transition: opacity 0.3s linear, transform 0.4s ease;
  transform: translateY(20px);
  will-change: opacity, transform;
}
.content.show {
  transform: translateY(0);
}
.content:hover {
  z-index: 5;
}

.tooltip {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  background: #000;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  z-index: 6;
  bottom: 110%;
  pointer-events: none;
  transition: all 0.3s ease;
  padding: 6px 10px;
  width: 120%;
  text-shadow: none;
}
.tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -7px;
  border: 7px solid;
  border-color: #000 transparent transparent transparent;
}
.content:hover .tooltip {
  opacity: 1;
}
.tooltip.bottom {
  top: 110%;
  bottom: auto;
}
.tooltip.bottom::after {
  top: auto;
  bottom: 100%;
  border-color: transparent transparent #000 transparent;
}

@media (max-width: 1069px) {
  .content {
    min-width: 20%;
  }
}

@media (max-width: 650px) {
  .content {
    min-width: 100%;
  }
  .tooltip {
    width: 100%;
  }
}
