/* =========================================================
   OLD ZOMBIE — страница «Топ игроков»: шапка, подиум, таблица, пагинация, анимации
   ========================================================= */

/* ---------- Шапка ---------- */
.pw-hero { position: relative; margin-bottom: 22px; padding: 26px 26px 22px; border-radius: 22px; border: 1px solid var(--line-violet); background: linear-gradient(140deg, #150f2a 0%, #0e1520 55%, #0a0f18 100%); overflow: hidden; isolation: isolate; box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.pw-hero::before { content: ''; position: absolute; inset: -60%; z-index: -2; background: conic-gradient(from 0deg, transparent 0 62%, rgba(168, 85, 255, .28) 76%, rgba(255, 201, 74, .18) 84%, transparent 92%); animation: pwSpin 16s linear infinite; }
.pw-hero::after { content: ''; position: absolute; inset: 1px; z-index: -1; border-radius: 21px; background: linear-gradient(140deg, #130d26, #0d1420 60%, #0a0f18); }
.pw-orb { position: absolute; z-index: -1; border-radius: 50%; filter: blur(46px); pointer-events: none; }
.pw-orb.o1 { width: 280px; height: 280px; left: -60px; top: -90px; background: rgba(139, 61, 255, .32); animation: pwDrift 9s ease-in-out infinite; }
.pw-orb.o2 { width: 240px; height: 240px; right: -40px; bottom: -110px; background: rgba(255, 190, 60, .2); animation: pwDrift 11s ease-in-out infinite reverse; }
.pw-sparks { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.pw-sparks i { position: absolute; bottom: -10px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); opacity: 0; animation: pwRise var(--d) linear var(--w) infinite; }
.pw-hero .top-head { position: relative; z-index: 1; margin-bottom: 0; }
.pw-hero .top-head h1 { font-size: 36px; background: linear-gradient(90deg, #fff 0%, #d5b3ff 30%, #ffd35c 55%, #fff 80%); background-size: 240% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: pwShine 7s linear infinite; }
.pw-hero .top-head-stats > div { background: rgba(14, 21, 32, .7); backdrop-filter: blur(8px); border-color: var(--line-2); transition: transform .25s, border-color .25s, box-shadow .25s; }
.pw-hero .top-head-stats > div:hover { transform: translateY(-3px); border-color: var(--violet-2); box-shadow: 0 0 24px rgba(142, 49, 255, .3); }
.pw-hero .top-head-stats b { font-size: 22px; }
@keyframes pwSpin { to { transform: rotate(360deg); } }
@keyframes pwShine { to { background-position: -240% 0; } }
@keyframes pwDrift { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(34px, 22px); } }
@keyframes pwRise { 0% { transform: translateY(0) scale(.6); opacity: 0; } 12% { opacity: .9; } 100% { transform: translateY(-260px) scale(1.1); opacity: 0; } }

/* ---------- Появление при прокрутке ---------- */
html.pw-js .pw-reveal { transition: opacity .6s ease, transform .6s cubic-bezier(.2, .8, .2, 1); }
html.pw-js .pw-reveal:not(.in) { opacity: 0; transform: translateY(18px); }

/* ---------- Вкладки ---------- */
.top-tab { position: relative; overflow: hidden; }
.top-tab::after { content: ''; position: absolute; top: 0; left: -80%; width: 50%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .12), transparent); transform: skewX(-18deg); transition: left .6s; }
.top-tab:hover::after { left: 130%; }
.top-tab.active i { animation: pwPulse 2.8s ease-in-out infinite; }
@keyframes pwPulse { 0%, 100% { box-shadow: 0 0 14px rgba(142, 49, 255, .5); } 50% { box-shadow: 0 0 28px rgba(190, 90, 255, .85); } }

/* ---------- Подиум ---------- */
.pw-podium { display: grid; grid-template-columns: 1fr 1.14fr 1fr; gap: 16px; align-items: end; margin: 8px 0 24px; perspective: 1100px; }
.pw-pod { --rc1: #e7ebf3; --rc2: #8d97a8; --tone: 207, 214, 230; --h: 46px; position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 24px 14px 0; border-radius: 22px; border: 1px solid rgba(var(--tone), .3); background: linear-gradient(180deg, rgba(var(--tone), .1), var(--panel) 46%); color: var(--text); text-decoration: none; text-align: center; overflow: hidden; transform-style: preserve-3d; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .18s ease-out, border-color .25s, box-shadow .3s; animation: pwUp .8s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i) * 120ms + 100ms); }
.pw-pod:hover { color: #fff; border-color: rgba(var(--tone), .65); box-shadow: 0 22px 50px rgba(0, 0, 0, .45), 0 0 40px rgba(var(--tone), .18); }
.pw-pod::before { content: ''; position: absolute; top: 0; left: -60%; width: 38%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .09), transparent); transform: skewX(-18deg); animation: pwSweep 6s ease-in-out infinite; animation-delay: calc(var(--i) * 1.4s); pointer-events: none; }
.pw-pod::after { content: ''; position: absolute; inset: 0; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 0%), rgba(255, 255, 255, .13), transparent 62%); opacity: 0; transition: opacity .25s; pointer-events: none; }
.pw-pod:hover::after { opacity: 1; }
.pw-pod > * { position: relative; }
.pw-1 { --rc1: #ffe07a; --rc2: #e08a0e; --tone: 255, 201, 74; --h: 68px; padding-top: 34px; box-shadow: 0 0 46px rgba(255, 190, 60, .14); animation: pwUp .8s cubic-bezier(.2, .8, .2, 1) backwards, pwGold 3.4s ease-in-out 1s infinite; animation-delay: .1s, 1s; }
.pw-3 { --rc1: #f0aa72; --rc2: #8e4e22; --tone: 227, 153, 94; --h: 34px; }
.pw-pod.is-me { outline: 2px solid var(--violet-2); outline-offset: 2px; }
@keyframes pwUp { from { opacity: 0; transform: translateY(40px) scale(.94); } to { opacity: 1; } }
@keyframes pwSweep { 0%, 55% { left: -60%; } 100% { left: 140%; } }
@keyframes pwGold { 0%, 100% { box-shadow: 0 0 34px rgba(255, 190, 60, .12); } 50% { box-shadow: 0 0 66px rgba(255, 190, 60, .3); } }

.pw-crown { position: absolute !important; top: 6px; left: 50%; font-size: 26px; color: #ffd35c; filter: drop-shadow(0 0 12px rgba(255, 200, 70, .9)); animation: pwFloat 2.8s ease-in-out infinite; }
@keyframes pwFloat { 0%, 100% { transform: translate(-50%, 0) rotate(-6deg); } 50% { transform: translate(-50%, -6px) rotate(6deg); } }
.pw-ava { position: relative; width: 84px; height: 84px; margin-bottom: 2px; }
.pw-1 .pw-ava { width: 100px; height: 100px; }
.pw-ava::before { content: ''; position: absolute; inset: -4px; border-radius: 50%; background: conic-gradient(var(--rc1), transparent 30%, var(--rc2), transparent 70%, var(--rc1)); animation: pwSpin 5s linear infinite; }
.pw-ava img { position: relative; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid #0e1520; background: #0e1520; }
.pw-medal { position: absolute; right: -4px; bottom: -2px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 13px; font-weight: 900; color: #1b1205; background: linear-gradient(135deg, var(--rc1), var(--rc2)); border: 2px solid #0e1520; box-shadow: 0 3px 10px rgba(0, 0, 0, .5); }
.pw-name { max-width: 100%; font-size: 16px; font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pw-1 .pw-name { font-size: 18px; }
.pw-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; min-height: 20px; }
.pw-kills b { display: block; font-size: 34px; line-height: 1.05; font-weight: 900; font-variant-numeric: tabular-nums; background: linear-gradient(180deg, #ff8a95, #ff4d5e); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 14px rgba(255, 93, 108, .35)); }
.pw-1 .pw-kills b { font-size: 42px; }
.pw-kills small { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.pw-chips { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; }
.pw-chips > span { padding: 4px 10px; border-radius: 8px; background: rgba(10, 15, 24, .7); border: 1px solid var(--line); color: var(--dim); font-size: 11px; font-weight: 700; }
.pw-chips b { color: var(--text); }
.pw-chips i { color: var(--green); margin-right: 4px; }
.pw-step { align-self: stretch; margin: 12px -14px 0; height: var(--h); display: grid; place-items: center; font-size: 30px; font-weight: 900; color: rgba(var(--tone), .85); border-top: 1px solid rgba(var(--tone), .35); background: linear-gradient(180deg, rgba(var(--tone), .2), rgba(var(--tone), .03)); text-shadow: 0 0 20px rgba(var(--tone), .6); }

/* ---------- Панель и таблица ---------- */
.pw-panel { border-radius: 20px; border-color: var(--line-2); box-shadow: 0 16px 44px rgba(0, 0, 0, .3); }
.pw-toolbar { flex-wrap: wrap; row-gap: 10px; background: linear-gradient(180deg, rgba(139, 61, 255, .07), transparent); }
.pw-toolbar .pw-count { margin-left: auto; }
.pw-table thead th { font-size: 11px; letter-spacing: .07em; }
.pw-table tbody tr { position: relative; animation: pwRow .55s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 32ms + 250ms); }
.pw-table tbody tr td { transition: background .2s; }
.pw-table tbody tr:hover td { background: rgba(139, 61, 255, .09); }
.pw-table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--violet-2); }
.pw-table tbody tr.podium-row.p1 td { background: linear-gradient(90deg, rgba(255, 201, 74, .1), transparent 70%); }
.pw-table tbody tr.podium-row.p2 td { background: linear-gradient(90deg, rgba(207, 214, 230, .07), transparent 70%); }
.pw-table tbody tr.podium-row.p3 td { background: linear-gradient(90deg, rgba(227, 153, 94, .08), transparent 70%); }
.pw-table tbody tr.is-me td { background: rgba(139, 61, 255, .14) !important; }
.pw-table tbody tr.is-me td:first-child { box-shadow: inset 3px 0 0 var(--violet-2); }
@keyframes pwRow { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }
.pw-table .rank.r1 { animation: pwGlow 2.6s ease-in-out infinite; }
@keyframes pwGlow { 0%, 100% { box-shadow: 0 0 10px rgba(255, 200, 70, .3); } 50% { box-shadow: 0 0 22px rgba(255, 200, 70, .75); } }
.pw-table .pl-cell img { transition: transform .25s; }
.pw-table tbody tr:hover .pl-cell img { transform: scale(1.12) rotate(-3deg); }

.pw-kcell { display: flex; flex-direction: column; gap: 5px; min-width: 120px; }
.pw-bar { height: 5px; border-radius: 5px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.pw-bar i { display: block; height: 100%; width: var(--w); border-radius: 5px; background: linear-gradient(90deg, #ff5d6c, #ffa03c); box-shadow: 0 0 10px rgba(255, 93, 108, .55); transition: width 1.2s cubic-bezier(.2, .8, .2, 1); }
html.pw-js .pw-bar:not(.in) i { width: 0; }
.pw-kd { display: inline-block; padding: 3px 9px; border-radius: 7px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; border: 1px solid var(--line-2); }
.pw-kd.hi { color: var(--green); background: rgba(94, 240, 168, .1); border-color: rgba(94, 240, 168, .3); }
.pw-kd.mid { color: #e6eaf5; background: rgba(255, 255, 255, .05); }
.pw-kd.lo { color: #ff8b95; background: rgba(255, 93, 108, .08); border-color: rgba(255, 93, 108, .25); }

/* ---------- Пагинация: сверху в панели и под таблицей ---------- */
.pw-pager { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pw-pg { min-width: 38px; height: 38px; display: inline-grid; place-items: center; padding: 0 11px; border-radius: 11px; border: 1px solid var(--line-2); background: var(--panel-2); color: #cfd4e2; font-size: 13px; font-weight: 800; text-decoration: none; font-variant-numeric: tabular-nums; transition: transform .18s, border-color .18s, background .18s, box-shadow .18s; }
a.pw-pg:hover { transform: translateY(-2px); border-color: var(--violet-2); background: rgba(139, 61, 255, .2); color: #fff; box-shadow: 0 6px 18px rgba(142, 49, 255, .3); }
.pw-pg.on { border-color: transparent; background: var(--grad-violet); color: #fff; box-shadow: var(--shadow-violet); }
.pw-pg.dis { opacity: .3; }
.pw-gap { min-width: 22px; text-align: center; color: var(--dim); font-weight: 800; }
.pw-pager-wrap { display: flex; justify-content: center; padding: 14px 16px 16px; border-top: 1px solid var(--line); background: linear-gradient(0deg, rgba(139, 61, 255, .06), transparent); }
.pw-pager-top { margin-left: 0; }

/* ---------- Адаптив ---------- */
@media (max-width: 991px) {
  .pw-podium { grid-template-columns: 1fr; gap: 14px; }
  .pw-1 { order: -1; }
  .pw-hero .top-head h1 { font-size: 30px; }
  .pw-toolbar .pw-count { margin-left: 0; }
}
@media (max-width: 575px) {
  .pw-hero { padding: 18px 14px 16px; border-radius: 18px; }
  .pw-hero .top-head h1 { font-size: 26px; }
  .pw-kcell .pw-bar { display: none; }
  .pw-pg { min-width: 34px; height: 34px; padding: 0 8px; }
  .pw-pager { justify-content: center; width: 100%; }
  .pw-pod { transform: none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .pw-hero::before, .pw-orb, .pw-sparks i, .pw-pod, .pw-pod::before, .pw-crown, .pw-ava::before, .pw-table tbody tr, .pw-table .rank.r1, .pw-hero .top-head h1, .top-tab.active i { animation: none !important; }
  html.pw-js .pw-reveal:not(.in) { opacity: 1; transform: none; }
  html.pw-js .pw-bar:not(.in) i { width: var(--w); }
}
