.round-filter-btn {
  /* padding: 6px 12px; */
  padding: 4px 7px;
  font-size: 0.8em;
  background: rgba(50, 55, 70, 0.7);
  border: 1px solid #3a7bd5;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #b0b8c8;
  white-space: nowrap;
  flex-shrink: 0;
}

.round-filter-btn:hover {
  background: rgba(50, 55, 70, 0.95);
  border-color: #5a9fd4;
}

/* Кнопка завершённого тура (все матчи завершены) */
.round-filter-btn.finished {
  background: rgba(255, 152, 0, 0.6);
  border-color: #f57c00;
  color: #ffe0b2;
}

.round-filter-btn.finished:hover {
  background: rgba(255, 152, 0, 0.8);
  border-color: #c9721c;
}

/* Активная кнопка тура (приоритет ВЫШЕ finished) */
.round-filter-btn.active {
  background: rgba(58, 123, 213, 0.8);
  border-color: #3a7bd5;
  color: #e0e6f0;
}

.round-filter-btn.active:hover {
  background: rgba(58, 123, 213, 0.95);
}

/* Кнопка редактирования порядка туров */
.edit-rounds-btn {
  padding: 4px 8px;
  font-size: 0.75em;
  background: rgba(50, 55, 70, 0.7);
  border: 1px solid #3a7bd5;
  border-radius: 10px;
  cursor: pointer;
  color: #b0b8c8;
  transition: all 0.2s ease;
  margin-left: 5px;
}

.edit-rounds-btn:hover {
  background: rgba(50, 55, 70, 0.95);
  border-color: #5a9fd4;
}
#roundsFilterContainer {
  cursor: grab;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#roundsFilterContainer:active {
  cursor: grabbing;
}

/* Скрытие скроллбара для WebKit браузеров (Chrome, Safari, Edge) */
#roundsFilterContainer > div::-webkit-scrollbar {
  display: none;
}

#roundsFilterScroll::-webkit-scrollbar {
  display: none;
}

/* Контейнер с кнопками туров для горизонтального скролла */
#roundsFilterScroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  align-items: center;
  padding: 8px 10px;
  height: 100%;
  /* Ключевое свойство - содержимое займет столько ширины сколько нужно */

/* Стили для tournamentRoundsFilter (аналогично roundsFilterContainer) */
#tournamentRoundsFilter {
  cursor: grab;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

#tournamentRoundsFilter:active {
  cursor: grabbing;
}

/* Скрытие скроллбара для WebKit браузеров (Chrome, Safari, Edge) */
#tournamentRoundsFilter > div::-webkit-scrollbar {
  display: none;
}

#tournamentRoundsFilterScroll::-webkit-scrollbar {
  display: none;
}

/* Контейнер с кнопками туров для горизонтального скролла */
#tournamentRoundsFilterScroll {
  display: flex;
  flex-wrap: nowrap;
  gap: 7px;
  align-items: center;
  padding: 8px 10px;
  height: 100%;
  /* Ключевое свойство - содержимое займет столько ширины сколько нужно */
}
  width: max-content;
}

/* Модальное окно сортировки туров */
.rounds-order-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.rounds-order-modal.active {
  display: flex;
}

.rounds-order-content {
  background: rgba(40, 44, 54, 0.95);
  border-radius: 12px;
  padding: 20px;
  max-width: 350px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
}

.rounds-order-content h3 {
  margin: 0 0 15px 0;
  font-size: 1.1em;
  color: #e0e6f0;
}

.rounds-order-list {
  list-style: none;
  padding: 0;
  margin: 0 0 15px 0;
}

.rounds-order-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: rgba(50, 55, 70, 0.7);
  border: 1px solid #3a7bd5;
  border-radius: 8px;
  cursor: grab;
  transition: all 0.2s ease;
  color: #e0e6f0;
}

.rounds-order-item:active {
  cursor: grabbing;
}

.rounds-order-item.dragging {
  opacity: 0.5;
  background: rgba(30, 34, 44, 0.9);
}

.rounds-order-item.drag-over {
  border-color: #5a9fd4;
  background: rgba(58, 123, 213, 0.2);
}

.rounds-order-item .drag-handle {
  margin-right: 10px;
  color: #b0b8c8;
  font-size: 1.1em;
}

.rounds-order-item .round-name {
  flex: 1;
  font-size: 0.9em;
  color: #e0e6f0;
}

.rounds-order-item .delete-round-btn {
  background: transparent;
  border: none;
  color: #f44336;
  font-size: 1.5em;
  line-height: 1;
  cursor: pointer;
  padding: 0 8px;
  margin-left: 10px;
  transition: all 0.2s ease;
  opacity: 0.7;
}

.rounds-order-item .delete-round-btn:hover {
  opacity: 1;
  color: #ff5252;
  transform: scale(1.2);
}

.rounds-order-buttons {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.rounds-order-buttons button {
  padding: 8px 16px;
  font-size: 0.85em;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.rounds-order-buttons .cancel-btn {
  background: rgba(100, 110, 130, 0.3);
  border: 1px solid #3a7bd5;
  color: #b0b8c8;
}

.rounds-order-buttons .cancel-btn:hover {
  background: rgba(100, 110, 130, 0.5);
  color: #e0e6f0;
}

.rounds-order-buttons .save-btn {
  background: rgba(58, 123, 213, 0.8);
  border: 1px solid #3a7bd5;
  color: #e0e6f0;
}

.rounds-order-buttons .save-btn:hover {
  background: rgba(58, 123, 213, 0.95);
  color: #fff;
}

/* Стили для кнопок результатов финала */
.result-btn {
  background: transparent;
  border: 1px solid #4db8a8;
  color: #4db8a8;
  padding: 8px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: bold;
}

.result-btn:hover {
  background: rgba(77, 184, 168, 0.2);
  border-color: #4db8a8;
}

.finalMatchResultWindow {
  padding: 20px;
}
.finalMatchResultWindow h3 {
  margin: 0 auto 10px;
}
.finalMatchResultWindow h4 {
  text-align: center;
}
.finalMatchResultWindow button {
  padding: 3px 10px !important;
}

#finalMatchResultModal {
  display: none;
}

/* Toggle Switch для уведомлений */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 28px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #0088cc;
}

input:focus + .slider {
  box-shadow: 0 0 1px #0088cc;
}

input:checked + .slider:before {
  transform: translateX(22px);
}

/* ===== КАРТОЧКА ПОБЕДИТЕЛЯ ТУРНИРА ===== */

.tournament-winner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  /* min-height: 600px; */
  padding: 20px;
}

.tournament-winner-card {
  width: 100%;
  max-width: 500px;
  max-height: 40vh;
  max-height: 100%;
  background: linear-gradient(
    135deg,
    rgba(58, 123, 213, 0.15) 0%,
    rgba(77, 184, 168, 0.1) 100%
  );
  border: 2px solid #5a9fd4;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  text-align: center;
  display: flex;
  flex-direction: column;
}

.winner-header {
  font-size: 1.2em;
  font-weight: bold;
  color: #ffd700;
  margin-bottom: 12px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  word-break: break-word;
}

.winner-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  overflow-y: auto;
}

.winner-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #ffd700;
  /* box-shadow: 0 0 20px rgba(255, 215, 0, 0.4); */
  flex-shrink: 0;
}

.winner-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.winner-info {
  width: 100%;
}

.winner-name {
  font-size: 1.3em;
  font-weight: bold;
  color: #e0e6f0;
  margin-bottom: 10px;
}

.winner-stats {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(44, 50, 63, 0.5);
  border-radius: 10px;
  padding: 12px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 0.9em;
}

.stat-label {
  color: #a0a8b8;
  font-size: 0.9em;
  /* text-align: left; */
  flex: 1;
}

.stat-value {
  color: #4db8a8;
  font-size: 1em;
  font-weight: bold;
  /* text-align: right; */
  flex: 0 0 auto;
}

.award-description {
  color: #ffd700;
  font-size: 1em;
  max-width: 150px;
  /* text-align: right; */
  word-break: break-word;
}

.no-winner-message {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 300px;
  font-size: 1.8em;
  color: #ff9800;
  font-weight: bold;
  text-align: center;
  padding: 40px;
  background: rgba(255, 152, 0, 0.1);
  border-radius: 10px;
  border: 2px dashed #ff9800;
}

/* Контейнер с матчами - расположение в одну строку с space-between */
.matches-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

/* Кастомный select */
.reminder-time-btn {
  padding: 10px;
  background: rgba(40, 44, 54, 0.9);
  border: 1px solid rgba(90, 159, 212, 0.5);
  border-radius: 6px;
  color: #b0b8c8;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.95em;
  font-weight: 500;
}

.reminder-time-btn:hover {
  background: rgba(90, 159, 212, 0.2);
  border-color: #5a9fd4;
  transform: translateY(-2px);
}

.reminder-time-btn.selected {
  background: rgba(90, 159, 212, 0.3);
  border-color: #5a9fd4;
  color: #5a9fd4;
  font-weight: 600;
}

