/* === Стили с index === */

/* === Базовая настройка === */
* {
    cursor: url('/stats/ico/cursor.png'), auto !important;
}

@font-face {
    font-family: 'HeliosCond';
    src: url('../fonts/HeliosCond-bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'HeliosCondC';
    src: url('../fonts/helioscondc-bold-webfont.woff') format('woff');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}
 ::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

body {
    -ms-overflow-style: none;  /* IE/Edge */
    scrollbar-width: none;     /* Firefox */
    color: #cceeff;
    font-family: HeliosCond, sans-serif;
    margin: 0;
    padding: 0;
    background-size: cover;
    background-attachment: fixed;
   
    background-position: top center, bottom center;
    background-repeat: no-repeat, no-repeat;
}

/* === Глобальный контейнер для всего сайта === */

.site-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;margin:0 0 12px;background:rgba(0,64,70,.8);border:1px solid #00ffff33;border-radius:8px}
.topbar-left a.logo{font-weight:700;color:#00ffff;text-decoration:none;letter-spacing:.5px;text-shadow:0 0 6px #00ffff55}
.topbar-right{display:flex;gap:8px;align-items:center}
.btn,button.btn,a.btn{display:inline-flex;align-items:center;gap:6px;border:1px solid #00ffff44;background:#002c30;color:#cceeff;padding:6px 10px;border-radius:6px;text-decoration:none;cursor:pointer}
.btn.secondary{border-color:#557;background:#1e2b31;color:#cbd8e6}

.auth-modal{position:fixed;inset:0;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.6);z-index:9999}
.auth-modal.open{display:flex}
.auth-card{width:min(440px,94vw);background:#022c31;border:1px solid #00ffff55;border-radius:12px;box-shadow:0 0 18px #00ffff33;padding:16px 18px;color:#cceeff}
.auth-card h3{margin:0 0 10px;color:#fff}
.auth-row{display:flex;flex-direction:column;gap:4px;margin-bottom:10px}
.auth-row input{background:#001a1d;color:#cceeff;border:1px solid #00ffff22;border-radius:6px;padding:8px 10px}
.auth-actions{display:flex;justify-content:space-between;gap:8px;margin-top:10px}
/* === Favorites UI === */
.fav-btn {
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px; border-radius:50%;
  font-size:18px; line-height:1; cursor:pointer;
  border:1px solid #00ffff55; background:#003038; color:#ffe38a;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.fav-btn:hover { transform: translateY(-1px); box-shadow: 0 0 8px #00ffff33 inset; }
.fav-btn.is-active { background:#4a3600; border-color:#ffd24d; }
.fav-btn:focus { outline:2px solid #00ffff66; }

.fav-list { display:grid; gap:8px; }
.fav-item {
  display:flex; align-items:center; justify-content:space-between;
  background:#00343a; border:1px solid #00ffff22; border-radius:8px; padding:8px 10px;
}
.fav-link { color:#cceeff; text-decoration:none; font-weight:600; }
.fav-link:hover { text-decoration:underline; }
.fav-remove {
  width:24px; height:24px; border-radius:6px; border:1px solid #ff666655; background:#360909;
  color:#ffaaaa; cursor:pointer; line-height:1;
}
.fav-remove:hover { filter: brightness(1.1); }

/* === Основной контейнер === */
.container {
    width: 90%;
    margin: 20px auto;
    padding: 20px;
    position: relative;
    text-align: left;
}


/* === Заголовки === */
.container h1,
.container h2,
.container h3 {
    color: #00ffff;
    text-shadow: 0 0 5px #00ffff, 0 0 10px #008888;
    margin-top: 0;
    margin-bottom: 10px;
}

/* === Дата/время блока === */
.date {
    color: #66cccc;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

/* === Текст описания === */
.description {
    color: #cceeff;
    font-size: 1rem;
    line-height: 1.4;
}

/* === Ссылки === */
a {
    color: #00ffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
}

a:hover {
    text-decoration: underline;
    text-shadow: 0 0 5px #00ffff;
}
/* === LOADING SCREEN — полноэкранная загрузка === */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;   /* ширина всего экрана */
  height: 100vh;  /* высота всего экрана */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #000; /* чёрный резервный фон под картинкой */
  z-index: 999999;  /* поверх всего */
  overflow: hidden;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}

/* плавное скрытие */
#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
}

/* фоновая картинка — на весь экран */
.loading-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* растягиваем без искажений */
  object-position: center; /* центрируем */
  z-index: 0;
}

/* текст поверх картинки */
.loading-text {
  position: relative;
  z-index: 1;
  font-family: 'HeliosCond', sans-serif;
  font-size: 1.6rem;
  color: #ffffff;
  text-shadow: 0 0 10px #00ffff, 0 0 25px #00ffff77;
  animation: blink 1.5s infinite;
  letter-spacing: 3px;
  text-align: center;
  user-select: none;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* адаптация для маленьких экранов */
@media (max-width: 480px) {
  .loading-text {
    font-size: 1.1rem;
    letter-spacing: 2px;
  }
}


/* === Боковое изображение (например, превью) === */
img.side-image {
    float: right;
    max-width: 120px;
    margin-left: 15px;
    border-radius: 4px;
    box-shadow: 0 0 10px #00ffff55;
}

/* === Глобальный стиль для кнопок === */
button,
input[type="submit"],
input[type="button"],
.filter-container button {

  background: none;
  border: none;
  padding: 0;
  cursor: pointer;

  width: 170px;   
  height: 35px;   
  background-image: url('/stats/ico/Кнопка.png');
  background-repeat: no-repeat;
  background-size: contain;

  font-family: 'HeliosCond', Arial, sans-serif;
  font-size: 1rem;
  color: #D3D3D3;    
  text-shadow: 0 0 2px rgba(255,255,255,0.5);
  text-align: center;
  line-height: 35px; 
}

/* небольшой эффект при наведении */
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
.filter-container button:hover {
  filter: brightness(0.9);
}

/* === Поля ввода === */
input[type="text"],
textarea {
  background: none;
  border: none;
  padding: 0;
  text-align:center;
  width: 1200px;   
  height: 40px;   
  box-sizing: border-box;
  background-image: url('/stats/ico/твнгивг.png');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 0 12px;        
  line-height: 40px;      
  font-family: 'HeliosCond', Arial, sans-serif;
  font-size: 1rem;
  color: #cceeff;
}

textarea {
  height: auto;
  min-height: 80px;      
  line-height: normal;   
  padding: 12px;         
}

/* Ховер/фокус — немного подсветим */
input[type="text"]:focus,
textarea:focus {
  outline: none;
  filter: brightness(1.1);
}

/* === Табы === */
.tabs-wrapper {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
    width: 100%;
    height: auto
}

.tabs {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    max-width:150px;
    gap: 10px;
    width: 160px;
    flex-grow: 0; 
}

.tabs li {
    padding: 10px 15px;
    background: linear-gradient(180deg, #003d40, #002a2d);
    color: #cceeff;
    cursor: pointer;
    border-left: 4px solid transparent;
    border-radius: 4px;
    text-align: left;
    transition: all 0.2s ease;
    box-shadow: inset 0 0 6px #00ffff22;
}

.tabs li:hover {
    background: #004b4f;
}

.tabs li.active {
    background: #00ffff;
    color: #003d40;
    font-weight: bold;
    border-left: 4px solid #00ffff;
    box-shadow: 0 0 10px #00ffff88;
}

/* === Chart wr/hero === */

.hero-labels {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.hero-label {
  text-align: center;
  font-size: 0.8rem;
  color: #15cdf9;
}

.hero-label img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  margin-bottom: 4px;
  box-shadow: 0 0 10px #00ffff66;
}

/* === Подсвеченный текст === */
.highlight {
    color: #00ffff;
    font-weight: bold;
    text-shadow: 0 0 5px #00ffff, 0 0 10px #00ffff;
}

.user-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  max-width: 700px;
  margin: 20px auto;
  padding: 10px;
  background: rgba(0, 30, 33, 0.75);
  border-radius: 6px;
  box-shadow: 0 0 8px #00ffff22;
}

.user-item {
  display: block;
  padding: 8px 12px;
  background: #003840;
  border: 1px solid #00a8cc44;
  border-radius: 4px;
  color: #00ffff;
  text-align: center;
  text-decoration: none;
  font-weight: bold;
  transition: all 0.2s ease;
}

.user-item:hover {
  background: #005f6f;
  color: #ffffff;
  box-shadow: 0 0 6px #00ffff66;
}

	/* ===== Избранные ===== */

/* контейнеры на главной (#fav-main-list) и во вкладке (#fav-tab-list) */
#fav-main-list,
#fav-tab-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* две колонки */
  gap: 10px;
  margin: 10px 0;
  padding: 0;
}

/* карточка избранного */
.fav-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(145deg, #002b30, #003a44);
  border: 1px solid #00ffff44;
  border-radius: 10px;
  padding: 8px 10px;
  color: #cceeff;
  font-family: HeliosCond, sans-serif;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fav-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.45);
}

/* ссылка с ником */
.fav-link {
  flex: 1;
  color: #00f7ff;
  text-decoration: none;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding-right: 6px;
}

.fav-link:hover {
  text-decoration: underline;
  color: #00ffff;
}

/* кнопка удалить */
.fav-remove {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: #ff4444cc;
  color: #fff;
  font-weight: bold;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
}

.fav-remove:hover {
  background: #ff2222;
  transform: scale(1.1);
}

.fav-remove:active {
  transform: scale(0.95);
}

/* для пустого списка */
#fav-main-list > div,
#fav-tab-list > div {
  grid-column: span 2;
  text-align: center;
  color: #89a;
  font-size: 14px;
}

/* Ряд коронок внизу вкладки "Информация" */
.server-tops-inline{
  display:flex;
  flex-wrap:nowrap;
  justify-content:space-between;
  align-items:flex-start;
  gap:28px;
  max-width:1100px;
  margin:10px auto;
}
.server-tops-inline--bottom{ margin:26px auto 6px; }

/* немножко подровнять уже существующий .server-top для режима "inline" */
.server-tops-inline .server-top{
  margin:0;
  align-items:center;          
}
.server-tops-inline .server-top-caption{
  align-items:center;          
  text-align:center;
  padding-left:0;
}
.server-tops-inline--bottom {
  margin-top: 120px; 
  padding-bottom: 20px;
}

/* === поиск === */
.search-block-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 20px;
  text-align: center;
}

.welcome-message {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 15cqh;
  margin-bottom: 15px;
  font-size: 1.1rem;
  color: #ffffff;
  line-height: 1.4;
  text-align: center;
}

.search-form {
  display: flex;
  padding-left:55cqh;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  justify-content: flex-end;
  width: 100%;
  max-width: 650px;
}

.search-form input[type="text"] {
  width: 100%;
  max-width: 800px;
  height: 40px;
  background: none;
  border: none;
  padding: 0 12px;
  background-image: url('/stats/ico/твнгивг.png');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  color: #cceeff;
  text-align: center;
  font-family: 'HeliosCond', Arial, sans-serif;
  font-size: 1rem;
  line-height: 40px;
  box-sizing: border-box;
}

.search-form button {
  width: 100px;
  height: 34px;
  background-image: url('/stats/ico/Кнопка.png');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  border: none;
  padding: 0;
  color: #e0e0e0;
  font-weight: bold;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-banner {
  width: 100%;
  max-width: 700px;
  aspect-ratio: 16/7;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  margin: 20px auto 0;
}

/* === Стили фильтра === */
.filter-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(0, 30, 33, 0.85);
    border: 1px solid #00ffff22;
    border-radius: 6px;
    box-sizing: border-box;
    width: 100%;
}

.filter-container .filter-label {
    color: #00ffff;
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
    margin-right: 6px;
}

.filter-container .filter-select {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #00ffff22;
    background: #002c30;
    color: #cceeff;
    font-size: 0.9rem;
}

/* === Карточка мача === */
.matches-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr); /* ⬅️ было 4 → стало 6 */
  gap: 10px;
  margin-top: 1rem;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0 0 8px rgba(0, 173, 239, 0.2);
  width: 100%;
  max-width: 1200px;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  border: 2px solid #00a8cc;
}

.match-card {
  background: rgba(0, 30, 33, 0.95);
  border-radius: 8px;
  padding: 10px;
  text-align: center;
  box-shadow: 0 0 6px #00ffff33;
  transition: transform 0.2s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 90%;
}

.match-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 12px rgba(0, 173, 239, 0.4);
}

.match-card img {
    width: 60%;
    height: auto;
    border-radius: 4px;
    margin: 0 auto 8px;
}

.match-card .mode {
    font-size: 0.8em;
    margin-top: 5px;
    color: #00a8cc;
    font-weight: bold;
}

.match-card.win .mode {
    color: #00ff00;
}

.match-card.loss .mode {
    color: #ff0000;
}

.match-card .win-loss {
    font-size: 0.75em;
    margin-top: 2px;
    font-weight: bold;
}

.match-card .rating {
    font-size: 0.7em;
    margin-top: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.match-card.win .rating {
    color: #00ff00;
}

.match-card.win .rating::after {
    content: "+";
    color: #00ff00;
    font-size: 1.2em;
    margin-left: 2px;
}

.match-card.loss .rating {
    color: #ff0000;
}

.match-card.loss .rating::after {
    content: "-";
    color: #ff0000;
    font-size: 1.2em;
    margin-left: 2px;
}

.match-card a {
  background-image: url('/stats/ico/Кнопка.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
  color: #e0e0e0;
  border: none;
  padding: 6px 12px;
  font-weight: bold;
  font-size: 0.85rem;
  text-align: center;
  cursor: pointer;
}

.match-card a:hover {
    background: #003d40;
    box-shadow: 0 0 5px #00a8cc;
}

.matches-grid .empty {
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    font-size: 0.9rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    box-shadow: inset 0 0 4px #3a4f55;
    border: 1px solid #00a8cc;
}

/* === Match Details === */
.match-details {
  width: 95%;
  max-width: 1000px;
  margin: 20px auto;
  padding: 15px;
  background: rgba(0, 30, 33, 0.85);
  border: 1px solid #00ffff55;
  border-radius: 6px;
  box-shadow: 0 0 10px #00ffff33;
  color: #cceeff;
}

/* Назад кнопка */
.back-button a {
  display: inline-block;
  background-color: #003f4f;
  color: #00ffff;
  font-weight: bold;
  padding: 8px 14px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 0 10px #00ffff44;
  transition: background-color 0.3s, transform 0.2s;
}
.back-button a:hover {
  background-color: #005f6f;
  transform: translateY(-1px);
  color: #ffffff;
}

/* Заголовки */
.match-title {
  color: #00ffff;
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 10px;
  text-shadow: 0 0 5px #00ffff;
}
.match-date {
  color: #66cccc;
  font-size: 0.9rem;
  text-align: center;
  margin-bottom: 15px;
  opacity: 0.8;
}

/*Party*/
/* ==== PARTY / ГРУППЫ В ДЕТАЛЯХ МАТЧА ==== */

.party-group{
  border:1px solid #00ffff33;
  background: rgba(0,64,70,.45);
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 10px;
}
.party-group.is-user-party{
  box-shadow: 0 0 0 2px rgba(0,255,200,.25) inset;
}
.party-header{
  display:flex; align-items:center; gap:8px; justify-content:space-between;
  margin-bottom: 6px;
}
.party-badge{
  display:inline-block; padding:2px 8px; border-radius:999px;
  border:1px solid #34e1e1; color:#cfffff; font-weight:700; font-size:.92rem;
  background: rgba(0,160,160,.15);
}
.party-badge.solo{
  border-color:#6aa; color:#d9f7ff; background: rgba(90,120,130,.15);
}
.party-count{ color:#9fe; font-size:.9rem }

.player-card{
  display:flex; gap:8px; align-items:center;
  border:1px solid #00ffff22; border-radius:8px; padding:6px 8px;
  background:#002e33; margin-top:6px;
}

/* Контейнер для двух колонок */
.team-columns-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

/* Одна команда */
.team-column {
  flex: 1 1 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Заголовок команды */
.team-title {
  text-align: center;
  font-weight: bold;
  padding: 6px;
  border-radius: 4px;
  font-size: 1rem;
}
.team-title.win {
  background-color: #0a3012;
  color: #00ff88;
}
.team-title.loss {
  background-color: #3b1111;
  color: #ff6666;
}

/* Карточка игрока */
.player-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid #005d66;
  border-left: 4px solid #00ffff99;
  border-radius: 6px;
  padding: 6px 10px;
  box-shadow: inset 0 0 6px #00ffff22;
}

/* Герой */
.hero-avatar {
  width: 40px;
  height: 40px;
  border-radius: 5px;
  object-fit: cover;
  border: 1px solid #00ffff88;
}

/* Инфо игрока */
.player-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.player-name {
  font-size: 0.95rem;
  font-weight: bold;
  color: #00e0ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-line {
  font-size: 0.78rem;
  color: #b0eaff;
}

.afk-yes {
  color: #ff4444;
  font-weight: bold;
}
.afk-no {
  color: #88ff88;
}

.stat-kills {
  color: #00ff99;
}
.stat-deaths {
  color: #ff8888;
}
.stat-assists {
  color: #ffc800;
  font-weight: bold;
}
.stat-corner-horizontal {
    position: absolute;
    top: 6px;
    right: 8px;
    display: flex;
    flex-direction: row;
    gap: 10px;
    z-index: 1;
}
.stat-combat-row {
  position: absolute;
  top: 6px;
  right: 10px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.stat-icon-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.78rem;
}

.stat-icon {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.no-players {
  text-align: center;
  color: #aaa;
  font-size: 0.8rem;
  margin-top: 10px;
}

/* === шото типа клана === */
.profile-header .clan {
    color: #00c2c2;
    font-size: 1rem;
}

.profile-header .clan.dokty {
    color: #ff5555;
}

.profile-header .clan.adornya {
    color: #55ff55;
}
.hero-left-wrap {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 20px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.hero-percent-chart {
  width: 320px;
  background: rgba(0, 64, 70, 0.85);
  padding: 10px;
  border-radius: 10px;
  box-shadow: inset 0 0 8px #00ffff33;
  flex-shrink: 0;
  margin-left: 0;
}

.hero-info-block {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.achievements .summary p {
    margin: 0;
    font-size: 0.9rem;
    color: #cceeff;
}
.stats-summary div {
    background: #003d40;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 1rem;
    box-shadow: inset 0 0 5px #00ffff22;
    min-height: 60px;
    display: flex;               
    flex-direction: column;      
    justify-content: center;     
    align-items: center;         
    text-align: center;      
}

.stats-summary .label {
    font-weight: bold;
    color: #00ffff;
    font-size: 0.75rem;
    margin-bottom: 2px;
}

.stats-summary .value {
    margin-top: -10px;
    font-size: 1rem;
    color: #ffffff;
    line-height: 1.2;
}

.stats-summary .date-value {
    font-size: 1.3rem;
    color: #00ffff;
    text-align: center;
    padding: 10px;
    background: rgba(0, 30, 33, 0.85);
    border-radius: 4px;
    box-shadow: inset 0 0 5px #00ffff22;
}

.progress-bar {
    width: 100%;
    background-color: #003d40;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 5px;
}

.progress {
    height: 20px;
    text-align: right;
    padding-right: 5px;
    color: #fff;
    line-height: 20px;
    border-radius: 4px;
}

.progress.win {
    background-color: #00ff00;
}

.progress.loss {
    background-color: #ff0000;
}

/* === Ачивки блок === */
.achievements h3 {
    color: #00ffff;
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #00ffff99;
}

.achievements .summary {
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    background: rgba(0, 30, 33, 0.85);
}

/* Стили для любимого героя */
.favorite-hero {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    background: rgba(0, 173, 239, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #00ffff33;
    box-shadow: 0 0 10px #00ffff22;
}

.hero-img {
    width: 60px;
    height: auto;
    border-radius: 4px;
}

.rank-img {
    width: 18px;
    height: auto;
    vertical-align: middle;
}

/* Стили для сетки достижений */
.achievement-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 64px;
  height: 64px;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  text-align: center;
  padding: 6px 4px 4px;
  box-sizing: border-box;
}

.achievement-card.locked .ach-lock {
    width: 24px;
    height: 24px;
    opacity: 0.7;
}

.achievement-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 8px #00ffff88;
}

.achievement-card img {
  width: 32px;
  height: 32px;
  object-fit: contain;
  margin-bottom: 2px;
  border-radius: 4px;
}

.achievement-card p {
  font-size: 0.55rem;
  color: #00ffff;
  font-weight: bold;
  line-height: 1.1;
  word-wrap: break-word;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-achievement {
    font-size: 1rem;
    color: #666;
    font-weight: bold;
}

/* Стили для рамки статистики */
.stats-frame {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: center;
    align-items: center;
    background: rgba(0, 30, 33, 0.85);
    border: 1px solid #00ffff33;
    border-radius: 8px;
    box-shadow: 0 0 8px #00ffff22;
    max-width: 300px;
    margin: 10px auto;
}

.stats-frame p {
    margin: 0;
    font-size: 0.9rem;
    color: #cceeff;
}

/* Стили для заголовка достижений */
.achievements h3 {
    color: #00ffff;
    font-size: 1.2rem;
    margin-bottom: 10px;
    text-shadow: 0 0 5px #00ffff99;
    text-align: center;
}

/* контейнер-сетка (ПК) */
.heroes-grid{
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(140px,1fr));
  gap:12px;
  justify-items:center;
  padding:12px;
  max-width:1200px;
  margin:0 auto;
  background: rgba(0,30,33,0.85);
  border-radius:6px;
  box-shadow:0 0 10px #00ffff33;
}

/* карточка (без фиксированной ширины) */
.hero-card{
  width:auto;
  background: linear-gradient(145deg,#002d2f,#004146);
  border-radius:18px;
  padding:12px;
  box-shadow:0 0 12px rgba(0,173,239,.3);
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  align-items:center;
  overflow:hidden;
  min-width:0;
  transition:transform .2s ease, box-shadow .2s ease;
}
.hero-card:hover{ transform:translateY(-5px); box-shadow:0 0 15px rgba(0,173,239,.5); }

/* изображение героя */
.hero-img{ width:68px; height:auto; border-radius:8px; margin-bottom:8px; }
.hero-img--round{ border-radius:50%; }

/* текстовые блоки */
.hero-info{ text-align:center; width:100%; min-width:0; overflow:hidden; }
.hero-name{
  font-size:1rem; font-weight:700; color:#fff; margin-bottom:4px;
  max-width:100%; word-wrap:break-word; word-break:break-word;
}
.hero-rating, .hero-wr, .hero-games{
  font-size:.9rem; color:#b6ecf9; margin-bottom:2px;
}
.rank-icon{ width:20px; vertical-align:middle; margin-right:4px; }

/* === Мобильная адаптация === */
@media (max-width: 900px){
  .heroes-grid{
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap:8px;
    padding:8px;
  }

  .hero-card{ padding:10px; border-radius:12px; }
  .hero-img{ width:72%; height:auto; margin-bottom:6px; }
  .hero-name{ font-size:.95rem; }
  .hero-rating, .hero-wr, .hero-games{ font-size:.85rem; }
}

/* === Блок элементов графиков === */
.charts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.charts-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
    justify-items: center;
}

.chart {
    width: 120px;
    height: 120px;
    position: relative;
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    padding: 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.chart canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    background-color: transparent;
}

.chart .total {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: #fff;
    z-index: 1;
}

.chart .legend {
    margin-top: 10px;
    font-size: 0.8rem;
    color: #cceeff;
}

.chart-container {
    margin-top: 10px;
    background-color: #002c30;
    border-radius: 8px;
    padding: 10px;
    width: 180px;
    height: 180px;
    box-shadow: inset 0 0 6px #00ffff33;
}

.win-loss-chart .total {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: #fff;
    z-index: 1;
}

.charts > div:nth-child(2) {
    width: 100%;
    max-height: 300px;
}
.wl-toolbar{
  display:flex; justify-content:flex-start; margin:8px 0;
}
.wl-left{
  display:grid; grid-auto-flow:column; gap:10px;
}

/* Пилюльные кнопки */
.wl-btn{
  -webkit-tap-highlight-color: transparent;
  appearance: none;
  border: 0;
  border-radius: 12px;                 /* как на скрине */
  padding: 8px 14px;
  min-width: 96px;                     /* чуть выровнять ширину */
  font-weight: 700;                    /* полужирный как на скрине */
  color: #d9e2ec;
  background: rgba(255,255,255,.06);   /* мягкая подложка */
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.08),
    0 1px 0 rgba(0,0,0,.25);
  cursor: pointer;
  transition: background .15s ease, box-shadow .15s ease, transform .02s ease;
}
.wl-btn:hover{
  background: rgba(255,255,255,.10);
}
.wl-btn:active{
  transform: translateY(1px);
}

/* Выбранная */
.wl-btn.active,
.wl-btn[aria-pressed="true"]{
  background: rgba(0,247,255,.18);
  box-shadow:
    inset 0 0 0 2px rgba(0,247,255,.35),
    0 1px 0 rgba(0,0,0,.25);
  color:#eef7fa;
}

/* Видимый фокус по WCAG 2.4.7 */
.wl-btn:focus-visible{
  outline: 3px solid #00f7ff;         /* чёткий маркер фокуса */
  outline-offset: 2px;
  /* можно оставить background как есть — контраст достаточный */
}

/* На узких экранах — если надо в строку с переносом */
@media (max-width: 480px){
  .wl-left{ grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .wl-btn{ width: 100%; min-width: 0; }
}

/* === Дополнительно — выравнивание элементов в профиле === */
.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    background: rgba(0, 30, 33, 0.75);
    border-radius: 4px;
    margin-bottom: 15px;
}

.profile-header .username {
    font-size: 1.2rem;
    font-weight: bold;
    color: #00ffff;
}

.profile-header .clan {
    color: #00c2c2;
    font-size: 1rem;
}

.profile-header .role {
    color: #99dddd;
    font-size: 0.9rem;
}

/* ====== Табы и поиск на мобильных ====== */
@media (max-width: 900px){
  .tabs-wrapper{
    flex-direction: column;
    gap: 12px;
  }
  .tabs{
    flex-direction: row;
    width: 100%;
    max-width: none;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
  }
  .tabs li{
    flex: 0 0 auto;
    white-space: nowrap;
  }
  
  /* Поиск + недавние в одну линию */
.search-row{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  gap:12px;
  margin: 6px 0 10px;
}

.search-form{
  display:flex;
  gap:8px;
  align-items:center;
}

/* Блок "Недавно смотрели" справа от кнопки */
.recent-box{
  min-width: 240px;
  max-width: 280px;
  background: rgba(0,64,70,.7);
  border: 1px solid #00ffff33;
  border-radius:8px;
  padding:8px 10px;
}

.recent-title{
  color:#00ffff;
  font-weight:700;
  margin-bottom:6px;
  text-align:center;
}

.recent-list{
  display:grid;
  gap:6px;
}

.recent-item{
  display:flex;
  align-items:center;
  gap:8px;
  background:#002b30;
  border:1px solid #00ffff22;
  border-radius:6px;
  padding:6px 8px;
}

.recent-item__avatar{
  width:28px; height:28px; border-radius:50%;
  object-fit:cover;
  background:#01363a;
}

.recent-item__name{
  color:#cceeff;
  text-decoration:none;
  font-weight:600;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}

.recent-item__open{
  margin-left:auto;
  font-size:.85rem;
  color:#88e;
  text-decoration:underline;
}

@media (max-width: 900px){
  .search-row{ flex-direction:column; align-items:center; }
  .recent-box{ width:100%; max-width:520px; }
}

	

  .search-form{
    padding-left: 0 !important;
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  .search-form input[type="text"]{
    max-width: none;
    width: 100%;
  }
  .search-form button{
    flex: 0 0 88px;
  }
}

/* для очень узких экранов уберём любые глобальные масштабирования */
@media (max-width: 420px){
  html{ transform: none !important; transform-origin: initial !important; }
  .container{ width:100vw; max-width:100%; margin:0; padding:8px; }
}

/* ====== Герои: адаптивная сетка + скролл на телефонах ====== */

/* desktop: как и было — auto-fill */
.heroes-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px,1fr));
  gap: 12px;
  justify-items: center;
}

/* планшеты */
@media (max-width: 1200px){
  .heroes-grid{
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
    padding: 10px;
  }
}

/* телефоны — 3 колонки, БЕЗ скрытия карточек; вместо этого даём скролл */
@media (max-width: 900px){
  .heroes-grid{
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 8px;
    padding: 8px;
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* не прячем элементы, убери старые правила с :nth-child */
  .heroes-grid .hero-card{ display: flex !important; }

  .hero-card{ padding: 10px; border-radius: 10px; }
  .hero-card img{ width: 72%; height: auto; margin-bottom: 5px; } /* базовое для главного изображения героя */

  .hero-card .rank-icon,
  .hero-card .rank-img,
  .hero-card img.rank-icon,
  .hero-card img.rank-img,
  .hero-card img[alt*="ранг"],
  .hero-card img[alt*="Ранг"],
  .hero-card img[alt*="rank"]{
    width: 26px !important;
    height: auto !important;
    display: block;
    margin: 2px auto 4px !important;
  }

  /* если ранг — это полоска/шеврон фоном */
  .hero-card .rank,
  .hero-card .rank-strip{
    width: 32px !important;
    height: 5px !important;
    background-size: 100% 100% !important;
    background-repeat: no-repeat !important;
    display: block;
    margin: 2px auto 4px !important;
  }

  .hero-card .hero-name{ font-size: 0.9rem; }
  .hero-card .hero-rating,
  .hero-card .hero-wr,
  .hero-card .hero-games{ font-size: 0.85rem; }
}

/* очень узкие телефоны — 2 колонки, всё так же листается скроллом */
@media (max-width: 420px){
  .heroes-grid{
    grid-template-columns: repeat(2, minmax(0,1fr));
    max-height: calc(100vh - 240px);
  }

  .hero-card .rank-icon,
  .hero-card .rank-img,
  .hero-card img.rank-icon,
  .hero-card img.rank-img,
  .hero-card img[alt*="ранг"],
  .hero-card img[alt*="Ранг"],
  .hero-card img[alt*="rank"]{
    width: 22px !important;
    margin: 2px auto 3px !important;
  }
  .hero-card .rank,
  .hero-card .rank-strip{
    width: 28px !important;
    height: 4px !important;
  }
}

/* ====== История матчей: как на скрине, без скрытия карточек ====== */

/* планшеты */
@media (max-width: 1200px){
  .matches-grid{
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
    padding: 10px;
  }
}

/* телефоны — 3 колонки, максимум 9 элементов */
@media (max-width: 900px){
  .heroes-grid{
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 8px;
    padding: 8px;
    max-height: calc(190vh - 460px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* показываем только первые 9 карточек */
  .heroes-grid .hero-card:nth-child(n+100) {
    display: none !important;
  }

  .hero-card{ padding: 10px; border-radius: 10px; }
  .hero-card img{ width: 72%; height: auto; margin-bottom: 5px; }

  /* дублируем уменьшение ранга в этом media на случай порядка подключений */
  .hero-card .rank-icon,
  .hero-card .rank-img,
  .hero-card img.rank-icon,
  .hero-card img.rank-img,
  .hero-card img[alt*="ранг"],
  .hero-card img[alt*="Ранг"],
  .hero-card img[alt*="rank"]{
    width: 26px !important;
    height: auto !important;
    display: block;
    margin: 2px auto 4px !important;
  }
  .hero-card .rank,
  .hero-card .rank-strip{
    width: 32px !important;
    height: 5px !important;
    margin: 2px auto 4px !important;
  }

  .hero-card .hero-name{ font-size: 0.9rem; }
  .hero-card .hero-rating,
  .hero-card .hero-wr,
  .hero-card .hero-games{ font-size: 0.85rem; }
}

html, body { overflow-x: hidden; }

@media (max-width: 480px){
  .tabs-wrapper{
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    padding-left: 10px;
  }
  .search-form{
    order: -1;
    width: 100%;
    margin: 0;
    display: flex;
    gap: 6px;
  }
  .search-form input[type="text"]{
    flex: 1 1 auto;
    min-width: 0;
    height: 36px;
    font-size: 0.95rem;
    background-size: 100% 100%;
  }
  .search-form button{
    flex: 0 0 auto;
    height: 36px;
    font-size: 0.95rem;
    padding: 0 12px;
  }
}

/* === Масштабирование контейнера (а НЕ body) для разных узких ширин === */
@media (max-width: 414px){
  .container{
    transform: scale(0.92);
    transform-origin: top center;
    width: calc(100% / 0.92);
    margin: 0 auto;
  }
}
@media (max-width: 390px){
  .container{
    transform: scale(0.88);
    transform-origin: top center;
    width: calc(100% / 0.88);
    margin: 0 auto;
  }
}
@media (max-width: 375px){
  .container{
    transform: scale(0.84);
    transform-origin: top center;
    width: calc(100% / 0.84);
    margin: 0 auto;
  }
}
@media (max-width: 360px){
  .container{
    transform: scale(0.80);
    transform-origin: top center;
    width: calc(100% / 0.80);
    margin: 0 auto;
  }
}

/* ===== Ограничение для очень узких телефонов (макс. 2x3) ===== */
@media (max-width: 420px) {
  body {
    transform: scale(0.68);
    transform-origin: top center;
  }
  html, body {
    width: 140%;
    overflow-x: hidden;
  }
  .matches-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
  .matches-grid .match-card:nth-child(n+7),
  .matches-grid .empty:nth-child(n+7) {
    display: none !important;
  }
  .match-card {
    padding: 6px !important;
    min-height: 190px !important;
  }
  .match-card img {
    width: 60% !important;
    margin-bottom: 4px !important;
  }
  .match-card .mode,
  .match-card .win-loss,
  .match-card .rating,
  .match-card .match-date {
    font-size: 11px !important;
    line-height: 1.15 !important;
  }
  .match-card a {
    font-size: 12px !important;
    padding: 5px 8px !important;
  }
}

/* === ЦЕНТРУЕМ ПОИСК И ОГРАНИЧИВАЕМ ШИРИНУ РЕЗУЛЬТАТОВ (ВСТАВЛЕНО) === */
:root { 
  --search-max: 700px; /* меняй одно число — синхронно подстроятся поиск и список ников */
}

/* форма поиска строго по центру и единой ширины */
.search-form{
  padding-left: 0 !important;
  justify-content: center !important;
  width: 100%;
  max-width: var(--search-max) !important;
  margin: 24px auto 14px !important;
  gap: 10px;
}

/* поле растягивается, кнопка — фикс */
.search-form input[type="text"]{
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
}
.search-form button{
  flex: 0 0 100px;
}

/* контейнер с найденными никами — не шире поиска и по центру */
.search-block-wrapper .user-grid{
  width: 100%;
  max-width: var(--search-max);
  margin: 0 auto !important;
  box-sizing: border-box;
}

/* сетка никнеймов адаптивная, но в пределах контейнера */
.user-grid{
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  overflow: hidden;
}

/* чипы-ники ужимаются по тексту, длинные — с троеточием */
.user-item{
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* мобильный вид: ширина берётся от экрана, но список не шире поиска */
@media (max-width: 640px){
  :root { --search-max: 92vw; }
  .search-form button{ flex-basis: 88px; }
}

.achievements-grid.left{
  margin-left: -16px;
}
/* Базовая карточка */
.achievement-card{
  position: relative;
  width: 88px;         
  height: 88px;
  margin: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Круглая фигура с иконкой */
.achievement-card .ach-figure{
  position: relative;
  width: 72px;        
  height: 72px;
  border-radius: 999px;
  display: grid;
  place-items: center;
}
.achievement-card .ach-figure img,
.achievement-card .ach-figure .ach-fallback{
  width: 72px;
  height: 72px;
  border-radius: 999px;
  display: block;
}

/* Серость только для закрытых */
.achievement-card.is-locked img { filter: grayscale(100%) saturate(0) opacity(.55); }
.achievement-card.is-locked .ach-fallback { opacity:.6; }

/* Кольцевой прогресс вокруг иконки */
.achievement-card .ach-ring{
  position: absolute;
  inset: -4px;             
  width: 80px;             
  height: 80px;
  transform: rotate(-90deg); 
  pointer-events: none;
}
.achievement-card .ach-ring .ring-bg{
  fill: none;
  stroke: rgba(255,255,255,.18);
  stroke-width: 8;
}
.achievement-card .ach-ring .ring-fg{
  fill: none;
  stroke-width: 8;
  stroke-linecap: round;
 
  stroke: #ff33cc;
  transition: stroke-dashoffset .35s ease;
}

/* Центрированный текст процента */
.achievement-card .ach-center{
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  color: #eaf3ff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
  pointer-events: none;
}

/* Небольшие метки статуса (отцентрованные визуально) */
.achievement-card .ach-open-label,
.achievement-card .ach-locked-label{
  position: absolute;
  top: -4px;
  left: 50%;
  transform: translateX(-50%);
  padding: 2px 6px;
  font-size: 10px;
  line-height: 1;
  border-radius: 999px;
  background: rgba(0, 0, 0, .5);
  color: #cceeff;
  white-space: nowrap;
  pointer-events: none;
}
.achievement-card .ach-locked-label:empty{ display:none; } /* когда показываем только кольцо и проценты */

/* Чуть реакций при ховере у закрытых, без «раскраски» */
.achievement-card.is-locked:hover img{
  filter: grayscale(100%) saturate(0) opacity(.68) drop-shadow(0 2px 6px rgba(0,255,255,.15));
}


