@media (max-width: 768px) {

  /* Базовые настройки */

  h1 {
    font-size: 3em;
    margin: 0.67em 0;
  }

  h2,
  .h2 {
    font-size: 36px;
  }

  .hotline-block{ display: none; height: auto;}
  .hotline-content{ margin: 0 16px; font-size: 14px;}
  .btn-hotline-close {right: 8px;}



  /* Навбар */
  .navbar {
    height: auto;
    flex-direction: column;
    padding: 8px 16px;
    position: relative;
  }

  .navbar>.h1 {
    width: 100%;
    justify-content: center;
    padding: 8px 0;
    position: relative;
  }

  .navigation_menu,
  .navbar_auth,
  .navbar_profile_block {
    width: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
  }

  .navbar_profile {
    border-radius: 8px;
    background-color: #333333;
  }

  .navigation_menu a {
    margin: 4px 0;
    padding: 8px 16px;
    text-align: center;
    width: 100%;
  }

  /* Кнопка для раскрытия меню */
  .mobile-menu-toggle {
    display: block;
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
  }

  /* Показываем меню при активном состоянии */
  .navbar.active {
    border-radius: 0 0 16px 16px;
  }

  .navbar.active .navigation_menu,
  .navbar.active .navbar_auth,
  .navbar.active .navbar_profile_block {
    display: flex;
  }

  /* Дропдаун профиля в мобильной версии */
  .profile-dropdown {
    position: static;
    width: 100%;
    border: none;
    background-color: transparent;
  }

  .profile-dropdown a {
    text-align: center;
    padding: 8px 16px;
  }

  .navbar_profile {
    width: 100%;
    text-align: center;
    padding: 8px 0;
  }


  /* Контейнеры */
  .container {
    padding: 15px;
    margin: 15px auto;
  }

  /* Таблицы */
  table {
    overflow-x: auto;
    white-space: nowrap;
  }


  /* Кнопки */
  .button,
  button {
    padding: 8px 16px;
  }

  .button_dark {
    padding: 12px 10px;
    margin: 5px 0;
  }

  /* Модальные окна */
  .modal-content {
    width: 80%;
    padding: 16px;
  }

  /* Пагинация */
  .pagination-wrapper {
    justify-content: center;
  }

  /* Карточки участников */
  .member-card {
    padding: 12px;
  }

  .user_stats {
    flex-direction: column;
    width: 90%;
  }

  .cookie-consent {
    font-size: 12px;
    width: 100%;
    margin: 8px;
  }

  .cookie-btn {
    height: 32px;
  }

  .modal-content {
    max-width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 15px;
  }

  .scoring-info {
    width: 100%;
  }

  .scoring-table {
    white-space: nowrap;
    /* Запрещаем перенос текста */
  }

  .scoring-table td {
    padding: 8px 12px;
    /* Увеличиваем отступы для мобильных */
  }

  .profile_container {
    flex-direction: column-reverse;
  }

  .links {
    margin-right: 0px;
  }

  .user-info {
    flex-direction: column;
    gap: 5px;
  }

  .matches-section {
    overflow-y: auto;
    max-height: 80vh;
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    margin-top: 8px;
    padding: 6px;

  }

  .join_request_card {
    flex-direction: column;
  }

  .admin-actions {
    flex-direction: column;
  }

  .scroll_up_btn {
    top: 110px;
    left: 4px;
    bottom: unset;
    right: unset;
    padding: 8px 8px 4px 8px;
  }

  .scroll_up_btn svg {
    height: 18px;
    width: 18px;
  }
}

/* Дополнительные адаптации для очень маленьких экранов */
@media screen and (max-width: 480px) {

  /* Навбар */
  .navbar {
    padding: 5px;
  }


  /* Формы */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="date"],
  input[type="number"],
  input[type="datetime-local"],
  textarea,
  select {
    font-size: 14px;
  }

  /* Кнопки */
  .button,
  button {
    font-size: 16px;
  }

  /* Карточки участников */
  .member-info {
    font-size: 13px;
  }
}