/* Кнопка обновления аватара не выходит за границы формы */
/* Кнопка обновления аватара центрируется и не выходит за границы формы */
.avatar-upload-form {
  /* ...существующие стили... */
  display: flex;
  flex-direction: column;
  align-items: center;
}
.avatar-upload-form .btn-nexus-form {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0.5rem 0 0 0;
  overflow: hidden;
  display: block;
  align-self: center;
}
/* --- Аватар --- */
/* Форма-обёртка аватара теперь адаптивная */
.avatar-upload-form {
  width: 148px;
  max-width: 100%;
  margin: 0 auto 1.2rem auto;
  position: relative;
  display: inline-block;
}
/* Лейбл и превью аватара теперь наследуют размеры формы */
.avatar-label {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1/1;
  margin: 0 auto;
}
/* Превью аватара всегда вписывается в форму */
.avatar-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 3px solid var(--nexus-gold);
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  transition: box-shadow 0.18s;
  border-radius: 50%;
}
.avatar-label:hover .avatar-preview,
.avatar-label:focus .avatar-preview {
  box-shadow: 0 4px 16px rgba(240,192,64,0.25);
}
.avatar-upload-overlay {
  position: absolute;
  left: 0; top: 0; right: 0; bottom: 0;
  background: rgba(24,24,30,0.45);
  color: var(--nexus-gold);
  opacity: 0;
  border-radius: 50%;
  transition: opacity 0.18s;
  pointer-events: none;
}
.avatar-label:hover .avatar-upload-overlay,
.avatar-label:focus .avatar-upload-overlay {
  opacity: 1;
}
/* --- Notification mention icon color --- */
.text-nexus-orange {
  color: var(--nexus-orange) !important;
}
.comment-delete-form.position-absolute {
  right: 0;
  bottom: 0;
  margin: 0 !important;
}
/* Убрать фон у формы удаления комментария */
.comment-delete-form.no-bg {
  background: none !important;
  box-shadow: none !important;
  border: none !important;
}
.cursor-pointer { cursor: pointer !important; }
/* ==================== */
/* === БАЗОВЫЕ СТИЛИ === */
/* ==================== */

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(to bottom, #1f1f23, #15151a, #0f0f11);
    margin: 0;
    padding: 0;
    color: var(--nexus-text);
    line-height: var(--line-height-base);
}

a {
    color: var(--nexus-gold);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover, a:focus {
    color: var(--nexus-white);
    text-decoration: none;
}

a:active {
    color: var(--nexus-gold-hover);
}

.container {
    max-width: var(--container-max-width);
    margin-left: auto;
    margin-right: auto;
    padding: var(--spacing-md) var(--spacing-sm);
}

.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }
.text-decoration-none { text-decoration: none !important; }
.mb-3 { margin-bottom: var(--spacing-md) !important; }
.mb-4 { margin-bottom: var(--spacing-lg) !important; }
.mt-3 { margin-top: var(--spacing-md) !important; }
.p-4 { padding: var(--spacing-lg) !important; }
.hidden { display: none !important; }

.text-nexus-gold { color: var(--nexus-gold) !important; }
.text-nexus-white { color: var(--nexus-white) !important; }
.text-nexus-dark { color: var(--nexus-dark)}
.text-nexus-dark:hover { color: var(--nexus-white) }
.text-muted { 
    color: var(--nexus-text-muted) !important;
    padding: 0.2rem 0 0.2rem 2rem;
}

/* Добавить недостающие утилиты */
.w-100 { width: 100% !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.text-center { text-align: center !important; }
.text-decoration-none { text-decoration: none !important; }
.p-4 { padding: 1.5rem !important; }

.index-hero {
    background: var(--nexus-dark);
    border-radius: .7em;
    margin-bottom: 2.5em;
    box-shadow: 0 2px 16px 0 #18181e33;
    color: #fff;
    padding: 3.5em 1em 2.5em 1em;
}

.index-title {
    font-size: 2.5em;
    font-weight: 900;
    color: #f0c040;
    margin-bottom: .3em;
    letter-spacing: .01em;
}

.index-lead {
    font-size: 1.25em;
    color: #e0e0e0;
    margin-bottom: 1.5em;
}

.index-features .card {
    background: var(--nexus-dark);
    color: #e0e0e0;
    border-radius: .7em;
    box-shadow: 0 2px 8px 0 #18181e33;
    border: none;
}

.index-features .card-title {
    color: #f0c040;
    font-weight: 700;
    font-size: 1.18em;
}

.index-section-title {
    color: #f0c040;
    font-weight: 800;
    margin-bottom: 1.2em;
    font-size: 1.4em;
    letter-spacing: .01em;
}

.img-thumbnail {
    padding: .25rem;
    background-color: transparent!important;
    border: none!important;
    border-radius: var(--bs-border-radius);
    max-width: 100%;
    height: auto;
}

.mod-card,
.btn-nexus,
.form-control,
.bbcode-btn {
    will-change: transform;
    backface-visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.mod-card {
    contain: layout style paint;
}

.mods-grid {
    contain: layout;
}

.mod-thumb {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.bg-hero {
    min-height: 200px;
    position: relative;
    display: flex;
    align-items: center;
}

.bg-hero .container {
    border-radius: .5rem;
}

.register-container {
    background-color: #fff;
    padding: 2rem;
    border-radius: .5rem;
    box-shadow: 0 .125rem .25rem rgba(0,0,0,.075);
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
}

.site-footer {
    background: 0 0;
    color: #ccc;
    padding: 40px 20px;
    font-size: 14px;
    border-top: 1px solid #333;
}

/* Исправления и доработки */
.custom-card {
    background: var(--nexus-dark);
    border-radius: .5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,.25);
    border: none;
}

.reset-login {
  max-width: 480px;
  width:auto;
}

.custom-card-body {
  background: var(--nexus-dark);
  border-radius: .8rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-bottom: 1rem;
  padding-top: 1rem;
}

.custom-card-body-register {
  background: var(--nexus-dark);
  border-radius: .8rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-bottom: 1rem;
  padding-top: 1rem;
  max-width: 800px;
}

.custom-card-title {
  margin-bottom: 0.5rem;
  color: #f0c040;
  font-weight: 700;
  font-size: 1.18em;
  margin-left:0.5rem;
  margin-right:0.5rem;
}

.custom-card-text {
  font-size: 1rem;
  line-height: 1.5;
  color: #e0e0e0;
  margin-bottom: 0;
  margin-left:1rem;
  margin-right:1rem;
}

.custom-card-register {
 max-width: 880px;
 background: var(--nexus-dark);
 border-radius: .5rem;
 box-shadow: 0 .125rem .25rem rgba(0, 0, 0, 0.075);
 border: none;
}

.my-image-card {
    background: var(--nexus-dark);
    border-radius: .5rem;
    border: none;
    cursor: zoom-in;
    object-fit: cover;
    height: 150px;
}

.my-image-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 6px #f0c040;
}

.mod-detailed-desc {
    background: #2d2d36;
    border-radius: .5rem;
    padding: 1.2em 1.5em;
    color: #e0e0e0;
}

.mod-changelog {
    background: #2d2d36;
    border-radius: .5rem;
    padding: 1.2em 1.5em;
    color: #e0e0e0;
}

.mod-detail-content .tab-content {
    background: var(--nexus-dark) !important;
    color: #e0e0e0 !important;
    border-radius: .5rem;
    padding: 2rem 2.2rem 2rem 2.2rem;
    margin-bottom: 1.5rem;
    min-height: 320px;
}

.about-mod-body {
    border-radius: .5rem;
    color: #e0e0e0;
    padding: 2rem 2.2rem 2rem 2.2rem;
}

.about-mod-title {
    font-size: 1.45em;
    font-weight: 700;
    color: #d2d1d6;
    letter-spacing: .01em;
    line-height: 1.2;
    margin-bottom: 20px;
}

/* Соцсети в футере */
.footer-social a {
    font-size: 2rem !important;
    color: #888 !important;
    margin: 0 10px;
    transition: color .2s;
}

.footer-social a:hover {
    color: #fff !important;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 3px;
}

.profile-link .username,
.profile-link .username:active,
.profile-link .username:visited {
    text-decoration: none!important;
    color: #c6c5ca!important;
    font-weight: 700!important;
}

.profile-link .username:hover {
    color: #ff7e29!important;
    text-decoration: none!important;
}


/* Адаптивность */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-sm);
    }
}

/* Фон файла в files tab */
.list-group-item {
    background: #18181e;
    border-color: #3d3d45;
    color: #e0e0e0;
    justify-content: space-between;
    max-width: auto;
    padding: 2.2em 0 2.2em 1em;
    margin: 15px;
    display: flex;
    align-items: center;
    min-height: 48px;
    height: 48px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* mod-section-title — вернуть стиль как в style.css */
.mod-section-title {
    display: block;
    width: 100%;
    font-size: 1.22em;
    font-weight: 700;
    color: var(--nexus-white);
    background: #8884762b;
    padding: .7em 1em .7em .6em;
    margin-bottom: 1.1em;
    margin-top: .2em;
    border-radius: .4em;
    letter-spacing: .01em;
    box-shadow: 0 2px 8px 0 #18181e22;
    border-left: 12px solid #f0c040;
}

/* mod-meta-row — дата и размер серым, размер шрифта меньше */
.mod-meta-row {
    font-size: .92em !important;
    color: #b0b0b0 !important;
    display: flex;
    flex-wrap: wrap;
    gap: .3em;
    align-items: center;
    line-height: 1.5;
}
.mod-meta-row .mod-date,
.mod-meta-row .mod-size {
    color: #b0b0b0 !important;
    font-size: .92em !important;
}

.zoomable {
  cursor: zoom-in;
  transition: transform 0.2s;
}

.main-content {
  flex-grow: 1;
  max-width: 1300px;
  width: 100%;
  min-width: 0;
}

.index-hero-wrapper {
  max-width: 900px;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.torch-img {
  width: 80px; /* можно подкорректировать размер под твой дизайн */
  height: auto;
  user-select: none;
}

.torch-left {
  margin-right: 20px;
}

.torch-right {
  margin-left: 20px;
}

.mods-btn {
  align-items: center;
}

.icon-wrapper {
  position: relative;
  display: inline-block;
  height: 1.5em;
  width: 1em; /* или подкорректируй ширину под пропорции картинки */
  vertical-align: middle;
}

.icon-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  height: 1.5em;
  width: auto;
  transition: opacity 0.3s ease;
  display: block;
}

.icon-hover {
  opacity: 0;
  pointer-events: none;
}

.mods-btn:hover .icon-default {
  opacity: 0;
}

.mods-btn:hover .icon-hover {
  opacity: 1;
}

.mods-btn:hover .icon-hover {
  opacity: 1;
}

.hero-text {
  margin-right: 11rem !important;
  margin-left: 11rem !important;
}

.list-group-item > span,
.list-group-item .me-3 {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    display: block;
    max-width: 70%;
}

.list-group-item .delete-cross-form,
.list-group-item .delete-cross-btn {
    flex-shrink: 0;
    margin-left: 8px;
}


/* Styles for donation section */
.donation-block {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(212, 175, 55, 0.05));
    border: 2px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Donation frame width reduction by 20% */
.donation-frame {
    width: 80%;
    margin: 0 auto;
}

.wallet-info {
    background-color: rgba(33, 37, 41, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.wallet-address {
    background-color: rgba(212, 175, 55, 0.1);
    color: #d4af37;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    word-break: break-all;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.wallet-address-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.feature-icon {
  width: 125px;
  height: 125px;
  object-fit: contain;
}

@media (max-width: 768px) {
    .donation-frame {
        width: 100%;
    }
    
    .wallet-address-container {
        flex-direction: column;
    }
    
    .wallet-address {
        font-size: 0.8rem;
        word-break: break-all;
        width: 100%;
    }
}

/* --- Notification Bell --- */
.notification-bell {
  user-select: none;
  color: var(--nexus-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: transparent;
  border: none;             /* убираем дефолтную рамку */
  transition: background 0.2s ease, color 0.2s ease;
  outline: none;            /* убираем синий контур */
  cursor: pointer;
}

/* hover */
.notification-bell:hover {
  background: #2c2c2c;
  color: var(--nexus-white);
}

/* active / focus */
.notification-bell:active,
.notification-bell:focus {
  background: #2c2c2c;
  color: var(--nexus-white);
  box-shadow: none;  /* убираем bootstrap shadow */
}

/* --- Notification Count --- */
.notification-count {
 display: none;
}

.notification-count-full {
  display: none; /* по умолчанию скрыт */
  position: absolute;  /* важно для позиционирования относительно кнопки */
  top: 0;
  right: 0;
  transform: translate(50%, -50%); /* смещаем немного за край кнопки */
  background: var(--nexus-red);
  color: var(--nexus-pure-white);
  font-size: 0.7rem;
  font-weight: bold;
  min-width: 17px;
  height: 17px;
  padding: 0px;
  border-radius: 25%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center; 
  -webkit-text-stroke: 0.2px #000;
  text-shadow: 0 0 1px #000;
}

/* --- Notification Dropdown --- */
.notification-dropdown {
  position: absolute;
  right: 0;
  top: 120%;
  min-width: 340px;
  max-width: 400px;
  max-height: 420px;
  overflow-y: auto;
  background: #222 !important;
  color: #e0e0e0 !important;
  border-radius: 0.5rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  z-index: 9999;
  padding: 0;
  border: 2px solid #f0c040;
  scrollbar-width: none;
  display:none;
}

.notification-dropdown::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

/* --- Notification Items --- */
.notification-item {
  padding: 0.6rem 1rem;
  transition: background 0.2s ease;
}

/* Непрочитанное уведомление */
.notification-item.notification-unread {
  background: #2c2c2c;
}

/* Hover по уведомлению */
.notification-item:hover {
  background: #2c2c2c;
}

/* --- BBCode sizes --- */
.bbcode-size-10 { font-size: 10px; }
.bbcode-size-14 { font-size: 14px; }
.bbcode-size-18 { font-size: 18px; }
.bbcode-size-24 { font-size: 24px; }
.bbcode-size-32 { font-size: 32px; }

/* --- BBCode colors --- */
.bbcode-color-red { color: red; }
.bbcode-color-orange { color: orange; }
.bbcode-color-yellow { color: yellow; }
.bbcode-color-green { color: green; }
.bbcode-color-blue { color: blue; }
.bbcode-color-purple { color: purple; }
.bbcode-color-black { color: black; }
/* HEX цвета: пример для #ffff00 */
.bbcode-color-#ffff00, .bbcode-highlight-#ffff00 { color: #ffff00; background: #ffff00; }

/* --- BBCode highlights --- */
.bbcode-highlight-yellow { background: yellow; }
.bbcode-highlight-green { background: green; }
.bbcode-highlight-blue { background: blue; }
.bbcode-highlight-#ffff00 { background: #ffff00; }

/* --- BBCode lists --- */
.bbcode-list-decimal { list-style-type: decimal; }
.bbcode-list-alpha { list-style-type: lower-alpha; }

/* --- BBCode fonts --- */
.bbcode-font-Arial { font-family: Arial, sans-serif; }
.bbcode-font-Times { font-family: 'Times New Roman', Times, serif; }
.bbcode-font-Courier { font-family: 'Courier New', Courier, monospace; }

/* --- BBCode video --- */
.bbcode-video { max-width: 100%; height: auto; }

/* --- BBCode alignment --- */
.bbcode-align-left { text-align: left; }
.bbcode-align-center { text-align: center; }
.bbcode-align-right { text-align: right; }

/* --- BBCode preview image --- */
.bbcode-preview-image { max-width: 100%; height: auto; }

/* --- BBCode quote --- */
.bbcode-preview-quote { border-left: 3px solid var(--nexus-gold); margin: 8px 0; padding: 8px 12px; background: var(--nexus-dark); }
.bbcode-quote-author { font-weight: bold; color: #888; margin-right: 8px; }

/* --- BBCode spoiler --- */
.bbcode-spoiler { margin: 8px 0; border: 1px dashed #aaa; background: var(--nexus-dark); }
.bbcode-spoiler-header { cursor: pointer; font-weight: bold; padding: 4px 8px; background: #eee; }
.bbcode-spoiler-content-hidden { display: none; }

/* --- BBCode accordion --- */
.bbcode-accordion { margin: 8px 0; border: 1px solid #ddd; }
.bbcode-accordion-title { cursor: pointer; font-weight: bold; padding: 4px 8px; background: #eee; }
.bbcode-accordion-body-hidden { display: none; }

/* --- BBCode code --- */
.bbcode-preview-code { background: #222; color: #eee; padding: 8px; border-radius: 4px; font-family: monospace; font-size: 14px; overflow-x: auto; }

/* --- BBCode table --- */
.bbcode-table { border-collapse: collapse; width: 100%; margin: 8px 0; }
.bbcode-table td, .bbcode-table th { border: 1px solid #ccc; padding: 4px 8px; }

/* --- BBCode attach --- */
.bbcode-attach { color: #888; font-style: italic; }

/* --- BBCode math --- */
.bbcode-math { font-family: 'Times New Roman', Times, serif; font-style: italic; }

/* --- BBCode progress --- */
progress { vertical-align: middle; }

/* --- BBCode anchor/goto --- */
.bbcode-anchor { display: inline-block; width: 0; height: 0; }
.bbcode-goto { color: #007bff; text-decoration: underline; cursor: pointer; }

/* --- BBCode preview link --- */
.bbcode-preview-link { color: #007bff; text-decoration: underline; }

/* --- BBCode fieldset --- */
.bbcode-fieldset { border: 1px solid #aaa; padding: 8px; margin: 8px 0; }
.bbcode-fieldset legend { font-weight: bold; }

/* --- BBCode dropdown color box --- */
.bbcode-dropdown-color-box { display: inline-block; width: 16px; height: 16px; margin-right: 6px; vertical-align: middle; border: 1px solid #ccc; }

/* --- BBCode preview --- */
.bbcode-preview { min-height: 80px; background: #f8f8f8; border: 1px solid #eee; padding: 8px; border-radius: 4px; }

/* --- BBCode output --- */
.bbcode-output { white-space: pre-wrap; word-break: break-word; }

/* --- BBCode tabs --- */
.bbcode-tab.active { font-weight: bold; border-bottom: 2px solid #007bff; }

/* --- BBCode editor hide --- */
.bbcode-hide { display: none !important; }

/* --- BBCode preview visible --- */
.bbcode-preview-visible { display: block !important; }

/* --- BBCode dropdown --- */
.bbcode-dropdown { z-index: 1000; background: #fff; border: 1px solid #ccc; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.bbcode-dropdown-item { cursor: pointer; transition: background 0.2s; }
.bbcode-dropdown-item:hover { background: #f0f0f0; }

/* --- BBCode editor --- */
.bbcode-editor { position: relative; }
/* --- Comments modern style --- */
.comment-card {
  background: #2d2d36;
  border: 1px solid #333;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  color: #f8f9fa;
  position: relative;
}
.comment-avatar {
  width: 48px;
  height: 48px;
  object-fit: cover;
  background: #444;
}
.comment-username {
  color: var(--nexus-orange);
  cursor: pointer;
}
.comment-content {
  font-size: 1.05em;
  margin-bottom: 8px;
  color: #f8f9fa;
}
.comment-reply-btn, .comment-quote-btn {
  min-width: 36px;
  font-size: 0.95em;
  padding: 2px 8px;
  line-height: 1.2;
  width: 100%;
  margin-bottom: 2px;
  border: 1px solid #888;
  background: #222;
  color: #eee;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}
.comment-reply-btn:hover, .comment-quote-btn:hover {
  background: #333;
  color: #fff;
}
.btn-xs {
  font-size: 0.85em;
  padding: 2px 8px;
  line-height: 1.2;
}
.comment-delete-btn {
  position: absolute;
  bottom: 3px;
  right: 3px;
  z-index: 2;
}

/* --- Comments layout --- */
.comment-left {
  min-width: 60px;
}
.comment-vr {
  width: 2px;
  min-height: 60px;
  background: #444;
  margin: 0 0;
}
.comment-right {
  position: relative;
  padding-left: 12px;
}
.comment-delete-form {
  top: 6px;
  right: 8px;
}

.vr {
  width: 2px;
  min-height: 60px;
  background: #444;
  margin: 0 0;
}

/* Edit tab navigation menu styles */
.edit-nav-menu {
  min-width: 240px;
  max-width: 320px;
  background: #23232b;
  border-radius: 12px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.10);
  border: 1px solid var(--nexus-gold);
  padding: 18px 0 18px 0;
}
.edit-nav-list {
  margin: 0;
  padding: 0;
}
.edit-nav-link {
  color: #f0c040;
  background: transparent;
  font-weight: 500;
  font-size: 1.08rem;
  transition: background 0.15s, color 0.15s;
  border: none;
  outline: none;
  text-decoration: none;
}
.edit-nav-link:hover, .edit-nav-link:focus {
  background: #353545;
  color: #fffbe6;
  text-decoration: none;
}
.edit-nav-link.active {
  background: #f0c040;
  color: #23232b;
}

.pagination-bar-top {
 max-width: 1555px;
}

.pagination-bar-bottom {
 max-width: 1260px;
}