/* Цвета: тёмная основа, красный главный цвет, золото и цвета атрибутов как яркие акценты */
:root {
  --bg: #100c0e;
  --card: rgba(30, 22, 25, 0.85);
  --card-solid: #1e1619;
  --card-hover: #2a1e22;
  --border: #3a2a2f;
  --text: #ede4e4;
  --muted: #a39396;
  --accent: #e04a4d;
  --accent-2: #ff8a4c;
  --accent-dark: #b33a3d;
  --gold: #f4c25b;
  --win: #5fd08a;
  --loss: #ff6b66;
  --warn: #f4c25b;
  --str: #e5554f;
  --agi: #5fd08a;
  --int: #4fb3ff;
  --all: #c58cff;
  --grad: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
}

* { box-sizing: border-box; }
html { scrollbar-color: var(--border) var(--bg); }

/* Фон страницы: им же закрашено окно матча, чтобы оно выглядело как меню */
body, .modal {
  background:
    radial-gradient(ellipse at 15% -10%, rgba(224, 74, 77, 0.28) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 10%, rgba(255, 138, 76, 0.14) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 110%, rgba(197, 140, 255, 0.10) 0%, transparent 50%),
    var(--bg);
  background-attachment: fixed;
}

body {
  margin: 0;
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.5;
  min-height: 100vh;
}

h1, h2, h3 { margin: 0 0 12px; font-weight: 700; }
h1 { font-size: 26px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; margin-top: -6px; }
.small-inline { font-size: 13px; font-weight: 400; }
.center { text-align: center; }
.win { color: var(--win); }
.loss { color: var(--loss); }
.gold { color: var(--gold); }
.accent { color: var(--accent); }
.error { color: var(--loss); }

/* Плавное появление */
@keyframes pop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: none; }
}
.pop, .tab-page, #profile { animation: pop 0.35s ease-out; }

/* Экраны */
.screen { padding: 24px 16px; }
.screen-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wrap { max-width: 960px; margin: 0 auto; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  backdrop-filter: blur(6px);
}
.narrow { max-width: 480px; width: 100%; box-shadow: 0 20px 60px rgba(224, 74, 77, 0.15); }

.logo {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 2px;
  margin-bottom: 14px;
  color: var(--text);
}
.logo span {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Нумерованные шаги в уведомлении */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding-left: 38px; margin-bottom: 10px; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--grad);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Кнопки и поле ввода */
.btn {
  background: var(--grad);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(224, 74, 77, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(224, 74, 77, 0.45); }
.btn-ghost { background: transparent; border: 1px solid var(--accent); color: var(--accent); box-shadow: none; }
.btn-ghost:hover { background: rgba(224, 74, 77, 0.12); box-shadow: none; }

/* Переключатель «Статистика игрока / Разбор матча» */
.mode-switch {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
}
.mode-btn {
  flex: 1;
  background: none;
  border: none;
  border-radius: 9px;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.mode-btn:hover { color: var(--text); }
.mode-btn.active { background: var(--grad); color: #fff; box-shadow: 0 4px 14px rgba(224, 74, 77, 0.35); }

.reminder {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
  background: rgba(244, 194, 91, 0.08);
  border-left: 3px solid var(--gold);
}
.reminder b { color: var(--text); }

/* Блок создателей на стартовом экране */
.creators { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.creators-title {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin: 0 0 6px;
  font-weight: 700;
}
.creator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 5px 0;
}
.creator-id { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.creator-name { font-weight: 700; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.creator-name::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--grad);
  box-shadow: 0 0 6px rgba(224, 74, 77, 0.6);
  flex-shrink: 0;
}
.creator-name.gold::before { background: var(--gold); box-shadow: 0 0 6px rgba(244, 194, 91, 0.6); }
.creator-name.no-dot::before { display: none; }
.creator-role { font-size: 12px; color: var(--muted); }
.creator .links { margin-top: 0; }

#form-id { display: flex; flex-direction: column; gap: 10px; }
#input-id {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 12px 14px;
  font-size: 16px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#input-id:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(224, 74, 77, 0.2); }

/* Загрузка */
.loading { text-align: center; color: var(--muted); padding: 80px 0; }
.spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border: 4px solid var(--border);
  border-top-color: var(--accent);
  border-right-color: var(--accent-2);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Шапка профиля */
.hero-card {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  padding: 22px;
  margin-bottom: 16px;
  border-radius: 16px;
  border: 1px solid rgba(224, 74, 77, 0.4);
  background:
    linear-gradient(120deg, rgba(224, 74, 77, 0.30) 0%, rgba(255, 138, 76, 0.12) 45%, rgba(30, 22, 25, 0.9) 75%),
    var(--card-solid);
  box-shadow: 0 16px 50px rgba(224, 74, 77, 0.18);
}
.avatar {
  width: 84px;
  height: 84px;
  border-radius: 14px;
  border: 3px solid var(--accent-2);
  box-shadow: 0 0 24px rgba(255, 138, 76, 0.45);
}
.profile-info { flex: 1; min-width: 180px; }
.profile-info h1 { margin: 0; word-break: break-word; }

.links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; align-items: center; }
.links a {
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  padding: 3px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.25);
  transition: border-color 0.15s, color 0.15s;
}
.links a:hover { border-color: var(--accent-2); color: var(--accent-2); }
.links .links { margin-top: 0; }
.links a.steam-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #1b2838 0%, #2a475e 100%);
  border-color: #66c0f4;
  color: #c7e6fb;
  font-weight: 600;
}
.links a.steam-btn:hover { color: #fff; border-color: #fff; }

/* TikTok — такая же кнопка, в цветах TikTok */
.links a.tiktok-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #0b0b0f 0%, #22252d 100%);
  border-color: #fe2c55;
  color: #fff;
  font-weight: 600;
}
.links a.tiktok-btn:hover { color: #25f4ee; border-color: #25f4ee; }

.rank {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
}
.medal { position: relative; width: 72px; height: 72px; filter: drop-shadow(0 0 10px rgba(244, 194, 91, 0.35)); }
.medal img { position: absolute; inset: 0; width: 100%; height: 100%; }
.rank-name { font-weight: 700; color: var(--gold); }

/* Вкладки */
.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
  padding: 5px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
}
.tab {
  flex: 1;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--grad); color: #fff; box-shadow: 0 4px 16px rgba(224, 74, 77, 0.35); }

/* Обзор: круговая диаграмма + плитки */
.overview-grid { display: grid; grid-template-columns: 220px 1fr; gap: 16px; margin-bottom: 0; }
.donut-card { position: relative; display: flex; align-items: center; justify-content: center; }
.donut { width: 170px; height: 170px; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 12; }
.donut-bg { stroke: rgba(255, 107, 102, 0.35); }
.donut-win { stroke: var(--win); stroke-linecap: round; transition: stroke-dasharray 0.8s ease-out; }
.donut-center { position: absolute; text-align: center; }
.donut-value { font-size: 30px; font-weight: 800; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat {
  text-align: center;
  padding: 18px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-bottom: 16px;
}
.stat-value { font-size: 30px; font-weight: 800; }
@media (max-width: 700px) {
  .overview-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .stat-value { font-size: 22px; }
}

/* Маленькие плитки «последние 100 игр» */
.mini-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.mini {
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  border-left: 3px solid var(--accent-2);
}
.mini-value { font-size: 20px; font-weight: 700; }

/* Любимые герои */
.top-heroes { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.top-hero {
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  transition: transform 0.15s;
}
.top-hero:hover { transform: translateY(-3px); }
.top-hero img { width: 100%; display: block; border-bottom: 3px solid var(--attr, var(--accent)); }
.top-hero-body { padding: 8px 10px; }
.bar { height: 6px; border-radius: 3px; background: rgba(255, 107, 102, 0.35); overflow: hidden; margin-top: 4px; }
.bar > div { height: 100%; background: var(--win); }

/* Топ-3 героя: крупнее, с местом */
.top-hero { position: relative; }
.top-hero .place {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: #1a1012;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}
.place-1 { background: linear-gradient(135deg, #ffe08a, #f4c25b); }
.place-2 { background: linear-gradient(135deg, #f0f0f0, #b9b9c3); }
.place-3 { background: linear-gradient(135deg, #f0b27a, #c87f4a); }

/* Статистика по типам матчей */
.category-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.category {
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border-top: 3px solid var(--cat, var(--accent));
}
.category-name { font-weight: 700; margin-bottom: 4px; }
.category-rate { font-size: 24px; font-weight: 800; }

/* Кнопки-фильтры матчей */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filter {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.filter:hover { color: var(--text); border-color: var(--cat, var(--accent)); }
.filter.active { color: #fff; background: var(--cat, var(--accent)); border-color: var(--cat, var(--accent)); }
.source { font-size: 12px; color: var(--muted); }

/* Сворачивающийся блок */
.collapsible summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.collapsible summary::-webkit-details-marker { display: none; }
.collapsible summary h2 { margin: 0; }
.collapsible summary::after {
  content: "▾";
  color: var(--accent-2);
  font-size: 18px;
  transition: transform 0.2s;
}
.collapsible[open] summary::after { transform: rotate(180deg); }
.collapsible[open] summary { margin-bottom: 12px; }
.collapsible summary:hover h2 { color: var(--accent-2); }

/* Сверка источников */
.compare-table td, .compare-table th { padding: 8px 10px; }
.compare-table tr + tr td { border-top: 1px solid var(--border); }
.used {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--grad);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
}

/* Список матчей */
.match {
  display: grid;
  grid-template-columns: 70px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 10px;
  border-left: 4px solid transparent;
  cursor: pointer;
  transition: background 0.15s, transform 0.15s;
}
.match:hover { background: var(--card-hover); transform: translateX(3px); }
.match.is-win { border-left-color: var(--win); background: linear-gradient(90deg, rgba(95, 208, 138, 0.08), transparent 40%); }
.match.is-loss { border-left-color: var(--loss); background: linear-gradient(90deg, rgba(255, 107, 102, 0.08), transparent 40%); }
.match + .match { margin-top: 5px; }
.match img { width: 70px; border-radius: 5px; display: block; border-bottom: 2px solid var(--attr, transparent); }
.match-hero { font-weight: 600; }
.mode-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid var(--cat);
  color: var(--cat);
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.match-kda { font-weight: 700; white-space: nowrap; }
.match-right { text-align: right; font-size: 13px; white-space: nowrap; }
@media (max-width: 600px) {
  .match { grid-template-columns: 56px 1fr auto; }
  .match img { width: 56px; }
  .match-right { display: none; }
}

/* Проверка на смурфа */
.smurf-top { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; margin-bottom: 18px; }
.gauge { position: relative; width: 170px; height: 170px; flex-shrink: 0; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 14; }
.gauge-bg { stroke: rgba(255, 255, 255, 0.08); }
.gauge-val { stroke-linecap: round; transition: stroke-dasharray 0.9s ease-out; }
.gauge-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.gauge-num { font-size: 38px; font-weight: 900; }
.verdict { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.flags { list-style: none; padding: 0; margin: 0; }
.flags li {
  padding: 10px 12px 10px 40px;
  margin-bottom: 8px;
  border-radius: 10px;
  position: relative;
  background: rgba(0, 0, 0, 0.25);
}
.flags li::before { position: absolute; left: 13px; top: 9px; font-weight: 900; }
.flags li.bad { border-left: 3px solid var(--loss); }
.flags li.bad::before { content: "!"; color: var(--loss); }
.flags li.warn { border-left: 3px solid var(--warn); }
.flags li.warn::before { content: "?"; color: var(--warn); }
.flags li.ok { border-left: 3px solid var(--win); }
.flags li.ok::before { content: "✓"; color: var(--win); }
.flag-points { float: right; color: var(--muted); font-size: 13px; margin-left: 8px; }
.note {
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  background: rgba(244, 194, 91, 0.08);
  border: 1px solid rgba(244, 194, 91, 0.25);
  font-size: 13px;
  color: var(--muted);
}

/* Окно матча */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
  z-index: 10;
}
.modal-box { position: relative; max-width: 1000px; width: 100%; box-shadow: 0 20px 60px rgba(224, 74, 77, 0.15); }
.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
}
.modal-close:hover { color: var(--accent); }

/* Разбор матча: итоги команд */
.totals { display: grid; gap: 10px; margin-bottom: 6px; }
.total-nums { display: flex; justify-content: space-between; font-weight: 700; font-size: 14px; }
.total-nums .muted { font-weight: 500; }
.total-bar { height: 8px; border-radius: 4px; background: var(--loss); overflow: hidden; margin-top: 3px; }
.total-bar > div { height: 100%; background: var(--win); }

/* Лучшие в матче */
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.highlight {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.28);
  border-left: 3px solid var(--border);
}
.highlight.is-win { border-left-color: var(--win); }
.highlight.is-loss { border-left-color: var(--loss); }
.highlight img { width: 56px; border-radius: 4px; }
.highlight-value { font-size: 20px; font-weight: 800; color: var(--gold); }

/* Влияние на исход */
.impacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin-bottom: 6px; }
.impact { padding: 14px; border-radius: 12px; background: rgba(0, 0, 0, 0.28); }
.impact-good { border: 1px solid rgba(95, 208, 138, 0.45); }
.impact-bad { border: 1px solid rgba(255, 107, 102, 0.45); }
.impact-title { font-weight: 800; margin-bottom: 8px; }
.impact-good .impact-title { color: var(--win); }
.impact-bad .impact-title { color: var(--loss); }
.impact-player { display: flex; gap: 10px; align-items: center; }
.impact-player img { width: 72px; border-radius: 5px; }
.impact ul { margin: 10px 0 0; padding-left: 18px; font-size: 14px; }
.impact li { margin-bottom: 3px; }

/* Разбор игрока */
.match-tabs { margin-top: 14px; }
.picker { display: grid; gap: 10px; margin-bottom: 16px; }
.picks { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 4px; }
.pick {
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.pick img { width: 100%; border-radius: 6px; border-bottom: 2px solid var(--attr, transparent); }
.pick-name { font-size: 11px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.pick:hover { transform: translateY(-2px); border-color: var(--accent-2); }
.pick.active { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(244, 194, 91, 0.35); }
@media (max-width: 600px) {
  .picks { grid-template-columns: repeat(3, 1fr); }
}

.analysis-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.analysis-head img { width: 120px; border-radius: 8px; border-bottom: 3px solid var(--attr, var(--accent)); }
.analysis-head h2 { margin: 0; }
.analysis-head .verdict { margin-top: 4px; }
.analysis-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 12px; }
@media (max-width: 700px) {
  .analysis-cols { grid-template-columns: 1fr; }
}

.timeline {
  position: relative;
  height: 22px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
}
.tl-dot {
  position: absolute;
  top: 50%;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  border: 2px solid #1a1316;
}
.tl-dot { cursor: help; transition: transform 0.15s, box-shadow 0.15s; }
.tl-kill { background: var(--win); }
.tl-death { background: var(--loss); }
/* При наведении точка увеличивается и светится своим цветом */
.tl-kill:hover { transform: scale(1.7); box-shadow: 0 0 12px var(--win); z-index: 2; }
.tl-death:hover { transform: scale(1.7); box-shadow: 0 0 12px var(--loss); z-index: 2; }

/* Разбор предметов */
.ai-items { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; margin-bottom: 6px; }
.ai-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border-left: 3px solid var(--muted);
}
.ai-item.good { border-left-color: var(--win); }
.ai-item.bad { border-left-color: var(--loss); }
.ai-item img.item {
  width: 60px;
  height: 44px;
  border-radius: 5px;
  flex-shrink: 0;
  cursor: help;
  transition: transform 0.15s, box-shadow 0.15s;
}
.ai-item img.item:hover { transform: scale(1.15); box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(244, 194, 91, 0.6); }
.ai-badge { font-size: 13px; font-weight: 700; margin: 2px 0; }
.ai-item.good .ai-badge { color: var(--win); }
.ai-item.bad .ai-badge { color: var(--loss); }
.ai-item.neutral .ai-badge { color: var(--muted); }
.ai-item ul { margin: 4px 0 0; padding-left: 16px; font-size: 13px; color: var(--muted); }
.tip-note { margin-top: 6px; font-size: 12px; color: var(--muted); max-width: 260px; }
.tip-note.good { color: var(--win); }
.tip-note.bad { color: var(--loss); }
.tl-marks { position: relative; height: 18px; font-size: 11px; color: var(--muted); }
.tl-mark { position: absolute; transform: translateX(-50%); }
.tl-mark:first-child { transform: none; }
.tl-mark:last-child { transform: translateX(-100%); }

/* График преимущества */
.lead-chart { width: 100%; height: 160px; background: rgba(0, 0, 0, 0.25); border-radius: 10px; }
.lead-axis { stroke: var(--border); stroke-width: 1; }
.bar-radiant { fill: var(--win); }
.bar-dire { fill: var(--loss); }
.lead-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }

.score { font-size: 22px; font-weight: 800; margin-bottom: 4px; }
.team-title { margin: 18px 0 6px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 6px 8px; text-align: left; white-space: nowrap; }
th { color: var(--muted); font-weight: 500; border-bottom: 1px solid var(--border); }
tr.me { background: linear-gradient(90deg, rgba(224, 74, 77, 0.25), rgba(255, 138, 76, 0.08)); }
td img.hero { width: 52px; border-radius: 4px; vertical-align: middle; border-bottom: 2px solid var(--attr, transparent); }
td img.item {
  width: 32px;
  height: 24px;
  border-radius: 3px;
  margin-right: 2px;
  vertical-align: middle;
  cursor: help;
  transition: transform 0.15s, box-shadow 0.15s;
}
/* При наведении предмет чуть увеличивается и светится */
td img.item:hover {
  transform: scale(1.25);
  box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(244, 194, 91, 0.6);
  position: relative;
  z-index: 2;
}

/* Всплывающая подсказка над предметом */
.item-tip {
  position: fixed;
  z-index: 50;
  min-width: 190px;
  padding: 10px 12px;
  border-radius: 12px;
  background: linear-gradient(160deg, #2a1d21 0%, #1a1316 100%);
  border: 1px solid rgba(244, 194, 91, 0.45);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 18px rgba(244, 194, 91, 0.15);
  pointer-events: none;
  animation: pop 0.15s ease-out;
}
.tip-head { display: flex; gap: 10px; align-items: center; }
.tip-head img { width: 44px; height: 32px; border-radius: 4px; }
.tip-name { font-weight: 700; }
.tip-cost { font-size: 12px; color: var(--gold); }
.tip-time {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.tip-time b { font-size: 18px; color: var(--gold); }
.tip-clock { margin-right: 4px; }
td .item-empty { display: inline-block; width: 32px; height: 24px; margin-right: 2px; background: rgba(0, 0, 0, 0.35); border-radius: 3px; vertical-align: middle; }






/* ---------- Билды героев ---------- */

.builds-picker { margin: 12px 0 4px; }
.build-search {
  width: 100%;
  max-width: 380px;
  padding: 11px 14px;
  font-size: 15px;
  color: var(--text);
  background: var(--card-solid);
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  margin-bottom: 12px;
}
.build-search:focus { border-color: var(--accent-2); }

/* Сетка выбора героя: портреты, как в игре */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px;
}
.hero-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.hero-tile:hover {
  transform: translateY(-2px);
  border-color: var(--accent-2);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(255, 138, 76, 0.2);
}
.hero-tile.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent), 0 0 16px rgba(224, 74, 77, 0.4);
}
.hero-tile img {
  width: 56px;
  height: 32px;
  object-fit: cover;
  border-radius: 6px;
}
.hero-tile span {
  font-size: 10.5px;
  line-height: 1.15;
  text-align: center;
  color: var(--muted);
  max-height: 2.3em;
  overflow: hidden;
}
.hero-tile:hover span, .hero-tile.active span { color: var(--text); }

/* Метка типа билда */
.build-type {
  display: inline-block;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  vertical-align: middle;
}
.build-type-mag { background: rgba(79, 179, 255, 0.15); border: 1px solid var(--int); color: var(--int); }
.build-type-phys { background: rgba(229, 85, 79, 0.15); border: 1px solid var(--str); color: var(--str); }
.build-type-mixed { background: rgba(197, 140, 255, 0.12); border: 1px solid var(--all); color: var(--all); }

.build-card h3 {
  margin: 18px 0 8px;
  font-size: 15px;
  color: var(--accent-2);
}
.build-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.build-head h2 { margin: 0; }

.build-variant { margin-bottom: 12px; }
.build-items { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.build-item {
  width: 46px;
  height: 34px;
  object-fit: contain;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  transition: transform 0.15s, box-shadow 0.15s;
}
/* При наведении предмет увеличивается и светится */
.build-item:hover {
  transform: scale(1.25);
  box-shadow: 0 0 0 2px var(--gold), 0 0 14px rgba(244, 194, 91, 0.6);
  position: relative;
  z-index: 2;
}
.item-unknown {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 34px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
}

.build-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.build-slot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.build-slot-info { font-size: 13px; line-height: 1.35; }

.build-abilities { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 13px; }
.build-ability {
  padding: 2px 9px;
  background: rgba(79, 179, 255, 0.12);
  border: 1px solid rgba(79, 179, 255, 0.4);  border-radius: 999px;
  color: var(--int);
}
.build-arrow { color: var(--muted); }

/* Прокачка в руководстве Steam: иконка способности с номером уровня */
.build-ability-step { position: relative; display: inline-block; }
.build-ability-icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: rgba(0, 0, 0, 0.35);
}
.build-ability-lvl {
  position: absolute;
  right: -5px;
  bottom: -5px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  padding: 1px 5px;
  line-height: 1.2;
}

.talent-row {
  display: grid;
  grid-template-columns: 44px 1fr 1fr;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid rgba(58, 42, 47, 0.6);
}
.talent-row:first-of-type { border-top: none; }
.talent-lvl { font-weight: 800; color: var(--gold); text-align: center; }
.talent-side { min-width: 0; }
.talent-name { font-size: 12.5px; margin-bottom: 3px; }
.talent-bar { height: 6px; border-radius: 999px; background: rgba(0, 0, 0, 0.4); overflow: hidden; }
.talent-fill { height: 100%; background: var(--grad); }
.talent-fill.talent-dim { background: rgba(163, 147, 150, 0.55); }

.build-neutrals { display: flex; gap: 18px; flex-wrap: wrap; }
