body {
    font-family: Arial, sans-serif;
}

/* Основная таблица */
table {
    width: auto; /* Пусть ширина таблицы адаптируется к содержимому */
    border-spacing: 0; /* Устраняем промежутки между ячейками */
}

/* Минимализм в оформлении */
table th, table td {
    padding: 6px 8px; /* Уменьшаем отступы */
    min-width: 80px; /* Ограничиваем минимальную ширину */
    max-width: 150px; /* Ограничиваем максимальную ширину */
    word-break: break-all; /* Переносим длинные слова */
}

table td {
    text-align: center;
}

/* Подсветка при наведении мыши */
table tr:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Нет рамок и линий между ячейками */
table, table th, table td {
    border: none;
}

/* Оформление шапки таблицы */
table thead th {
    background-color: #fafafa;
    color: #333;
    font-weight: bold;
}

/* Фиксированная шапка при прокрутке */
table thead {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: inherit;
}

/* Прокручиваемая область */
.table-container {
    overflow-x: auto;
    max-width: 100%; /* Ограничиваем ширину контейнера */
}

/* Адаптация для мобильных устройств */
@media screen and (max-width: 768px) {
    table th, table td {
        white-space: normal; /* Позволяем словам разрываться на маленькие экраны */
    }
}

th.sorted-up::after {
    content: "\25B2"; /* Символ стрелки вверх */
    margin-left: 5px;
}

th.sorted-down::after {
    content: "\25BC"; /* Символ стрелки вниз */
    margin-left: 5px;
}

/* Стиль для таблицы в раскрытом блоке */
.details-table {
  width: 100%;
  border: 1px solid transparent;
  border-collapse: separate;
  border-spacing: 0;
}

.details-table th, .details-table td {
  border: 1px solid transparent;
/* border: 1px solid #ccc; */
  padding: 4px 8px;
  text-align: center;
}

.details-table th {
  font-weight: bold;
}

.loader {
  display: block;
  margin: 8px auto;
  padding: 12px;
  text-align: center;
  color: #888;
  font-style: italic;
}

.diff-low {
    background-color: #06f97b;
}
.diff-medium {
    background-color: #e7e7e7;
}
.diff-high{
    background-color: #ff1651;
    color: white;
}
.diff-very-high{
    background-color: #ff1651; /* very-high был #800000*/
    color: white;
}

.fixture-points {
    width: 60px;
    margin: 0 auto;
    border-radius: 0 0 10px 10px;
    text-align: center;
    display: block;      /* чтобы margin:0 auto сработал */
    white-space: nowrap;
    font-size: 15px;
    font-weight: bold;
}

.card-container {
  display: flex;
  gap: 16px; /* расстояние между карточками */
}

.player-card {
    background: #09eaff;
    border-radius: 18px;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    max-width: 460px;
    margin-bottom: 24px;
    /* Добавляем небольшой отступ справа, если понадобится */
    position: relative;
    flex: 1; /* равное распределение по ширине */
}

.player-photo {
    width: 90px;
    height: 120px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.09);
    flex-shrink: 0; /* Чтобы фото не сжималось */
}

.player-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #37003c;
    font-family: inherit;
    /* Чтобы занял оставшееся место */
    flex-grow: 1;
}

.player-first-name {
    font-size: 16px;
    font-weight: bold;
}

.player-second-name {
    font-size: 24px;
    font-weight: bold;
}

.player-position, .player-team {
    font-size: 12px;
    opacity: 0.85;
}

.details-table {
    margin-top: 18px;
}

td .team-logo {
    display: block;
    margin: 0 auto;
}

.team-logo {
    width: 25px;
    height: 25px;
}

.team-logo-large {
    width: 120px;
    height: 120px;
    object-fit: contain;
    /* Чтобы логотип не сжимал player-info */
    flex-shrink: 0;
}

.opponent-logo {
    width: 50px;
    height: 50px;
}

.checkbox-wrapper {
  display: inline-block;
  margin-right: 12px;
}

.checkbox-custom {
  display: inline-block;
  background: #f2f2f2;
  border-radius: 18px;
  padding: 8px 18px;
  font-size: 16px;
  color: #333;
  cursor: pointer;
  border: 2px solid #e0e0e0;
  transition: background 0.2s, border 0.2s;
  user-select: none;
}

.checkbox-custom.checked {
  background: #1976d2;
  color: #fff;
  border: 2px solid #1976d2;
}

.checkbox-custom input {
  display: none;
}

.stylish-input {
  border: 1.5px solid #e0e0e0;
  border-radius: 22px;
  padding: 10px 24px;
  font-size: 18px;
  outline: none;
  margin-bottom: 28px;
  width: 230px;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  flex-basis: 100%;
  margin-top: 16px;
  max-width: 900px;
}

.stylish-input:focus {
  border-color: #1976d2;
  box-shadow: 0 4px 20px rgba(25,118,210,0.08);
}

.filters-area {
  display: flex;
  flex-direction: column; /* вертикально */
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start; /* чтобы левый край был ровным */
}


.table-area {
  margin-top: 18px;
}

/* Кнопки в стиле "выбранного фильтра", но как полноценные кнопки */
.btn-main {
  display: inline-block;
  background: #1976d2;
  color: #fff;
  border: 2px solid #1976d2;
  border-radius: 18px;
  padding: 8px 18px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
  text-align: center;
  text-decoration: none;
  user-select: none;
}
.btn-main.exit-button {
  margin: 0;
}
.btn-main:hover {
  background: #145aa6;
  border-color: #145aa6;
}
.header-image {
  max-height: 140px;        /* Пример - регулируй по вкусу */
  width: auto;
  display: block;
  margin: 0 auto;
  object-fit: contain;
}
.header-image-left {
  max-height: 140px;        /* Пример - регулируй по вкусу */
  width: auto;
  display: block;
  margin-left: 0;   /* по левому краю */
  margin-right: auto;
  object-fit: contain;
}
.main-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}
.drafts,
.players,
.code-input,
.action-bar {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.drafts h2 {
  margin: 0;
  font-size: 20px;
  color: #333;
}
.top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  margin-right: 34px;      /* чуть смещаем от края */
}
.update-time {
  font-size: 14px;
  color: #666;
  font-style: italic;
}
/* Контейнер регистрации - карточка с отступами и тенью */
.register-main-container {
  max-width: 440px;
  margin: 40px auto 0 auto;
  padding: 32px 40px;
  background: #f2faff;
  border-radius: 24px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* Заголовок формы */
.register-main-container h2 {
  margin-bottom: 18px;
  font-size: 26px;
  font-weight: bold;
  color: #1976d2;
}

/* Отступы для групп полей */
.register-main-container .form-group {
  margin-bottom: 16px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Вертикальное расположение label и input */
.register-main-container label {
  font-size: 16px;
  color: #333;
}

/* Стиль инпутов (аналогичный .stylish-input) */
.register-main-container input[type="text"],
.register-main-container input[type="password"] {
  border: 1.5px solid #e0e0e0;
  border-radius: 22px;
  padding: 10px 24px;
  font-size: 18px;
  outline: none;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-top: 2px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.register-main-container input[type="text"]:focus,
.register-main-container input[type="password"]:focus {
  border-color: #1976d2;
  box-shadow: 0 4px 20px rgba(25,118,210,0.08);
}

/* Блок кода из Telegram с подсказкой рядом */
.register-main-container .form-group-inline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  width: 100%;
}

.register-main-container {
  white-space: nowrap;
  font-size: 0.97rem;
  color: #666;
}

.telegram-tip {
    font-size: 0.97rem;
    color: #666;
    margin: 6px 0 0 2px;
    word-break: break-word;
}
.telegram-tip a {
    color: #5e1da8;
    text-decoration: underline;
}

/* Кнопка регистрации в стиле btn-main */
.register-main-container .register-btn {
  display: inline-block;
  background: #1976d2;
  color: #fff;
  border: 2px solid #1976d2;
  border-radius: 18px;
  padding: 10px 30px;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
  margin-top: 8px;
  margin-bottom: 8px;
  box-shadow: 0 2px 10px rgba(25,118,210,0.1);
}

.register-main-container .register-btn:hover {
  background: #145aa6;
  border-color: #145aa6;
}

.register-btn {
    display: block;
    margin: 18px auto 8px auto; /* сверху отступ, снизу чуть меньше */
    width: 80%;
    max-width: 250px;
    background: #1976d2;
    color: #fff;
    border: 2px solid #1976d2;
    border-radius: 18px;
    padding: 12px 1px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s, border 0.2s;
    box-shadow: 0 2px 10px rgba(25,118,210,0.08);
    text-align: center;
}
.register-btn:hover {
    background: #145aa6;
    border-color: #145aa6;
}

/* Ошибки регистрации */
.register-main-container .register-error {
  color: #ff1651;
  font-size: 16px;
  margin-top: 10px;
  text-align: center;
}

.login-main-container {
  max-width: 400px;
  margin: 48px auto 0 auto;
  padding: 32px 40px;
  background: #f2faff;
  border-radius: 24px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.07);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.login-main-container h2 {
  margin-bottom: 18px;
  font-size: 26px;
  font-weight: bold;
  color: #1976d2;
  text-align: center;
}

.login-main-container .form-group {
  width: 100%;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.login-main-container label {
  font-size: 16px;
  color: #333;
}

.login-main-container input[type="text"],
.login-main-container input[type="password"] {
  border: 1.5px solid #e0e0e0;
  border-radius: 22px;
  padding: 10px 24px;
  font-size: 18px;
  outline: none;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin-top: 2px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.login-main-container input[type="text"]:focus,
.login-main-container input[type="password"]:focus {
  border-color: #1976d2;
  box-shadow: 0 4px 20px rgba(25,118,210,0.08);
}

/* Основная кнопка Войти, стиль из btn-main */
.btn-main.login-btn {
  width: 100%;
  background: #1976d2;
  color: #fff;
  border: 2px solid #1976d2;
  border-radius: 18px;
  padding: 12px 0;
  font-size: 18px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
  box-shadow: 0 2px 10px rgba(25,118,210,0.1);
  margin-top: 8px;
  margin-bottom: 8px;
}

.btn-main.login-btn:hover {
  background: #145aa6;
  border-color: #145aa6;
}

/* Вторичные кнопки */
.login-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  width: 100%;
}

.btn-secondary {
  background: #f2f2f2;
  border: 2px solid #d0d0d0;
  border-radius: 18px;
  padding: 10px 20px;
  font-size: 16px;
  color: #444;
  cursor: pointer;
  transition: background 0.2s, border 0.2s;
}

.btn-secondary:hover {
  background: #e0e0e0;
  border-color: #b0b0b0;
}

.btn-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #e0e0e0;
  color: #888;
}

/* Ошибка */
.login-error {
  color: #ff1651;
  font-size: 16px;
  margin-top: 10px;
  text-align: center;
}

/* Адаптация для мобильных */
@media screen and (max-width:600px){
  .register-main-container {
    max-width: 99vw;
    padding: 14px 6vw;
  }
  .login-main-container {
    max-width: 95vw;
    padding: 16px 6vw;
  }
  .header-image {
    margin-left: 6vw;
  }
}

#draft-register-status {
  display: block;
  margin-top: 4px;      /* небольшой отступ сверху */
  font-size: 0.9em;     /* чуть меньше основного текста */
  font-weight: 500;
  font-family: Arial, sans-serif;
}

.status-success {
  color: #28a745;       /* насыщенный зеленый */
}

.status-error {
  color: #dc3545;       /* насыщенный красный */
}

.table-separator {
  border: none;
  border-top: 1px solid #ccc;
  margin: 24px 0;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  max-width: 1200px;    /* например, увеличить ширину до 1200px */
  width: 90vw;          /* или оставить адаптивную ширину, например 90% окна */
  max-height: 90vh;     /* увеличить максимальную высоту до 90% высоты экрана */
  height: auto;         /* высота подстраивается под контент */
  overflow: visible;    /* если не требуется прокрутка */
  padding: 20px;
  border-radius: 6px;
  position: relative;
  background: #fff;
  box-sizing: border-box;
}

.modal-close {
  position: absolute;
  right: 10px;
  top: 10px;
  font-size: 20px;
  cursor: pointer;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 10px; /* пробелы между элементами */
  max-width: 300px; /* например, чтобы ограничить ширину */
}