#app {
    padding: 60px 0;
}

#app .title{
  font-family: "Manrope", sans-serif;
  font-size: 24px;
  text-transform: uppercase;
  font-weight: bold;
}

#app .subtitle{
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  color: #5e5f5f;
}

.demo-app {
    overflow: auto;
    height: 100%;
    max-width: 1080px;
    margin: 0 auto;
}

.demo-title {
  padding: 24px 12px 12px;
}

.demo-stories {
    display: flex;
    align-items: center;
    padding: 24px 0;
    overflow: auto;
    scrollbar-width: none;
    justify-content: space-between;
}

.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: 120px;
  height: 120px;
  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: 20px;
    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: 370px;
  max-height: 879px;
}
.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: 1200px) {
  #app .title {
      font-size: 16px;
  }
  #app .subtitle {
    font-size: 13px;
  }
  #app {
    padding: 30px 0;
  }
  .demo-stories-avatar img {
    width: 100px;
    height: 100px;
  }
}

.video-wrapper {
  position: relative;
  display: inline-block;
}
.video-wrapper video {
  width: 100%;
  display: block;
}
.video-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0,0,0,.4);
  cursor: pointer;
}
.video-overlay .preview-img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.play-btn {
  z-index: 2;
  background: rgba(255,255,255,0.8);
  border: none;
  border-radius: 50%;
  width: 70px;
  height: 70px;
  font-size: 30px;
  cursor: pointer;
}

.inner_desc_doctor {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    padding: 10px 10px;
    background: rgba(44, 63, 80, 0.60);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#app .inner_desc_doctor .title{
  color: #FFF;
  font-family: Manrope;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  line-height: 170%;
  letter-spacing: -0.27px;
  text-transform: uppercase;
}

.inner_desc_doctor .small_text{
  color: #FFF;
  font-family: Manrope;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
  padding-bottom: 16px;
}

.inner_desc_doctor .desc{
  color: #FFF;
  font-family: Manrope;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
}


@media (max-width: 767px) {
  .demo-stories-avatar img {
    width: 52px;
    height: 52px;
  }
  .demo-stories-name {
    margin-top: 10px;
    font-size: 14px;
    line-height: 120%;
  }
  .demo-stories a + a {
      margin-left: 0px;
  }
  .demo-stories {
    padding: 12px 0;
    gap: 0;
  }
  div#app .container {
    padding: 0 10px;
  }
  #app {
        padding: 0 0 30px;
    }
}


.demo-stories-avatar::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    padding: 3px;
    background: conic-gradient(
        from 0deg,
        #8A3BEE 0%, #8A3BEE 20%, /* Самый длинный сегмент */
        transparent 5%, transparent 0%,
        #F200B7 5%, #F200B7 40%,
        transparent 5%, transparent 5%,
        #FE9402 5%, #FE9402 55%,
        transparent 5%, transparent 10%,
        #8A3BEE 5%, #8A3BEE 65%,
        transparent 5%, transparent 70%,
        #F200B7 10%, #F200B7 73%,
        transparent 73%, transparent 75%,
        #FE9402 25%, #FE9402 77%,
        transparent 77%, transparent 79%,
        #8A3BEE 79%, #8A3BEE 80%, /* Самый короткий сегмент */
        transparent 80%, transparent 100%
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: spin 2s linear infinite;
    animation-play-state: running;
    z-index: 1;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.stories-slider-content > img {
    object-fit: contain;
    width: 100%;
    height: 100%;
}