:root,
page {
  --nut-scale-f: 1;
  --nut-scale-font: var(--nut-scale-f, 1);
  --nut-scale-icon: var(--nut-scale-f, 1);
  --nut-icon-height: calc(16px * var(--nut-scale-icon, var(--nut-scale-f, 1))) !important;
  --nut-icon-width: calc(16px * var(--nut-scale-icon, var(--nut-scale-f, 1))) !important;
  --nut-icon-line-height: calc(16px * var(--nut-scale-icon, var(--nut-scale-f, 1))) !important;
}

/* #ifdef harmony */
/* #endif */
/* #ifndef harmony */
/* #endif */
.nut-barrage {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  background-color: var(--nutui-color-background, #f2f3f5);
  color: var(--nutui-color-title, #1a1a1a);
}
.nut-barrage .barrage-item {
  display: block;
  position: absolute;
  right: 0;
  padding: calc(4px * var(--nut-scale-f, 1)) calc(16px * var(--nut-scale-f, 1));
  border-radius: calc(16px * var(--nut-scale-f, 1));
  font-size: var(--nutui-font-size-s, calc(12px * var(--nut-scale-font, var(--nut-scale-f, 1))));
  text-align: center;
  white-space: pre;
  transform: translateX(100%);
  background: linear-gradient(to right, var(--nutui-black-3), var(--nutui-black-1));
  box-sizing: border-box;
}
.nut-barrage .barrage-item.move {
  will-change: transform;
  animation-name: moving;
  animation-timing-function: linear;
  animation-play-state: running;
}
@keyframes moving {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(var(--move-distance));
  }
}
@-webkit-keyframes moving {
  from {
    -webkit-transform: translateX(100%);
  }
  to {
    -webkit-transform: translateX(var(--move-distance));
  }
}

[dir=rtl] .nut-barrage,
.nut-rtl .nut-barrage {
  left: auto;
  right: 0;
}
[dir=rtl] .nut-barrage .barrage-item,
.nut-rtl .nut-barrage .barrage-item {
  transform: translateX(-100%);
  background: linear-gradient(to left, var(--nutui-black-3), var(--nutui-black-1));
}
[dir=rtl] .nut-barrage .barrage-item.move,
.nut-rtl .nut-barrage .barrage-item.move {
  animation-name: moving-rtl;
}
@keyframes moving-rtl {
  from {
    transform: translateX(var(--move-distance));
  }
  to {
    transform: translateX(100%);
  }
}
@-webkit-keyframes moving-rtl {
  from {
    transform: translateX(var(--move-distance));
  }
  to {
    transform: translateX(100%);
  }
}