*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --txt-clr: black;
  --bg-clr: white;
}

@media (prefers-color-scheme: dark) {
  :root {
    --txt-clr: white;
    --bg-clr: #0d1117;
  }
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
    Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: var(--txt-clr);
  background-color: var(--bg-clr);
  min-height: 100vh;
  padding: 1em;
}

.trigger {
  cursor: pointer;
  position: relative;
  width: 125px;
  height: 50px;
  border-radius: 5px;
  background-color: #292a2b;
  display: flex;
  align-items: center;
  justify-content: center;
}

.trigger::after {
  content: 'See more 👇';
}

ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  transition: display 3000ms ease-in-out;
  position: absolute;
  display: none;
  width: 125px;
  animation: fadeIn 300ms ease-in-out 0s 1 forwards;
}

li {
  border: 1px solid var(--txt-clr);
  padding: 0.5em;
  border-radius: 5px;
  transition: transform 300ms ease-in-out;
}

li:hover {
  background-color: lightgray;
  cursor: pointer;
  transform: scale(1.1);
}

.trigger.active + ul {
  display: block;
}

.trigger.active::after {
  content: 'See less 👆';
}

/* ! fix why hover isn't working */
/* .trigger:hover + ul,
.trigger:hover + ul > li {
  display: block;
} */

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
