/* ==================== */
/* === БАЗОВЫЕ УТИЛИТЫ === */
/* ==================== */

.no-border-shadow-bg {
  border: none !important;
  box-shadow: none !important;
  background: 0 0 !important;
}

.separator {
  color: #444;
  margin: 0 0.3em;
  font-weight: 700;
}

.max-width-container {
  max-width: 1800px;
  margin: 0 auto;
}

/* ==================== */
/* === КНОПКИ И ЭЛЕМЕНТЫ УПРАВЛЕНИЯ === */
/* ==================== */

.requests-action-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  font-size: 1.6rem !important;
}

.pagination-btn {
  min-width: 40px;
  padding: .25rem .75rem;
  font-weight: 600;
}

.active-page {
  font-weight: 600;
}

.delete-cross-btn {
  opacity: 0;
  transition: opacity 0.2s;
}

.image-modal-close {
  position: absolute;
  top: 24px;
  right: 32px;
  color: #fff;
  font-size: 2.2rem;
  font-weight: 700;
  background: none;
  border: none;
  box-shadow: none;
  opacity: 0.85;
  z-index: 10000;
  padding: 0.1em 0.3em;
  transition: color .18s, opacity .18s;
}

.image-modal-close:hover {
  color: #f0c040;
  opacity: 1;
  background: none;
}

/* ==================== */
/* === ИЗОБРАЖЕНИЯ И МЕДИА === */
/* ==================== */

.requests-thumb-maxheight {
  max-height: 140px !important;
  height: auto !important;
  width: 100%;
  object-fit: contain;
}

gallery-full-img {
  display: block;
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  margin: auto;
  object-fit: contain;
  background: #18181e;
  border-radius: calc(0.7 * 0.5rem);
}

/* ==================== */
/* === ГРАНИЦЫ И СОСТОЯНИЯ === */
/* ==================== */

.border-success {
  border: 0.5px solid var(--success-light) !important;
  box-shadow: 0 0 0 1px var(--success-light) !important;
}

/* ==================== */
/* === КАРТОЧКИ МОДОВ === */
/* ==================== */

.mods-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  justify-content: center;
  gap: 20px;
  padding: 20px;
  margin: 20px auto 0;
  margin-top: 0;
  /*max-width: calc(100% - 40px);*/
  align-items: stretch;
}

.mod-card {
  background: #23232b;
  border-radius: calc(0.7 * .75rem);
  box-shadow: 0 2px 4px rgba(0,0,0,.1);
  will-change: transform;
  color: #e0e0e0;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: auto;
  min-width: 290px;
  /* max-width: 290px; */
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.13);
  transition: box-shadow .2s;
  font-size: .92em;
  position: relative;
  width: 100%;
  margin: 0 auto;
}

/* === Изображения карточек === */
.mod-thumb-wrapper {
  width: 100%;
  height: 162px;
  overflow: hidden;
  border-top-left-radius: calc(0.7 * .75rem);
  border-top-right-radius: calc(0.7 * .75rem);
  background: #18181e;
  display: block;
  position: relative;
}

.mod-thumb {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #18181e;
  transition: transform .35s cubic-bezier(.4,2,.6,1);
  display: block;
}

.mod-thumb-wrapper:hover .mod-thumb {
  transform: scale(1.04);
}

/* === Контент карточек === */
.mod-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0.7rem var(--spacing-md) var(--spacing-sm);
}

.mod-title {
  font-size: 1.08em;
  font-weight: var(--font-weight-semi, 600);
  margin: 0 0 0.2em 0;
  color: var(--nexus-white);
  line-height: var(--line-height-tight, 1.2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-clamp: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  max-height: 2.6em;
}

.mod-title a {
  color: var(--nexus-white);
  text-decoration: none;
}

.mod-title a:hover {
  color: var(--nexus-white);
  text-decoration: underline;
}

.mod-author-row {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs, 0.4em);
  margin-bottom: 0.15em;
  font-size: 0.92em;
  background: none !important;
  border: none !important;
  box-shadow: none !important;
}

.mod-author-row img {
  width: 1.2em;
  height: 1.2em;
  border-radius: 50%;
  object-fit: cover;
  margin-right: .5em;
  vertical-align: middle;
  box-shadow: 0 0 0 2px #23232a;
}

.mod-author-link,
.mod-category-link {
  color: #b0b0b0 !important;
  text-decoration: none;
  font-weight: 400;
  font-size: .92em;
  transition: color .2s;
}

.mod-author-link:hover,
.mod-category-link:hover {
  color: #f7ce42;
  text-decoration: underline;
}

.mod-hr {
  border: none;
  border-top: var(--border-width, 1px) solid var(--nexus-card-bg, #3e3e46);
  margin: 0.4em 0;
  opacity: var(--opacity-muted, 0.5);
}

.requiments-separator {
  border: none;
  border-top: var(--border-width, 1px) solid var(--nexus-description);
  margin-top:1em;
}

.mod-meta2 {
  display: flex;
  align-items: center;
  gap: var(--spacing-xs, 0.4em);
  font-size: 0.85em;
  color: var(--nexus-text-muted, #b0b0b0);
  margin-bottom: var(--spacing-xs, 0.4em);
  flex-wrap: wrap;
}

.mod-desc {
  font-size: 0.91em;
  color: var(--nexus-description, #a2a3a8);
  margin-bottom: var(--spacing-sm, 0.5em);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 7;
  line-clamp: 7;
  -webkit-box-orient: vertical;
  min-height: 6.5em;
}

/* === Футер карточек === */
.mod-footer {
  background: #3E3E46;
  /*border-bottom-left-radius: calc(0.7 * 0.75rem); */
  /*border-bottom-right-radius: calc(0.7 * 0.75rem); */
  padding: 0.4em 1em;
  border-top: 1px solid #2e2e33;
  display: flex;
  align-items: center;
  min-height: 2em;
}

.mod-rating {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: 0;
  margin: 0;
  background: 0 0;
  border: none;
}

.mod-rating-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.mod-rating-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.mod-rating-right {
  display: flex;
  align-items: center;
  margin-left: auto;
}

.endorse-mod-form {
  display: inline-block;
  margin: 0;
}

/* === Индикаторы состояния === */
.mod-downloaded-indicator {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: flex;
  align-items: center;
}

.update-available-label {
  background: #fff;
  color: var(--nexus-dark);
  border-radius: calc(0.7 * 4px);
  padding: 0.3em;
  margin-right: 0.2em;
  font-size: 0.85em;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
  border: 1px solid #e0e0e0;
  letter-spacing: .01em;
}

.downloaded-checkmark {
  background: #fff;
  border-radius: calc(0.7 * 6px);
  padding: 3px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
  border: 1px solid #e0e0e0;
}

/* ==================== */
/* === БЕЙДЖИ И ЭЛЕМЕНТЫ РЕЙТИНГА === */
/* ==================== */

.mod-rating .badge,
.mod-rating .downloads-badge,
.mod-rating .like-button {
  min-width: 28px;
  text-align: center;
  font-size: .78em;
  padding: .25em .5em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 1.6em;
  border-radius: calc(0.7 * .5em);
  box-sizing: border-box;
  box-shadow: none;
  margin: 0;
  line-height: 1;
  vertical-align: middle;
}

.mod-rating i {
  font-size: .9em;
  line-height: 1;
}

.badge.bg-info,
.downloads-badge {
  color: var(--nexus-white);
}

.bg-info {
  --bs-bg-opacity: 0;
  background-color: transparent !important;
}

.badge.bg-success {
  display: none;
}

.badge.bg-danger {
  font-family: Rajdhani, sans-serif;
  font-weight: 600;
  letter-spacing: .04em;
  background: #902c2b !important;
  align-items: center;
}

.badge.bg-secondary {
  background: #6c757d;
  color: #f3f3f3;
  display: inline-flex;
  align-items: center;
  font-size: 1em;
  min-width: 36px;
  height: 32px;
}

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

.nexus-comment-card {
  border-left: 4px solid #f0c040;
  border-radius: .6rem;
  box-shadow: 0 2px 8px 0 #18181e33;
  margin-bottom: 1.2rem;
  color: #f3f3f3;
  border: none;
  position: relative;
  background: #2d2d35;
  padding: 15px;
}

.nexus-comment-header {
  font-size: 1em;
  color: #f0c040;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: .7em;
  padding-bottom: 0.5rem;
}

.nexus-comment-author {
  color: #e0e0e0;
  font-weight: 600;
  font-size: 1em;
}

.nexus-comment-author i.bi-person-circle {
  color: #f0c040 !important;
}

.nexus-comment-date {
  color: #a0a0a0;
  font-size: 0.9em;
  font-weight: 400;
}

.nexus-comment-content {
  color: #e0e0e0;
  font-size: 1.04em;
  margin-top: .3em;
  word-break: break-word;
  padding-bottom: 1rem;
  padding-left: 1rem;
  line-height: 1.5;
}

.nexus-comment-card .delete-cross-form {
  margin-left: auto;
  display: inline;
}

.nexus-comment-card .delete-cross-btn {
  margin-left: .7em;
  vertical-align: middle;
}

.nexus-comment-card .delete-cross-btn i {
  vertical-align: middle;
}

.mod-detail-content .nexus-comment-card,
.mod-detail-content .nexus-comment-card .custom-card-body {
  background: #8884762b !important;
  color: #f3f3f3 !important;
  border-left: 4px solid #f0c040 !important;
  border-radius: .6rem !important;
  box-shadow: 0 2px 8px 0 #18181e33 !important;
  margin-bottom: 1.2rem !important;
  padding: 1rem 1.2rem .7rem 1.2rem !important;
  position: relative !important;
}

/* ==================== */
/* === ДОПОЛНИТЕЛЬНЫЕ КАРТОЧКИ === */
/* ==================== */

.changelog-card {
  background: var(--nexus-light-bg);
  border-radius: .4em;
}

.extra-image-card {
  background-color: #23232a;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: none;
  height: 100%;
}

.extra-image-card:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.extra-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  display: block;
  border-radius: 0;
  border: none;
}

/* ==================== */
/* === ГАЛЕРЕЯ === */
/* ==================== */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-item {
  width: 100%;
}

.gallery-thumb-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

.gallery-thumb {
  transition: transform 0.3s ease, filter 0.3s ease;
  display: block;
  width: 100%;
  height: auto;
}

.gallery-thumb:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
}

.gallery-thumb-wrapper:hover .delete-cross-btn {
  opacity: 1;
}

.gallery-card-16-9 {
  position: relative;
  overflow: hidden;
}

.gallery-thumb-16-9 {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.gallery-thumb-16-9 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-thumb-16-9 img:hover {
  transform: scale(1.05);
  cursor: zoom-in !important;
}

/* ==================== */
/* === МЕДИА-ЗАПРОСЫ === */
/* ==================== */

@media (max-width: 992px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== */
/* === ПАГИНАЦИЯ КОММЕНТАРИЕВ === */
/* ==================== */

.comments-header {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 1.5rem;
  gap: 0.5rem;
}

.add-comment-btn {
  background: linear-gradient(135deg, #f0c040 0%, #e0b030 100%);
  border: none;
  color: #1a1a22 !important;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(240, 192, 64, 0.3);
}

.add-comment-btn:hover {
  background: linear-gradient(135deg, #f8d050 0%, #e8c040 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(240, 192, 64, 0.4);
}

.add-comment-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(240, 192, 64, 0.3);
}

.comment-form-container {
  margin-bottom: 2rem;
  /*padding: 1rem;*/
  /*background: rgba(240, 192, 64, 0.05);*/
  /*border-left: 4px solid #f0c040; */
  border-radius: 0.4rem;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cancel-comment-form-btn {
  margin-right: 0.5rem;
}

/* Pagination styles */
.pagination {
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 2rem;
}

.pagination-sm .page-link {
  padding: 0.4rem 0.7rem;
  font-size: 0.9rem;
  color: #b0b0b0;
  background: #2d2d35;
  border: 1px solid #3e3e46;
  transition: all 0.2s ease;
}

.pagination-sm .page-link:hover {
  color: #f0c040;
  border-color: #f0c040;
  background: #3e3e46;
}

.pagination-sm .page-item.active .page-link {
  background: #f0c040;
  border-color: #f0c040;
  color: #1a1a22;
  font-weight: 600;
}

.pagination-sm .page-item.disabled .page-link {
  color: #6e6e6e;
  background: #1a1a22;
  border-color: #3e3e46;
  cursor: not-allowed;
}
