/* Экран загрузки (см. js/loader.js) */
html.et-loading { overflow: hidden; }
#et-loader {
  position: fixed; inset: 0; z-index: 2147483000;
  display: flex; align-items: center; justify-content: center;
  background: #161616; color: #fff;
  opacity: 1; transition: opacity .35s ease;
}
#et-loader.et-hide { opacity: 0; pointer-events: none; }
html[data-skin="light"] #et-loader { background: #e9e9e9; color: #222; }

/* ---------- Обычные страницы: капельная загрузка ---------- */
.et-goo { position: relative; width: 90px; height: 30px; filter: url(#et-goo); }
.et-goo i {
  position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: currentColor;
}
.et-goo i.a { animation: et-goo-a 1.3s ease-in-out infinite; }
.et-goo i.c { animation: et-goo-c 1.3s ease-in-out infinite; }
.et-goo i.b { animation: et-goo-b 1.3s ease-in-out infinite; }
@keyframes et-goo-a { 0%, 100% { transform: translateX(-30px) scale(.45); } 50% { transform: translateX(0) scale(1); } }
@keyframes et-goo-c { 0%, 100% { transform: translateX(30px) scale(.45); }  50% { transform: translateX(0) scale(1); } }
@keyframes et-goo-b { 0%, 100% { transform: scale(.7); } 50% { transform: scale(1.5, 1.1); } }

/* ---------- Главная: «конвейер» капель, как на референсе ----------
   Ряд из 12-пиксельных капель с шагом 12px едет вправо: слева капля рождается крошечной,
   к центру растёт и сливается в общий блоб, справа уменьшается и исчезает. Один шаг — .533s,
   после него все капли встают на места соседних, поэтому цикл бесшовный.
   Размер капли зависит от места в ряду (слабее к краям) — это задаёт --s0 → --s1. */
.et-flow { position: relative; width: 120px; height: 24px; filter: url(#et-goo-flow); }
.et-flow i {
  position: absolute; top: 50%; left: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: currentColor;
  animation: et-flow .533s linear infinite;
}
.et-flow i:nth-child(1) { --x: -30px; --s0: 0;   --s1: .46; }
.et-flow i:nth-child(2) { --x: -18px; --s0: .46; --s1: 1; }
.et-flow i:nth-child(3) { --x: -6px;  --s0: 1;   --s1: 1; }
.et-flow i:nth-child(4) { --x: 6px;   --s0: 1;   --s1: .46; }
.et-flow i:nth-child(5) { --x: 18px;  --s0: .46; --s1: 0; }
@keyframes et-flow {
  from { transform: translateX(var(--x)) scale(var(--s0)); }
  to   { transform: translateX(calc(var(--x) + 12px)) scale(var(--s1)); }
}

/* ---------- Тир-лист / лидерборд: предметы + EasyTiers ---------- */
.et-center { display: flex; flex-direction: column; align-items: center; gap: 26px; }
.et-name {
  font-family: 'Minecraft', monospace; font-size: 26px; letter-spacing: .08em;
  text-shadow: 3px 3px 0 rgba(0,0,0,.55); animation: et-name-pulse 1.6s ease-in-out infinite;
}
html[data-skin="light"] .et-name { text-shadow: 2px 2px 0 rgba(0,0,0,.15); }
@keyframes et-name-pulse { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }

.et-fx { position: relative; width: 190px; height: 120px; }
.et-fx i { display: block; position: absolute; image-rendering: pixelated; image-rendering: crisp-edges; }

/* Эндер-жемчуг: парит, крутится, вокруг — фиолетовые частицы */
.et-pearl {
  left: 50%; top: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px;
  background: url('/img/icons/pearl.svg') center / 100% 100% no-repeat;
  animation: et-pearl-float 1.8s ease-in-out infinite, et-pearl-spin 3.6s linear infinite;
}
@keyframes et-pearl-float { 0%, 100% { translate: 0 -8px; } 50% { translate: 0 8px; } }
@keyframes et-pearl-spin { to { rotate: 360deg; } }
.et-shadow {
  left: 50%; bottom: 2px; width: 60px; height: 8px; margin-left: -30px; border-radius: 50%;
  background: rgba(0,0,0,.45); animation: et-shadow 1.8s ease-in-out infinite;
}
html[data-skin="light"] .et-shadow { background: rgba(0,0,0,.2); }
@keyframes et-shadow { 0%, 100% { transform: scale(1.05); opacity: .8; } 50% { transform: scale(.7); opacity: .45; } }
.et-motes {
  left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px 0 0 -3px; background: #b06cff;
  box-shadow: -54px -20px #8b3fe0, 50px -34px #c990ff, 60px 18px #8b3fe0, -46px 34px #c990ff, 8px -56px #b06cff, -12px 52px #8b3fe0;
  animation: et-motes 1.8s ease-in-out infinite;
}
@keyframes et-motes { 0%, 100% { opacity: .2; transform: scale(.8) rotate(0); } 50% { opacity: 1; transform: scale(1.15) rotate(12deg); } }

/* Зелье: летит по дуге слева направо, крутится и разбивается красными брызгами */
.et-potion-x { left: 0; top: 40px; width: 56px; height: 56px; animation: et-potion-x 1.7s linear infinite; }
.et-potion-y { inset: 0; animation: et-potion-y 1.7s infinite; }
.et-potion {
  inset: 0; background: url('/img/icons/potion.svg') center / 100% 100% no-repeat;
  animation: et-potion-rot 1.7s linear infinite;
}
@keyframes et-potion-x {
  0%   { transform: translateX(-10px); opacity: 0; }
  6%   { opacity: 1; }
  68%  { transform: translateX(132px); opacity: 1; }
  70%, 100% { transform: translateX(132px); opacity: 0; }
}
@keyframes et-potion-y {
  0%   { transform: translateY(0);     animation-timing-function: cubic-bezier(.2, .7, .4, 1); }
  34%  { transform: translateY(-44px); animation-timing-function: cubic-bezier(.6, 0, .8, .4); }
  68%, 100% { transform: translateY(22px); }
}
@keyframes et-potion-rot { 0% { rotate: -30deg; } 68%, 100% { rotate: 400deg; } }
.et-splash {
  left: 160px; top: 90px; width: 8px; height: 8px; margin: -4px; background: #ff5555; opacity: 0;
  box-shadow: -18px -12px #d43030, 16px -16px #ff7777, -24px 6px #ff5555, 24px 4px #d43030, -8px -26px #ff7777, 6px 14px #d43030, -14px 16px #ff5555, 20px -28px #ff5555;
  animation: et-splash 1.7s ease-out infinite;
}
@keyframes et-splash {
  0%, 66% { opacity: 0; transform: scale(.2); }
  70%     { opacity: 1; transform: scale(1); }
  100%    { opacity: 0; transform: scale(1.9); }
}

/* Мечи: влетают с двух сторон, скрещиваются, искра, снова расходятся */
.et-sword { left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; opacity: 0; background: url('/img/icons/sword.svg') center / 100% 100% no-repeat; }
.et-sword.l { animation: et-sword-l 1.7s ease-in-out infinite; }
.et-sword.r { animation: et-sword-r 1.7s ease-in-out infinite; transform-origin: center; }
.et-sword.r { background-image: url('/img/icons/sword.svg'); scale: -1 1; }   /* правый — зеркальный, вместе дают «X» */
@keyframes et-sword-l {
  0%   { opacity: 0; translate: -90px 8px; rotate: -120deg; }
  15%  { opacity: 1; }
  48%  { opacity: 1; translate: -6px 0; rotate: 0deg; }
  72%  { opacity: 1; translate: -6px 0; rotate: 0deg; }
  100% { opacity: 0; translate: -90px 8px; rotate: -120deg; }
}
@keyframes et-sword-r {
  0%   { opacity: 0; translate: 90px 8px; rotate: 120deg; }
  15%  { opacity: 1; }
  48%  { opacity: 1; translate: 6px 0; rotate: 0deg; }
  72%  { opacity: 1; translate: 6px 0; rotate: 0deg; }
  100% { opacity: 0; translate: 90px 8px; rotate: 120deg; }
}
.et-spark {
  left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; background: #fff; opacity: 0;
  box-shadow: 0 -20px #fff, 0 20px #fff, -20px 0 #fff, 20px 0 #fff, -14px -14px #7ee8fa, 14px -14px #7ee8fa, -14px 14px #7ee8fa, 14px 14px #7ee8fa;
  animation: et-spark 1.7s ease-out infinite;
}
@keyframes et-spark {
  0%, 46% { opacity: 0; transform: scale(.3); }
  52%     { opacity: 1; transform: scale(1); }
  76%, 100% { opacity: 0; transform: scale(1.8); }
}

@media (prefers-reduced-motion: reduce) {
  .et-goo i, .et-flow i, .et-pearl, .et-shadow, .et-motes, .et-potion-x, .et-potion-y, .et-potion, .et-splash,
  .et-sword, .et-spark, .et-name { animation: none !important; }
  .et-sword { opacity: 1; } .et-potion-x { opacity: 1; transform: translateX(60px); }
}
