/* --- MOD DETAIL IMAGE STYLES RESTORE --- */
.img-general-image,
.img-general-image-nozoom {
  max-width: 100%;
  height: auto;
  border-radius: .5em;
  border: 2px solid transparent;
  transition: box-shadow .18s, border-color .18s, transform .18s;
}

.img-general-image:hover,
.img-general-image-nozoom:hover {
  border-color: #f0c040;
  box-shadow: 0 0 8px #f0c04055;
}

.extra-thumbnails {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem; /* Расстояние между изображениями */
}

.extra-thumbnails .extra-thumb {
  width: 100%; /* чтобы вписывались в ячейку */
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: .4em;
  border: 2px solid #35353c;
  box-shadow: 0 1px 4px #18181e33;
  transition: transform .18s, border-color .18s, box-shadow .18s;
  cursor: zoom-in !important;
}

.extra-thumbnails .extra-thumb:hover,
.extra-thumbnails-flex .extra-thumb:hover {
  border-color: #f0c040;
  box-shadow: 0 0 8px #f0c04055;
  transform: scale(1.13);
  z-index: 2;
}
/* --- END MOD DETAIL IMAGE STYLES RESTORE --- */
/* Скрывать textarea, если preview активен */
.bbcode-textarea.bbcode-hide {
  display: none;
}
/* BBCode preview visibility logic */
.bbcode-preview {
  display: none;
}
.bbcode-preview.bbcode-preview-visible {
  display: block;
}
.min-height-70vh { min-height: 70vh !important; }
.font-size-5rem { font-size: 5rem !important; }
.font-size-6rem { font-size: 6rem !important; }
.text-shadow-10px { text-shadow: 0 0 10px rgba(242, 140, 56, 0.5) !important; }
.bg-23232a { background: #23232a !important; }
.max-width-600 { max-width: 600px !important; }
.display-inline-block { display: inline-block !important; }
.box-shadow-none { box-shadow: none !important; }
.width-100 { width: 100px !important; }
.height-100 { height: 100px !important; }
.border-radius-50 { border-radius: 50% !important; }
/* === ДОПОЛНИТЕЛЬНЫЕ КЛАССЫ ДЛЯ ЗАМЕНЫ ИНЛАЙН-СТИЛЕЙ === */
.bg-skyrim-header {
  background-image: url('../skyrim_background.webp') !important;
  background-size: cover !important;
  background-position: center !important;
}
.padding-x-45 {
  padding-left: 45px !important;
  padding-right: 45px !important;
}
.bg-black-06 {
  background-color: rgba(0,0,0,0.6) !important;
}
.padding-1rem {
  padding: 1rem !important;
}
.height-72 {
  height: 72px !important;
}
.width-auto {
  width: auto !important;
}
.min-width-340 {
  min-width: 340px !important;
}
.min-width-120 {
  min-width: 120px !important;
}
.min-width-180 {
  min-width: 180px !important;
}
/* ==================== */
/* === ФОРМЫ =========== */
/* ==================== */

form {
    background: var(--nexus-dark);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

form label {
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-sm);
    display: block;
    color: var(--nexus-white);
}

.form-control,
.form-select {
    width: 100%;
    padding: var(--spacing-sm) 0.75rem;
    margin-bottom: var(--spacing-md);
    border: var(--border-width) solid var(--nexus-border);
    border-radius: var(--border-radius-sm);
    background: var(--nexus-light-bg);
    color: var(--nexus-text);
    font-size: var(--font-size-base);
    transition: var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    background: var(--nexus-border);
    color: var(--nexus-text);
    border-color: var(--nexus-orange);
    box-shadow: 0 0 0 1px var(--nexus-orange);
    outline: 0;
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger-light);
    box-shadow: 0 0 0 0.1rem rgba(255, 77, 79, 0.15);
}

.invalid-feedback {
    display: none;
    color: var(--danger-light);
    font-size: var(--font-size-sm);
    margin-top: 3px;
}

.form-control.is-invalid + .invalid-feedback {
    display: block;
}

.form-control::placeholder {
    color: var(--nexus-placeholder);
    opacity: 1;
}

.form-search,
.form-select {
    width: 100%;
    padding: var(--spacing-sm) 0.75rem;
    border: var(--border-width) solid var(--nexus-border);
    border-radius: var(--border-radius-sm);
    background: var(--nexus-light-bg);
    color: var(--nexus-text);
    font-size: var(--font-size-base);
    transition: var(--transition-fast);
}

.form-search:focus,
.form-select:focus {
    background: var(--nexus-border);
    color: var(--nexus-text);
    border-color: var(--nexus-orange);
    box-shadow: 0 0 0 1px var(--nexus-orange);
    outline: 0;
}

.form-search.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger-light);
    box-shadow: 0 0 0 0.1rem rgba(255, 77, 79, 0.15);
}
.form-search.is-invalid + .invalid-feedback {
    display: block;
}

.form-search::placeholder {
    color: var(--nexus-placeholder);
    opacity: 1;
}

/* Специфичные стили форм */
.nsfw-block {
    background: #2d1a1a;
    border: 1px solid var(--danger-light);
    border-radius: var(--border-radius);
    padding: 1em;
    margin-bottom: 0.8em;
    max-width: 500px;
}

.nsfw-block-edit {
    background: #2d1a1a;
    border: 1px solid var(--danger-light);
    border-radius: var(--border-radius);
    padding: 1em;
    margin-bottom: 1.5em;
    max-width: 294px;
}

.file-input {
    color: var(--nexus-white) !important;
    background: var(--nexus-light-bg) !important;
    border: 1px solid var(--nexus-border);
    border-radius: var(--border-radius-sm);
    font-size: 1em;
}

.form-check-label,
.form-label {
    color: #d1d1d6;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.form-text {
    color: #b0b0b8!important;
}

.nsfw-block .form-check-input {
    margin-top: .25em;
}

.nsfw-block .form-check-label {
    margin-bottom: 0;
    color: #ff4d4f!important;
    font-weight: 600;
}

.nsfw-block .form-text {
    color: #ffb3b3!important;
}

.nsfw-block .form-check-input {
    margin-top: .25em;
}

.nsfw-block .form-check-label {
    margin-bottom: 0;
    color: #ff4d4f!important;
    font-weight: 600;
}

.nsfw-block .form-text {
    color: #ffb3b3!important;
}


.nsfw-block-edit .form-check-input {
    margin-top: .25em;
}

.nsfw-block-edit .form-check-label {
    margin-bottom: 0;
    color: #ff4d4f!important;
    font-weight: 600;
}

.nsfw-block-edit .form-text {
    color: #ffb3b3!important;
}

.nsfw-block-edit .form-check-input {
    margin-top: .25em;
}

.nsfw-block-edit .form-check-label {
    margin-bottom: 0;
    color: #ff4d4f!important;
    font-weight: 600;
}

.nsfw-block-edit .form-text {
    color: #ffb3b3!important;
}


.nsfw-checkbox {
    width: 2.2em;
    height: 2.2em;
    min-width: 2.2em;
    min-height: 2.2em;
    border: 1px solid #b0b0b8!important;
    border-radius: .4em;
    background: #18181e!important;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    box-shadow: 0 0 0 2px #23232a;
    appearance: none;
    position: relative;
    display: inline-block;
    vertical-align: middle;
}

.nsfw-checkbox:checked {
    border-color: #4caf50!important;
    box-shadow: 0 0 0 2px #4caf50;
    background: #23232a!important;
}

.nsfw-checkbox:checked::after {
    content: '\2714';
    color: #4caf50;
    font-size: 1.6em;
    position: absolute;
    left: .18em;
    top: -.1em;
    font-weight: 700;
    pointer-events: none;
}

.nsfw-checkbox::after {
    content: '';
    position: absolute;
}

.file-chosen {
    display: block;
    margin-top: 7px;
    margin-left: 4px;
    min-width: 120px;
    color: #f0f0f0;
    font-size: 1em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.input-group {
    position: relative;
}

.input-group.selected .file-label-text {
    color: #f0f0f0;
    opacity: 1;
    width: 100%;
    text-align: center;
    margin-left: 0;
    font-weight: 600;
}

.input-group.selected .input-group-text {
    background: #2d2d35;
}

.input-group-text.file-label {
    min-width: 140px;
    justify-content: center;
    align-items: center;
    display: flex;
    gap: .5em;
    font-size: 1em;
    height: 44px;
    cursor: pointer;
    z-index: 1;
    border-top-right-radius: 7px!important;
    border-bottom-right-radius: 7px!important;
    border-color: var(--nexus-gold);
    background: #23232a;
    color: #f0c040;
}

.file-input::-webkit-file-upload-button,
.file-input::file-selector-button {
    display: none;
}

.file-input {
    color: #f0f0f0!important;
    background: #18181e!important;
    border: 1px solid #35353c;
    border-radius: .3rem;
    font-size: 1em;
    margin-left: 5px!important;
    opacity: 0;
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    z-index: 2;
    cursor: pointer;
}

form.d-inline.like-form {
  display: inline-flex !important;
  align-items: center;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
}

.register-form {
  border: none;
  box-shadow: none;
  background: #23232a;
}

.hidden {
  display: none;
}

.form-reset-container {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.form-reset {
  max-width: 480px;
  margin: 0 auto;
}

/* === КЛАССЫ ДЛЯ ЗАМЕНЫ ИНЛАЙН-СТИЛЕЙ === */
.cursor-zoom-in { cursor: zoom-in !important; }
.color-f0c040 { color: #f0c040 !important; }
.color-e0e0e0 { color: #e0e0e0 !important; }
.color-d2d1d6 { color: #D2D1D6 !important; }
.color-b0b0b0 { color: #b0b0b0 !important; }
.color-ff4d4f { color: #ff4d4f !important; }
.color-f3f3f3 { color: #f3f3f3 !important; }
.color-23232a { color: #23232a !important; }
.color-ffb3b3 { color: #ffb3b3 !important; }
.bg-18181e { background: #18181e !important; }
.bg-8884762b { background: #8884762b !important; }
.bg-23232a { background: #23232a !important; }
.bg-2d1a1a { background: #2d1a1a !important; }
.bg-transparent { background: transparent !important; }
.bg-nexus-light { background: var(--nexus-light-bg) !important; }
.font-size-1em { font-size: 1em !important; }
.font-size-1-1em { font-size: 1.1em !important; }
.font-size-1-3em { font-size: 1.3em !important; }
.font-size-2rem { font-size: 2rem !important; }
.min-width-36 { min-width: 36px !important; }
.min-width-220 { min-width: 220px !important; }
.max-width-480 { max-width: 480px !important; }
.max-width-500 { max-width: 500px !important; }
.max-width-540 { max-width: 540px !important; }
.max-width-700 { max-width: 700px !important; }
.height-32 { height: 32px !important; }
.height-150 { height: 150px !important; }
.height-210 { height: 210px !important; }
.width-120 { width: 120px !important; }
.width-163 { width: 163px !important; }
.width-260 { width: 260px !important; }
.display-inline-flex { display: inline-flex !important; }
.display-flex { display: flex !important; }
.display-none { display: none !important; }
.align-items-center { align-items: center !important; }
.justify-content-center { justify-content: center !important; }
.gap-05em { gap: 0.5em !important; }
.gap-12 { gap: 12px !important; }
.gap-15 { gap: 15px !important; }
.padding-4 { padding: 4px !important; }
.padding-bottom-15 { padding-bottom: 15px !important; }
.padding-bottom-07 { padding-bottom: .7rem !important; }
.padding-bottom-1-2rem { padding-bottom: 1.2rem !important; }
.padding-bottom-1em { padding-bottom: 1em !important; }
.padding-bottom-0 { padding-bottom: 0 !important; }
.padding-left-15 { padding-left: 15px !important; }
.margin-0-auto { margin: 0 auto !important; }
.margin-bottom-1-2rem { margin-bottom: 1.2rem !important; }
.margin-bottom-1-5em { margin-bottom: 1.5em !important; }
.margin-bottom-15 { margin-bottom: 15px !important; }
.margin-left-4 { margin-left: 4px !important; }
.margin-left-9 { margin-left: 9px !important; }
.margin-left-18 { margin-left: 18px !important; }
.opacity-013 { opacity: 0.13 !important; }
.object-fit-cover { object-fit: cover !important; }
.white-space-pre-line { white-space: pre-line !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }
.min-width-0 { min-width: 0 !important; }
.min-width-220 { min-width: 220px !important; }
.min-width-36 { min-width: 36px !important; }
.max-width-700 { max-width: 700px !important; }
.max-width-480 { max-width: 480px !important; }
.max-width-500 { max-width: 500px !important; }
.max-width-540 { max-width: 540px !important; }
.width-120 { width: 120px !important; }
.width-163 { width: 163px !important; }
.height-32 { height: 32px !important; }
.height-150 { height: 150px !important; }
.height-210 { height: 210px !important; }
.display-block { display: block !important; }
.display-inline-block { display: inline-block !important; }
.display-none { display: none !important; }
.border-none { border: none !important; }
.border-radius-6 { border-radius: .6rem !important; }
.border-radius-4 { border-radius: .4em !important; }
.border-radius-3 { border-radius: .3rem !important; }
.border-radius-7 { border-radius: 7px !important; }
.box-shadow { box-shadow: 0 2px 8px 0 #18181e33 !important; }
.vertical-align-middle { vertical-align: middle !important; }
.text-center { text-align: center !important; }
.text-end { text-align: end !important; }
.font-weight-600 { font-weight: 600 !important; }
.font-weight-700 { font-weight: 700 !important; }
.line-height-1-5 { line-height: 1.5 !important; }
.overflow-hidden { overflow: hidden !important; }
.text-overflow-ellipsis { text-overflow: ellipsis !important; }
.white-space-nowrap { white-space: nowrap !important; }
.pointer-events-none { pointer-events: none !important; }

/* Аватар теперь всегда вписывается в родителя, не выходит за границы */
.profile-avatar {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: cover;
  border: 2px solid var(--nexus-orange);
  border-radius: 50%;
  box-sizing: border-box;
}

.profile-avatar-user {
  width: 64px;
  height: 64px;
  border: 2px solid var(--nexus-orange);
}

form.delete-mod-form {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
}

.endorse-mod-form {
  display: inline;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  border-radius: none;
  box-shadow: none;
}

.centered-container {
  display: flex;
  justify-content: center;
  padding-top: 2rem;

}

/* Стили для списка файлов */
.file-list-container {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #2d2d36;
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid #35353c;
  transition: all 0.2s ease;
}

.file-item:hover {
  background: #35353c;
  border-color: var(--nexus-gold);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.file-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.file-icon {
  color: var(--nexus-gold);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
}

.file-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.file-name {
  color: var(--nexus-white);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 0.25rem;
}

.file-size {
  color: var(--nexus-text-muted);
  font-size: 0.875rem;
}

.file-actions {
  flex-shrink: 0;
}

.download-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  min-width: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.download-btn:hover {
  transform: scale(1.05);
}

.no-files-message {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--nexus-text-muted);
  padding: 1rem;
  background: #2d2d36;
  border-radius: 0.5rem;
  border: 1px dashed #35353c;
}

.no-files-message i {
  font-size: 1.25rem;
}

.formNexus {
  background: transparent;
  border: none;
  box-shadow: none;
}