:root {
  --bg: #09090b;
  --surface: #18181b;
  --surface-hover: #27272a;
  --text-main: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #ff2a55;
  --accent-glow: rgba(255, 42, 85, 0.15);
  --border: #27272a;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(circle at 50% 0%, var(--accent-glow) 0%, transparent 40%);
  background-repeat: no-repeat;
  background-size: 100% 600px;
  overflow-x: hidden;
}

/* --- Шапка --- */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(9, 9, 11, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 20px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 90px; /* Чтобы кнопки не вылезали за края */
}

header h1 {
  font-family: 'Unbounded', sans-serif;
  font-size: 42px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -1px;
  background: linear-gradient(to right, #fff, #a1a1aa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 6px;
}

header p {
  font-size: 14px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 600;
}

/* --- Список --- */
main {
  max-width: 1000px;
  margin: 30px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* --- Карточки --- */
.tower-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  transition: all 0.2s ease;
  cursor: pointer; /* Указывает, что можно кликнуть */
}

.tower-card:hover {
  background-color: var(--surface-hover);
  border-color: #3f3f46;
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.tower-info {
  display: flex;
  align-items: center;
  gap: 20px;
}

.tower-rank {
  font-family: 'Unbounded', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: var(--text-muted);
  min-width: 50px;
}

.tower-card:nth-child(1) .tower-rank { color: #fbbf24; }
.tower-card:nth-child(2) .tower-rank { color: #e4e4e7; }
.tower-card:nth-child(3) .tower-rank { color: #b45309; }

.tower-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Новый контейнер для названия и акронима */
.tower-title-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: 'Unbounded', sans-serif;
  letter-spacing: -0.5px;
}

.tower-fullname {
  font-size: 18px;
  font-weight: 600;
}

/* Стиль для акронима (серенький, маленький, справа) */
.tower-acronym {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.7;
  white-space: nowrap;
}

/* Обновляем стили для модалки, чтобы акроним тоже влезал */
.modal-header h2 {
  font-family: 'Unbounded', sans-serif;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  padding-right: 30px;
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-header h2 .tower-acronym {
  font-size: 14px;
  color: var(--text-muted);
  opacity: 0.7;
  font-weight: 600;
}

.tower-meta {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  gap: 16px; /* Расстояние между иконками */
  align-items: center; /* Выравниваем иконки и текст по центру */
  flex-wrap: wrap; /* Если ник длинный, перенесется на новую строку */
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px; /* Расстояние между иконкой и ником */
}

.meta-item svg {
  color: #71717a; /* Цвет иконок (серый) */
  transition: color 0.2s ease;
}

/* При наведении на карточку иконки подсвечиваются */
.tower-card:hover .meta-item svg {
  color: var(--accent); /* Неоновый красный/розовый */
}

/* Обновленный блок с рейтингом справа */
.tower-diff-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
}

.tower-diff {
  font-family: 'Unbounded', sans-serif;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
}

.tower-tier {
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
  opacity: 0.9;
}

/* Модалка */
.modal-subtitle {
  font-family: 'Unbounded', sans-serif;
  font-size: 16px;
  font-weight: 600;
}

/* =========================================
   МОДАЛЬНОЕ ОКНО
   ========================================= */
.modal {
  display: none; /* Скрыто по умолчанию */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  width: 90%;
  max-width: 700px;
  padding: 30px;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  max-height: 90vh;
  overflow-y: auto;
}

.modal.active .modal-content {
  transform: translateY(0);
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.close-btn:hover {
  color: var(--accent);
}

.modal-header {
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
}

.modal-header h2 {
  font-family: 'Unbounded', sans-serif;
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 8px;
  padding-right: 30px; /* Чтобы не наезжало на кнопку закрытия */
}

.modal-subtitle {
  font-family: 'Unbounded', sans-serif;
  font-size: 16px;
  color: var(--accent);
  font-weight: 600;
}

/* Видео контейнер (сохраняет пропорции 16:9) */
.video-container {
  width: 100%;
  aspect-ratio: 16 / 9;
  background-color: #000;
  border-radius: 8px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  overflow: hidden;
}

.video-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.video-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
}

/* Сетка с инфой */
.modal-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.info-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.info-value {
  font-size: 14px;
  color: var(--text-main);
  font-weight: 400;
}

/* Адаптив */
@media (max-width: 700px) {
  header h1 { font-size: 32px; }
  header p { font-size: 11px; letter-spacing: 1px; }
  
  .tower-card { padding: 16px; }
  .tower-info { gap: 12px; flex-direction: column; align-items: flex-start; }
  .tower-rank { font-size: 18px; }
  .tower-name { font-size: 15px; }
  .tower-meta { flex-direction: column; gap: 2px; font-size: 11px; }
  .tower-diff { font-size: 22px; }

  .modal-content { padding: 20px; }
  .modal-info-grid { grid-template-columns: 1fr; }
  .modal-header h2 { font-size: 20px; }
}

/* Растягиваем блок викторов на 2 колонки */
.info-item.full-width {
  grid-column: span 2;
  background: rgba(255, 255, 255, 0.03);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}
