/* ===== СТИЛИ ДЛЯ СТРАНИЦЫ ТЕМЫ ===== */

/* Хлебные крошки */
.breadcrumbs {
  margin-bottom: 30px;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-border-light);
}

.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumbs__item {
  display: flex;
  align-items: center;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.breadcrumbs__item:not(:last-child)::after {
  content: '/';
  margin-left: 8px;
  color: var(--color-text-muted);
}

.breadcrumbs__link {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.breadcrumbs__current {
  color: var(--color-text-white);
  font-weight: 500;
}

/* Заголовок темы */
.topic-header {
  margin-bottom: 30px;
  position: relative;
}

.topic-header__title {
  font-size: 2rem;
  color: var(--color-text-white);
  margin-bottom: 10px;
  line-height: 1.3;
}

.topic-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.topic-header__meta i {
  margin-right: 5px;
  color: var(--color-primary-start);
}

.topic-header__category a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.topic-header__category a:hover {
  color: var(--color-primary-start);
}

/* Сообщения */
.posts {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.post {
  display: flex;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.post:hover {
  border-color: var(--color-border-hover);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

/* Сайдбар с информацией об авторе */
.post__sidebar {
  width: 220px;
  padding: 20px;
  background: rgba(0, 0, 0, 0.2);
  border-right: 1px solid var(--color-border-light);
  transition: background 0.3s ease;
}

.post__author {
  text-align: center;
  margin-bottom: 15px;
}

.post__avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-primary-start);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.post__avatar:hover {
  transform: scale(1.05);
}

.post__avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post__avatar-img:hover {
  transform: scale(1.1);
}

.post__author-name {
  display: block;
  color: var(--color-text-white);
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 5px;
  transition: color 0.3s ease;
}

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

.post__author-rank {
  display: inline-block;
  padding: 3px 10px;
  background: rgba(102, 126, 234, 0.1);
  color: var(--color-primary-start);
  font-size: 0.8rem;
  border-radius: 4px;
  transition: background 0.3s ease, transform 0.3s ease;
}

.post__stats {
  text-align: left;
}

.post__stat {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.post__stat i {
  width: 16px;
  color: var(--color-primary-start);
}

/* Контент сообщения */
.post__content {
  flex: 1;
  padding: 20px;
}

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

.post__number {
  color: var(--color-primary-start);
  font-weight: 600;
}

.post__date {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.post__date i {
  margin-right: 5px;
}

/* ========================================
   БАЗОВЫЕ СТИЛИ ДЛЯ КОНТЕНТА ПОСТОВ
   ======================================== */

.post__body {
  color: var(--color-text-primary);
  line-height: 1.6;
  margin-bottom: 20px;
}

/* Абзацы */
.post__body p {
  margin: 0 0 0.5rem 0;
  line-height: 1.4;

  color: var(--color-text-primary, #e0e0e0);
}

/* Убираем отступы у пустых параграфов */
.post__body p:empty {
  display: none;
}

/* Заголовки */
.post__body h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 1.5rem 0 1rem;
  color: var(--color-text-white);
}

.post__body h2 {
  font-size: 1.3rem;
  /* margin: 20px 0 10px; */
  margin: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--color-border-light);
  color: var(--color-text-white);
}

.post__body h3 {
  font-size: 1.1rem;
  /* margin: 15px 0 8px; */
  margin: 1.2rem 0 0.8rem;
  color: var(--color-text-white);

}

.post__body h4 {
  font-size: 1.1rem;
  margin: 1rem 0 0.5rem;
  color: var(--color-text-secondary);
}

/*
.post__body ul,
.post__body ol {
  margin: 10px 0 10px 20px;
  padding-left: 20px;
} */

/* Списки */
.post__body ul {
  margin: 0.5rem 0 1rem 1.5rem;
  padding-left: 0.5rem;
}

.post__body ol {
  margin: 0.5rem 0 1rem 1.5rem;
  padding-left: 0.5rem;
}

.post__body li {
  margin-bottom: 0.25rem;
  line-height: 1.5;
}

.post__body ul li {
  list-style-type: disc;
}

.post__body ol li {
  list-style-type: decimal;
}

/* Жирный текст */
.post__body strong,
.post__body b {
  font-weight: 700;
  color: var(--color-primary-start);
}

/* Курсив */
.post__body em,
.post__body i {
  font-style: italic;
}

/* Подчеркивание */
.post__body u {
  text-decoration: underline;
}

/* Ссылки */
.post__body a {
  color: var(--color-primary-start);
  text-decoration: none;
}

.post__body a:hover {
  text-decoration: underline;
}

/* Цитаты */
.post__body blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: rgba(102, 126, 234, 0.08);
  border-left: 4px solid var(--color-primary-start);
  border-radius: 8px;
  color: var(--color-text-secondary);
  font-style: italic;
}

.post__body blockquote strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-primary-start);
  font-style: normal;
}

/* Код */
.post__body pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 1rem;
  border-radius: 8px;
  overflow-x: auto;
  font-family: monospace;
  font-size: 0.9rem;
  margin: 1rem 0;
}

.post__body code {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9rem;
}

/* Картинки */
.post__body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 0.5rem 0;
}

/* Разрыв строки */
.post__body br {
  display: block;
  margin-bottom: 0.5rem;
  content: "";
}

/* Подвал сайта */

.post__footer {
  display: flex;
  gap: 15px;
  padding-top: 15px;
  border-top: 1px solid var(--color-border-light);
}

.post__like,
.post__reply,
.post__quote,
.post__favorite {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: none;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  font-size: 0.9rem;
}

.post__like:hover {
  color: #ff4757;
  background: rgba(255, 71, 87, 0.1);
  border-color: rgba(255, 71, 87, 0.2);
  transform: translateY(-1px);
}

.post__reply:hover,
.post__quote:hover {
  color: var(--color-primary-start);
  background: rgba(102, 126, 234, 0.1);
  border-color: rgba(102, 126, 234, 0.2);
  transform: translateY(-1px);
}

.post__favorite {
  margin-left: auto;
}

.post__favorite:hover {
  color: #ffd700;
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.2);
  transform: translateY(-1px);
}

.post__favorite.active {
  color: #ffd700;
}

.post__like i,
.post__reply i,
.post__quote i,
.post__favorite i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.post__like:hover i,
.post__reply:hover i,
.post__quote:hover i,
.post__favorite:hover i {
  transform: scale(1.1);
}

/* Пагинация */
.pagination {
  padding-bottom: 40px;
}

.pagination:empty,
.pagination:has(.pagination__list:empty) {
  display: none;
}

.pagination__list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.pagination__link,
.pagination__current,
.pagination__dots {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 10px;
  border-radius: 10px;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination__link {
  background: var(--color-bg-card);
  color: var(--color-text-secondary);
  border: 1px solid var(--color-border-light);
}

.pagination__link:hover {
  background: var(--color-primary-start);
  color: white;
  border-color: var(--color-primary-start);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.pagination__current {
  background: var(--color-primary-start);
  color: white;
  border: 1px solid var(--color-primary-start);
  font-weight: 600;
  box-shadow: 0 2px 10px rgba(102, 126, 234, 0.2);
}

.pagination__dots {
  color: var(--color-text-muted);
}

/* Форма ответа */
.reply-section {
  padding: 40px 0;
  border-top: 1px solid var(--color-border-light);
}

.reply-section__title {
  color: var(--color-text-white);
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.reply-form__group {
  margin-bottom: 20px;
}

.reply-form__textarea {
  width: 100%;
  padding: 15px;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  color: var(--color-text-white);
  font-family: inherit;
  font-size: 1rem;
  resize: none;
  transition: all 0.3s ease;
}

.reply-form__textarea:focus {
  outline: none;
  border-color: var(--color-primary-start);
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
  transform: translateY(-1px);
}

.reply-form__textarea::placeholder {
  color: var(--color-text-muted);
}

.reply-form__actions {
  display: flex;
  gap: 15px;
}

/* Медиа-галерея */
.topic-media-gallery {
  margin-top: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 12px;
  border: 1px solid var(--color-border-light);
}

.media-title {
  color: var(--color-text-white);
  font-size: 0.9rem;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.media-title i {
  color: var(--color-primary-start);
}

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

.media-item {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.media-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.media-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
}

.media-image:hover {
  transform: scale(1.08);
  opacity: 0.9;
}

.media-video {
  width: 100%;
  max-height: 200px;
}

/* Стили для цитат */
.post__quote-block {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: rgba(102, 126, 234, 0.08);
  border-left: 4px solid var(--color-primary-start);
  border-radius: 8px;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

.post__quote-block:hover {
  background: rgba(102, 126, 234, 0.12);
}

.post__quote-block strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--color-primary-start);
}

/* Сохраняем переносы строк внутри цитаты */
.post__quote-block {
  white-space: pre-wrap;
}

/* Убираем двойные br внутри цитаты */
.post__quote-block br+br {
  display: none;
}

/* Убираем лишние отступы у br внутри цитаты */
.post__quote-block br {
  display: none;
}

/* Или если хотите оставить один br, но убрать лишние: */
.post__quote-block br:first-child {
  display: none;
}

/* ===== ЛАЙТБОКС ===== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    background 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
  background: rgba(0, 0, 0, 0.96);
  pointer-events: all;
}

.lightbox__image {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox.active .lightbox__image {
  transform: scale(1);
  opacity: 1;
}

.lightbox__close {
  position: absolute;
  top: 25px;
  right: 35px;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 10001;
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: rotate(-90deg);
}

.lightbox.active .lightbox__close {
  opacity: 1;
  transform: rotate(0deg);
  transition-delay: 0.2s;
}

.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.1) rotate(90deg);
}

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: white;
  font-size: 1.8rem;
  width: 55px;
  height: 55px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  opacity: 0;
}

.lightbox.active .lightbox__prev,
.lightbox.active .lightbox__next {
  opacity: 1;
}

.lightbox.active .lightbox__prev {
  transition-delay: 0.25s;
}

.lightbox.active .lightbox__next {
  transition-delay: 0.25s;
}

.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.15);
}

.lightbox__prev {
  left: 35px;
}

.lightbox__next {
  right: 35px;
}

.lightbox__counter {
  position: absolute;
  bottom: 35px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 10px 20px;
  border-radius: 30px;
  font-size: 1rem;
  backdrop-filter: blur(10px);
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.active .lightbox__counter {
  opacity: 1;
  transition-delay: 0.3s;
}

/* Кнопка редактирования */
.post__edit {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: none;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  font-size: 0.9rem;
}

.post__edit:hover {
  color: #ffa502;
  background: rgba(255, 165, 2, 0.1);
  border-color: rgba(255, 165, 2, 0.2);
  transform: translateY(-1px);
}

.post__edit i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.post__edit:hover i {
  transform: scale(1.1);
}

/* Модальное окно редактирования */
.modal-edit {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-edit__content {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  padding: 25px;
  width: 90%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-edit__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.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__actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
  justify-content: flex-end;
}

.modal-edit .form__textarea {
  width: 100%;
  padding: 15px;
  background: var(--color-bg-primary);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  color: var(--color-text-white);
  font-family: inherit;
  font-size: 1rem;
  resize: vertical;
}

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

/* ===== ОБЕРТКА РЕДАКТОРА ===== */
.editor-wrapper {
  position: relative;
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  background: var(--color-bg-card);
  overflow: hidden;
}

/* ===== ПАНЕЛЬ ИНСТРУМЕНТОВ ===== */
.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border-light);
  border-radius: 12px 12px 0 0;
  position: relative;
  z-index: 1;
}

.toolbar-group {
  display: flex;
  gap: 4px;
}

.toolbar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--color-text-secondary);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 14px;
}

.toolbar-btn:hover {
  background: var(--color-bg-hover);
  color: var(--color-text-white);
}

.toolbar-btn:active {
  background: var(--color-primary-start);
  color: var(--color-text-white);
}

.toolbar-btn.has-text {
  width: auto;
  padding: 0 8px;
  font-weight: 600;
}

.toolbar-btn.has-text span {
  font-size: 12px;
  line-height: 1;
}

/* ===== АКТИВНЫЕ КНОПКИ ТУЛБАРА ===== */
.editor-toolbar .toolbar-btn.active {
  background: var(--color-primary-start);
  color: var(--color-text-white);
  border-radius: 6px;
  transform: scale(0.95);
}

.editor-toolbar .toolbar-btn.active i,
.editor-toolbar .toolbar-btn.active span {
  color: white;
}

/* Hover для кнопок */
.editor-toolbar .toolbar-btn:hover {
  background: rgba(102, 126, 234, 0.2);
  color: var(--color-primary-start);
}

/* Анимация при клике */
.editor-toolbar .toolbar-btn:active {
  transform: scale(0.9);
  transition: transform 0.05s ease;
}

/* ===== КОНТЕНТ РЕДАКТОРА ===== */
.editor-content {
  min-height: 200px;
  max-height: 400px;
  padding: 16px;
  outline: none;
  color: var(--color-text-white);
  font-family: inherit;
  font-size: 14px;
  line-height: 1.6;
  overflow-y: auto;
  word-wrap: break-word;
}

.editor-content:focus {
  outline: none;
}

.editor-content:empty:before {
  content: attr(data-placeholder);
  color: var(--color-text-secondary);
  pointer-events: none;
}

.editor-content[data-placeholder]:empty:before {
  content: attr(data-placeholder);
  color: var(--color-text-secondary);
  pointer-events: none;
}

.editor-content * {
  margin: 0;
  padding: 0;
}

.editor-content h2 {
  font-size: 20px;
  font-weight: 600;
  margin: 16px 0 8px 0;
  color: var(--color-text-white);
  line-height: 1.3;
}

.editor-content h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 14px 0 6px 0;
  color: var(--color-text-white);
  line-height: 1.3;
}

.editor-content p,
.editor-content div {
  margin: 8px 0;
}

.editor-content p {
  line-height: 1.6;
}

.editor-content p:last-child {
  margin-bottom: 0;
}

.editor-content div {}

.editor-content ul,
.editor-content ol {
  margin: 12px 0;
  padding-left: 24px;
}

.editor-content li {
  margin: 4px 0;
  line-height: 1.5;
}

.editor-content ul li {
  list-style-type: disc;
}

.editor-content ol {
  counter-reset: list-counter;
}

.editor-content ol li {
  counter-increment: list-counter;
  list-style-type: none;
}

.editor-content ol li:before {
  content: counter(list-counter) ". ";
  color: var(--color-primary-start);
  font-weight: 600;
  margin-left: -24px;
  margin-right: 8px;
}

.editor-content blockquote {
  border-left: 3px solid var(--color-primary-start);
  padding-left: 16px;
  margin: 16px 0;
  color: var(--color-text-secondary);
  font-style: italic;
}

.editor-content a {
  color: var(--color-primary-start);
  text-decoration: none;
}

.editor-content a:hover {
  text-decoration: underline;
}

.editor-content strong,
.editor-content b {
  font-weight: 600;
  color: var(--color-text-white);
}

.editor-content em,
.editor-content i {
  font-style: italic;
  color: var(--color-text-secondary);
}

.editor-content u {
  text-decoration: underline;
}

/* Обёртка для даты */
.post__date-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Пометка "отредактировано" */
.post__edited {
  color: var(--color-text-muted);
  font-size: 0.8rem;
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 4px;
}

.post__edited i {
  font-size: 0.7rem;
  color: var(--color-primary-start);
}

/* ========================================
   КНОПКИ ЛАЙКА И ИЗБРАННОГО В ТЕМЕ
   ======================================== */

/* Общие стили для обеих кнопок */
.topic__like,
.topic__favorite {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary, #8a8a9a);
  transition: all 0.25s ease;
  white-space: nowrap;
}

/* Контейнер для кнопок в шапке темы */
.topic-header__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

/* Иконки внутри кнопок */
.topic__like i,
.topic__favorite i {
  font-size: 1.2rem;
  transition: transform 0.2s ease;
}

/* ===== ЛАЙК (сердце) ===== */
.topic__like {
  background: rgba(255, 255, 255, 0.03);
}

.topic__like:hover {
  background: rgba(255, 71, 87, 0.15);
  color: #ff6b81;
}

.topic__like:hover i {
  transform: scale(1.15);
}

.topic__like.liked,
.post__like.liked {
  color: #ff4757;
  background: rgba(255, 71, 87, 0.1);
}

.topic__like.liked i,
.post__like.liked i {
  color: #ff4757;
  animation: heartBeat 0.3s ease;
}


@keyframes heartBeat {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.3);
  }

  100% {
    transform: scale(1);
  }
}

.topic__like:active i {
  transform: scale(0.9);
}

/* ===== ИЗБРАННОЕ (закладка) ===== */
.topic__favorite {
  background: rgba(255, 255, 255, 0.03);
}

.topic__favorite:hover {
  background: rgba(255, 165, 2, 0.15);
  color: #ffb347;
}

.topic__favorite:hover i {
  transform: scale(1.1);
}

/* ===== АКТИВНОЕ СОСТОЯНИЕ ИЗБРАННОГО ===== */
.topic__favorite.active,
.post__favorite.active {
  color: #ffa502;
  background: rgba(255, 165, 2, 0.1);
}

.topic__favorite.active i,
.post__favorite.active i {
  animation: bookmarkPop 0.3s ease;
  color: #ffa502;
}


@keyframes bookmarkPop {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.2) rotate(-5deg);
  }

  100% {
    transform: scale(1);
  }
}

/* Отдельно для счётчика лайков */
.topic__like-count {
  font-weight: 600;
  margin-left: 2px;
}

.post__delete {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: none;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px;
  font-size: 0.9rem;
}

.post__delete:hover {
  color: #ff4757;
  background: rgba(255, 71, 87, 0.1);
  border-color: rgba(255, 71, 87, 0.2);
  transform: translateY(-1px);
}

.post__delete i {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.post__delete:hover i {
  transform: scale(1.1);
}

.topic__delete {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary, #8a8a9a);
  transition: all 0.25s ease;
  white-space: nowrap;
}

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

.topic__delete:hover i {
  transform: scale(1.1);
}

.topic__delete i {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.topic__report {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary, #8a8a9a);
  transition: all 0.25s ease;
}

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

.topic__report:hover i {
  transform: scale(1.1);
}

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

.modal-report__body {
  display: grid;
  gap: 15px;
}

.modal-report__content {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border-light);
  border-radius: 16px;
  padding: 25px;
  width: 90%;
  max-width: 500px;
}

.modal-report__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

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

.modal-report__actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  padding-top: 20px;
}

.mention {
  color: var(--color-primary-start);
  text-decoration: none;
  font-weight: 500;
  background: rgba(102, 126, 234, 0.1);
  padding: 0 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.mention:hover {
  background: rgba(102, 126, 234, 0.2);
  text-decoration: underline;
}

.post__report {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: none;
  border: 1px solid transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.post__report:hover {
  color: #ffa502;
  background: rgba(255, 165, 2, 0.1);
  border-color: rgba(255, 165, 2, 0.2);
}

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

.modal-report__descr {
  margin-bottom: 10px;
}

.filters__group {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.form__label {
  margin-bottom: 0;
}


/* Уведомление об авторизации */
.auth-notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  animation: slideInRight 0.3s ease;
}

.auth-notification__content {
  background: #1a1a2e;
  border-left: 4px solid #ff4757;
  padding: 15px 20px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 280px;
  max-width: 400px;
}

.auth-notification__content i {
  color: #ff4757;
  font-size: 24px;
}

.auth-notification__text {
  color: #e0e0e0;
  font-size: 14px;
  line-height: 1.5;
  flex: 1;
}

.auth-notification__text strong {
  color: #fff;
  font-size: 15px;
}

.auth-notification__text a {
  color: #ff4757;
  text-decoration: none;
  font-weight: 600;
}

.auth-notification__text a:hover {
  text-decoration: underline;
}

.auth-notification__close {
  background: none;
  border: none;
  color: #888;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
}

.auth-notification__close:hover {
  color: #fff;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }

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

/* Кнопка жалобы */
.topic__report.reported,
.post__report.reported {
  opacity: 0.6;
  cursor: not-allowed;
  background: rgba(128, 128, 128, 0.2);
}

.topic__report.reported:hover,
.post__report.reported:hover {
  opacity: 0.6;
  transform: none;
}

/* Уведомления */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10001;
  animation: slideInRight 0.3s ease;
}

.notification__content {
  background: #1a1a2e;
  padding: 12px 20px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
  border-left: 4px solid;
}

.notification--success .notification__content {
  border-left-color: #00d26a;
}

.notification--success i {
  color: #00d26a;
}

.notification--error .notification__content {
  border-left-color: #ff4757;
}

.notification--error i {
  color: #ff4757;
}

.notification--info .notification__content {
  border-left-color: #ffa502;
}

.notification--info i {
  color: #ffa502;
}

.notification__content button {
  background: none;
  border: none;
  color: #888;
  font-size: 18px;
  cursor: pointer;
  padding: 0 5px;
}

.notification__content button:hover {
  color: #fff;
}



@media (max-width: 576px) {
  .auth-notification {
    bottom: 10px;
    right: 10px;
    left: 10px;
  }

  .auth-notification__content {
    max-width: none;
    width: auto;
  }
}

/* ========================================
   АДАПТИВ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ
   ======================================== */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) {

  .topic__like,
  .topic__favorite {
    padding: 6px 12px;
    font-size: 0.85rem;
    gap: 6px;
  }

  .topic__like i,
  .topic__favorite i {
    font-size: 1rem;
  }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
  .topic-header__actions {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
    margin-top: 12px;
  }

  .topic__like,
  .topic__favorite {
    padding: 6px 10px;
    font-size: 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
  }

  .topic__like i,
  .topic__favorite i {
    font-size: 0.9rem;
  }

  .post__body h2 {
    font-size: 1.3rem;
  }

  .post__body h3 {
    font-size: 1.1rem;
  }

  .post__body ul,
  .post__body ol {
    margin-left: 1rem;
  }
}

/* Адаптив */
@media (max-width: 576px) {
  .post__date-wrapper {
    gap: 5px;
  }

  .post__like,
  .post__reply,
  .post__quote,
  .post__favorite {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 7px;
    background: none;
    border: 1px solid transparent;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 8px;
    font-size: 0.9rem;
  }

  .post__edited {
    font-size: 0.75rem;
  }

  /* Кнопки в шапке темы */
  .topic-header__actions {
    gap: 6px;
  }

  .topic__like,
  .topic__favorite {
    padding: 5px 8px;
    font-size: 0.7rem;
    gap: 4px;
  }

  .topic__like i,
  .topic__favorite i {
    font-size: 0.85rem;
  }

  /* Экран 480px и меньше — скрываем текст у избранного */
  @media (max-width: 480px) {
    .topic__favorite span {
      display: none;
    }

    .topic__favorite {
      padding: 5px 8px;
      gap: 0;
    }

    .topic__favorite i {
      margin: 0;
    }
  }
}

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

  .post__sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--color-border-light);
  }

  .post__author {
    display: flex;
    align-items: center;
    text-align: left;
    gap: 15px;
  }

  .post__avatar {
    width: 60px;
    height: 60px;
    margin: 0;
  }

  .post__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
  }

  .topic-header__title {
    font-size: 1.5rem;
  }

  .reply-form__actions {
    flex-direction: column;
  }

  .pagination__link,
  .pagination__current {
    min-width: 35px;
    height: 35px;
  }

  .lightbox__prev,
  .lightbox__next {
    width: 45px;
    height: 45px;
    font-size: 1.5rem;
  }

  .lightbox__prev {
    left: 20px;
  }

  .lightbox__next {
    right: 20px;
  }

  .lightbox__close {
    top: 20px;
    right: 25px;
    font-size: 2rem;
    width: 45px;
    height: 45px;
  }

  .lightbox__image {
    max-width: 95%;
    max-height: 85%;
  }

  .lightbox__counter {
    bottom: 25px;
    padding: 8px 16px;
    font-size: 0.9rem;
  }
}

@media (max-width: 576px) {
  .post__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .post__footer {
    flex-wrap: wrap;
    gap: 5px;
  }

  .post__favorite {
    margin-left: 0;
  }

  .topic-header__meta {
    flex-direction: column;
    gap: 10px;
  }
}