/* EasyTiers — «Minecraft+». Тот же интерфейс с фасками и серой палитрой, но:
   ровные кнопки одной высоты, аккуратные отступы, читаемые абзацы (Onest) и плавная загрузка.
   Цвета не трогаем — берутся из --mc-* и скинов, так что светлая тема продолжает работать. */

/* Шрифт: на Linux регистр имени файла важен — файл лежит как minecraft.ttf */
@font-face {
  font-family: 'Minecraft';
  src: url('/fonts/minecraft.ttf') format('truetype');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0400-04FF, U+2000-206F, U+20AC, U+2122, U+2190-21FF, U+25A0-25FF;
  font-display: swap;
}

html body:not(.x) {
  --pl-body: 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pl-ease: cubic-bezier(.2,.8,.2,1);
  --pl-chip: inset 2px 2px 0 var(--mc-light, #5a5a5a), inset -2px -2px 0 var(--mc-dark, #161616), 0 0 0 2px var(--mc-line, #000);
  animation: none !important;
}
html body:not(.x) .container { max-width: 1180px; padding-top: 40px; animation: none !important; }

/* ---------- Типографика: пиксели для заголовков и кнопок, Onest для текста ---------- */
html body:not(.x) h1 { font-size: clamp(28px, 3.4vw, 38px); line-height: 1.1; margin: 0 0 14px; }
html body:not(.x) h2 { font-size: 24px; line-height: 1.2; margin: 0 0 16px; }
html body:not(.x) .muted, html body:not(.x) .card p, html body:not(.x) .steps p, html body:not(.x) .field label, html body:not(.x) .leader-row .score {
  font-family: var(--pl-body) !important; font-size: 14px; line-height: 1.6; text-shadow: none; opacity: .86;
}
html body:not(.x) code { font-family: var(--pl-body); font-size: 13px; text-shadow: none; }

/* ---------- Шапка ---------- */
html body:not(.x) .topbar { height: 66px; padding: 0 28px !important; align-items: center; }
html body:not(.x) .topbar-left { gap: 28px; }
html body:not(.x) .topbar-right, html body:not(.x) .account { gap: 10px; }
html body:not(.x) .brand { font-size: 22px; gap: 12px; }
html body:not(.x) .brand .mark { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }
html body:not(.x) .nav { gap: 8px; align-items: center; }
html body:not(.x) .nav a, html body:not(.x) .nav-more-btn {
  height: 40px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; color: var(--mc-text); font-size: 17px; line-height: 1; cursor: pointer;
  transition: background .15s;
}
html body:not(.x) .nav a::after { display: none; }
html body:not(.x) .nav a:hover, html body:not(.x) .nav-more-btn:hover { background: var(--mc-btn-hover); }
html body:not(.x) .nav a.active, html body:not(.x) .nav-more-btn.active { background: var(--mc-btn); box-shadow: var(--mc-bevel-pressed); color: var(--c-ffffff, #fff); }
html body:not(.x) .nav-more-menu { padding: 8px; gap: 4px; box-shadow: var(--mc-bevel), 0 12px 0 rgba(0,0,0,.25); }
html body:not(.x) .nav-more-menu a { width: 100%; justify-content: flex-start; }
html body:not(.x) .search-box input {
  height: 44px; padding: 0 14px; border: 0; background: var(--mc-dark); box-shadow: var(--mc-bevel-pressed);
  color: var(--mc-text); font-size: 17px; outline: none;
}
html body:not(.x) .search-box input:focus-visible { outline: 2px solid var(--mc-text); outline-offset: 2px; }
html body:not(.x) .search-results { box-shadow: var(--mc-bevel), 0 12px 0 rgba(0,0,0,.25); }

/* ---------- Кнопки: одна высота, центр по обеим осям ---------- */
html body:not(.x) .btn, html body:not(.x) button.btn, html body:not(.x) a.btn {
  box-sizing: border-box; height: 44px; min-width: 44px; padding: 0 20px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 18px; line-height: 1; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background .15s var(--pl-ease), transform .1s var(--pl-ease), box-shadow .1s;
}
html body:not(.x) .btn:hover { transform: none; }
html body:not(.x) .btn:active { transform: translateY(2px); box-shadow: var(--mc-bevel-pressed); }
html body:not(.x) .btn:focus-visible, html body:not(.x) .mode-tab:focus-visible, html body:not(.x) .nav a:focus-visible { outline: 2px solid var(--c-ffffff, #fff); outline-offset: 3px; }
html body:not(.x) .modal-actions { gap: 12px; }
html body:not(.x) .modal-actions .btn { flex: 1; }

/* ---------- Вкладки режимов — «хотбар» ---------- */
html body:not(.x) .mode-tabs {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 22px; padding: 8px;
  background: var(--mc-dark); box-shadow: var(--mc-bevel-pressed);
}
html body:not(.x) .mode-tab {
  height: 44px; padding: 0 18px; gap: 8px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 18px; line-height: 1; text-shadow: 2px 2px 0 var(--mc-shadow);
  transition: background .15s var(--pl-ease), transform .1s var(--pl-ease);
}
html body:not(.x) .mode-tab:active { transform: translateY(2px); }

/* ---------- Панели, строки, чипы ---------- */
html body:not(.x) .card { padding: 24px; }
html body:not(.x) .steps { gap: 20px; }
html body:not(.x) .steps .card .num {
  display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-right: 10px;
  background: var(--mc-btn); box-shadow: var(--pl-chip); color: var(--c-ffffff, #fff); font-size: 18px;
}
html body:not(.x) .leader-row {
  display: flex; align-items: center; gap: 14px; min-height: 56px; padding: 8px 14px; margin: 0 -14px;
  border-bottom: 2px solid rgba(0,0,0,.35); transition: background .15s;
}
html body:not(.x) .leader-row:last-child { border-bottom-color: transparent; }
html body:not(.x) .leader-row:hover { background: var(--mc-panel-hi); padding-left: 14px; }
html body:not(.x) .leader-row .rank { width: 36px; font-variant-numeric: tabular-nums; }
html body:not(.x) .tier-chip {
  display: inline-flex; align-items: center; justify-content: center; height: 30px; min-width: 44px; padding: 0 10px;
  border: 0; border-radius: 0; background: var(--mc-btn); box-shadow: var(--pl-chip); font-size: 15px; line-height: 1;
}

/* ---------- Формы и окна ---------- */
html body:not(.x) .modal-backdrop { background: rgba(0,0,0,.66); }
html body:not(.x) .modal { padding: 28px; }
html body:not(.x) .modal h2 { margin-bottom: 20px; }
html body:not(.x) .field { margin-bottom: 16px; }
html body:not(.x) .field label { display: block; margin-bottom: 8px; }
html body:not(.x) .field input, html body:not(.x) .field select, html body:not(.x) .field textarea {
  height: 46px; width: 100%; padding: 0 14px; border: 0; border-radius: 0; background: var(--mc-dark);
  box-shadow: var(--mc-bevel-pressed); color: var(--mc-text); font-size: 17px; outline: none;
}
html body:not(.x) .field textarea { height: auto; padding: 12px 14px; font-family: var(--pl-body) !important; font-size: 15px; }
html body:not(.x) .field input:focus-visible, html body:not(.x) .field select:focus-visible, html body:not(.x) .field textarea:focus-visible { outline: 2px solid var(--mc-text); outline-offset: 2px; }

/* ---------- Плавная загрузка (предметы остаются, меняется подача) ---------- */
#et-loader { transition: opacity .6s cubic-bezier(.2,.8,.2,1), visibility .6s; }
#et-loader.et-hide { opacity: 0; visibility: hidden; }
#et-loader.et-hide .et-center, #et-loader.et-hide .et-goo { transform: translateY(-10px) scale(.97); transition: transform .6s cubic-bezier(.2,.8,.2,1); }
#et-loader .et-center, #et-loader .et-goo { animation: pl-loader-in .6s cubic-bezier(.2,.8,.2,1) both; }
/* полоска загрузки из пиксельных сегментов, как шкала опыта */
html:not([data-skin="cis"]):not([data-skin="clean"]) #et-loader::after {
  content: ''; position: absolute; left: 50%; bottom: 14vh; width: 240px; height: 16px; margin-left: -120px;
  background: var(--c-111111, #111); box-shadow: inset 2px 2px 0 #000, inset -2px -2px 0 var(--c-3a3a3a, #3a3a3a), 0 0 0 2px #000;
}
html:not([data-skin="cis"]):not([data-skin="clean"]) #et-loader::before {
  content: ''; position: absolute; z-index: 1; left: 50%; bottom: calc(14vh + 4px); width: 232px; height: 8px; margin-left: -116px;
  background: repeating-linear-gradient(90deg, #b5b5b5 0 10px, transparent 10px 12px);
  animation: pl-fill 1.6s steps(20, end) infinite;
}
@keyframes pl-fill { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes pl-loader-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Контент выезжает один раз, когда экран загрузки начинает таять */
html.et-loading:not(.et-ready) .topbar,
html.et-loading:not(.et-ready) .container > *,
html.et-loading:not(.et-ready) .admin-main > * { opacity: 0; }
html:not(.et-loading) .topbar, html.et-ready .topbar { animation: pl-drop .7s var(--pl-ease, ease) both; }
html:not(.et-loading) .container > *, html.et-ready .container > * { animation: pl-rise .75s var(--pl-ease, ease) both; }
.container > :nth-child(1) { animation-delay: .05s !important; }
.container > :nth-child(2) { animation-delay: .11s !important; }
.container > :nth-child(3) { animation-delay: .17s !important; }
.container > :nth-child(4) { animation-delay: .23s !important; }
.container > :nth-child(5) { animation-delay: .29s !important; }
.container > :nth-child(n+6) { animation-delay: .35s !important; }
@keyframes pl-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pl-drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }

/* Строки рейтинга, которые приходят с сервера позже, — по очереди */
.leader-row { animation: pl-rise .45s var(--pl-ease, ease) both; }
.leader-row:nth-child(2) { animation-delay: .03s; } .leader-row:nth-child(3) { animation-delay: .06s; }
.leader-row:nth-child(4) { animation-delay: .09s; } .leader-row:nth-child(5) { animation-delay: .12s; }
.leader-row:nth-child(6) { animation-delay: .15s; } .leader-row:nth-child(7) { animation-delay: .18s; }
.leader-row:nth-child(8) { animation-delay: .21s; } .leader-row:nth-child(n+9) { animation-delay: .24s; }

html body:not(.x) .loading-state { display: flex; align-items: center; gap: 12px; padding: 18px 0; }

@media (max-width: 760px) {
  html body:not(.x) .topbar { padding: 0 14px !important; height: auto; min-height: 60px; }
  html body:not(.x) .container { padding-left: 14px; padding-right: 14px; }
  html body:not(.x) .mode-tabs { flex-wrap: nowrap; overflow-x: auto; }
  html body:not(.x) .mode-tab { flex: 0 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  html *, html *::before, html *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* ==========================================================================
   Тир-лист: сдержанные акценты. Цвет тира — только тонкая линия под шапкой колонки
   и полоска у строки при наведении. Никаких заливок, иконок и фоновых эффектов.
   ========================================================================== */
html body:not(.x) .tierlist-col.b1 { --tc: #d9b23c; }
html body:not(.x) .tierlist-col.b2 { --tc: #4cc3b8; }
html body:not(.x) .tierlist-col.b3 { --tc: #46b872; }
html body:not(.x) .tierlist-col.b4 { --tc: #d27a45; }
html body:not(.x) .tierlist-col.b5 { --tc: #8e959d; }

html body:not(.x) .tierlist-col { animation: pl-rise .7s var(--pl-ease, ease) both; }
.tierlist-col:nth-child(1) { animation-delay: .05s; } .tierlist-col:nth-child(2) { animation-delay: .11s; }
.tierlist-col:nth-child(3) { animation-delay: .17s; } .tierlist-col:nth-child(4) { animation-delay: .23s; }
.tierlist-col:nth-child(5) { animation-delay: .29s; }

html body:not(.x) .tierlist-col .col-head {
  display: flex; align-items: center; justify-content: center; gap: 10px; height: 50px;
  border-bottom: 2px solid var(--tc); color: var(--mc-text);
}
html body:not(.x) .tierlist-col .col-count {
  min-width: 24px; height: 22px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--mc-dark); box-shadow: var(--pl-chip); color: var(--mc-text); font-size: 14px; font-style: normal; line-height: 1; opacity: .8;
}
html body:not(.x) .tierlist-col .empty { opacity: .4; padding-top: 24px; text-align: center; }

html body:not(.x) .tierlist-col .row { border-left: 3px solid transparent; }
html body:not(.x) .tierlist-col .row:hover { border-left-color: var(--tc); }
html body:not(.x) .tierlist-col .row:not(.retired):nth-child(1) .rank { color: #d9b23c; }
html body:not(.x) .tierlist-col .row:not(.retired):nth-child(2) .rank { color: #c9ced4; }
html body:not(.x) .tierlist-col .row:not(.retired):nth-child(3) .rank { color: #d27a45; }
