/* Глобальные настройки */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Segoe UI', sans-serif;
  color: white;
  background: url("../images/background.jpg") no-repeat center center/cover;
  overflow: hidden;
}

.loader {
  text-align: center;
  font-weight: bold;
  font-size: 18px;
  margin: 10px 0;
  animation: fade 1s infinite alternate;
}
@keyframes fade {
  from { opacity: 0.3; }
  to   { opacity: 1; }
}

/* Контент всегда от верха */
.content {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 40px 60px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Обёртка центра */
.center {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Обёртка таблицы */
.ranking-layout {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  margin-top: 20px;
  min-height: 480px; /* предотвращает сжатие при пустом контенте */
}

/* Таблица рейтинга */
.ranking-table {
  width: 100%;
  background-color: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  font-size: 14px;
  color: white;
  margin: 0 auto;
}

/* Строки таблицы */
.table-header,
.ranking-row {
  display: flex;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-header {
  font-weight: bold;
  background-color: rgba(255, 255, 255, 0.08);
}

.ranking-row:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.03);
}

.ranking-row:hover {
  background-color: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}

.table-header div,
.ranking-row div {
  flex: 1;
  text-align: center;
}

/* Аватарки */
.avatar-icon {
  width: 25px;
  height: 25px;
  vertical-align: middle;
}

/* Табы */
.rankings-tabs {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.rankings-tabs .tab {
  padding: 10px 20px;
  margin-right: 10px;
  margin-bottom: 10px;
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.rankings-tabs .tab.active {
  background-color: #7b4dfb;
  color: white;
}

.rankings-tabs .tab:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* Фильтры */
.filters {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filters > * {
  margin-right: 12px;
  margin-bottom: 12px;
}

.filters select,
.filters input {
  background-color: #2c2f4a;
  border: none;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
}

/* Пагинация */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.page-button {
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
  border: none;
  padding: 6px 12px;
  margin: 4px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.2s ease;
}

.page-button.active {
  background-color: #7b4dfb;
  color: white;
}

.page-button:hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* 📱 Адаптив */
@media screen and (max-width: 1200px) {
  .ranking-layout {
    flex-direction: column;
  }

  .ranking-table {
    width: 100%;
  }
}


/* Верхняя панель */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0px;
}

/* Статус */
.status, .updating {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  padding: 6px 12px;
  border-radius: 12px;
  width: 200px;
}

.status img, .updating img {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.status-container {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.online-bar, .progress-bar {
  height: 4px;
  width: 100%;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  margin-top: 4px;
  overflow: hidden;
}

#online-fill, #progress-fill {
  height: 100%;
  width: 0%;
  background-color: #4caf50;
  transition: width 0.3s;
}


/* Кнопки */
.buttons {
  display: flex;
}

.buttons .start {
  margin-right: 20px;
}

/* Убрать фокус-рамки у всех элементов управления */
select:focus,
option:focus,
input:focus,
button:focus {
  outline: none;
  box-shadow: none;
  border: none;
}

/* Также можно стилизовать сами select */
select,
input[type="text"] {
  background-color: #2c2f4a;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 14px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.page-button {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: white;
  padding: 6px 12px;
  margin: 2px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s;
}

.page-button:hover {
  background: rgba(255, 255, 255, 0.15);
}

.page-button.active {
  background: #7b4dfb;
  font-weight: bold;
}

.pagination-dots {
  padding: 6px 10px;
  color: #aaa;
  font-size: 14px;
  user-select: none;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 15px;
  border-radius: 50%;
  vertical-align: middle;
}
.status-dot.online {
  background-color: #4caf50;
}
.status-dot.offline {
  background-color: #f44336;
}

.elo-icon {
  width: 25px;
  height: 25px;
  object-fit: contain;
  display: inline-block;
  vertical-align: middle;
  cursor: help;
}
