
.demo-app {
  overflow: auto;
  height: 100%;
}
.demo-title {
  padding: 24px 12px 12px;
}
.demo-stories {
  display: flex;
  align-items: center;
  padding: 12px;
  overflow: auto;
  scrollbar-width: none;
  justify-content: center;
}
.demo-stories::-webkit-scrollbar {
  display: none;
  opacity: 0;
}
.demo-stories a + a {
  margin-left: 20px;
}
.demo-stories a {
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition-duration: 300ms;
  transition-property: opacity;
}
.demo-stories a:active {
  opacity: 0.55;
  transition-duration: 50ms;
}

.demo-stories-avatar {
  position: relative;
  border-radius: 50%;
  padding: 4px; /* толщина рамки */
  overflow: hidden;
}

/* вращающийся градиент */
.demo-stories-avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  padding: 3px;
  background: conic-gradient(
    from 0deg,
    #8A3BEE,
    #F200B7,
    #FE9402,
    #8A3BEE
  );

  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;

  animation: spin 4s linear infinite;
  animation-play-state: running; /* по умолчанию крутится */
  z-index: 1;
}

/* при ховере — стоп */
.demo-stories-avatar:hover::before {
  animation-play-state: paused;
}

.demo-stories-avatar img {
  position: relative;
  z-index: 2;
  display: block;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
}

/* анимация вращения */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}


.demo-stories-name {
    margin-top: 10px;
    color: #212121;
    text-align: center;
    font-family: Manrope;
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
    line-height: 140%;
}
.demo-post-header {
  display: flex;
  align-items: center;
  padding: 8px;
}
.demo-post-header-actions {
  appearance: none;
  margin: 0;
  padding: 0;
  border: none;
  outline: 0;
  position: relative;
  box-shadow: none;
  border-radius: 0;
  background: none;
  margin-left: auto;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition-duration: 300ms;
  transition-property: opacity;
}
.demo-post-header-actions:active {
  opacity: 0.55;
  transition-duration: 50ms;
}
.demo-post-header-actions span {
  width: 3px;
  height: 3px;
  background: #fff;
  border-radius: 50%;
}
.demo-post-header-actions span + span {
  margin-left: 3px;
}
.demo-post-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  margin-right: 8px;
  padding: 2px;
  box-sizing: border-box;
  position: relative;
  cursor: pointer;
  background-image: linear-gradient(
    to right top,
    #ffc600 20%,
    #ff0040,
    #e600cc 80%
  );
  transition-property: opacity;
  transition-duration: 200ms;
}
.demo-post-avatar:active {
  opacity: 0.55;
  transition-duration: 0;
}
.demo-post-avatar::before {
  content: '';
  left: 1px;
  top: 1px;
  right: 1px;
  bottom: 1px;
  background: #000;
  position: absolute;
  border-radius: 50%;
  z-index: 0;
}
.demo-post-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  position: relative;
  z-index: 1;
}
.demo-post-name {
  font-size: 14px;
  font-weight: 600;
}
.demo-post-image {
  height: 320px;
}
.demo-post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.demo-post-footer {
  padding: 16px;
}
.demo-post-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
}
.demo-post-footer-actions-left,
.demo-post-footer-actions-right {
  display: flex;
  align-items: center;
}
.demo-post-footer-actions button {
  appearance: none;
  border: none;
  outline: 0;
  position: relative;
  box-shadow: none;
  border-radius: 0;
  background: none;
  margin-left: auto;
  display: flex;
  align-items: center;
  cursor: pointer;
  transition-duration: 300ms;
  transition-property: opacity;
  padding: 0;
  margin: 0;
}
.demo-post-footer-actions button:active {
  opacity: 0.55;
  transition-duration: 50ms;
}
.demo-post-footer-actions button img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  object-position: center;
}
.demo-post-footer-actions button + button {
  margin-left: 16px;
}
.demo-post-likes {
  font-size: 14px;
  font-weight: 600;
}
.demo-post-content {
  font-size: 14px;
  margin-top: 4px;
  line-height: 1.25;
}
.demo-post-content-name {
  font-weight: 600;
}
.demo-post-content-text {
  opacity: 0.85;
}
.demo-post-date {
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.5;
  font-weight: 500;
}
.stories-slider {
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  transform: scale(0);
  transform: translate3d(0, 0, 0) scale(0.5);
  opacity: 0;
  background: #000;
}
@media (min-width: 415px), (min-height: 897px) {
  .stories-slider {
    background: #292831;
  }
}
.stories-slider > .swiper {
  z-index: 2;
  max-width: 414px;
  max-height: 896px;
}
.stories-slider:not(.stories-slider-in) {
  pointer-events: none;
}
.stories-slider:not(.stories-slider-in) * {
  pointer-events: none !important;
}
.stories-slider-in {
  animation: stories-slider-in 400ms forwards;
  pointer-events: auto;
  transform: translate3d(0, 0, 0) scale(1);
  opacity: 1;
}
.stories-slider-out {
  pointer-events: none;
  animation: stories-slider-out 400ms forwards !important;
}
@keyframes stories-slider-in {
  0% {
    transform: translate3d(0, 0, 0) scale(0.5);
    opacity: 0;
  }
  50% {
    transform: translate3d(0, 0, 0) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
}
@keyframes stories-slider-out {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate3d(0, 0, 0) scale(0.5);
    opacity: 0;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(0.5);
    opacity: 0;
  }
}

@media (max-width: 767px) {
  .demo-stories a + a {
      margin-left: 0px;
  }
  .demo-stories {
    padding: 12px 5px;
    gap: 5px;
  }
}