/**
 * @file: rating.css
 * @description: Специализированные стили для страницы рейтинга пилотов
 * @created: 2025-01-09
 * @updated: 2025-01-09
 */

/* ===== ОСНОВНЫЕ СТИЛИ СТРАНИЦЫ РЕЙТИНГА ===== */
.rating-page {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  min-height: 100vh;
}

.rating-header {
  background: var(--gradient-header);
  color: var(--text-inverse);
  padding: 1rem 0;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.rating-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
}

.rating-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-inverse);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.rating-header .lead {
  font-size: 0.9rem;
  opacity: 0.95;
  margin-top: 0.25rem;
  font-weight: 400;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* ===== КНОПКА РЕЙТИНГОВ ===== */
.rating-btn {
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  border: 2px solid var(--primary);
  color: var(--primary);
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.rating-btn:hover {
  background: var(--gradient-primary);
  color: var(--text-inverse);
  transform: var(--hover-transform);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}

.rating-btn .rating-icon {
  font-size: 1.1rem;
}

/* ===== АККОРДЕОН СИСТЕМЫ РЕЙТИНГА ===== */
.rating-system-accordion {
  margin-top: 0.5rem;
  margin-bottom: 2rem;
}

.rating-system-accordion .accordion-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.rating-system-accordion .accordion-button {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1.1rem;
  padding: 1.25rem 1.5rem;
  border: none;
  box-shadow: none;
}

.rating-system-accordion .accordion-button:not(.collapsed) {
  background: var(--primary);
  color: var(--text-inverse);
  box-shadow: none;
}

.rating-system-accordion .accordion-button:focus {
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
  border-color: transparent;
}

.rating-system-accordion .accordion-body {
  padding: 2rem;
  background: var(--bg-primary);
}

.rating-system-accordion .accordion-collapse {
  transition: height 0.3s ease;
}

.rating-system-accordion .accordion-collapse.collapse {
  display: none;
}

.rating-system-accordion .accordion-collapse.collapse.show {
  display: block;
}

.rating-system-accordion h3 {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.rating-system-accordion h4 {
  color: var(--text-primary);
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

.rating-system-accordion h5 {
  color: var(--text-primary);
  font-weight: 600;
  margin-top: 1.25rem;
  margin-bottom: 0.75rem;
  font-size: 1.1rem;
}

.rating-system-accordion code {
  background: var(--bg-tertiary);
  color: var(--primary);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
}

.rating-system-accordion .table {
  margin-top: 1rem;
  font-size: 0.95rem;
}

.rating-system-accordion .table th {
  background: var(--bg-secondary);
  font-weight: 600;
  color: var(--text-primary);
}

/* ===== ТАБЛИЦА РЕЙТИНГА ===== */
.rating-table-container {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  margin-bottom: 2rem;
  width: 100%;
}

.rating-table-container .table-responsive,
.rating-table-container .rating-table-wrapper {
  overflow-x: auto;
  overflow-y: auto;
  width: 100%;
  display: block;
}

.rating-table-container > div {
  width: 100%;
}

.rating-table {
  margin: 0;
  font-size: 0.95rem;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  table-layout: fixed;
}

.rating-table thead {
  background: var(--gradient-header);
  color: var(--text-inverse);
}

.rating-table thead th {
  padding: 0.6rem 0.4rem;
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  border: none;
  position: relative;
  text-align: center;
  word-wrap: break-word;
  hyphens: auto;
  line-height: 1.2;
}

.rating-table thead th:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: rgba(255, 255, 255, 0.2);
}

.rating-table tbody tr {
  transition: all 0.3s ease;
  border-bottom: 1px solid var(--border-light);
  background: transparent;
  transform: translateY(0);
  box-shadow: none;
}

.rating-table tbody tr:hover {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.rating-table tbody tr:last-child {
  border-bottom: none;
}

.rating-table tbody td {
  padding: 1rem;
  vertical-align: middle;
  border: none;
  color: var(--text-primary);
}

.rating-table tbody td:first-child {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--primary);
  text-align: center;
  width: 50px;
}

/* Устанавливаем ширину колонок - основные стили определены ниже */

/* ===== СТОЛБЕЦ СТРАНЫ ===== */
.country-col {
  width: 80px;
  text-align: center;
}

.country-flag {
  width: 24px;
  height: 18px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ===== СТОЛБЕЦ ПИЛОТА ===== */
.pilot-cell {
  min-width: 180px;
  max-width: 220px;
}

.pilot-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: color 0.2s ease;
}

.pilot-link:hover {
  color: var(--primary);
  text-decoration: none;
}

.pilot-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
  transition: all 0.2s ease;
}

.pilot-link:hover .pilot-avatar {
  border-color: var(--primary);
  transform: scale(1.05);
}

.pilot-name {
  font-size: 1.0rem;
  font-weight: 600;
  white-space: nowrap;
}

/* ===== СТОЛБЕЦ РЕЙТИНГА ===== */
.rating-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
  text-align: center;
}

/* ===== СТОЛБЕЦ ИЗМЕНЕНИЯ ===== */
.rating-change {
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.rating-change.positive {
  color: var(--success);
}

.rating-change.negative {
  color: var(--danger);
}

.rating-change.neutral {
  color: var(--text-muted);
}

.rating-change-arrow {
  margin-right: 0.25rem;
  font-size: 0.8rem;
}

/* ===== СТОЛБЕЦ РАНГА ===== */
.rank-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.25rem 0.4rem;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  white-space: nowrap;
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.rank-badge:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.rank-icon {
  font-size: 0.75rem;
  flex-shrink: 0;
}

.rank-badge.rank-novice {
  background: linear-gradient(135deg, var(--secondary) 0%, #5a6268 100%);
  color: var(--text-inverse);
}

.rank-badge.rank-amateur {
  background: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%);
  color: var(--text-inverse);
}

.rank-badge.rank-pilot {
  background: linear-gradient(135deg, var(--pilot) 0%, #5a32a3 100%);
  color: var(--text-inverse);
}

.rank-badge.rank-professional {
  background: linear-gradient(135deg, var(--success) 0%, #146c43 100%);
  color: var(--text-inverse);
}

.rank-badge.rank-master {
  background: linear-gradient(135deg, var(--warning) 0%, #e0a800 100%);
  color: var(--text-primary);
}

.rank-badge.rank-legend {
  background: linear-gradient(135deg, var(--danger) 0%, #b02a37 100%);
  color: var(--text-inverse);
}

/* Стили для колонки ранга в таблице */
.rating-table td:nth-child(7) {
  overflow: hidden;
  text-align: center;
  padding: 0.5rem 0.25rem;
}

/* Контейнер для бейджа ранга */
.rating-table td:nth-child(7) .rank-badge {
  display: inline-flex;
  max-width: calc(100% - 4px);
}

/* ===== СТОЛБЕЦ ГОНОК ===== */
.race-count {
  text-align: center;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

/* ===== СТОЛБЕЦ ПРОГРЕССА ===== */
.progress-cell {
  min-width: 140px;
}

.rating-progress {
  height: 20px;
  background: var(--bg-tertiary);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rating-progress-bar {
  height: 100%;
  border-radius: var(--radius);
  position: relative;
  transition: width 0.6s ease;
  background: linear-gradient(90deg, var(--primary) 0%, #0056b3 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.rating-progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.3) 50%, transparent 100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.rating-progress-bar.progress-novice {
  background: linear-gradient(90deg, var(--secondary) 0%, #5a6268 100%);
}

.rating-progress-bar.progress-amateur {
  background: linear-gradient(90deg, var(--primary) 0%, #0056b3 100%);
}

.rating-progress-bar.progress-pilot {
  background: linear-gradient(90deg, var(--pilot) 0%, #5a32a3 100%);
}

.rating-progress-bar.progress-professional {
  background: linear-gradient(90deg, var(--success) 0%, #146c43 100%);
}

.rating-progress-bar.progress-master {
  background: linear-gradient(90deg, var(--warning) 0%, #e0a800 100%);
}

.rating-progress-bar.progress-legend {
  background: linear-gradient(90deg, var(--danger) 0%, #b02a37 100%);
}

.progress-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.85rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 
    -1px -1px 0 rgba(0, 0, 0, 0.8),
    1px -1px 0 rgba(0, 0, 0, 0.8),
    -1px 1px 0 rgba(0, 0, 0, 0.8),
    1px 1px 0 rgba(0, 0, 0, 0.8),
    0 0 4px rgba(0, 0, 0, 0.9);
  z-index: 1;
}

/* ===== СТОЛБЕЦ ОБНОВЛЕНИЯ ===== */
.last-updated {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  font-weight: 500;
}

/* ===== РЕЙТИНГ АВАРИЙНОСТИ В ТАБЛИЦЕ ===== */
.crash-rate-display {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 90px;
  max-width: 90px;
  padding: 0 5px;
}

.crash-rate-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.2;
}

.crash-rate-badge-star {
  background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
  color: #000;
  box-shadow: 0 2px 6px rgba(255,215,0,0.4);
}

.crash-rate-badge-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  color: white;
  box-shadow: 0 2px 6px rgba(40,167,69,0.3);
}

.crash-rate-badge-warning {
  background: linear-gradient(135deg, #ffc107 0%, #ffcd39 100%);
  color: #000;
  box-shadow: 0 2px 6px rgba(255,193,7,0.3);
}

.crash-rate-badge-orange {
  background: linear-gradient(135deg, #fd7e14 0%, #ff922b 100%);
  color: white;
  box-shadow: 0 2px 6px rgba(253,126,20,0.3);
}

.crash-rate-badge-danger {
  background: linear-gradient(135deg, #dc3545 0%, #e74c3c 100%);
  color: white;
  box-shadow: 0 2px 6px rgba(220,53,69,0.3);
}

.crash-rate-avg {
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.8;
  line-height: 1.1;
}

/* ===== ОПТИМИЗАЦИЯ ШИРИНЫ КОЛОНОК ТАБЛИЦЫ ===== */
.rating-table {
  table-layout: fixed;
  width: 100%;
}

.rating-table th:nth-child(1),  /* # */
.rating-table td:nth-child(1) {
  width: 40px;
  text-align: center;
}

.rating-table th:nth-child(2),  /* Страна */
.rating-table td:nth-child(2) {
  width: 60px;
  text-align: center;
}

.rating-table th:nth-child(3),  /* Пилот */
.rating-table td:nth-child(3) {
  width: 200px;
  min-width: 160px;
}

.rating-table th:nth-child(4),  /* Уровень */
.rating-table td:nth-child(4) {
  width: 45px;
  text-align: center;
}

.rating-table th:nth-child(5),  /* Рейтинг */
.rating-table td:nth-child(5) {
  width: 75px;
  text-align: center;
}

.rating-table th:nth-child(6),  /* Изм. */
.rating-table td:nth-child(6) {
  width: 65px;
  text-align: center;
}

.rating-table th:nth-child(7),  /* Ранг */
.rating-table td:nth-child(7) {
  width: 115px;
  min-width: 100px;
  max-width: 120px;
  overflow: hidden;
}

.rating-table th:nth-child(8),  /* Рейтинг аварийности */
.rating-table td:nth-child(8) {
  width: 100px;
  min-width: 85px;
  text-align: center;
}

.rating-table th:nth-child(9),  /* Гонки */
.rating-table td:nth-child(9) {
  width: 50px;
  text-align: center;
}

.rating-table th:nth-child(10),  /* Прогресс */
.rating-table td:nth-child(10) {
  width: 100px;
  min-width: 80px;
}

.rating-table th:nth-child(11), /* Последнее обновление */
.rating-table td:nth-child(11) {
  width: 100px;
  min-width: 85px;
  text-align: center;
  font-size: 0.7rem;
  white-space: nowrap;
}

/* Специальные стили для заголовков с длинным текстом */
.rating-table thead th:nth-child(8) { /* Рейтинг аварийности */
  font-size: 0.6rem;
  line-height: 1.15;
  padding: 0.5rem 0.2rem;
}

.rating-table thead th:nth-child(11) { /* Последнее обновление */
  font-size: 0.6rem;
  line-height: 1.15;
  padding: 0.5rem 0.2rem;
}

/* ===== СТОЛБЕЦ УРОВНЯ ===== */
.level-col {
  width: 45px;
}

.pilot-level {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 1200px) {
  .rating-table {
    font-size: 0.9rem;
  }
  
  /* Уменьшаем ширину колонок на средних экранах */
  .rating-table th:nth-child(3),  /* Пилот */
  .rating-table td:nth-child(3) {
    width: 170px;
    min-width: 150px;
  }
  
  .rating-table th:nth-child(4),  /* Уровень */
  .rating-table td:nth-child(4) {
    width: 40px;
  }
  
  .rating-table th:nth-child(7),  /* Ранг */
  .rating-table td:nth-child(7) {
    width: 105px;
    min-width: 95px;
    max-width: 110px;
  }
  
  .rating-table th:nth-child(8),  /* Рейтинг аварийности */
  .rating-table td:nth-child(8) {
    width: 90px;
    min-width: 80px;
  }
  
  .rating-table th:nth-child(10),  /* Прогресс */
  .rating-table td:nth-child(10) {
    width: 90px;
    min-width: 75px;
  }
  
  .rating-table th:nth-child(11), /* Последнее обновление */
  .rating-table td:nth-child(11) {
    width: 80px;
    font-size: 0.7rem;
  }
  
  .rank-badge {
    font-size: 0.65rem;
    padding: 0.25rem 0.4rem;
    gap: 0.2rem;
  }
  
  .rank-icon {
    font-size: 0.7rem;
  }
}

@media (max-width: 768px) {
  .rating-table {
    font-size: 0.8rem;
  }
  
  /* Еще больше уменьшаем колонки на мобильных */
  .rating-table th:nth-child(3),  /* Пилот */
  .rating-table td:nth-child(3) {
    width: 130px;
    min-width: 110px;
  }
  
  .rating-table th:nth-child(4),  /* Уровень */
  .rating-table td:nth-child(4) {
    width: 35px;
  }
  
  .rating-table th:nth-child(7),  /* Ранг */
  .rating-table td:nth-child(7) {
    width: 90px;
    min-width: 80px;
    max-width: 95px;
  }
  
  .rating-table th:nth-child(8),  /* Рейтинг аварийности */
  .rating-table td:nth-child(8) {
    width: 80px;
    min-width: 70px;
  }
  
  .rating-table th:nth-child(10),  /* Прогресс */
  .rating-table td:nth-child(10) {
    width: 70px;
    min-width: 60px;
  }
  
  .rating-table th:nth-child(11), /* Последнее обновление */
  .rating-table td:nth-child(11) {
    width: 70px;
    font-size: 0.65rem;
  }
  
  .rank-badge {
    font-size: 0.55rem;
    padding: 0.2rem 0.35rem;
    gap: 0.15rem;
    letter-spacing: 0.2px;
  }
  
  .rank-icon {
    font-size: 0.6rem;
  }
  
  .crash-rate-badge {
    font-size: 8px;
    padding: 1px 4px;
  }
  
  .crash-rate-avg {
    font-size: 9px;
  }
  
  .pilot-level {
    font-size: 0.9rem;
  }
}

@media (max-width: 992px) {
  .rating-header h1 {
    font-size: 1.4rem;
  }
  
  .rating-header .lead {
    font-size: 0.85rem;
  }
  
  .rating-table thead th,
  .rating-table tbody td {
    padding: 0.5rem 0.25rem;
  }
  
  .pilot-avatar {
    width: 32px;
    height: 32px;
  }
  
  .pilot-name {
    font-size: 0.9rem;
  }
  
  .rank-badge {
    padding: 0.25rem 0.4rem;
    font-size: 0.6rem;
    gap: 0.2rem;
  }
  
  .rank-icon {
    font-size: 0.7rem;
  }
}

@media (max-width: 768px) {
  .rating-page {
    padding: 0;
  }
  
  .rating-header {
    padding: 0.75rem 0;
    margin-bottom: 1rem;
  }
  
  .rating-header h1 {
    font-size: 1.3rem;
  }
  
  .rating-header .lead {
    font-size: 0.8rem;
  }
  
  .rating-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
  
  .rating-btn .rating-icon {
    font-size: 1rem;
  }
  
  .rating-table-container {
    margin: 0 -15px;
    border-radius: 0;
  }
  
  .rating-table-container .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }
  
  .rating-table thead th,
  .rating-table tbody td {
    padding: 0.5rem 0.25rem;
    font-size: 0.8rem;
  }
  
  .pilot-cell {
    min-width: 150px;
  }
  
  .pilot-avatar {
    width: 28px;
    height: 28px;
  }
  
  .rating-progress {
    height: 16px;
  }
  
  .progress-text {
    font-size: 0.75rem;
  }
}

@media (max-width: 576px) {
  .rating-table thead th,
  .rating-table tbody td {
    padding: 0.25rem 0.1rem;
    font-size: 0.75rem;
  }
  
  .pilot-cell {
    min-width: 120px;
  }
  
  .pilot-avatar {
    width: 24px;
    height: 24px;
  }
  
  .rank-badge {
    padding: 0.15rem 0.3rem;
    font-size: 0.5rem;
    gap: 0.1rem;
    letter-spacing: 0.1px;
  }
  
  .rank-icon {
    font-size: 0.55rem;
  }
  
  .rating-progress {
    height: 14px;
  }
  
  .progress-text {
    font-size: 0.7rem;
  }
}

/* ===== УБИРАЕМ АНИМАЦИИ ЗАГРУЗКИ, ЧТОБЫ НЕ МЕШАТЬ HOVER-ЭФФЕКТАМ ===== */

/* ===== ДОПОЛНИТЕЛЬНЫЕ УТИЛИТЫ ===== */
.text-gradient {
  background: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.shadow-soft {
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.border-gradient {
  border: 2px solid;
  border-image: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%) 1;
}

/* ===== ДОПОЛНИТЕЛЬНЫЕ АДАПТИВНЫЕ СТИЛИ ===== */
@media (max-width: 480px) {
  .rating-header h1 {
    font-size: 1.5rem;
  }
  
  .rating-header .lead {
    font-size: 0.9rem;
  }
  
  .rating-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .rating-table thead th {
    font-size: 0.7rem;
    padding: 0.5rem 0.1rem;
  }
  
  .rating-table tbody td {
    font-size: 0.7rem;
    padding: 0.25rem 0.1rem;
  }
  
  .pilot-cell {
    min-width: 100px;
  }
  
  .pilot-avatar {
    width: 20px;
    height: 20px;
  }
  
  .pilot-name {
    font-size: 0.8rem;
  }
  
  .rank-badge {
    padding: 0.1rem 0.25rem;
    font-size: 0.45rem;
    gap: 0.08rem;
  }
  
  .rank-icon {
    font-size: 0.5rem;
  }
  
  .rating-progress {
    height: 12px;
  }
  
  .progress-text {
    font-size: 0.65rem;
  }
  
  .rating-value {
    font-size: 1rem;
  }
  
  .rating-change {
    font-size: 0.7rem;
  }
}

/* ===== УЛУЧШЕНИЯ ДЛЯ ПЕЧАТИ ===== */
@media print {
  .rating-page {
    background: white;
  }
  
  .rating-header {
    background: white;
    color: black;
    box-shadow: none;
  }
  
  .rating-table-container {
    box-shadow: none;
    border: 1px solid #ccc;
  }
  
  .rating-table thead {
    background: #f5f5f5;
    color: black;
  }
  
  .rating-table tbody tr:hover {
    background: white;
    transform: none;
    box-shadow: none;
  }
  
  .rating-progress-bar::after {
    display: none;
  }
}

/* ===== УЛУЧШЕНИЯ ДОСТУПНОСТИ ===== */
@media (prefers-reduced-motion: reduce) {
  .rating-table tbody tr,
  .rating-progress-bar,
  .rating-btn,
  .rank-badge {
    animation: none;
    transition: none;
  }
  
  .rating-progress-bar::after {
    animation: none;
  }
}

/* ===== ВЫСОКИЙ КОНТРАСТ ===== */
@media (prefers-contrast: high) {
  .rating-table thead {
    background: #000;
    color: #fff;
  }
  
  .rating-table tbody tr:hover {
    background: #f0f0f0;
  }
  
  .rank-badge {
    border: 2px solid currentColor;
  }
  
  .rating-progress {
    border: 1px solid #000;
  }
}

/* ===== СТИЛИ ДЛЯ TOOLTIP ===== */
.tooltip {
  font-size: 0.875rem;
}

.tooltip-inner {
  max-width: 400px !important;
  min-width: 300px;
  text-align: left;
  padding: 12px 16px;
  line-height: 1.4;
  white-space: nowrap;
}

/* Специальные стили для tooltip рейтинга аварийности */
.crash-rate-display[data-bs-toggle="tooltip"] + .tooltip .tooltip-inner {
  max-width: 500px !important;
  min-width: 400px;
  white-space: normal;
  text-align: left;
}

/* Стили для tooltip распределения по силе */
.stat-label[data-bs-toggle="tooltip"] + .tooltip .tooltip-inner {
  max-width: 350px !important;
  min-width: 280px;
  white-space: normal;
  text-align: left;
}
