/* FREE CASINO ONLINE · Recompensas, niveles e insignias */
:root {
  --rw-common: #b9b3a4;
  --rw-uncommon: #69c78a;
  --rw-rare: #62a8ff;
  --rw-epic: #bb82ff;
  --rw-legendary: #f0b84b;
  --rw-exclusive: #ff7e8d;
}

.view--rewards.is-active {
  display: block;
  overflow-y: auto;
  min-height: 0;
  padding: clamp(20px, 3.5vh, 38px) 18px 46px;
  scroll-margin-top: 112px;
  background:
    radial-gradient(ellipse 65% 45% at 50% 26%, rgba(196, 158, 64, 0.13), transparent 72%),
    radial-gradient(ellipse 60% 40% at 90% 80%, rgba(31, 107, 68, 0.12), transparent 70%),
    linear-gradient(180deg, #07160f, #04100a);
}

.rw-wrap {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.rw-head {
  position: relative;
  padding: 2px 0 20px;
  text-align: center;
}

.rw-kicker {
  display: block;
  color: var(--gold);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.24em;
}

.rw-title {
  margin: 7px 0 8px;
  color: #fbf5e6;
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 400;
  line-height: 0.9;
}

.rw-intro {
  max-width: 620px;
  margin: 0 auto;
  color: #a9a28e;
  font-size: 11px;
  line-height: 1.55;
}

.rw-profile {
  display: flex;
  align-items: center;
  width: min(430px, 100%);
  margin: 18px auto 0;
  padding: 9px 12px;
  border: 1px solid rgba(246, 216, 128, 0.2);
  border-radius: 14px;
  background: rgba(5, 23, 13, 0.72);
  text-align: left;
}

.rw-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(246, 216, 128, 0.5);
  border-radius: 50%;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 25px;
}

.rw-profile-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  margin-left: 10px;
}

.rw-profile-label {
  color: #817963;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.rw-profile-copy strong {
  overflow: hidden;
  color: #f2e7ce;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rw-profile-copy small {
  color: var(--gold);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.rw-profile-badge {
  flex: 0 1 auto;
  max-width: 150px;
  overflow: hidden;
  color: #dfc786;
  font-size: 8px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rw-top-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.rw-card {
  position: relative;
  min-width: 0;
  padding: 16px;
  border: 1px solid rgba(246, 216, 128, 0.15);
  border-radius: 17px;
  background:
    radial-gradient(ellipse 100% 80% at 0% 0%, rgba(232, 191, 98, 0.06), transparent 70%),
    rgba(5, 23, 13, 0.8);
}

.rw-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #b7a77f;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.rw-tag {
  color: #817963;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.rw-big {
  display: block;
  margin-top: 13px;
  color: var(--gold-bright);
  font-family: var(--font-display);
  font-size: 54px;
  font-weight: 400;
  line-height: 0.9;
}

.rw-copy {
  min-height: 31px;
  margin: 9px 0 12px;
  color: #a59e8a;
  font-size: 9px;
  line-height: 1.45;
}

.rw-daily-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.rw-streak {
  color: #8f8772;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.rw-streak b {
  color: var(--gold);
  font-size: 12px;
}

.rw-primary {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 240, 184, 0.55);
  border-radius: 8px;
  background: linear-gradient(135deg, #ffe9a3, #d1a23d);
  color: #1d1304;
  font-family: var(--font-body);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.rw-primary:disabled {
  opacity: 0.45;
  cursor: default;
}

.rw-level-number {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 13px;
  color: var(--gold-bright);
  font-family: var(--font-display);
  line-height: 0.9;
}

.rw-level-number strong {
  font-size: 54px;
  font-weight: 400;
}

.rw-level-number span {
  color: #817963;
  font-size: 18px;
}

.rw-level-bar,
.rw-badge-progress {
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.rw-level-bar {
  height: 5px;
  margin: 12px 0 7px;
}

.rw-level-bar i,
.rw-badge-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #9a6f25, #f5d98b);
  transition: width 0.4s ease;
}

.rw-level-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #8f8772;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.rw-level-reward {
  margin: 10px 0 0;
  color: #bfa56c;
  font-size: 8px;
  font-weight: 700;
}

.rw-level-claim {
  margin-top: 10px;
}

.rw-badges-section {
  margin-top: 20px;
}

.rw-badges-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.rw-badges-head h3 {
  margin: 3px 0 0;
  color: #fbf5e6;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 400;
  line-height: 0.9;
}

.rw-badge-count {
  color: var(--gold);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.rw-badge-filters {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(560px, 100%);
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid rgba(246, 216, 128, 0.15);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.18);
}

.rw-badge-filters button {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #8b8370;
  font-family: var(--font-body);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
}

.rw-badge-filters button.is-active {
  background: linear-gradient(135deg, rgba(255, 233, 163, 0.95), rgba(189, 134, 38, 0.95));
  color: #1d1304;
}

.rw-badge-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rw-badge {
  display: flex;
  min-width: 0;
  gap: 11px;
  padding: 11px;
  border: 1px solid rgba(246, 216, 128, 0.12);
  border-radius: 14px;
  background: rgba(5, 23, 13, 0.76);
}

.rw-badge.is-locked {
  opacity: 0.62;
}

.rw-badge.is-locked .rw-badge-medal {
  filter: grayscale(1);
}

.rw-badge-medal {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--rw-common);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0.22), transparent 45%),
    #16231a;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.035), 0 0 16px color-mix(in srgb, var(--rw-common) 25%, transparent);
}

.rw-badge-medal span {
  font-size: 24px;
  line-height: 1;
}

.rw-badge-copy {
  flex: 1;
  min-width: 0;
}

.rw-badge-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rw-badge-top strong {
  overflow: hidden;
  color: #f0e6ce;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rw-badge-top span {
  flex: 0 0 auto;
  color: var(--rw-common);
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.rw-badge-copy p {
  margin: 3px 0 7px;
  color: #958d79;
  font-size: 8px;
  line-height: 1.35;
}

.rw-badge-progress {
  height: 3px;
  margin-bottom: 7px;
}

.rw-badge-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rw-badge-bottom small {
  overflow: hidden;
  color: #756e5d;
  font-size: 7px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rw-badge-bottom button,
.rw-equipped,
.rw-locked-label {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 6px;
  font-weight: 900;
  letter-spacing: 0.07em;
}

.rw-badge-bottom button {
  padding: 4px 7px;
  border: 1px solid rgba(246, 216, 128, 0.4);
  border-radius: 5px;
  color: var(--gold-bright);
  cursor: pointer;
}

.rw-equipped { color: var(--gold); }
.rw-locked-label { color: #5e584c; }


.rw-rarity-common .rw-badge-medal { border-color: var(--rw-common); }
.rw-rarity-common .rw-badge-top span { color: var(--rw-common); }
.rw-rarity-uncommon { --rw-rarity: var(--rw-uncommon); }
.rw-rarity-uncommon .rw-badge-medal { border-color: var(--rw-uncommon); }
.rw-rarity-uncommon .rw-badge-top span { color: var(--rw-uncommon); }
.rw-rarity-rare .rw-badge-medal, .rw-rarity-rare .rw-badge-top span { border-color: var(--rw-rare); color: var(--rw-rare); }
.rw-rarity-epic .rw-badge-medal, .rw-rarity-epic .rw-badge-top span { border-color: var(--rw-epic); color: var(--rw-epic); }
.rw-rarity-legendary .rw-badge-medal, .rw-rarity-legendary .rw-badge-top span { border-color: var(--rw-legendary); color: var(--rw-legendary); }
.rw-rarity-exclusive .rw-badge-medal, .rw-rarity-exclusive .rw-badge-top span { border-color: var(--rw-exclusive); color: var(--rw-exclusive); }

.rw-rarity-rare .rw-badge-medal { box-shadow: 0 0 0 3px rgba(98, 168, 255, 0.06), 0 0 16px rgba(98, 168, 255, 0.2); }
.rw-rarity-epic .rw-badge-medal { box-shadow: 0 0 0 3px rgba(187, 130, 255, 0.06), 0 0 16px rgba(187, 130, 255, 0.23); }
.rw-rarity-legendary .rw-badge-medal { box-shadow: 0 0 0 3px rgba(240, 184, 75, 0.07), 0 0 18px rgba(240, 184, 75, 0.3); }
.rw-rarity-exclusive .rw-badge-medal { box-shadow: 0 0 0 3px rgba(255, 126, 141, 0.07), 0 0 18px rgba(255, 126, 141, 0.26); }

.rw-backend-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(246, 216, 128, 0.15);
  border-radius: 9px;
  color: #8b8370;
  font-size: 8px;
  line-height: 1.5;
}

/* Insignia equipada junto al usuario en todas las páginas */
.user-button,
.fc-user {
  position: relative;
}

.fc-equipped-badge {
  position: absolute;
  right: -5px;
  bottom: -5px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 1px solid rgba(255, 237, 178, 0.85);
  border-radius: 50%;
  background: #0c2114;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  font-size: 11px;
  line-height: 1;
  pointer-events: none;
}

@media (min-width: 901px) {
  .view--rewards.is-active {
    scroll-margin-top: 100px;
  }
}

@media (max-width: 760px) {
  .view--rewards.is-active {
    padding: 18px 12px 40px;
  }

  .rw-title { font-size: 42px; }

  .rw-top-grid,
  .rw-badge-grid {
    grid-template-columns: 1fr;
  }

  .rw-daily-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .rw-primary {
    width: 100%;
  }

  .rw-badges-head h3 { font-size: 30px; }

  .rw-profile-badge {
    max-width: 120px;
  }

  .rw-badge-filters button {
    font-size: 6px;
  }
}

/* Iconos SVG y hasta tres insignias equipadas */
.rw-badge-medal {
  color: var(--rw-common);
}

.rw-badge-medal .rw-svg-icon {
  display: block;
  width: 27px;
  height: 27px;
}

.rw-rarity-uncommon .rw-badge-medal { color: var(--rw-uncommon); }
.rw-rarity-rare .rw-badge-medal { color: var(--rw-rare); }
.rw-rarity-epic .rw-badge-medal { color: var(--rw-epic); }
.rw-rarity-legendary .rw-badge-medal { color: var(--rw-legendary); }
.rw-rarity-exclusive .rw-badge-medal { color: var(--rw-exclusive); }

.rw-badge-bottom .rw-unequip {
  border-color: rgba(200, 134, 120, 0.45);
  color: #c88678;
}

.rw-profile-badge {
  display: flex;
  align-items: center;
  gap: 4px;
}

.rw-profile-badge span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  color: var(--gold);
}

.rw-profile-badge .rw-svg-icon {
  width: 16px;
  height: 16px;
}

.fc-equipped-badges {
  position: absolute;
  right: -4px;
  bottom: -4px;
  display: flex;
  align-items: center;
  gap: 1px;
  pointer-events: none;
}

.fc-equipped-badge {
  position: relative;
  right: auto;
  bottom: auto;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(255, 237, 178, 0.85);
  border-radius: 50%;
  background: #0c2114;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  color: var(--gold);
  font-size: 0;
  line-height: 1;
  pointer-events: none;
}

.fc-equipped-badge .rw-svg-icon {
  width: 10px;
  height: 10px;
}

@media (min-width: 901px) {
  .fc-equipped-badge {
    width: 18px;
    height: 18px;
  }
  .fc-equipped-badge .rw-svg-icon {
    width: 12px;
    height: 12px;
  }
}

.rw-count-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.rw-count-wrap small {
  color: #6f6858;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.09em;
}

/* Textos pequeños más legibles */
.rw-kicker { font-size: 10px; }
.rw-intro { font-size: 13px; line-height: 1.6; }
.rw-profile-label { font-size: 9.5px; }
.rw-profile-copy small { font-size: 10px; }
.rw-profile-badge { font-size: 10px; }
.rw-card-head { font-size: 10px; }
.rw-tag { font-size: 9.5px; }
.rw-copy { font-size: 12px; line-height: 1.5; }
.rw-streak { font-size: 9.5px; }
.rw-primary { font-size: 10px; }
.rw-level-meta { font-size: 9.5px; }
.rw-level-reward { font-size: 11px; line-height: 1.45; }
.rw-badge-count { font-size: 11px; }
.rw-badge-filters button { font-size: 9.5px; }
.rw-badge-top strong { font-size: 12px; }
.rw-badge-top span { font-size: 8.5px; }
.rw-badge-copy p { font-size: 10.5px; line-height: 1.45; }
.rw-badge-bottom small { font-size: 9px; }
.rw-badge-bottom button,
.rw-equipped,
.rw-locked-label { font-size: 8.5px; }
.rw-backend-note { font-size: 11px; line-height: 1.55; }
.rw-count-wrap small { font-size: 8.5px; }

@media (max-width: 760px) {
  .rw-badge-filters button { font-size: 9px; }
  .rw-copy { font-size: 11.5px; }
  .rw-badge-copy p { font-size: 10.5px; }
}

/* Ajuste final de legibilidad */
.rw-tag,
.rw-streak,
.rw-level-meta { font-size: 10px; }
.rw-badge-filters button { font-size: 10px; }
.rw-badge-top span { font-size: 9.5px; }
.rw-badge-copy p { font-size: 12px; }
.rw-badge-bottom small { font-size: 10px; }
.rw-badge-bottom button,
.rw-equipped,
.rw-locked-label { font-size: 9.5px; }
.rw-count-wrap small { font-size: 9px; }

@media (max-width: 760px) {
  .rw-badge-filters button { font-size: 9.5px; }
  .rw-badge-copy p { font-size: 11.5px; }
}

/* Texto pequeño XL */
.rw-kicker { font-size: 11px; }
.rw-intro { font-size: 14px; }
.rw-profile-label { font-size: 10.5px; }
.rw-profile-copy small,
.rw-profile-badge { font-size: 11px; }
.rw-card-head { font-size: 11px; }
.rw-tag,
.rw-streak { font-size: 10.5px; }
.rw-copy { font-size: 13.5px; }
.rw-primary { font-size: 11px; }
.rw-level-meta { font-size: 10.5px; }
.rw-level-reward { font-size: 12px; }
.rw-badge-count { font-size: 12px; }
.rw-badge-filters button { font-size: 10.5px; }
.rw-badge-top strong { font-size: 13px; }
.rw-badge-top span { font-size: 10.5px; }
.rw-badge-copy p { font-size: 13px; line-height: 1.5; }
.rw-badge-bottom small { font-size: 11px; }
.rw-badge-bottom button,
.rw-equipped,
.rw-locked-label { font-size: 10.5px; }
.rw-backend-note { font-size: 12px; }
.rw-count-wrap small { font-size: 10px; }

@media (max-width: 760px) {
  .rw-badge-filters button { font-size: 10px; }
  .rw-badge-copy p { font-size: 12.5px; }
}

/* Insignias equipadas solo en la ficha, grandes y con tooltip */
.rw-profile-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.rw-profile-badge-icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(246, 216, 128, 0.42);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 25%, rgba(255, 230, 162, 0.16), transparent 65%),
    rgba(7, 27, 15, 0.82);
  color: var(--gold);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.rw-profile-badge-icon:hover,
.rw-profile-badge-icon:focus-visible {
  border-color: rgba(255, 230, 162, 0.8);
  box-shadow: 0 0 20px rgba(232, 191, 98, 0.2);
  transform: translateY(-1px);
  outline: none;
}

.rw-profile-badge-icon .rw-svg-icon {
  width: 24px;
  height: 24px;
}

.rw-profile-badge-icon::after {
  content: attr(data-name);
  position: absolute;
  z-index: 20;
  top: calc(100% + 9px);
  right: 0;
  padding: 7px 10px;
  border: 1px solid rgba(246, 216, 128, 0.34);
  border-radius: 8px;
  background: #07150d;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
  color: #f2e7ce;
  font: 700 11px/1.2 var(--font-body);
  letter-spacing: 0;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-3px);
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.rw-profile-badge-icon:hover::after,
.rw-profile-badge-icon:focus-visible::after {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 640px) {
  .rw-profile-badge { gap: 5px; }
  .rw-profile-badge-icon { width: 32px; height: 32px; }
  .rw-profile-badge-icon .rw-svg-icon { width: 21px; height: 21px; }
  .rw-profile-badge-icon::after { font-size: 10px; }
}

/* Tamaño final de las insignias de la ficha */
.rw-profile-badge .rw-profile-badge-icon {
  width: 38px;
  height: 38px;
}
.rw-profile-badge .rw-profile-badge-icon .rw-svg-icon {
  width: 26px;
  height: 26px;
}
@media (max-width: 640px) {
  .rw-profile-badge .rw-profile-badge-icon { width: 34px; height: 34px; }
  .rw-profile-badge .rw-profile-badge-icon .rw-svg-icon { width: 23px; height: 23px; }
}

/* Color original según la rareza de cada insignia */
.rw-profile-badge-icon.rw-profile-rarity-common { color: var(--rw-common); }
.rw-profile-badge-icon.rw-profile-rarity-uncommon { color: var(--rw-uncommon); }
.rw-profile-badge-icon.rw-profile-rarity-rare { color: var(--rw-rare); }
.rw-profile-badge-icon.rw-profile-rarity-epic { color: var(--rw-epic); }
.rw-profile-badge-icon.rw-profile-rarity-legendary { color: var(--rw-legendary); }
.rw-profile-badge-icon.rw-profile-rarity-exclusive { color: var(--rw-exclusive); }


/* Tooltip también al tocar en móvil/tablet */
.rw-profile-badge-icon.is-tooltip-open::after {
  opacity: 1;
  transform: translateY(0);
}

/* Insignia secreta Creador: oro + partículas */
@keyframes fc-creator-particles {
  0% { transform: rotate(0deg) scale(0.94); opacity: 0.65; }
  50% { opacity: 1; }
  100% { transform: rotate(360deg) scale(1.06); opacity: 0.65; }
}

.rw-badge.is-creator .rw-badge-medal {
  position: relative;
  color: #ffd76a;
  border-color: #ffd76a;
  box-shadow: 0 0 0 3px rgba(255, 215, 106, 0.09), 0 0 24px rgba(255, 215, 106, 0.4);
}

.rw-badge.is-creator .rw-badge-medal::before,
.rw-profile-badge-icon.is-creator::before {
  content: "";
  position: absolute;
  inset: -8px;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 18% 22%, #fff6cf 0 1.2px, transparent 2px),
    radial-gradient(circle at 78% 16%, #ffd76a 0 1.5px, transparent 2.3px),
    radial-gradient(circle at 91% 62%, #fff1b8 0 1px, transparent 1.8px),
    radial-gradient(circle at 68% 89%, #ffd76a 0 1.3px, transparent 2px),
    radial-gradient(circle at 30% 82%, #fff6cf 0 1px, transparent 1.8px),
    radial-gradient(circle at 8% 55%, #ffd76a 0 1.2px, transparent 2px);
  animation: fc-creator-particles 5s linear infinite;
}

.rw-profile-badge-icon.is-creator {
  color: #ffd76a;
  border-color: #ffd76a;
  box-shadow: 0 0 0 2px rgba(255, 215, 106, 0.07), 0 0 22px rgba(255, 215, 106, 0.38);
}

/* Partículas visibles alrededor del icono */
.rw-profile-badge-icon.is-creator,
.rw-badge.is-creator .rw-badge-medal { isolation: isolate; }
.rw-profile-badge-icon.is-creator::before,
.rw-badge.is-creator .rw-badge-medal::before { z-index: 0; }
.rw-profile-badge-icon.is-creator .rw-svg-icon,
.rw-badge.is-creator .rw-badge-medal .rw-svg-icon { position: relative; z-index: 1; }

/* Creador como rareza única */
.rw-rarity-unique .rw-badge-medal {
  color: #ffd76a;
  border-color: #ffd76a;
  box-shadow: 0 0 0 3px rgba(255, 215, 106, 0.09), 0 0 24px rgba(255, 215, 106, 0.4);
}
.rw-rarity-unique .rw-badge-top span { color: #ffd76a; }

/* Cinco categorías cuando aparece ÚNICAS */
.rw-badge-filters {
  display: flex;
  width: min(620px, 100%);
}
.rw-badge-filters button {
  flex: 1 1 0;
  min-width: 0;
}
.rw-badge-filters button[hidden] { display: none; }
@media (max-width: 640px) {
  .rw-badge-filters button { font-size: 9px; padding: 0 3px; }
}

/* Chispas de Creador: aparecen y desaparecen */
@keyframes fc-creator-sparkle {
  0%, 100% { opacity: 0; transform: scale(0.25); }
  18% { opacity: 1; transform: scale(1); }
  48% { opacity: 0.75; transform: scale(0.8); }
  68% { opacity: 0; transform: scale(1.15); }
}
.creator-sparks {
  position: absolute;
  inset: -10px;
  z-index: 0;
  display: block;
  border-radius: 50%;
  pointer-events: none;
}
.creator-sparks i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff1b8;
  box-shadow: 0 0 6px #ffd76a, 0 0 13px rgba(255, 215, 106, 0.75);
  opacity: 0;
  animation: fc-creator-sparkle 2.4s ease-in-out infinite;
}
.creator-sparks i:nth-child(1) { left: 2%; top: 32%; animation-delay: 0s; }
.creator-sparks i:nth-child(2) { left: 22%; top: 4%; animation-delay: 0.35s; animation-duration: 2.1s; }
.creator-sparks i:nth-child(3) { left: 78%; top: 8%; animation-delay: 0.75s; animation-duration: 2.7s; }
.creator-sparks i:nth-child(4) { left: 96%; top: 44%; animation-delay: 0.15s; animation-duration: 2.2s; }
.creator-sparks i:nth-child(5) { left: 82%; top: 82%; animation-delay: 0.9s; animation-duration: 2.5s; }
.creator-sparks i:nth-child(6) { left: 46%; top: 96%; animation-delay: 0.5s; animation-duration: 2.8s; }
.creator-sparks i:nth-child(7) { left: 12%; top: 78%; animation-delay: 0.65s; animation-duration: 2.3s; }
.creator-sparks i:nth-child(8) { left: 4%; top: 58%; animation-delay: 1.05s; animation-duration: 2.6s; }
.rw-badge.is-creator .rw-badge-medal::before,
.rw-profile-badge-icon.is-creator::before { display: none; }
.rw-badge .creator-sparks i,
.rw-profile-badge-icon .creator-sparks i { z-index: 1; }
.rw-badge.is-creator .rw-badge-medal .rw-svg-icon,
.rw-profile-badge-icon.is-creator .rw-svg-icon { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  .creator-sparks i { animation: none; opacity: 0.8; }
}

/* Chispas en órbita alrededor de la insignia */
@keyframes fc-creator-sparkle-orbit {
  0%, 100% {
    opacity: 0;
    transform: rotate(var(--a, 0deg)) translateY(calc(var(--orbit, 24px) * -1)) scale(0.2);
  }
  24% {
    opacity: 1;
    transform: rotate(var(--a, 0deg)) translateY(calc(var(--orbit, 24px) * -1 - 2px)) scale(1);
  }
  62% {
    opacity: 0.75;
    transform: rotate(var(--a, 0deg)) translateY(calc(var(--orbit, 24px) * -1 + 1px)) scale(0.65);
  }
  82% {
    opacity: 0;
    transform: rotate(var(--a, 0deg)) translateY(calc(var(--orbit, 24px) * -1 - 3px)) scale(1.15);
  }
}
.creator-sparks { --orbit: 23px; }
.rw-badge.is-creator .rw-badge-medal .creator-sparks { --orbit: 30px; }
.creator-sparks i {
  left: 50%;
  top: 50%;
  width: 4px;
  height: 4px;
  margin: -2px 0 0 -2px;
  animation-name: fc-creator-sparkle-orbit;
}
.creator-sparks i:nth-child(1) { --a: 0deg; }
.creator-sparks i:nth-child(2) { --a: 45deg; }
.creator-sparks i:nth-child(3) { --a: 90deg; }
.creator-sparks i:nth-child(4) { --a: 135deg; }
.creator-sparks i:nth-child(5) { --a: 180deg; }
.creator-sparks i:nth-child(6) { --a: 225deg; }
.creator-sparks i:nth-child(7) { --a: 270deg; }
.creator-sparks i:nth-child(8) { --a: 315deg; }

/* Órbita ajustada al tamaño real de cada insignia */
.creator-sparks { --orbit: 18px; }
.rw-badge.is-creator .rw-badge-medal .creator-sparks { --orbit: 28px; }

/* El contenedor de chispas debe ocupar todo el icono y quedar centrado */
.rw-profile-badge .creator-sparks {
  width: auto;
  height: auto;
  inset: -10px;
  display: block;
}
.rw-badge-medal .creator-sparks {
  width: auto;
  height: auto;
  inset: -10px;
  display: block;
}

/* Órbita más cerrada alrededor de la insignia */
.creator-sparks {
  --orbit: 14px;
  z-index: 3;
}
.rw-badge.is-creator .rw-badge-medal .creator-sparks {
  --orbit: 22px;
}
.creator-sparks i {
  z-index: 4;
}

/* Órbita muy cerrada */
.creator-sparks { --orbit: 7px; }
.rw-badge.is-creator .rw-badge-medal .creator-sparks { --orbit: 13px; }

/* Todas las chispas parten del centro real de la órbita */
.creator-sparks i:nth-child(n) {
  left: 50%;
  top: 50%;
  margin: -2px 0 0 -2px;
}

/* Partículas fuera del borde de la insignia */
.creator-sparks { --orbit: 22px; }
.rw-badge.is-creator .rw-badge-medal .creator-sparks { --orbit: 30px; }

/* Más partículas, órbita amplia y brillo suave */
.creator-sparks {
  --orbit: 28px;
  inset: -20px;
  opacity: 0.55;
}
.rw-badge.is-creator .rw-badge-medal .creator-sparks {
  --orbit: 38px;
  inset: -20px;
}
.creator-sparks i:nth-child(9) { --a: 22.5deg; animation-delay: 0.2s; animation-duration: 2.5s; }
.creator-sparks i:nth-child(10) { --a: 67.5deg; animation-delay: 0.55s; animation-duration: 2.9s; }
.creator-sparks i:nth-child(11) { --a: 112.5deg; animation-delay: 0.8s; animation-duration: 2.2s; }
.creator-sparks i:nth-child(12) { --a: 157.5deg; animation-delay: 1.2s; animation-duration: 2.7s; }
.creator-sparks i:nth-child(13) { --a: 202.5deg; animation-delay: 0.1s; animation-duration: 2.4s; }
.creator-sparks i:nth-child(14) { --a: 247.5deg; animation-delay: 0.45s; animation-duration: 3s; }
.creator-sparks i:nth-child(15) { --a: 292.5deg; animation-delay: 0.95s; animation-duration: 2.3s; }
.creator-sparks i:nth-child(16) { --a: 337.5deg; animation-delay: 0.7s; animation-duration: 2.8s; }

/* 8 chispas originales + 4 nuevas más lejanas y suaves */
@keyframes fc-creator-sparkle-soft {
  0%, 100% {
    opacity: 0;
    transform: rotate(var(--a, 0deg)) translateY(calc(var(--orbit, 22px) * -1 - var(--spark-extra, 10px))) scale(0.2);
  }
  24% {
    opacity: 0.55;
    transform: rotate(var(--a, 0deg)) translateY(calc(var(--orbit, 22px) * -1 - var(--spark-extra, 10px) - 2px)) scale(0.9);
  }
  62% {
    opacity: 0.35;
    transform: rotate(var(--a, 0deg)) translateY(calc(var(--orbit, 22px) * -1 - var(--spark-extra, 10px))) scale(0.6);
  }
  82% {
    opacity: 0;
    transform: rotate(var(--a, 0deg)) translateY(calc(var(--orbit, 22px) * -1 - var(--spark-extra, 10px) - 3px)) scale(1);
  }
}
.creator-sparks {
  --orbit: 22px;
  inset: -18px;
  opacity: 1;
}
.rw-badge.is-creator .rw-badge-medal .creator-sparks { --orbit: 30px; }
.creator-spark-extra {
  width: 3px !important;
  height: 3px !important;
  margin: -1.5px 0 0 -1.5px !important;
  --spark-extra: 10px;
  background: rgba(255, 235, 175, 0.8) !important;
  box-shadow: 0 0 5px rgba(255, 215, 106, 0.45) !important;
  animation-name: fc-creator-sparkle-soft !important;
}
.creator-sparks i:nth-child(9) { --a: 22.5deg; animation-delay: 0.25s; }
.creator-sparks i:nth-child(10) { --a: 112.5deg; animation-delay: 0.8s; }
.creator-sparks i:nth-child(11) { --a: 202.5deg; animation-delay: 0.5s; }
.creator-sparks i:nth-child(12) { --a: 292.5deg; animation-delay: 1.1s; }

/* El aro de las insignias web usa el color del icono/rareza */
.rw-profile-badge-icon {
  border-color: currentColor;
}

/* Borde de insignias web un poco más grueso */
.rw-profile-badge-icon {
  border-width: 2px;
}

/* Aros de insignias pequeñas un poco más gruesos */
.rw-profile-badge-icon { border-width: 2.5px; }
.rw-badge-medal { border-width: 2.5px; }

/* Aviso al intentar equipar más de 3 insignias */
.rw-limit-button {
  border: 1px solid rgba(246, 216, 128, 0.22);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.16);
  color: #9d947f;
  padding: 5px 9px;
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.rw-limit-button:hover,
.rw-limit-button:focus-visible {
  border-color: rgba(246, 216, 128, 0.55);
  color: var(--gold-bright);
  outline: none;
}
.rw-equip-toast {
  position: fixed;
  z-index: 1200;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  width: min(420px, calc(100% - 24px));
  padding: 12px 15px;
  border: 1px solid rgba(246, 216, 128, 0.55);
  border-radius: 12px;
  background: rgba(6, 24, 14, 0.98);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55), 0 0 22px rgba(246, 216, 128, 0.1);
  color: #f5e9cf;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 12px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.rw-equip-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Botón AÑADIR cuando ya hay 3 equipadas */
.rw-add-button {
  border: 1px solid rgba(246, 216, 128, 0.42);
  border-radius: 999px;
  background: rgba(246, 216, 128, 0.08);
  color: var(--gold-bright);
  padding: 5px 9px;
  font: inherit;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.08em;
  cursor: pointer;
}
.rw-add-button:hover,
.rw-add-button:focus-visible {
  border-color: var(--gold-bright);
  background: rgba(246, 216, 128, 0.16);
  outline: none;
}

/* Beta Tester: única en turquesa con partículas */
.rw-profile-badge-icon.is-beta,
.rw-badge.is-beta .rw-badge-medal {
  color: #4ee8d8;
  border-color: #4ee8d8;
  box-shadow: 0 0 0 3px rgba(78, 232, 216, 0.09), 0 0 24px rgba(78, 232, 216, 0.42);
}
.rw-badge.is-beta .rw-badge-top span { color: #4ee8d8; }
.rw-profile-badge-icon.is-beta .creator-sparks i,
.rw-badge.is-beta .creator-sparks i {
  background: #d4fffa;
  box-shadow: 0 0 6px #4ee8d8, 0 0 13px rgba(78, 232, 216, 0.8);
}

/* Beta Tester: pulso de luz en el aro, sin partículas */
@keyframes fc-beta-ring-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(78, 232, 216, 0.12), 0 0 12px rgba(78, 232, 216, 0.3);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(78, 232, 216, 0.24), 0 0 27px rgba(78, 232, 216, 0.7);
  }
}
.rw-profile-badge-icon.is-beta,
.rw-badge.is-beta .rw-badge-medal {
  animation: fc-beta-ring-pulse 2.4s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .rw-profile-badge-icon.is-beta,
  .rw-badge.is-beta .rw-badge-medal { animation: none; }
}

/* Aviso de desafío completado también dentro de los juegos */
.ch-toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 9999;
  max-width: calc(100% - 28px);
  padding: 11px 18px;
  border: 1px solid rgba(246, 216, 128, 0.46);
  border-radius: 10px;
  background: rgba(4, 20, 11, 0.97);
  color: #f8e7b0;
  font: 800 12px/1.35 Manrope, "Helvetica Neue", Arial, sans-serif;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, 160%);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.25s ease;
}
.ch-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (prefers-reduced-motion: reduce) {
  .ch-toast { transition: none; }
}

/* Alerta de premio mensual de ranking */
.rank-reward-overlay {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    radial-gradient(ellipse 55% 50% at 50% 45%, rgba(246, 216, 128, 0.15), transparent 72%),
    rgba(2, 9, 5, 0.94);
}
.rank-reward-overlay[hidden] { display: none; }
.rank-reward-panel {
  position: relative;
  isolation: isolate;
  width: min(560px, 100%);
  padding: 30px 26px 24px;
  border: 1px solid rgba(246, 216, 128, 0.65);
  border-radius: 18px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(246, 216, 128, 0.1), transparent 55%),
    #07170e;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.7), 0 0 42px rgba(246, 216, 128, 0.12);
  text-align: center;
}
.rank-reward-panel > *:not(.rank-reward-sparks) { position: relative; z-index: 2; }
.rank-reward-kicker {
  color: #d8bd7b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.18em;
}
.rank-reward-panel h2 {
  margin: 9px 0 12px;
  color: #fff2c9;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(36px, 6vw, 54px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.02em;
}
.rank-reward-panel p {
  max-width: 440px;
  margin: 0 auto;
  color: #d7cbb1;
  font-size: 14px;
  line-height: 1.55;
}
.rank-reward-panel p strong { color: #ffe9a3; }
.rank-reward-amount {
  display: block;
  margin: 18px 0 16px;
  color: #ffe9a3;
  font: 400 clamp(28px, 4.8vw, 40px)/1 Georgia, serif;
  text-shadow: 0 0 22px rgba(246, 216, 128, 0.35);
}
.rank-reward-claim {
  width: min(330px, 100%);
  min-height: 46px;
  border: 1px solid #ffe9a3;
  border-radius: 11px;
  background: linear-gradient(135deg, #ffe9a3, #d1a23d);
  color: #1d1304;
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.09em;
  cursor: pointer;
}
.rank-reward-claim:hover,
.rank-reward-claim:focus-visible { filter: brightness(1.08); outline: 2px solid rgba(246,216,128,.5); outline-offset: 2px; }
.rank-reward-sparks {
  position: absolute;
  inset: -26px;
  z-index: 1;
  border-radius: 22px;
  pointer-events: none;
}
.rank-reward-sparks i {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff1b8;
  box-shadow: 0 0 8px #ffd76a, 0 0 16px rgba(255, 215, 106, 0.75);
  opacity: 0;
  animation: rank-reward-spark 3s ease-in-out infinite;
}
.rank-reward-sparks i:nth-child(1) { left: 4%; top: 12%; animation-delay: 0s; }
.rank-reward-sparks i:nth-child(2) { left: 22%; top: -2%; animation-delay: .4s; }
.rank-reward-sparks i:nth-child(3) { left: 48%; top: -4%; animation-delay: .9s; }
.rank-reward-sparks i:nth-child(4) { left: 76%; top: 3%; animation-delay: .2s; }
.rank-reward-sparks i:nth-child(5) { right: -2%; top: 23%; animation-delay: .7s; }
.rank-reward-sparks i:nth-child(6) { right: -3%; top: 58%; animation-delay: 1.1s; }
.rank-reward-sparks i:nth-child(7) { left: 82%; bottom: 3%; animation-delay: .5s; }
.rank-reward-sparks i:nth-child(8) { left: 58%; bottom: -4%; animation-delay: 1.3s; }
.rank-reward-sparks i:nth-child(9) { left: 30%; bottom: -3%; animation-delay: .8s; }
.rank-reward-sparks i:nth-child(10) { left: 5%; bottom: 8%; animation-delay: .15s; }
.rank-reward-sparks i:nth-child(11) { left: -4%; top: 48%; animation-delay: 1s; }
.rank-reward-sparks i:nth-child(12) { left: -2%; top: 74%; animation-delay: .6s; }
.rank-reward-sparks i:nth-child(13) { left: 12%; top: 35%; animation-delay: 1.5s; }
.rank-reward-sparks i:nth-child(14) { right: 12%; bottom: 18%; animation-delay: .35s; }
.rank-reward-sparks i:nth-child(15) { left: 45%; top: 8%; animation-delay: 1.7s; }
.rank-reward-sparks i:nth-child(16) { right: 28%; top: 14%; animation-delay: .95s; }
@keyframes rank-reward-spark {
  0%, 100% { opacity: 0; transform: scale(0.3); }
  22% { opacity: 1; transform: scale(1); }
  62% { opacity: 0.55; transform: scale(0.75); }
  82% { opacity: 0; transform: scale(1.2); }
}
@media (prefers-reduced-motion: reduce) {
  .rank-reward-sparks i { animation: none; opacity: 0.7; }
}
@media (max-width: 560px) {
  .rank-reward-panel { padding: 25px 18px 20px; }
  .rank-reward-panel p { font-size: 13px; }
}

/* Logo en la ventana de premio mensual */
.rank-reward-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  margin-bottom: 12px;
}
.rank-reward-brand img {
  width: 52px;
  height: 52px;
  filter: drop-shadow(0 0 14px rgba(246, 216, 128, 0.28));
}
.rank-reward-brand span {
  color: #fbf5e6;
  font-family: var(--font-display, Georgia, serif);
  font-size: 20px;
  letter-spacing: 0.045em;
  white-space: nowrap;
}
.rank-reward-brand b {
  color: #e3b454;
  font-family: var(--font-body, Manrope, Arial, sans-serif);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.26em;
  vertical-align: 2px;
}

/* ONLINE debajo de FREE CASINO en la ventana de premio */
.rank-reward-brand span {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  line-height: 0.95;
}
.rank-reward-brand b {
  display: block;
  padding-left: 1px;
  font-size: 9px;
  letter-spacing: 0.28em;
  vertical-align: 0;
}

/* ENHORABUENA dorado con destello periódico */
.rank-reward-panel h2 {
  position: relative;
  color: transparent;
  background: linear-gradient(180deg, #fff2bd 0%, #f3d177 42%, #d6a344 72%, #ffe9a3 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 14px rgba(246, 216, 128, 0.2));
}
.rank-reward-panel h2::after {
  content: "¡ENHORABUENA!";
  position: absolute;
  inset: 0;
  color: transparent;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.95) 48%, transparent 66%);
  background-size: 240% 100%;
  background-position: 190% 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rank-reward-title-shine 3s ease-in-out infinite;
  pointer-events: none;
}
@keyframes rank-reward-title-shine {
  0%, 62% { background-position: 190% 0; opacity: 0; }
  68% { opacity: 1; }
  84% { background-position: -90% 0; opacity: 0.9; }
  92%, 100% { background-position: -90% 0; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rank-reward-panel h2::after { animation: none; opacity: 0; }
}

/* Destello más lento dentro del ciclo de 3 segundos */
@keyframes rank-reward-title-shine {
  0%, 28% { background-position: 190% 0; opacity: 0; }
  36% { opacity: 0.9; }
  78% { background-position: -90% 0; opacity: 0.85; }
  90%, 100% { background-position: -90% 0; opacity: 0; }
}

/* Posición destacada en la alerta de premio */
.rank-reward-position {
  display: block;
  margin: 8px 0 10px;
  color: #ffe9a3;
  font-family: var(--font-display, Georgia, serif);
  font-size: clamp(40px, 7.2vw, 58px);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 0 0 24px rgba(246, 216, 128, 0.35);
}
.rank-reward-detail {
  display: block;
  text-align: center;
  line-height: 1.5;
}

/* Nº 1 dorado con destello periódico */
.rank-reward-position {
  color: transparent;
  background-image:
    linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.95) 48%, transparent 66%),
    linear-gradient(180deg, #fff2bd 0%, #f3d177 42%, #d6a344 72%, #ffe9a3 100%);
  background-size: 240% 100%, 100% 100%;
  background-position: 190% 0, 0 0;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
  filter: drop-shadow(0 0 16px rgba(246, 216, 128, 0.24));
  animation: rank-reward-position-shine 3s ease-in-out infinite;
}
@keyframes rank-reward-position-shine {
  0%, 28% { background-position: 190% 0, 0 0; }
  36% { background-position: 170% 0, 0 0; }
  78% { background-position: -90% 0, 0 0; }
  90%, 100% { background-position: -90% 0, 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rank-reward-position { animation: none; background-position: 0 0, 0 0; }
}

/* Streamer: insignia única morada con anillo giratorio */
.rw-profile-badge-icon.is-streamer,
.rw-badge.is-streamer .rw-badge-medal {
  color: #c084fc;
  border-color: #b56cff;
  box-shadow: 0 0 0 3px rgba(181, 108, 255, 0.1), 0 0 26px rgba(181, 108, 255, 0.5);
}
.rw-badge.is-streamer .rw-badge-top span { color: #c084fc; }
.rw-profile-badge-icon.is-streamer,
.rw-badge.is-streamer .rw-badge-medal {
  position: relative;
  isolation: isolate;
}
.rw-profile-badge-icon.is-streamer::before,
.rw-badge.is-streamer .rw-badge-medal::before {
  content: "";
  position: absolute;
  inset: -7px;
  z-index: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 52%, #d8b4fe 68%, #8b5cf6 78%, transparent 90%);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 4px), #000 calc(100% - 3px));
  filter: drop-shadow(0 0 4px rgba(181, 108, 255, 0.9));
  animation: fc-streamer-orbit 3.6s linear infinite;
  pointer-events: none;
}
.rw-profile-badge-icon.is-streamer .rw-svg-icon,
.rw-badge.is-streamer .rw-badge-medal .rw-svg-icon {
  position: relative;
  z-index: 2;
}
@keyframes fc-streamer-orbit { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .rw-profile-badge-icon.is-streamer::before,
  .rw-badge.is-streamer .rw-badge-medal::before { animation: none; }
}

/* Streamer: escaneo de luz tipo directo, en lugar del aro giratorio */
@keyframes fc-streamer-scan {
  0%, 100% { background-position: 0 -130%; opacity: 0.12; }
  45%, 55% { background-position: 0 130%; opacity: 0.7; }
}
@keyframes fc-streamer-neon {
  0%, 100% { box-shadow: 0 0 0 2px rgba(181, 108, 255, 0.12), 0 0 14px rgba(181, 108, 255, 0.35); }
  50% { box-shadow: 0 0 0 3px rgba(181, 108, 255, 0.28), 0 0 30px rgba(181, 108, 255, 0.75); }
}
.rw-profile-badge-icon.is-streamer,
.rw-badge.is-streamer .rw-badge-medal {
  animation: fc-streamer-neon 2.4s ease-in-out infinite;
}
.rw-profile-badge-icon.is-streamer::before,
.rw-badge.is-streamer .rw-badge-medal::before {
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(180deg, transparent 24%, rgba(232, 213, 255, 0.9) 48%, rgba(181, 108, 255, 0.7) 52%, transparent 76%);
  background-size: 100% 240%;
  -webkit-mask: none;
  mask: none;
  border: 0;
  filter: none;
  opacity: 0.35;
  mix-blend-mode: screen;
  animation: fc-streamer-scan 2.8s ease-in-out infinite;
  pointer-events: none;
}
.rw-badge.is-streamer .rw-badge-top span { color: #c084fc; }
.rw-profile-badge-icon.is-streamer .rw-svg-icon,
.rw-badge.is-streamer .rw-badge-medal .rw-svg-icon { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  .rw-profile-badge-icon.is-streamer,
  .rw-badge.is-streamer .rw-badge-medal { animation: none; }
  .rw-profile-badge-icon.is-streamer::before,
  .rw-badge.is-streamer .rw-badge-medal::before { animation: none; opacity: 0.25; }
}

/* Streamer: ecualizador de audio dentro de la insignia */
.rw-profile-badge-icon.is-streamer,
.rw-badge.is-streamer .rw-badge-medal {
  animation: none;
  box-shadow: 0 0 0 2px rgba(181, 108, 255, 0.14), 0 0 22px rgba(181, 108, 255, 0.5);
}
.rw-profile-badge-icon.is-streamer::before,
.rw-badge.is-streamer .rw-badge-medal::before { display: none; }
.streamer-eq {
  position: absolute;
  left: 50%;
  bottom: 3px;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 1.5px;
  width: 58%;
  height: 36%;
  transform: translateX(-50%);
  pointer-events: none;
}
.streamer-eq i {
  flex: 1 1 0;
  min-width: 1px;
  height: 30%;
  border-radius: 1px;
  background: linear-gradient(180deg, #f0e2ff, #b56cff);
  box-shadow: 0 0 5px rgba(181, 108, 255, 0.9);
  animation: fc-streamer-eq 0.85s ease-in-out infinite alternate;
}
.streamer-eq i:nth-child(2) { animation-delay: -0.2s; animation-duration: 0.65s; }
.streamer-eq i:nth-child(3) { animation-delay: -0.45s; animation-duration: 1s; }
.streamer-eq i:nth-child(4) { animation-delay: -0.12s; animation-duration: 0.55s; }
.streamer-eq i:nth-child(5) { animation-delay: -0.35s; animation-duration: 0.9s; }
.streamer-eq i:nth-child(6) { animation-delay: -0.08s; animation-duration: 0.7s; }
.streamer-eq i:nth-child(7) { animation-delay: -0.5s; animation-duration: 0.8s; }
@keyframes fc-streamer-eq {
  from { height: 16%; opacity: 0.45; }
  to { height: 92%; opacity: 1; }
}
.rw-badge.is-streamer .rw-badge-medal .streamer-eq { width: 54%; height: 34%; bottom: 4px; gap: 2px; }
.rw-badge.is-streamer .rw-badge-medal .streamer-eq i { min-width: 2px; }
@media (prefers-reduced-motion: reduce) {
  .streamer-eq i { animation: none; height: 55%; opacity: 0.75; }
}

/* Streamer: pulso de aro como Beta Tester, en morado */
@keyframes fc-streamer-ring-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(181, 108, 255, 0.12), 0 0 12px rgba(181, 108, 255, 0.3); }
  50% { box-shadow: 0 0 0 4px rgba(181, 108, 255, 0.24), 0 0 27px rgba(181, 108, 255, 0.7); }
}
.rw-profile-badge-icon.is-streamer,
.rw-badge.is-streamer .rw-badge-medal {
  animation: fc-streamer-ring-pulse 2.4s ease-in-out infinite;
}
.rw-profile-badge-icon.is-streamer::before,
.rw-badge.is-streamer .rw-badge-medal::before { display: none; }
.streamer-eq { display: none; }
@media (prefers-reduced-motion: reduce) {
  .rw-profile-badge-icon.is-streamer,
  .rw-badge.is-streamer .rw-badge-medal { animation: none; }
}

/* Streamer: pulso exagerado */
@keyframes fc-streamer-ring-pulse {
  0%, 100% {
    box-shadow: 0 0 0 2px rgba(181, 108, 255, 0.2), 0 0 18px rgba(181, 108, 255, 0.5), 0 0 34px rgba(181, 108, 255, 0.2);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(181, 108, 255, 0.38), 0 0 46px rgba(181, 108, 255, 1), 0 0 80px rgba(181, 108, 255, 0.55);
  }
}
@keyframes fc-streamer-wave {
  0% { transform: scale(0.82); opacity: 0.95; border-width: 3px; }
  65%, 100% { transform: scale(1.65); opacity: 0; border-width: 1px; }
}
.rw-profile-badge-icon.is-streamer,
.rw-badge.is-streamer .rw-badge-medal {
  border-width: 2.5px;
  animation: fc-streamer-ring-pulse 2.4s ease-in-out infinite;
}
.rw-profile-badge-icon.is-streamer::before,
.rw-badge.is-streamer .rw-badge-medal::before {
  display: block;
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border: 3px solid #d8b4fe;
  border-radius: 50%;
  background: none;
  -webkit-mask: none;
  mask: none;
  pointer-events: none;
  animation: fc-streamer-wave 2.4s ease-out infinite;
}
.rw-profile-badge-icon.is-streamer .rw-svg-icon,
.rw-badge.is-streamer .rw-badge-medal .rw-svg-icon { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) {
  .rw-profile-badge-icon.is-streamer,
  .rw-badge.is-streamer .rw-badge-medal { animation: none; }
  .rw-profile-badge-icon.is-streamer::before,
  .rw-badge.is-streamer .rw-badge-medal::before { animation: none; opacity: 0; }
}

/* Bucle perfecto de Streamer: sin reposo ni fotogramas repetidos */
@keyframes fc-streamer-wave {
  0% { transform: scale(0.82); opacity: 0; border-width: 3px; }
  12% { opacity: 0.95; }
  100% { transform: scale(1.7); opacity: 0; border-width: 1px; }
}
.rw-profile-badge-icon.is-streamer::before,
.rw-badge.is-streamer .rw-badge-medal::before {
  animation: fc-streamer-wave 2.4s cubic-bezier(0.18, 0.72, 0.3, 1) infinite;
  will-change: transform, opacity;
}

/* Insignias épicas: morado un poco más claro, sin tocar Streamer */
:root { --rw-epic: #d2a8ff; }
.rw-rarity-epic .rw-badge-medal {
  box-shadow: 0 0 0 3px rgba(210, 168, 255, 0.07), 0 0 17px rgba(210, 168, 255, 0.26);
}

/* Los SVG editables se usan como máscara para heredar el color de rareza */
.rw-badge-mask {
  display: block;
  background-color: currentColor !important;
  -webkit-mask-image: var(--badge-icon);
  mask-image: var(--badge-icon);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}
/* La insignia equipada debe usar el mismo color que su aro */
.rw-profile-badge-icon .rw-badge-mask { background-color: currentColor !important; }
.rw-profile-badge-icon.is-beta .rw-badge-mask,
.rw-badge.is-beta .rw-badge-medal .rw-badge-mask { background-color: #4ee8d8 !important; }
.rw-profile-badge-icon.is-creator .rw-badge-mask { background-color: #ffe9a3 !important; }
