.mobile-menu-toggle {
  display: none;
}

/* Мобильный user-input (скрыт на десктопе) */
.user-input-mobile {
  display: none;
}

/* Боковые кнопки навигации (скрыты на десктопе) */
.mobile-nav-buttons {
  display: none;
}

.user-input {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.auth-btn {
  border-radius: 6px;
  padding: 7px 16px;
  font-weight: 600;
  transition: background 0.3s ease, border 0.3s ease, color 0.3s ease,
    transform 0.3s ease;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  cursor: pointer;
  background: transparent;
}

.container.not-logged-in #username {
  display: block;
}

.user-input #username {
  max-width: 170px;
  text-align: center;
  display: none;
}

.user-input #authBtn {
  background: rgba(58, 123, 213, 0.7);
  border: 1px solid #3a7bd5;
  color: #e0e6f0;
}

.user-input #authBtn:hover {
  background: rgba(58, 123, 213, 0.9);
  box-shadow: 0 4px 12px rgba(58, 123, 213, 0.4);
}

/* Скрываем описание сайта после входа */
.container.logged-in .welcome-info,
.container.logged-in .welcome-info-mobile,
.container.logged-in .telegram-info-btn {
  display: none !important;
}

.profile-section .profile-heading-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.profile-section .profile-header h2 {
  margin: 0;
}

.profile-auth-placeholder {
  display: flex;
  justify-content: flex-end;
  min-width: 0;
  width: 0;
  height: 0;
}

#profile-content {
  position: relative;
}

.auth-btn.logout-mode {
  background: transparent;
  color: #f44336;
  padding: 6px 10px;
  flex-direction: row;
  gap: 2px;
  align-items: center;
  min-width: 60px;
  justify-content: center;
  border: none;
  position: absolute;
  top: 5px;
  right: -10px;
  z-index: 2;
  transition: all 0.35s ease;
  box-shadow: none;
}

.auth-btn.logout-mode .logout-cross {
  font-size: 1em;
  line-height: 0.1;
  display: inline-flex;
  color: #f44336;
  transition: transform 0.35s ease;
}

.auth-btn.logout-mode .logout-text {
  font-size: 0.65em;
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: #a0a8b8;
  display: inline-flex;
  overflow: hidden;
  white-space: nowrap;
  max-width: 0;
  opacity: 0;
  transform: translateY(4px) scale(0.65);
  transition: opacity 0.35s ease, transform 0.35s ease, max-width 0.35s ease;
  justify-content: center;
}

.auth-btn.logout-mode:hover {
  transform: scale(1.05);
  box-shadow: none;
  right: 5px;
}

.auth-btn.logout-mode:hover .logout-cross {
  transform: rotate(720deg);
}

.auth-btn.logout-mode:hover .logout-text {
  opacity: 1;
  transform: translateY(0) scale(1);
  max-width: 40px;
}

button#adminBtn,
button#addMatchBtn,
.user-input #adminUsersBtn {
  border: 1px solid #3a7bd5;
  background: rgba(58, 123, 213, 0.7);
  color: #e0e6f0;
}

input[type="text"] {
  flex: 1;
  max-width: 100%;
  padding: 12px 15px;
  border: 2px solid #3a7bd5;
  border-radius: 5px;
  font-size: 1em;
  transition: all 0.3s ease;
  background: rgba(50, 55, 70, 0.8);
  color: #e0e6f0;
}

input[type="text"]:focus {
  outline: none;
  border-color: #5a9fd4;
  background: rgba(50, 55, 70, 0.95);
  box-shadow: 0 0 10px rgba(90, 159, 212, 0.5);
}

button {
  /* padding: 12px 25px; */
  padding: 5px 15px;
  background: rgba(58, 123, 213, 0.8);
  color: #e0e6f0;
  border: 1px solid #3a7bd5;
  border-radius: 5px;
  font-size: 1em;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 600;
}

button:hover {
  background: rgba(58, 123, 213, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(58, 123, 213, 0.5);
}

button:active {
  transform: translateY(0);
}

.close-profile-btn {
  transition: transform 0.35s ease !important;
}
.close-profile-btn:hover {
  box-shadow: none !important;
  transform: rotate(720deg) scale(1.05) !important;
}

.content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.section {
  background: rgba(40, 44, 54, 0.85);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
  animation: fadeIn 0.6s ease;
}

.section.bet-section {
  padding: 0px 10px 10px 10px;
  max-height: 55vh;
  overflow: auto;
  scrollbar-width: none;
  position: relative;
}

.section.bet-section.bet-section-bets,.section.bet-section.bet-section-matches{
  max-height: 75vh;
}

#matchesSection {
  max-height: 80vh;
  overflow-x: hidden;
  overflow-y: auto;
}
.matches-header {
  flex-direction: column;
  gap: 5px;
}
.section h2 {
  color: #5a9fd4;
  margin-bottom: 10px;
  font-size: 1.3em;
  border-bottom: 2px solid #5a9fd4;
  padding-bottom: 10px;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

/* Sticky заголовки для мобильного скролла */
.sticky-header {
  position: sticky;
  background: rgba(40, 44, 54, 1);
  z-index: 2;
  top: 0;
  left: 0;
  padding-top: 10px;
  touch-action: manipulation;
  -webkit-touch-callout: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  transition: background-color 0.2s ease;
}

.sticky-header:active {
  cursor: grabbing;
  background: rgba(50, 55, 70, 1);
}

.my-bets-title {
  position: sticky;
  /* background: rgba(40, 44, 54, 0.85); */
  background: rgba(40, 44, 54, 1);
  z-index: 2;
  top: 0;
  left: 0;
  padding: 10px 0;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  cursor: grab;
  transition: background-color 0.2s ease;
}

.my-bets-title:active {
  cursor: grabbing;
  background: rgba(50, 55, 70, 1);
}
.my-bets-list {
  z-index: 1;
}

.tabs {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 10px;
  margin-bottom: 5px;
  /* border-bottom: 2px solid #e9ecef; */
  width: 100%;
  /* background: rgba(255, 255, 255, 0.95); */
  padding: 0 25px;
  /* border-radius: 10px; */
  /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); */

  max-width: 800px;
}

#allbets-content,
#participants-content,
#profile-content,
#settings-content,
#counting-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  transition: opacity 0.3s ease;
}

#allbets-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Порядок на десктопе: Турниры слева, Матчи справа, Мои ставки под Турнирами */
.tournaments-column {
  grid-column: 1;
  grid-row: 1;
}

.matches-column {
  grid-column: 2;
  grid-row: 1 / 3;
}

.bets-column {
  grid-column: 1;
  grid-row: 2;
}

#participants-content,
#profile-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-x: hidden;
}

.tab-btn {
  padding: 10px 20px;
  background: transparent;
  color: #5a9fd4;
  border: none;
  border-bottom: 3px solid transparent;
  cursor: pointer;
  font-size: 1em;
  font-weight: 700;
  transition: all 0.3s ease;
  text-decoration: none;
  white-space: nowrap;
}

.tab-btn:hover {
  color: #7ab0e0;
  background: rgba(90, 159, 212, 0.1);
  /* border-bottom-color: #0066cc; */
}

.tab-btn.active {
  color: #7ab0e0;
  /* border-bottom-color: #001f50; */
  /* box-shadow: 11px 11px 11px -4px rgba(0,0,0,0.75) inset; */
  box-shadow: 6px 6px 8px -6px rgba(90, 159, 212, 0.4) inset;
  /* border-bottom-color: #0066cc; */
  background: rgba(90, 159, 212, 0.15);
}

button.tab-btn:hover {
  transform: none;
  box-shadow: none;

  /* box-shadow: 6px 6px 8px -6px rgba(0, 102, 204, 0.4) inset; */
  /* box-shadow: 4px 6px 4px -8px rgba(0, 102, 204, 0.4) inset; */
  background-color: rgba(90, 159, 212, 0.1);
}

/* Кнопка LIVE с красной точкой */
.tab-btn.live-btn {
  position: relative;
  padding-right: 30px;
}

.live-indicator {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  background: #f44336;
  border-radius: 50%;
  animation: pulse-live 2s ease-in-out infinite;
}

/* Статичный синий индикатор (когда нет live матчей) */
.live-indicator.static {
  background: #5a9fd4;
  animation: none;
  opacity: 0.6;
}

@keyframes pulse-live {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7);
  }
  50% {
    opacity: 0.8;
    box-shadow: 0 0 0 4px rgba(244, 67, 54, 0);
  }
}

.tab-content {
  animation: fadeIn 0.3s ease;
}

.events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

