/* .team-page {
  max-width: 1000px;
  margin: 0 auto;
} */

.team-header {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
}

.team-header__main {
  display: flex;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.team-header__logo {
  width: 100px;
  height: 100px;
  border-radius: 20px;
  overflow: hidden;
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.team-header__logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-header__title {
  flex: 1;
}

.team-header__name {
  font-size: 2rem;
  color: var(--color-text-white);
  margin-bottom: 10px;
}

.team-header__rank {
  display: inline-block;
  padding: 5px 12px;
  background: rgba(102, 126, 234, 0.1);
  color: var(--color-primary-start);
  border-radius: 20px;
  font-size: 0.9rem;
}

.team-header__stats {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-light);
}

.team-header__stat {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-secondary);
}

.team-header__stat i {
  color: var(--color-primary-start);
}

.team-actions {
  display: flex;
  gap: 15px;
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.team-section {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  padding: 25px;
  margin-bottom: 30px;
}

.team-section__title {
  font-size: 1.3rem;
  color: var(--color-text-white);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-section__title i {
  color: var(--color-primary-start);
}

.team-description {
  color: var(--color-text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

.members-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
}

.member-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.member-card:hover {
  background: rgba(102, 126, 234, 0.05);
  transform: translateY(-2px);
}

.member-card__avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-primary-start);
}

.member-card__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-card__info {
  flex: 1;
}

.member-card__name {
  color: var(--color-text-white);
  font-weight: 500;
  text-decoration: none;
}

.member-card__name:hover {
  color: var(--color-primary-start);
}

.member-card__role {
  font-size: 0.75rem;
  color: var(--color-primary-start);
}

.report-btn {
  background: transparent;
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: #ff4757;
}

.report-btn:hover {
  background: rgba(255, 71, 87, 0.1);
  border-color: #ff4757;
}

.report-btn.reported {
  opacity: 0.6;
  cursor: not-allowed;
}

.apply-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ===== МОДАЛЬНОЕ ОКНО РЕДАКТИРОВАНИЯ ===== */
.modal-edit {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-edit__content {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: 20px;
  padding: 25px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-edit__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--color-border-light);
}

.modal-edit__header h3 {
  color: var(--color-text-white);
  font-size: 1.3rem;
  margin: 0;
}

.modal-edit__close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

.modal-edit__close:hover {
  color: #ff4757;
}

.modal-edit__form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.modal-edit .form__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-edit .form__label {
  color: var(--color-text-white);
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-edit .form__label i {
  color: var(--color-primary-start);
}

.modal-edit .form__input,
.modal-edit .form__select,
.modal-edit .form__textarea {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  color: var(--color-text-white);
  font-size: 0.95rem;
  transition: all 0.3s ease;
  resize: none;
}

.modal-edit .form__input:focus,
.modal-edit .form__select:focus,
.modal-edit .form__textarea:focus {
  outline: none;
  border-color: var(--color-primary-start);
}

.modal-edit .form__textarea {
  min-height: 100px;
}

.modal-edit .form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.modal-edit .roles-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-edit .role-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border-light);
  border-radius: 8px;
  cursor: pointer;
}

.modal-edit .checkbox__input {
  display: none;
}

.modal-edit .checkbox__box {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
}

.modal-edit .checkbox__input:checked+.checkbox__box {
  background: var(--color-primary-start);
  border-color: var(--color-primary-start);
}

.modal-edit .checkbox__icon {
  color: white;
  font-size: 10px;
  opacity: 0;
}

.modal-edit .checkbox__input:checked+.checkbox__box .checkbox__icon {
  opacity: 1;
}

.modal-edit__actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-light);
}

.modal-edit__actions .btn {
  min-width: 120px;
  padding: 10px 20px;
}

/* Стили для ошибок */
.modal-edit .form__error {
  color: #ff4757;
  font-size: 0.8rem;
  display: none;
  margin-top: 5px;
}

.modal-edit .form__error:not(:empty) {
  display: block;
}

.modal-edit .form__input--error,
.modal-edit .form__textarea--error {
  border-color: #ff4757;
}

.modal-edit .custom-select--error .custom-select__selected {
  border-color: #ff4757;
}

/* Модальное окно заявок */
.modal-applications {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(5px);
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-applications__content {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: 20px;
  padding: 25px;
  width: 100%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
}

.modal-applications__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--color-border-light);
}

.modal-applications__header h3 {
  color: var(--color-text-white);
  margin: 0;
}

.modal-applications__close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.8rem;
  cursor: pointer;
}

.application-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid var(--color-border-light);
}

.application-item__info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.application-item__avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  overflow: hidden;
}

.application-item__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.application-item__name {
  color: var(--color-text-white);
  font-weight: 500;
  text-decoration: none;
}

.application-item__message {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.application-item__actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.application-item__accept,
.application-item__reject,
.application-item__message-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.application-item__accept {
  background: rgba(46, 213, 115, 0.2);
  color: #2ed573;
}

.application-item__accept:hover {
  background: #2ed573;
  color: white;
  transform: scale(1.05);
}

.application-item__reject {
  background: rgba(255, 71, 87, 0.2);
  color: #ff4757;
}

.application-item__reject:hover {
  background: #ff4757;
  color: white;
  transform: scale(1.05);
}

.application-item__message-btn {
  background: rgba(102, 126, 234, 0.2);
  color: #667eea;
}

.application-item__message-btn:hover {
  background: #667eea;
  color: white;
  transform: scale(1.05);
}

.application-item__date {
  font-size: 0.7rem;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ===== МОДАЛЬНЫЕ ОКНА (ЕДИНЫЙ СТИЛЬ) ===== */

/* Затемнение */
.modal-report,
.modal-edit,
.modal-applications {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

/* Контент модалки */
.modal-report__content,
.modal-edit__content,
.modal-applications__content {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: 20px;
  padding: 25px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  animation: slideUp 0.3s ease;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Заголовок модалки */
.modal-report__header,
.modal-edit__header,
.modal-applications__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--color-border-light);
}

.modal-report__header h3,
.modal-edit__header h3,
.modal-applications__header h3 {
  color: var(--color-text-white);
  font-size: 1.3rem;
  margin: 0;
  font-weight: 600;
}

/* Кнопка закрытия */
.modal-report__close,
.modal-edit__close,
.modal-applications__close {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 1.8rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: all 0.2s ease;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.modal-report__close:hover,
.modal-edit__close:hover,
.modal-applications__close:hover {
  background: rgba(255, 71, 87, 0.1);
  color: #ff4757;
  transform: rotate(90deg);
}

/* Тело модалки */
.modal-report__body {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Форма внутри модалки */
.modal-report .form__group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-report .form__label {
  color: var(--color-text-white);
  font-weight: 500;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-report .form__label i {
  color: var(--color-primary-start);
  font-size: 0.9rem;
}

.modal-report .form__select,
.modal-report .form__textarea {
  width: 100%;
  padding: 12px 15px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  color: var(--color-text-white);
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-family: inherit;
}

.modal-report .form__select:focus,
.modal-report .form__textarea:focus {
  outline: none;
  border-color: var(--color-primary-start);
  background: rgba(255, 255, 255, 0.1);
}

.modal-report .form__textarea {
  min-height: 100px;
  resize: none;
}

/* Действия модалки */
.modal-report__actions {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-light);
  margin-top: 10px;
}

.modal-report__actions .btn {
  min-width: 120px;
  padding: 10px 20px;
}

/* Кнопка жалобы */
.report-btn {
  background: transparent;
  border: 1px solid rgba(255, 71, 87, 0.3);
  color: #ff4757;
  transition: all 0.2s ease;
}

.report-btn:hover {
  background: rgba(255, 71, 87, 0.1);
  border-color: #ff4757;
  transform: translateY(-2px);
}

.report-btn.reported {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

/* Анимации */
@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== СТИЛИ КОММЕНТАРИЕВ ===== */

/* Контейнер комментариев */
.comments__list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-bottom: 30px;
}

/* Карточка комментария — как карточка команды */
.comment {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
}

.comment:hover {
  border-color: var(--color-primary-start);
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Шапка комментария */
.comment__header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 15px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--color-border-light);
}

.comment__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid var(--color-primary-start);
}

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

.comment__author {
  color: var(--color-text-white);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
}

.comment__author:hover {
  color: var(--color-primary-start);
}

.comment__date {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  margin-left: auto;
}

/* Текст комментария */
.comment__text {
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 15px;
  word-break: break-word;
  font-size: 0.95rem;
  padding: 0 5px;
}

/* Кнопки действий */
.comment__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--color-border-light);
}

.comment__like,
.comment__reply,
.comment__delete,
.comment__report {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-border-light);
  border-radius: 20px;
  color: var(--color-text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comment__like:hover {
  background: rgba(255, 71, 87, 0.15);
  color: #ff4757;
  border-color: #ff4757;
}

.comment__reply:hover {
  background: rgba(102, 126, 234, 0.15);
  color: var(--color-primary-start);
  border-color: var(--color-primary-start);
}

.comment__delete:hover {
  background: rgba(255, 71, 87, 0.15);
  color: #ff4757;
  border-color: #ff4757;
}

.comment__report {
  background: rgba(255, 255, 255, 0.05);
}

.comment__report:hover {
  background: rgba(255, 165, 2, 0.15);
  color: #ffa502;
  border-color: #ffa502;
}

/* Активное состояние лайка */
.comment__like.active {
  background: rgba(255, 71, 87, 0.15);
  color: #ff4757;
  border-color: #ff4757;
}

.comment__like.active i {
  font-weight: 900;
}

/* Состояние "уже пожаловался" */
.comment__report.reported {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(128, 128, 128, 0.1);
  border-color: rgba(128, 128, 128, 0.3);
}

/* Кнопка жалобы — отправленное состояние */
.comment__report.reported {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(128, 128, 128, 0.1);
  border-color: rgba(128, 128, 128, 0.3);
  color: #888;
}

.comment__report.reported i {
  color: #888;
}

.comment__report:disabled,
.comment__report.reported {
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
  background: rgba(128, 128, 128, 0.1);
  border-color: rgba(128, 128, 128, 0.3);
  color: #888;
}

/* ===== КНОПКА "ПОКАЗАТЬ ЕЩЁ" ДЛЯ КОММЕНТАРИЕВ ===== */
.comments__load-more {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-light);
}

.comments__load-more .btn {
  min-width: 200px;
  padding: 12px 24px;
}

.comments__loading {
  text-align: center;
  padding: 40px;
  color: var(--color-text-muted);
}

.comments__loading i {
  margin-right: 8px;
}

/* Кнопка лайка команды */
.team__like-btn {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
  border-radius: 30px;
  transition: all 0.3s ease;
}

.team__like-btn.liked {
  background: rgba(255, 71, 87, 0.15);
  border-color: #ff4757;
  color: #ff4757;
}

.team__like-btn.liked i {
  color: #ff4757;
}

.team__like-btn:hover {
  background: var(--color-primary-start);
  border-color: var(--color-primary-start);
  color: white;
}

/* Кнопка избранного команды */
.team__favorite-btn {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  color: var(--color-text-secondary);
  border-radius: 30px;
  transition: all 0.3s ease;
}

.team__favorite-btn.active {
  background: rgba(102, 126, 234, 0.15);
  border-color: var(--color-primary-start);
  color: var(--color-primary-start);
}

.team__favorite-btn.active i {
  color: var(--color-primary-start);
}

.team__favorite-btn:hover {
  background: var(--color-primary-start);
  border-color: var(--color-primary-start);
  color: white;
}


/* Адаптивность */
@media (max-width: 768px) {
  .team-header__main {
    flex-direction: column;
    text-align: center;
  }

  .team-header__title {
    text-align: center;
  }

  .team-header__stats {
    justify-content: center;
  }

  .team-actions {
    justify-content: center;
  }

  .members-grid {
    grid-template-columns: 1fr;
  }

  .modal-edit__content {
    padding: 20px;
  }

  .modal-edit .form__row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .modal-edit__actions {
    flex-direction: column;
  }

  .modal-edit__actions .btn {
    width: 100%;
  }
}


@media (max-width: 576px) {

  .modal-report__content,
  .modal-edit__content,
  .modal-applications__content {
    padding: 20px;
    max-width: calc(100% - 20px);
  }

  .modal-report__actions {
    flex-direction: column;
  }

  .modal-report__actions .btn {
    width: 100%;
  }

  .modal-report__header h3,
  .modal-edit__header h3,
  .modal-applications__header h3 {
    font-size: 1.2rem;
  }
}

@media (max-width: 400px) {
  .modal-report__content {
    padding: 15px;
  }

  .modal-report .form__select,
  .modal-report .form__textarea {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}
