/* Современный стиль для отображения статистики матчей */
.match-expandable {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.match-expandable:hover {
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.match-header {
    padding: 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.match-header:hover {
}

.match-details {
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    padding: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    border-radius: 15px;
    position: relative;
}

.match-details.expanded {
    display: block;
    max-height: 1000px;
    opacity: 1;
    padding: 20px;
}

.team-section {
    margin-bottom: 15px;
    border-radius: 6px;
    padding: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.team-section h5 {
    margin-top: 0;
    margin-bottom: 16px;
    padding-bottom: 10px;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 600;
}

.player-list {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    padding: 12px;
    border-radius: 6px;
    border-left: 4px solid #007bff;
}

.player-stats-table {
    font-size: 0.8rem;
    margin-top: 10px;
    border-collapse: collapse;
    width: 100%;
    box-shadow: 0 2px 6px rgba(0,0,0.08);
    border-radius: 6px;
    overflow: hidden;
}

.player-stats-table th,
.player-stats-table td {
    padding: 0.5rem;
    text-align: center;
    border: none;
    transition: all 0.2s ease;
}

.player-stats-table th.player-name,
.player-stats-table td.player-name {
    text-align: left;
    min-width: 120px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Адаптация для мобильных устройств - преобразование таблицы в карточки */
@media (max-width: 768px) {
    .match-details{
        overflow: auto;
    }
    .player-stats-table {
        display: flex;
        flex-direction: column;
        font-size: 0.7rem;
    }
    
    .player-stats-table thead {
        display: none;
    }
    
    .player-stats-table tbody,
    .player-stats-table tr {
        display: flex;
        flex-direction: column;
    }
    
    .player-stats-table tr {
        border: 1px solid rgba(30, 30, 0.8);
        border-radius: 6px;
        margin-bottom: 8px;
        padding: 8px;
        background-color: rgba(30, 30, 0.8);
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .player-stats-table td {
        display: flex;
        justify-content: space-between;
        padding: 6px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left;
    }
    
    .player-stats-table td:last-child {
        border-bottom: none;
    }
    
    .player-stats-table td:before {
        content: attr(data-label);
        font-weight: bold;
        color: #007bff;
    }
    
    .player-stats-table th.player-name,
    .player-stats-table td.player-name {
        min-width: auto;
        max-width: none;
        white-space: normal;
    }
    
    .match-expandable .col-lg-2, .match-expandable .col-lg-3 {
        padding: 0 4px;
        min-height: 60px;
    }
    
    .match-expandable .with-description p {
        font-size: 0.85rem;
        margin: 0 4px 0;
    }
    
    .match-expandable .with-description span {
        font-size: 0.75rem;
    }
    
    .with-icon i {
        font-size: 1.4rem;
        margin-bottom: 4px;
    }
    
    .match-header {
        padding: 12px 10px;
    }
    
    .match-details.expanded {
        padding: 15px 10px;
    }
}

@media (max-width: 576px) {
    .match-details{
        overflow: auto;
    }
    
    .player-stats-table {
        font-size: 0.65rem;
    }
    
    .player-stats-table tr {
        padding: 6px;
        margin-bottom: 6px;
    }
    
    .player-stats-table td {
        padding: 4px;
        font-size: 0.65rem;
    }
    
    .match-expandable .col-lg-2, .match-expandable .col-lg-3 {
        padding: 0 2px;
        min-height: 50px;
    }
    
    .match-expandable .with-description p {
        font-size: 0.8rem;
        margin: 0 2px 0;
    }
    
    .match-expandable .with-description span {
        font-size: 0.7rem;
    }
    
    .with-icon i {
        font-size: 1.2rem;
        margin-bottom: 2px;
    }
}

.player-stats-table th {
    color: var(--cvet-na-akcente);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
}

.player-stats-table tbody tr:nth-child(odd) {
    background-color: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(4px);
}

.player-stats-table tbody tr:nth-child(even) {
    background-color: rgba(30, 30, 30, 0.8);
    backdrop-filter: blur(4px);
}

.player-stats-table tbody tr:hover {
    background-color: rgba(30, 30, 30, 0.8) !important;
    backdrop-filter: blur(6px);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0.1);
    transition: all 0.2s ease;
}

.player-stats-table tbody tr:hover td {
    font-weight: 600;
}

/* Дополнительные стили для улучшения читаемости статистики */
.player-kills {
    font-weight: bold;
    color: #28a745;
}

.player-deaths {
    font-weight: bold;
    color: #dc3545;
}

.player-hs {
    font-weight: bold;
    color: #fd7e14;
}

.player-kpr3, .player-kpr4, .player-kpr5 {
    font-weight: bold;
    color: #007bff;
}

.player-knife {
    font-weight: bold;
    color: #6f42c1;
}

/* Стили для иконок и элементов */
.with-icon i {
    font-size: 1.6rem;
    margin-bottom: 6px;
    color: #007bff;
}

.match-expandable .col-lg-2, .match-expandable .col-lg-3 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 8px;
}

.match-expandable .with-description p {
    margin: 0 6px 0;
    font-weight: 600;
    color: #495057;
    font-size: 0.95rem;
}

.match-expandable .with-description span {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Улучшенные стили для счета матча */
.match-score {
    font-size: 1.3rem;
    font-weight: bold;
    color: #343a40;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

/* Стили для команд */
.team-t-name, .team-ct-name {
    font-weight: 500;
    color: #495057;
}

/* Стили для даты матча */
.match-date {
    color: #6c757d;
    font-weight: 500;
}


/* MATCH INFO */

.match-container {
      width: 100%;
      max-width: 1200px;
      display: flex;
      flex-direction: column;
      background-image: url(../modules_extra/matchs/templates/nevercolor/img/none.jpg);
      background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    padding: 20px;
    }

    .match-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 16px 0;
    }

    .match-time {
      font-size: 0.7rem;
      font-weight: 600;
      color: #ff9800;
      background: rgb(30, 30, 30, 0.9);
      padding: 10px;
      border-radius: 12px;
    }

    .teams-container {
      display: flex;
      justify-content: space-between;
      gap: 32px;
    }

    .team {
      flex: 1;
      background: rgb(30, 30, 30, 0.9);
      border-radius: 16px;
      padding: 24px;
      box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    }

    .team-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 20px;
    }

    .team-name {
      font-size: 1.5rem;
      font-weight: 700;
    }

    .team-score {
      font-size: 2rem;
      font-weight: 800;
      color: #ff9800;
    }

    .players {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 16px;
    }

    .player {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
    }

    .player-avatar {
      width: 64px;
      height: 64px;
      border-radius: 50%;
      object-fit: cover;
      border: 2px solid #333;
      background: #222;
    }

    .player-nickname {
      font-size: 0.875rem;
      text-align: center;
      word-break: break-word;
      max-width: 80px;
    }

    @media (max-width: 900px) {
      .teams-container {
        flex-direction: column;
      }

      .players {
        grid-template-columns: repeat(5, 1fr);
      }
    }

    @media (max-width: 500px) {
      .players {
        grid-template-columns: repeat(3, 1fr);
      }

      .team {
        padding: 16px;
      }

      .team-score {
        font-size: 1.5rem;
      }
    }

 /* === ЧАТ === */
.chat-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 500px;
  border: 1px solid #2a2a35;
}

.chat-header {
  padding: 12px 16px;
  background: rgb(30, 30, 30, 1);
  border-bottom: 1px solid #2a2a35;
}

.chat-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #e0e0e0;
}

.chat-messages {
  flex: 1;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgb(30, 30, 30, 0.9);
}

/* Системное сообщение */
.message.system-message {
   font-size: 0.875rem;
   color: #ff5d5d;
   font-style: italic;
   padding: 6px 0;
   border-radius: 6px;
   width: 100%;
   display: flex;
   gap: 10px;
   max-width: calc(100% - 20px);
 }

.message.system-message .message-content {
   flex: 1;
   display: flex;
   flex-direction: column;
 }

.message.system-message .message-author {
   font-weight: 600;
   font-size: 0.9rem;
   color: #ff5d5d;
   margin-bottom: 2px;
 }

.message.system-message .message-text {
   color: #e0e0e0;
   font-size: 0.95rem;
   line-height: 1.4;
   word-break: break-word;
 }

.message.system-message .message-time {
   font-size: 0.75rem;
   color: #777;
   margin-top: 4px;
   align-self: flex-end;
 }

/* Сообщение пользователя */
.message.user-message {
  display: flex;
  gap: 10px;
  max-width: calc(100% - 20px);
}

.message-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #333;
  background: rgb(30, 30, 30, 0.9);
}

.message-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.message-author {
  font-weight: 600;
  font-size: 0.9rem;
  color: #ff9800;
  margin-bottom: 2px;
}

.message-text {
  color: #e0e0e0;
  font-size: 0.95rem;
  line-height: 1.4;
  word-break: break-word;
}

.message-time {
  font-size: 0.75rem;
  color: #777;
  margin-top: 4px;
  align-self: flex-end;
}

/* Адаптив: на узких экранах — уменьшаем отступы */
@media (max-width: 500px) {
  .chat-container {
    max-height: 400px;
  }

  .message.user-message {
    gap: 8px;
  }

  .message-avatar img {
    width: 32px;
    height: 32px;
  }

  .chat-input {
    font-size: 0.9rem;
  }
}