/*
 * Эффекты текста для званий: восемь ступеней (t-0 … t-7), чем выше — тем ярче.
 * Нагрузка минимальная: младшие ступени — просто цвет; блеск у старших — это сдвиг
 * фона у пары коротких надписей, без размытия и без перерисовки страницы.
 */

.t-0 { --fx-c1: #9aa8b8; --fx-c2: #c9d3de; }
.t-1 { --fx-c1: #6fbf8a; --fx-c2: #a8e0b8; }
.t-2 { --fx-c1: #2fc4a4; --fx-c2: #8cf0d8; }
.t-3 { --fx-c1: #4f8dff; --fx-c2: #9fc2ff; }
.t-4 { --fx-c1: #a879ff; --fx-c2: #e0a8ff; }
.t-5 { --fx-c1: #f2b33d; --fx-c2: #ffe3a0; }
.t-6 { --fx-c1: #ff5a72; --fx-c2: #ffb0a0; }
.t-7 { --fx-c1: #7ee7ff; --fx-c2: #ff9cf3; }

/* На светлых фонах те же оттенки, но темнее — чтобы читалось */
[data-theme="light"] .t-0, [data-theme="paper"] .t-0 { --fx-c1: #55606e; --fx-c2: #7b8796; }
[data-theme="light"] .t-1, [data-theme="paper"] .t-1 { --fx-c1: #2f7d4a; --fx-c2: #4f9e69; }
[data-theme="light"] .t-2, [data-theme="paper"] .t-2 { --fx-c1: #0f7d68; --fx-c2: #23a087; }
[data-theme="light"] .t-3, [data-theme="paper"] .t-3 { --fx-c1: #1d4fd8; --fx-c2: #4f7df0; }
[data-theme="light"] .t-4, [data-theme="paper"] .t-4 { --fx-c1: #6d28d9; --fx-c2: #a14be8; }
[data-theme="light"] .t-5, [data-theme="paper"] .t-5 { --fx-c1: #a15c00; --fx-c2: #d18a0f; }
[data-theme="light"] .t-6, [data-theme="paper"] .t-6 { --fx-c1: #c2183a; --fx-c2: #e0476a; }
[data-theme="light"] .t-7, [data-theme="paper"] .t-7 { --fx-c1: #0e7490; --fx-c2: #a21caf; }

.fx {
  color: var(--fx-c1, inherit);
  font-weight: 700;
}

/* 2: мягкое свечение */
.t-2.fx, .t-2 .fx {
  text-shadow: 0 0 12px color-mix(in srgb, var(--fx-c1) 45%, transparent);
}

/* 3–4: градиент по буквам, у 4 ещё свечение */
.t-3.fx, .t-3 .fx,
.t-4.fx, .t-4 .fx {
  background: linear-gradient(90deg, var(--fx-c1), var(--fx-c2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.t-4.fx, .t-4 .fx {
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--fx-c1) 40%, transparent));
}

/* 5–7: медленный блеск, у 7 — переливы всех цветов */
.t-5.fx, .t-5 .fx,
.t-6.fx, .t-6 .fx,
.t-7.fx, .t-7 .fx {
  background: linear-gradient(100deg, var(--fx-c1) 20%, var(--fx-c2) 45%, #fff 50%, var(--fx-c2) 55%, var(--fx-c1) 80%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: fx-shine 5s linear infinite;
}

.t-6.fx, .t-6 .fx {
  filter: drop-shadow(0 0 7px color-mix(in srgb, var(--fx-c1) 45%, transparent));
}

.t-7.fx, .t-7 .fx {
  background-image: linear-gradient(100deg, #7ee7ff, #a879ff, #ff9cf3, #ffd36e, #7ee7ff);
  animation-duration: 7s;
  filter: drop-shadow(0 0 8px rgb(168 121 255 / 45%));
}

[data-theme="light"] .t-7.fx, [data-theme="light"] .t-7 .fx,
[data-theme="paper"] .t-7.fx, [data-theme="paper"] .t-7 .fx {
  background-image: linear-gradient(100deg, #0e7490, #6d28d9, #a21caf, #a15c00, #0e7490);
}

@keyframes fx-shine {
  to { background-position: -250% 0; }
}

/* Плашка со званием: обводка и фон в цвет ступени */
.badge--tier {
  border: 1px solid color-mix(in srgb, var(--fx-c1) 55%, transparent);
  background: color-mix(in srgb, var(--fx-c1) 12%, transparent);
}

.badge--tier::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--fx-c1), var(--fx-c2));
}
