/* СТИЛИ В СТИЛЕ НОВОЙ СТРАНИЦЫ */
:root {
  --neon-blue: #00f3ff;
  --neon-pink: #ff00ff;
   --col-rank: 50px;
    
  --col-zvan: 70px;
  
  --col-name: auto;
     --col-elite: 20px;
  --col-result: 80px;
  --col-weight: 70px;
  --col-date: 100px;
  --col-er: 70px;
  --col-right: 70px;
  --col-left: 70px;
    --cell-padding: 10px 8px;
 
  --header-padding: 12px 8px;
  --neon-purple: #9d00ff;
  --dark-bg: #0a0a14;
  --darker-bg: #050510;
  --text-glow: 0 0 10px currentColor;
  --green: #00ff00;
  --b: #00f3ff; --p: #ff00ff; --r: #00ff00; --d: #0a0a14;
  --g: rgba(0,243,255,0.1); --c: 0 0 2px currentColor, 0 0 5px currentColor; --h: 44px;

    --cell-padding: 10px 8px;

  --header-padding: 12px 8px;
}

/* ЗАГРУЗКА ШРИФТА */
@font-face {
  font-family: 'Disket Mono';
  src: url('https://grippermania.ru/fonts/Disket-Mono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Disket Mono';
  src: url('https://grippermania.ru/fonts/Disket-Mono-Regular.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Disket Mono';
  src: url('https://grippermania.ru/fonts/Disket-Mono-Regular.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* RESET CSS */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Disket Mono', monospace;
  background-color: var(--dark-bg);
  color: var(--neon-blue);
  position: relative;
  overflow-x: hidden;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  line-height: 1.5;
}

/* Скрытый заголовок для доступности */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* СТИЛИ НАВИГАЦИИ */
.main-nav { 
    background: rgba(10,10,20,0.9); 
    padding: 1rem; 
    border-bottom: 2px solid var(--b); 
    box-shadow: 0 0 10px var(--b); 
    backdrop-filter: blur(10px); 
    z-index: 1000; 
    position: relative;
    width: 100%;
}

.nav-container {
    position: relative;
}

.nav-list { 
    display: flex; 
    list-style: none; 
    gap: 1.5rem; 
    margin: 0 auto; 
    justify-content: center; 
    position: relative;
    flex-wrap: wrap;
    align-items: center;
}

.nav-item { position: relative; }

.nav-link { 
    color: var(--b); 
    text-decoration: none; 
    padding: 0.5rem 1rem; 
    display: block; 
    transition: all 0.3s ease; 
    position: relative; 
    text-transform: uppercase;
    white-space: nowrap;
    font-size: 1rem;
    line-height: 1.4;
}

.nav-link::before { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 0; 
    height: 2px; 
    background: var(--r); 
    transition: width 0.3s ease; 
}

.nav-link:hover, .nav-link:focus { 
    color: var(--r); 
    text-shadow: 0 0 2px var(--r); 
    outline: none;
}

.nav-link:hover::before, .nav-link:focus::before { 
    width: 100%; 
}

/* Выпадающее меню */
.dropdown-menu { 
    display: none;
    position: absolute; 
    background: rgba(10,10,20,0.95); 
    list-style: none; 
    min-width: 220px; 
    top: 100%; 
    left: 50%;
    transform: translateX(-50%);
    border: 1px solid var(--b); 
    box-shadow: 0 0 15px var(--b); 
    backdrop-filter: blur(10px); 
    z-index: 1100;
    border-radius: 0 0 8px 8px;
}

.nav-item:hover .dropdown-menu { display: block; }

.dropdown-menu .nav-link {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid rgba(0,243,255,0.1);
}

.dropdown-menu .nav-link:last-child { border-bottom: none; }
.dropdown-menu .nav-link:hover { background: rgba(0,243,255,0.1); }

/* Мобильная навигация */
.mobile-header {
    display: none;
    background: rgba(10,10,20,0.9);
    padding: 10px 15px;
    border-bottom: 2px solid var(--b);
    box-shadow: 0 0 10px var(--b);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1000;
    width: 100%;
}

.mobile-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.page-title {
    color: var(--b);
    font-size: 1.2rem;
    text-transform: uppercase;
    font-weight: bold;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}

.hamburger-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    margin-left: auto;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: var(--b);
    border-radius: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 0 5px var(--b);
}

.hamburger-menu.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10,10,20,0.98);
    z-index: 999;
    padding: 80px 20px 20px;
    overflow-y: auto;
}

.mobile-nav.active { display: block; animation: fadeIn 0.3s ease; }

.mobile-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-nav-item { border-bottom: 1px solid rgba(0,243,255,0.2); }

.mobile-nav-link {
    display: block;
    color: var(--b);
    text-decoration: none;
    padding: 15px 10px;
    font-size: 1.1rem;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover, .mobile-nav-link:focus {
    color: var(--r);
    background: rgba(0,243,255,0.1);
}

.mobile-dropdown {
    display: none;
    background: rgba(20,20,30,0.8);
    border-left: 2px solid var(--b);
    margin-left: 15px;
}

.mobile-dropdown.active { display: block; }

.mobile-dropdown-link {
    display: block;
    color: var(--b);
    text-decoration: none;
    padding: 12px 20px;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0,243,255,0.1);
}

.mobile-dropdown-link:last-child { border-bottom: none; }

.mobile-dropdown-link:hover, .mobile-dropdown-link:focus {
    color: var(--r);
    background: rgba(0,243,255,0.1);
}

.mobile-nav-toggle {
    background: none;
    border: none;
    color: var(--b);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
    margin-left: auto;
}

/* СТИЛИ ПЕРЕКЛЮЧАТЕЛЯ ЯЗЫКА */
.desktop-language-switcher {
    position: relative;
    margin-left: 20px;
}

.desktop-lang-btn {
    background: transparent;
    color: var(--b);
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-family: inherit;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    min-width: 60px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
    line-height: 1.4;
    text-transform: uppercase;
}

.desktop-lang-btn::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 4px;
}

.desktop-lang-btn:hover,
.desktop-lang-btn:focus {
    box-shadow: 0 0 8px var(--b);
    background-color: rgba(0,243,255,0.1);
    outline: none;
}

.desktop-lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(10,10,20,0.95);
    border: 1px solid var(--b);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--b);
    z-index: 1002;
    min-width: 60px;
    margin-top: 5px;
}

.desktop-lang-dropdown.active {
    display: block;
}

.desktop-lang-option {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--b);
    padding: 8px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    text-transform: uppercase;
}

.desktop-lang-option:hover,
.desktop-lang-option:focus {
    background: rgba(0,243,255,0.1);
    outline: none;
}

.mobile-language-switcher {
    position: relative;
    margin-right: 10px;
}

.mobile-lang-btn {
    background: transparent;
    color: var(--b);
    border: none;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: none;
    min-width: 50px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 100%;
    line-height: 1.4;
    text-transform: uppercase;
}

.mobile-lang-btn::after {
    content: '▼';
    font-size: 0.6rem;
    margin-left: 3px;
}

.mobile-lang-btn:hover,
.mobile-lang-btn:focus {
    box-shadow: 0 0 8px var(--b);
    background-color: rgba(0,243,255,0.1);
    outline: none;
}

.mobile-lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(10,10,20,0.95);
    border: 1px solid var(--b);
    border-radius: 4px;
    box-shadow: 0 0 10px var(--b);
    z-index: 1002;
    min-width: 50px;
    margin-top: 5px;
}

.mobile-lang-dropdown.active {
    display: block;
}

.mobile-lang-option {
    display: block;
    width: 100%;
    background: transparent;
    border: none;
    color: var(--b);
    padding: 8px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.mobile-lang-option:hover,
.mobile-lang-option:focus {
    background: rgba(0,243,255,0.1);
    outline: none;
}

/* Основной контент */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 5px;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    width: 100%;
    min-height: calc(100vh - 140px);
}

/* Заголовок страницы */
.page-header {
    text-align: center;
    margin-bottom: 20px;
    padding: 0 10px;
}

.page-header h1 {
    color: var(--neon-blue);
    font-size: 2rem;
    text-transform: uppercase;
    text-shadow: 0 0 10px var(--neon-blue);
    margin-bottom: 10px;
}

.page-header p {
    color: var(--neon-blue);
    font-size: 1rem;
    opacity: 0.8;
}

/* Кастомные табы */
.vg-tabs {
  font-family: 'Disket Mono', monospace;
  border-bottom: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  padding: 5px;
  margin-bottom: 10px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  font-size: 0.9rem;
}

.vg-tab {
  font-family: inherit;
  color: var(--neon-blue);
  background: rgba(20, 20, 40, 0.7);
  border: 1px solid transparent;
  border-radius: 6px;
  margin: 0 3px;
  font-weight: 600;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-size: 0.85rem;
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.vg-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.vg-tab:hover::before {
  left: 100%;
}

.vg-tab:hover {
  color: #fff;
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px var(--neon-blue);
  transform: translateY(-2px);
}

.vg-tab.active {
  color: #000;
  background: var(--neon-blue);
  font-weight: 700;
  box-shadow: 0 0 15px var(--neon-blue);
}

.tab-content {
  width: 100%;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-pane.active {
  display: block;
}

/* СКРЫВАЕМ ВСЕ ЧЕКБОКСЫ ВО ВКЛАДКЕ ЭЛИТА */
#elita .check-row {
  display: none !important;
}

/* Блок чекбоксов и фильтров */
.check-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 15px;
  padding: 10px;
  background: transparent;
  border-radius: 6px;
  justify-content: center;
  width: 100%;
}

.year-filter-container {
  margin-left: 0;
}

/* Кастомные чекбоксы */
.form-check {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.form-check-input {
  width: 14px;
  height: 14px;
  background-color: rgba(20, 20, 40, 0.8);
  border: 1px solid var(--neon-blue);
  position: relative;
  cursor: pointer;
  appearance: none;
  border-radius: 2px;
  margin-right: 4px;
}

.form-check-input:checked {
  background-color: var(--neon-blue);
  border-color: var(--neon-blue);
  box-shadow: 0 0 8px var(--neon-blue);
}

.form-check-input:checked::before {
  content: '✓';
  position: absolute;
  color: #000;
  font-weight: bold;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 9px;
}

.form-check-label {
  font-size: 0.8rem;
  color: var(--neon-blue);
  cursor: pointer;
  transition: color 0.3s;
  font-weight: 500;
  white-space: nowrap;
}

.form-check-label:hover {
  color: var(--neon-blue);
}

/* Стили для выпадающего списка года */
.year-filter {
  background: rgba(20, 20, 40, 0.8) !important;
  color: var(--neon-blue) !important;
  border: 1px solid var(--neon-blue) !important;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.8rem;
  font-family: 'Disket Mono', monospace;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: auto;
}

.year-filter:hover {
  border-color: var(--neon-pink) !important;
  box-shadow: 0 0 8px var(--neon-pink);
}

.year-filter:focus {
  outline: none;
  border-color: var(--green) !important;
  box-shadow: 0 0 10px var(--green);
}

.year-filter option {
  background: rgba(20, 20, 40, 0.95);
  color: var(--neon-blue);
}

/* НОВЫЕ СТИЛИ ДЛЯ БЛОКА ВЕСОВЫХ КАТЕГОРИЙ */
.weight-categories-container {
  display: none;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 15px auto;
  padding: 8px;
  background: transparent;
  border-radius: 6px;
  border: 0px solid var(--neon-blue);
}

.weight-categories-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  align-items: center;
}

.weight-category-check {
  display: flex;
  align-items: center;
  margin: 0;
  justify-content: center;
  flex: 0 0 auto;
}

.weight-category-check .form-check-input {
  margin-right: 3px;
}

.weight-category-check .form-check-label {
  font-size: 0.7rem;
  white-space: nowrap;
  padding: 2px 4px;
}

/* НОВЫЕ СТИЛИ ДЛЯ РАСПОЛОЖЕНИЯ ЧЕКБОКСОВ НА ДЕСКТОПЕ */
@media (min-width: 577px) {
  .weight-categories-row {
    display: grid;
    grid-template-columns: repeat(7, auto);
    gap: 6px;
    justify-content: center;
    justify-items: start;
  }
  
  .weight-category-check {
    justify-content: flex-start;
  }
}

/* НОВЫЕ СТИЛИ ДЛЯ РАСПОЛОЖЕНИЯ ЧЕКБОКСОВ НА МОБИЛЬНЫХ */
@media (max-width: 576px) {
  .weight-categories-row {
    display: grid;
    grid-template-columns: repeat(4, auto);
    gap: 5px;
    justify-content: center;
    justify-items: start;
  }
  
  .weight-category-check {
    justify-content: flex-start;
  }
  
  .weight-category-check .form-check-label {
    font-size: 0.65rem;
  }
}

.year-filter {
    min-width: auto;
    font-size: 0.7rem;
    padding: 3px 6px;
}

/* СТИЛИ ДЛЯ КОНТЕЙНЕРА ТАБЛИЦЫ */
.table-container {
  margin: 0 auto;
  margin-bottom: 10px;
  border-radius: 8px;
  background: rgba(10, 10, 25, 0.6);
  padding: 2px;
  width: 100%;
  max-width: 1200px;
}

/* СТИЛИ ДЛЯ ТАБЛИЦЫ */
.cyber-table {
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--neon-blue);
  box-shadow: 
    0 0 25px var(--neon-blue),
    inset 0 0 15px rgba(0, 243, 255, 0.1);
  background: rgba(15, 15, 30, 0.9);
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
  width: 100%;
  backdrop-filter: blur(5px);
}

.cyber-table th {
  background: linear-gradient(to bottom, #1a1a3a, #0f0f2a);
  color: var(--green);
  border-bottom: 2px solid var(--neon-blue);
  padding: 12px 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  text-align: center;
  text-shadow: 0 0 5px currentColor;
/*   font-size: 0.85rem;*/
  cursor: pointer;
  transition: all 0.3s ease;
}

.cyber-table th:hover {
  background: linear-gradient(to bottom, #2a2a4a, #1a1a3a);
}

.cyber-table th::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
  box-shadow: 0 0 8px var(--neon-blue);
}

.cyber-table td {
  padding: 10px 0px;
  border-bottom: 1px solid rgba(0, 243, 255, 0.2);
  color: var(--neon-blue);
  vertical-align: middle;
  transition: all 0.2s ease;
  font-weight: 600;
  text-align: center;
  background: rgba(10, 10, 25, 0.6);
 /*  font-size: 0.85rem;*/
}

.cyber-table .name-cell {
  text-align: left;
}

.cyber-table tr {
  transition: all 0.3s ease;
}

.cyber-table tr:hover {
  background: rgba(0, 243, 255, 0.15);
  box-shadow: 
    inset 0 0 15px rgba(0, 243, 255, 0.3),
    0 0 10px rgba(0, 243, 255, 0.2);
}

.cyber-table tr:nth-child(even) {
  background: rgba(20, 20, 40, 0.5);
}

.cyber-table tr:nth-child(even) td {
  background: rgba(20, 20, 40, 0.7);
}

/* ЗЕЛЕНЫЙ ЦВЕТ ДЛЯ РЕЗУЛЬТАТОВ (кроме теневых) */
.score-value {
  color: var(--green) !important;
}

/* ГОЛУБОЙ ЦВЕТ ДЛЯ РУК ВО ВКЛАДКЕ СУММА */
.sum-hand-value {
  color: var(--neon-blue) !important;
}



/* СТИЛИ ДЛЯ ССЫЛОК В КОЛОНКЕ РЕЗУЛЬТАТОВ */
.score-link {
  text-decoration: none !important;
  color: inherit !important;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.score-link:hover {
  text-shadow: 0 0 8px currentColor;
  transform: scale(1.05);
}

.score-link::after {
  content: '↗️';
  font-size: 0.7em;
  margin-left: 2px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.score-link:hover::after {
  opacity: 1;
}

/* СТИЛИ ДЛЯ ССЫЛОК НА ПРОФИЛИ */
.profile-link {
  text-decoration: none !important;
  color: inherit !important;
  transition: all 0.3s ease;
  cursor: pointer;
}

.profile-link:hover {
  text-shadow: 0 0 8px currentColor;
}

.shadow-row .score-link,
.shadow-row .profile-link {
  color: #ffffff !important;
  text-decoration: none !important;
}

.shadow-row .score-link:hover,
.shadow-row .profile-link:hover {
  text-shadow: 0 0 8px #ffffff;
}

/* СТИЛИ ДЛЯ ТЕНЕВЫХ РЕЗУЛЬТАТОВ */
.shadow-row td {
  color: #ffffff !important;
  background: rgba(10, 10, 25, 0.6) !important;
  opacity: 1;
}

.shadow-row .name-cell,
.shadow-row .name-cell *,
.shadow-row .name-content,
.shadow-row .name-content *,
.shadow-row .name-text,
.shadow-row .name-text *,
.shadow-row .full-name,
.shadow-row .short-name {
  color: #ffffff !important;
}

.shadow-row .score-value {
  color: #ffffff !important;
}

.cyber-table tr.shadow-row:nth-child(even) td {
  background: rgba(20, 20, 40, 0.7) !important;
  color: #ffffff !important;
  opacity: 1;
}

.cyber-table tr.shadow-row:nth-child(even) .name-cell,
.cyber-table tr.shadow-row:nth-child(even) .name-cell *,
.cyber-table tr.shadow-row:nth-child(even) .name-content,
.cyber-table tr.shadow-row:nth-child(even) .name-content *,
.cyber-table tr.shadow-row:nth-child(even) .name-text,
.cyber-table tr.shadow-row:nth-child(even) .name-text *,
.cyber-table tr.shadow-row:nth-child(even) .full-name,
.cyber-table tr.shadow-row:nth-child(even) .short-name {
  color: #ffffff !important;
}

/* Стили для заголовков категорий */
.category-header {
  background: transparent;
  color: var(--neon-blue);
  font-weight: bold;
  padding: 10px 15px;
  margin-top: 16px;
  border-radius: 0;
  border: none;
  box-shadow: none;
  backdrop-filter: none;
  letter-spacing: 1px;
  text-shadow: 0 0 5px currentColor;
  font-size: 1.1rem;
  text-align: center;
}

/* Стили для ячеек с именами */
.name-cell {
  width: auto;
  white-space: nowrap;
  vertical-align: middle;
}

.name-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 2px;
  width: 100%;
  height: 100%;
}

.zvan-placeholder {
    width: 24px !important;
    height: 16px !important;
    border: none;
}

/* СТИЛИ ДЛЯ ЗВАНИЙ ЧЕРЕЗ CSS */
.zvan-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: 24px;
  height: 18px;
  border: none;
  text-shadow: 0 0 2px rgba(0,0,0,0.8);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  white-space: nowrap;
  font-family: 'Disket Mono', monospace;
}

/* СТИЛИ ДЛЯ CSS ФЛАГОВ СТРАН */
.flag {
    display: inline-block;
    width: 24px;
    height: 18px;
    border: none;
    vertical-align: middle;
    position: relative;
    box-shadow: 0 0 3px rgba(0,0,0,0.3);
    flex-shrink: 0;
    border-radius: 2px;
}

.zvan-container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px !important;
    gap: 7px;
    position: relative;
    overflow: hidden;
}

/* БАЗОВЫЕ СТИЛИ ДЛЯ СКРЫТИЯ КОЛОНОК НА МОБИЛЬНЫХ */
@media (max-width: 768px) {
	
	.bw-header,
    .bw-cell {
        display: none !important;
    }
    
    /* Для вкладок Абсолютка, Правая, Левая */
    #absolute .bw-header,
    #absolute .bw-cell,
    #right .bw-header,
    #right .bw-cell,
    #left .bw-header,
    #left .bw-cell {
        display: none !important;
    }
    .mobile-hide {
        display: none !important;
    }
    
    /* Специфичные стили для вкладки Элита на мобильных */
    #elita .din-value-cell.mobile-hide,
    #elita .bw-cell.mobile-hide,
    #elita .date-cell.mobile-hide {
        display: none !important;
    }
    
    /* Специфичные стили для вкладки Сумма на мобильных */
    #sum .right-result-cell.mobile-hide,
    #sum .left-result-cell.mobile-hide,
    #sum .date-cell.mobile-hide {
        display: none !important;
    }
    
    /* Скрываем заголовки колонок на мобильных */
    #elita .result-header.mobile-hide,
    #elita .bw-header.mobile-hide,
    #elita .date-cell.mobile-hide,
    #sum .right-header.mobile-hide,
    #sum .left-header.mobile-hide,
    #sum .date-cell.mobile-hide {
        display: none !important;
    }
    
    /* Принудительное скрытие колонок на мобильных */
    #elita tr th:nth-child(5),  /* Заголовок Дин */
    #elita tr td:nth-child(5),  /* Ячейки Дин */
    #elita tr th:nth-child(6),  /* Заголовок Вес */
    #elita tr td:nth-child(6),  /* Ячейки Вес */
    #elita tr th:nth-child(7),  /* Заголовок Дата */
    #elita tr td:nth-child(7) { /* Ячейки Дата */
        display: none !important;
    }
    
    /* Для вкладки Сумма */
    #sum tr th:nth-child(5),    /* Заголовок Правая */
    #sum tr td:nth-child(5),    /* Ячейки Правая */
    #sum tr th:nth-child(6),    /* Заголовок Левая */
    #sum tr td:nth-child(6),    /* Ячейки Левая */
    #sum tr th:nth-child(7),    /* Заголовок Дата */
    #sum tr td:nth-child(7) {   /* Ячейки Дата */
        display: none !important;
    }
}

/* Убедимся, что на десктопе все колонки видны */
@media (min-width: 769px) {
    .mobile-hide {
        display: table-cell !important;
    }
    
    #elita .din-value-cell.mobile-hide,
    #elita .bw-cell.mobile-hide,
    #elita .date-cell.mobile-hide,
    #sum .right-result-cell.mobile-hide,
    #sum .left-result-cell.mobile-hide,
    #sum .date-cell.mobile-hide {
        display: table-cell !important;
    }
}

/* Скрытие колонок на мобильных устройствах */
@media(max-width:576px){ 
	
	   .page-header {
    display: block;
    margin-bottom: 15px;
    padding: 0 10px;
     margin-top: 15px;
  }
  
  .page-header h1 {
    font-size: 1.4rem;
    margin-bottom: 5px;
  }
  
  .page-header p {
    font-size: 0.9rem;
  }
}


/* НОВЫЕ СТИЛИ: Минимальная ширина для десктопов */
@media (min-width: 577px) {
  .cyber-table th:nth-child(2),
  .cyber-table td:nth-child(2),
  .cyber-table th:nth-child(3),
  .cyber-table td:nth-child(3),
  .cyber-table th:nth-child(4),
  .cyber-table td:nth-child(4),
  .cyber-table th:nth-child(5),
  .cyber-table td:nth-child(5) {
    min-width: 250px;
  }
}

/* Адаптация для мобильных устройств */
@media(max-width:576px){ 
  body {
    padding: 0;
  }
  
  .main-nav { display: none; }
  .mobile-header { display: block; }
  
 /* table{ 
    font-size:12px; 
  } 
  
  th,td{
    padding:6px 3px; 
    vertical-align: middle;
    font-size: 12px;
  } */
  
  .vg-tab{ 
    font-size:10px; 
    padding:6px 6px;
    margin: 0 1px;
  } 
  
  .date-cell{
    display:none;
  }
  
  /* УБИРАЕМ КОЛОНКУ РУКА ДЛЯ МОБИЛЬНЫХ В АБСОЛЮТКЕ */
  .absolute-tab .hand-header,
  .absolute-tab .hand-cell {
    display: none !important;
  }
  
  /* Делаем колонку з/сания компактной на мобильных */
  .zvan-cell {
    min-width: 40px;
    padding: 2px 2px;
  }
  
  /* Сокращение названий колонок на мобильных */
  .country-header .full-text,
  .hand-header .full-text,
  .result-header .full-text,
  .bw-header .full-text,
  .count-header .full-text,
  .avg-header .full-text,
  .right-header .full-text,
  .left-header .full-text,
  .zvan-header .full-text,
  .er-header .full-text,
  .name-header .full-text {
    display: none;
  }
  
  .country-header .short-text,
  .hand-header .short-text,
  .result-header .short-text,
  .bw-header .short-text,
  .count-header .short-text,
  .avg-header .short-text,
  .right-header .short-text,
  .left-header .short-text,
  .zvan-header .short-text,
  .er-header .short-text,
  .name-header .short-text {
    display: inline;
  }
  
  /* Адаптация ячеек с именами для мобильных */
  .name-cell {
    max-width: 100px;
    text-align: left;
  }
  
  .name-content {
    gap: 2px;
  }
  
  .rep-progress-container {
    margin-right: 3px;
    gap: 2px;
    height: 18px;
  }
  
  .rep-level-bar {
    width: 5px;
    height: 2px;
  }
  
  .rep-level-bar.active {
    transform: scaleY(1.2);
  }
  
  
  .check-row {
    gap: 8px;
    padding: 8px;
  }
  
  .category-header {
    padding: 8px 12px;
    font-size: 0.9rem;
  }
  
  /* ОТОБРАЖЕНИЕ ВЕСА НА МОБИЛЬНЫХ */
  .weight-value {
    font-size: 11px;
    font-weight: 600;
  }
  
  .main-content {
    padding: 0px 0px;
  }
  
  /* АДАПТАЦИЯ СВЕЧЕНИЯ ДЛЯ МОБИЛЬНЫХ */
  .cyber-table {
    box-shadow: 
      0 0 5px var(--neon-blue),
      inset 0 0 8px rgba(0, 243, 255, 0.1);
  }
  
  /* АДАПТАЦИЯ ССЫЛОК ДЛЯ МОБИЛЬНЫХ */
  .score-link::after {
    font-size: 0.6em;
    margin-left: 1px;
  }
  
    /* Сокращенные названия для мобильных */
  .gender-label .full-text {
    display: none;
  }
  
  .gender-label .short-text {
    display: inline;
  }
  
  .form-check-label {
    font-size: 0.75rem;
  }
  
  .form-check-input {
    width: 12px;
    height: 12px;
  }
  
  .form-check-input:checked::before {
    font-size: 8px;
  }
  
  /* Адаптация выпадающего списка года для мобильных */
  .year-filter {
    font-size: 0.7rem;
    padding: 3px 6px;
    min-width: auto;
  }
}

/* Для десктопов - показываем полные названия */
@media(min-width:577px){
  .country-header .short-text,
  .hand-header .short-text,
  .result-header .short-text,
  .bw-header .short-text,
  .count-header .short-text,
  .avg-header .short-text,
  .right-header .short-text,
  .left-header .short-text,
  .zvan-header .short-text,
  .er-header .short-text,
  .name-header .short-text {
    display: none;
  }
  
  .country-header .full-text,
  .hand-header .full-text,
  .result-header .full-text,
  .bw-header .full-text,
  .count-header .full-text,
  .avg-header .full-text,
  .right-header .full-text,
  .left-header .full-text,
  .zvan-header .full-text,
  .er-header .full-text,
  .name-header .full-text {
    display: inline;
  }
  
  .gender-label .short-text {
    display: none;
  }
  
  .gender-label .full-text {
    display: inline;
  }
  
  .mobile-header { display: none; }
  .main-nav { display: block; }
  
  .main-content {
    padding: 20px 10px;
  }
  
  /* УБИРАЕМ КОЛОНКУ РУКА ДЛЯ ДЕСКТОПОВ В АБСОЛЮТКЕ */
  .absolute-tab .hand-header,
  .absolute-tab .hand-cell {
    display: none !important;
  }
  
  /* ОПТИМИЗАЦИЯ ШИРИНЫ ТАБЛИЦЫ НА ДЕСКТОПЕ */
  .cyber-table {
    min-width: auto;
    width: auto;
    margin: 0 auto;
  }
  
.cyber-table th {
  padding: var(--header-padding);
}
  /* ОСНОВНЫЕ СТИЛИ ТАБЛИЦЫ С ПЕРЕМЕННЫМИ */
.cyber-table th,
.cyber-table td {
  padding: var(--cell-padding);
}

.cyber-table th {
  padding: var(--header-padding);
}

/* ШИРИНЫ КОЛОНОК ПО УМОЛЧАНИЮ */
.cyber-table th:nth-child(1),
.cyber-table td:nth-child(1) { /* Колонка # */
  width: var(--col-rank);
  min-width: var(--col-rank);
  max-width: var(--col-rank);
}

.cyber-table th:nth-child(2),
.cyber-table td:nth-child(2) { /* Колонка з/с */
  width: var(--col-zvan);
  min-width: var(--col-zvan);
  max-width: var(--col-zvan);
}

.cyber-table th:nth-child(3),
.cyber-table td:nth-child(3) { /* Колонка имени */
  width: var(--col-name);
  min-width: 300px;
}


/* ДЛЯ ВКЛАДКИ АБСОЛЮТКА/ПРАВАЯ/ЛЕВАЯ */
#absolute th:nth-child(4),
#absolute td:nth-child(4),
#right th:nth-child(4),
#right td:nth-child(4),
#left th:nth-child(4),
#left td:nth-child(4) { /* Колонка Дин */
  width: var(--col-result);
  min-width: var(--col-result);
}

#absolute th:nth-child(5),
#absolute td:nth-child(5),
#right th:nth-child(5),
#right td:nth-child(5),
#left th:nth-child(5),
#left td:nth-child(5) { /* Колонка Вес */
  width: var(--col-weight);
  min-width: var(--col-weight);
}

#absolute th:nth-child(6),
#absolute td:nth-child(6),
#right th:nth-child(6),
#right td:nth-child(6),
#left th:nth-child(6),
#left td:nth-child(6) { /* Колонка Дата */
  width: var(--col-date);
  min-width: var(--col-date);
}

/* ДЛЯ ВКЛАДКИ ЭЛИТА */
#elita th:nth-child(4),
#elita td:nth-child(4) { /* Колонка ЭР */
  width: var(--col-er);
  min-width: var(--col-er);
}

#elita th:nth-child(5),
#elita td:nth-child(5) { /* Колонка Дин */
  width: var(--col-result);
  min-width: var(--col-result);
}

#elita th:nth-child(6),
#elita td:nth-child(6) { /* Колонка Вес */
  width: var(--col-weight);
  min-width: var(--col-weight);
}

#elita th:nth-child(7),
#elita td:nth-child(7) { /* Колонка Дата */
  width: var(--col-date);
  min-width: var(--col-date);
}

/* ДЛЯ ВКЛАДКИ СУММА */
#sum th:nth-child(4),
#sum td:nth-child(4) { /* Колонка Сумма */
  width: var(--col-result);
  min-width: var(--col-result);
}

#sum th:nth-child(5),
#sum td:nth-child(5) { /* Колонка Правая */
  width: var(--col-right);
  min-width: var(--col-right);
}

#sum th:nth-child(6),
#sum td:nth-child(6) { /* Колонка Левая */
  width: var(--col-left);
  min-width: var(--col-left);
}

#sum th:nth-child(7),
#sum td:nth-child(7) { /* Колонка Дата */
  width: var(--col-date);
  min-width: var(--col-date);
}
  /* Колонка с именой может расширяться */
  .name-cell {
    max-width: 750px;
  }
  
  .full-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 730px;
    min-width: 230px;
  }
}

/* Для больших экранов */
@media(min-width:1200px){
  .main-content {
    padding: 20px 15px;
  }
  
  .cyber-table {
    font-size: 15px;
  }
  
  .name-cell {
    max-width: 420px;
  }
  
  .full-name {
    max-width: 300px;
  
  }
}

/* Дополнительные стили для новой функциональности */
.admin-panel {
    background: rgba(20, 20, 40, 0.8);
    border: 1px solid var(--neon-blue);
    border-radius: 8px;
    padding: 15px;
    margin: 20px auto;
    max-width: 500px;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.3);
}

.load-all-btn {
    background: linear-gradient(to bottom, #1a1a3a, #0f0f2a);
    color: var(--neon-blue);
    border: 1px solid var(--neon-blue);
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 243, 255, 0.3);
    font-family: 'Disket Mono', monospace;
    width: 100%;
}

.load-all-btn:hover:not(:disabled) {
    background: linear-gradient(to bottom, #2a2a4a, #1a1a3a);
    box-shadow: 0 0 15px var(--neon-blue);
    transform: translateY(-2px);
}

.load-all-btn:disabled {
    background: #333350;
    color: #7070a0;
    border-color: #505070;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

/* Стили для статуса загрузки */
.loading-status {
    text-align: center;
    padding: 20px;
    color: var(--neon-blue);
    font-size: 1.1rem;
}

.loading-status.error {
    color: #ff4444;
}

.loading-status.success {
    color: var(--green);
}

/* Адаптация для мобильных */
@media (max-width: 576px) {
    .admin-panel {
        margin: 15px 10px;
        padding: 10px;
    }
    
    .load-all-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Стили для модального окна суммы */
.sum-modal-overlay {
    backdrop-filter: blur(5px);
}

.sum-modal-content {
    animation: modalAppear 0.2s ease-out;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    margin: 20px;
}

@keyframes modalAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Стили для модального окна ЭР */
.er-modal-overlay {
    backdrop-filter: blur(5px);
}

.er-modal-content {
    animation: modalAppear 0.2s ease-out;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    margin: 20px;
}

/* Адаптивность для вкладки Сумма и Элита */
@media (max-width: 768px) {
    .sum-result-cell {
        cursor: pointer;
        position: relative;
    }
    
    .sum-result-cell .sum-value {
        transition: all 0.2s ease;
    }
    
    .sum-result-cell:active .sum-value {
        transform: scale(0.95);
        opacity: 0.8;
    }
    
    .er-value-cell {
        cursor: pointer;
    }
    
    .er-value-cell .er-value {
        transition: all 0.2s ease;
    }
    
    .er-value-cell:active .er-value {
        transform: scale(0.95);
        opacity: 0.8;
    }
}

/* Подвал */
.main-footer { 
    background: rgba(10,10,20,0.9); 
    color: var(--b); 
    text-align: center; 
    padding: 1.5rem 10px;
    margin-top: auto;
    border-top: 2px solid var(--b); 
    box-shadow: 0 0 10px var(--b); 
    position: relative; 
    z-index: 1;
    width: 100%;
}

/* Анимация появления */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes flicker {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.flicker {
  animation: flicker 3s infinite alternate;
}

/* Стили для модального окна информации о результате */
.result-modal-overlay {
    backdrop-filter: blur(5px);
}

.result-modal-content {
    animation: modalAppear 0.2s ease-out;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.6);
    margin: 20px;
}

/* Адаптивность для вкладок Абсолютка, Правая, Левая */
@media (max-width: 768px) {
    .result-value-cell {
        cursor: pointer;
    }
    
    .result-value-cell .result-value {
        transition: all 0.2s ease;
    }
    
    .result-value-cell:active .result-value {
        transform: scale(0.95);
        opacity: 0.8;
    }
}


/* Стили для результата со стрелкой */
.result-with-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px; /* Отступ между числом и стрелкой */
}

.result-value {
    cursor: pointer;
    transition: all 0.2s ease;
}

.result-value:active {
    transform: scale(0.95);
    opacity: 0.8;
}

.result-arrow {
    font-size: 1.20em; /* Увеличиваем на 25% */
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.result-arrow:hover {
    transform: scale(1.2);
}

.result-arrow.inactive {
    opacity: 0.5; /* 50% прозрачности если нет ссылки */
    cursor: default;
}

.result-arrow.inactive:hover {
    transform: none;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .result-with-arrow {
        gap: 9px;
    }
    
    .result-arrow {
        font-size: 0.9em;
    }
}


/* СТИЛИ ДЛЯ МОБИЛЬНЫХ ИМЕН */
.mobile-name-first {
    display: block;
    font-weight: 600;
    margin-bottom: 1px;
    line-height: 1.1;
}

.mobile-name-rest {
    display: block;
    font-weight: 600;
    color: var(--neon-blue);
   
    line-height: 1.1;
}

.mobile-name-single {
    display: block;
    font-weight: 600;
    line-height: 1.2;
}

/* Адаптация ячеек с именами для мобильных */
@media (max-width: 576px) {
    .name-cell {
        min-height: 2.6em;
        padding: 4px 0px;
        min-width:150px;
    }
    
    .name-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        line-height: 1.1;
    }
    
    .full-name {
        white-space: normal;
        line-height: 1.2;
    }
}


/* Стили для поиска */
.search-container {
	margin: 15px auto 30px auto; 
     max-width: 400px;
    width: 90%;
    transition: all 0.3s ease;
}

.search-input {
    width: 100%;
    padding: 10px 10px;
    background: rgba(20, 20, 40, 0.8);
    border: 0px solid var(--neon-blue);
    border-radius: 6px;
    color: var(--neon-blue);
    font-family: 'Disket Mono', monospace;
    font-size: 12px;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--green);

}

.search-input::placeholder {
    color: rgba(0, 243, 255, 0.6);
}

/* Стили для выделения найденных элементов */
.search-highlight {
    background: rgba(255, 215, 0, 0.3) !important;
    border: 2px solid #ffd700 !important;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.7) !important;
    position: relative;
    z-index: 10;
}

.search-highlight td {
    background: rgba(255, 215, 0, 0.2) !important;
    color: #ffd700 !important;
    font-weight: bold !important;
}

/* Анимация появления */
@keyframes searchPulse {
    0% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 25px rgba(255, 215, 0, 1); }
    100% { box-shadow: 0 0 10px rgba(255, 215, 0, 0.5); }
}

.search-highlight {
    animation: searchPulse 2s ease-in-out;
}  


/* Для мобильных устройств */
@media (max-width: 768px) {
    .search-input {
        font-size: 14px; /* Предотвращает масштабирование в iOS */
        padding: 12px 15px; /* Увеличиваем для удобства касания */
    }
    
    .search-container {
        margin: 10px auto;
        width: 90%;
    }
    
    /* Специфично для поиска в нужных вкладках */
    #absolute .search-container,
    #right .search-container,
    #left .search-container {
        display: block !important;
    }
}


/* Мобильные индикаторы загрузки */
#mobile-loading {
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

/* Адаптация для очень маленьких экранов */
@media (max-width: 480px) {
    #cache-indicator {
        top: 60px !important;
        right: 5px !important;
        font-size: 10px !important;
        padding: 6px 8px !important;
    }
    
    #mobile-loading div {
        padding: 15px !important;
        font-size: 14px !important;
    }
}

/* Для планшетов */
@media (min-width: 769px) and (max-width: 1024px) {
    #cache-indicator {
        top: 80px !important;
        right: 15px !important;
        font-size: 14px !important;
        padding: 10px 15px !important;
    }
}


/* ОБНОВЛЕННЫЕ СТИЛИ ДЛЯ ШКАЛЫ РЕПУТАЦИИ */
.rep-progress-container {
  display: flex !important;
  flex-direction: column-reverse !important;
  align-items: center !important;
  justify-content: center !important;
  margin-right: 8px !important;
  gap: 3px !important;
  height: 24px !important;
}

.rep-level-bar {
  width: 7px !important;
  height: 3px !important;
  border-radius: 1px !important;
  background: #404060 !important;
  transition: all 0.3s ease !important;
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

.rep-level-bar.green.active {
  background: linear-gradient(90deg, #00ff00, #00cc00) !important;
  transform: scaleY(1.1) !important;
}

.rep-level-bar.red.active {
  background: linear-gradient(90deg, #ff0000, #cc0000) !important;
  transform: scaleY(1.1) !important;
}

.rep-progress-container:not(.shadow-rep):hover .rep-level-bar.active {
  transform: scaleY(1.3) !important;
}

/* Для мобильных */
@media(max-width:576px){ 
  .rep-progress-container {
    margin-right: 4px !important;
    gap: 2px !important;
    height: 18px !important;
  }
  
  .rep-level-bar {
    width: 5px !important;
    height: 2px !important;
  }
}
/* Стили для новых результатов - абсолютное позиционирование */
.result-with-new {
    position: relative;
    display: inline-block;
    padding-left: 5px; /* Немного места для огонька */
}

.new-indicator {
    position: absolute;
    left: -18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--neon-pink);
    font-size: 12px;
    animation: glow 1.5s ease-in-out infinite alternate;
    z-index: 1;
}

@keyframes glow {
    from { text-shadow: 0 0 5px var(--neon-pink); }
    to { text-shadow: 0 0 15px var(--neon-pink), 0 0 20px var(--neon-pink); }
}

/* Для мобильных */
@media (max-width: 768px) {
    .new-indicator {
        font-size: 10px;
        left: -15px;
    }
    
    .result-with-new {
        padding-left: 3px;
    }
}

/* Убираем анимации если пользователь предпочитает reduced motion */
@media (prefers-reduced-motion: reduce) {
    .new-indicator {
        animation: none;
    }
}

/* Для центрированных ячеек (Элита) */
.er-value-cell .result-with-new,
.sum-result-cell .result-with-new {
    text-align: center;
    width: 100%;
}

/* Для ячеек с результатом */
.result-value-cell .result-with-new {
    text-align: left;
}

/* Стили для имен доноров */
.don-name {
   color: #FFD700 !important;
  
    font-weight: bold;
    position: relative;
}


/* Для мобильных */
@media (max-width: 768px) {
    .don-name::after {
        font-size: 0.6em;
        margin-left: 2px;
    }
}

/* Для теневых строк */
.shadow-row .don-name {
 color: #FFD700 !important;
}