body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  background: url("https://i.loli.net/2020/09/01/4ejZ7JUt3lOkEyB.jpg") 0 0 / cover no-repeat;
}

ul {
  padding: 0;
  margin: 0;
  list-style-type: none;
}

.ios-notifications {
  $count: 4;
  $y-offset: 0.75rem;
  $z-offset: 3rem;
  position: relative;
  transform-style: preserve-3d;
  perspective: 800px;
  cursor: pointer;

  &__item {
    position: relative;
    width: 100%;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    backdrop-filter: saturate(130%) blur(20px);
    transition: 0.6s var(--ease-out-cubic);

    @for $i from 2 through $count {
      &:nth-child(#{$i}) {
        $j: $i - 1;
        position: absolute;
        top: 0;
        left: 0;
        z-index: -1 * $j;
        color: transparent;
        transform: translateY($y-offset * $j) translateZ($z-offset * $j * -1);

        @if $i == 2 {
          background: rgba(255, 255, 255, 0.6);
        }

        @if $i == 3 {
          background: rgba(255, 255, 255, 0.5);
        }

        @if $i > 3 {
          background: transparent;
          box-shadow: none;
        }
      }
    }
  }

  &.unfolded {
    .ios-notifications__item {
      color: black;
      background: rgba(255, 255, 255, 0.7);

      .more {
        display: none;
      }

      @for $i from 2 through $count {
        &:nth-child(#{$i}) {
          $j: $i - 1;
          transform: translateY(calc(#{100% * $j} + #{0.5rem * $j}));
        }
      }
    }
  }
}

.container {
  position: relative;
  top: -8rem;
}
