/* Оживление сайта Rubiker — движение без «тяжёлого» UI */

.rb-activity {
  margin-top: 12px;
}

.rb-activity__k {
  display: block;
  margin: 0 0 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3, #949ab8);
}

.rb-panel__head {
  margin: 0 0 12px;
}

.rb-panel__title--sm {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.rb-panel__sub {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-3, #949ab8);
}

.rb-ready {
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line-btn, #4b5278));
  background: color-mix(in srgb, var(--surface-2, #282d47) 94%, transparent);
}

.rb-ready__progress {
  height: 5px;
  margin: 0 0 10px;
  border-radius: 99px;
  overflow: hidden;
  background: color-mix(in srgb, var(--line-btn, #4b5278) 55%, transparent);
}

.rb-ready__progress > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #8b7cf8, #c5baff);
  transition: width 0.45s var(--spring, cubic-bezier(0.34, 1.25, 0.64, 1));
}

@media (max-width: 520px) {
  .rb-ready__track {
    display: none;
  }

  .rb-ready__line {
    font-size: 12.5px;
    text-align: center;
  }
}

.rb-ready[hidden] {
  display: none !important;
}

.rb-ready.is-spinning .rb-ready__track {
  opacity: 0.55;
}

.rb-ready__track {
  display: flex;
  gap: 6px;
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.rb-ready__step {
  flex: 1;
  text-align: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text-3, #949ab8);
  padding: 6px 4px 5px;
  border-radius: 999px;
  border: 1px solid transparent;
  transition:
    color 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.rb-ready__step.is-done {
  color: var(--text-2, #b9c1dc);
}

.rb-ready__step.is-active {
  color: #1a1030;
  background: linear-gradient(135deg, #c5baff, #9a8cff);
  border-color: color-mix(in srgb, #c5baff 40%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, #fff 12%, transparent) inset;
}

.rb-ready.is-ready-flash .rb-ready__step.is-active {
  animation: rb-ready-pulse 1.2s ease;
}

@keyframes rb-ready-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.03);
  }
}

.rb-ready__line {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text, #edf0ff);
}

.rb-ready__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.rb-ready__actions[hidden] {
  display: none !important;
}

.rb-ready__actions .btn {
  min-height: 38px;
  font-size: 12.5px;
}

.rb-start-battle.rb-cta--wait,
.rb-start-battle.rb-cta--guest,
.rb-start-battle.rb-cta--stake-wait {
  background: color-mix(in srgb, var(--surface-2, #282d47) 70%, var(--accent, #8b7cf8) 30%);
  border: 1px solid color-mix(in srgb, var(--line-btn, #4b5278) 80%, #8b7cf8 20%);
  color: var(--text, #edf0ff);
  box-shadow: none;
  cursor: default;
}

.rb-start-battle.rb-cta--guest {
  border-color: color-mix(in srgb, #7ee8a0 45%, var(--line-btn, #4b5278));
}

.rb-start-battle.rb-cta--stake,
.rb-start-battle.rb-cta--create {
  /* primary по умолчанию */
}

.rb-start-battle.rb-cta--go {
  background: linear-gradient(135deg, #7ee8a0, #3ecf7a);
  border-color: #5ee09a;
  color: #0d1a12;
  font-weight: 700;
  animation: rb-cta-go 1.6s ease-in-out infinite;
}

@keyframes rb-cta-go {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, #7ee8a0 50%, transparent);
  }
  50% {
    box-shadow: 0 0 0 6px color-mix(in srgb, #7ee8a0 0%, transparent);
  }
}

.rb-live-ticker {
  margin: 10px 0 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line-btn, #4b5278);
  background: color-mix(in srgb, var(--surface-2, #282d47) 88%, transparent);
  min-height: 40px;
}

.rb-live-ticker__slot {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  min-height: 40px;
}

.rb-live-ticker__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2, #b9c1dc);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(6px);
}

.rb-live-ticker__item.is-in {
  animation: rb-ticker-in 0.42s var(--spring, cubic-bezier(0.34, 1.25, 0.64, 1)) forwards;
}

.rb-live-ticker__item em {
  font-style: normal;
  color: var(--primary-text, #c5baff);
}

.rb-live-ticker__item b {
  font-weight: 600;
  color: var(--text, #edf0ff);
}

@keyframes rb-ticker-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.rb-cta {
  position: relative;
  overflow: hidden;
}

.rb-cta::before {
  content: "";
  position: absolute;
  inset: -40% -60%;
  background: linear-gradient(
    105deg,
    transparent 42%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 58%
  );
  transform: translateX(-120%);
  animation: rb-cta-sheen 4.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes rb-cta-sheen {
  0%,
  72% {
    transform: translateX(-120%);
  }
  100% {
    transform: translateX(120%);
  }
}

.bt-list.battle-list .bt-li {
  animation: rb-card-in 0.45s ease-out both;
}

.bt-list.battle-list .bt-li:nth-child(2) {
  animation-delay: 60ms;
}

.bt-list.battle-list .bt-li.is-tick {
  animation: rb-card-tick 0.55s ease-out;
}

.rb-ref-lobby {
  margin: 0 0 10px;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-2, #b9c1dc);
  background: color-mix(in srgb, var(--accent) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.rb-ref-lobby b {
  color: var(--primary-text, #c5baff);
  font-weight: 700;
}

.bt-list .bt-li.is-worker-stake {
  z-index: 1;
}

.rb-bt-card.is-worker-ref {
  border-color: color-mix(in srgb, var(--accent) 55%, #4b5278);
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent),
    0 8px 24px color-mix(in srgb, var(--accent) 18%, transparent);
  animation: rb-worker-card 2.4s ease-in-out infinite;
}

.bt-chip--worker {
  color: #1a1030;
  background: linear-gradient(135deg, #c5baff, #8b7cf8);
  font-weight: 700;
}

@keyframes rb-worker-card {
  0%,
  100% {
    transform: translateY(0);
    filter: brightness(1);
  }
  50% {
    transform: translateY(-2px);
    filter: brightness(1.06);
  }
}

@keyframes rb-card-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rb-card-tick {
  0% {
    transform: scale(1);
  }
  40% {
    transform: scale(1.012);
  }
  100% {
    transform: none;
  }
}

.gg-card.is-selected {
  animation: rb-gift-pick 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

.gift-grid button.gift-card {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: inherit;
}

.gift-grid button.gift-card.selected {
  border-color: #a297ff;
  box-shadow: 0 0 0 1px color-mix(in srgb, #a297ff 40%, transparent);
}

@keyframes rb-gift-pick {
  from {
    transform: scale(0.96);
  }
  to {
    transform: none;
  }
}

.rb-battle-wheel.is-stake-pulse .wheel-glow {
  animation: rb-stake-glow 0.52s ease-out;
}

.rb-chance-legend.is-stake-pulse b {
  animation: rb-pct-pop 0.45s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}

@keyframes rb-stake-glow {
  0% {
    opacity: 0.5;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
  100% {
    opacity: 0.9;
    transform: none;
  }
}

@keyframes rb-pct-pop {
  0% {
    transform: scale(0.88);
    opacity: 0.6;
  }
  100% {
    transform: none;
    opacity: 1;
  }
}

.bt-wait__msg.is-live {
  position: relative;
  overflow: hidden;
}

.bt-wait__msg.is-live::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.08),
    transparent
  );
  transform: translateX(-100%);
  animation: rb-wait-sheen 1.8s ease-in-out infinite;
  pointer-events: none;
}

@keyframes rb-wait-sheen {
  to {
    transform: translateX(100%);
  }
}

html.rb-giftbattle .bg-stage {
  opacity: 0.38;
  filter: saturate(0.55) blur(0);
}

html.rb-giftbattle .bg-stage .blob {
  opacity: 0.55;
}

@media (prefers-reduced-motion: reduce) {
  .rb-live-ticker__item.is-in,
  .rb-cta::before,
  .bt-wait__msg.is-live::after {
    animation: none;
  }

  .bt-list.battle-list .bt-li,
  .gg-card.is-selected {
    animation: none;
  }
}
