/* === DLE Engine CSS — Dark Theme === */

/* ── Loading ── */
#loading-layer { background: #000; padding: 10px; text-align: center; color: #fff; border-radius: 2px }
#loading-layer.withouttext {
    background: rgb(0 0 0 / 60%);
    padding: 5px 5px 0 5px;
    text-align: center;
    color: #fff;
    border-radius: 50%;
}
#loading-layer.withtext {
    padding: 10px;
    background: rgb(0 0 0 / 80%);
    color: #ededed;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgb(0 0 0 / 50%);
}

/* ── Quotes / spoilers / code ── */
.scriptcode, .title_quote,
    .title_spoiler, .text_spoiler, .quote { padding: 10px; background: #131313; border: 1px solid #2a2a2a; }

    .title_quote { border-left: 2px solid #e85319; border-bottom: 0; margin-top: 2px; font-weight: bold; color: #ededed; }
    .quote, blockquote { border-left: 2px solid #e85319; color: #ccc; }
    .quote_block { margin-bottom: .7rem; }
    .title_spoiler { margin-top: 2px; color: #ededed; }
    .text_spoiler { margin-bottom: 2px; color: #ccc; }
    .title_spoiler img { vertical-align: middle; margin: -1px 0 0 !important }
    .scriptcode { color: #7ec85a; text-align: left; font-family: "Courier New" }
    .title_spoiler { font-weight: normal; }
    .text_spoiler { border-top: 0; text-align: justify; }

    .hide { background-color: #131313; padding: 5px; color: #7ec85a; border: 1px solid #2a2a2a; margin: 0 0 1em 0 }
    .hide a { text-decoration: underline; } .hide a:hover { text-decoration: none }

/* ── Sort ── */
.sort { list-style: none; padding: 0; margin: 0; }
    .sort > li, .sort { display: inline; }
    .sort > li { margin: 0 0 0 3%; }
    .sort > li a { color: #8a8a8a; }
    .sort > li.asc a, .sort > li.desc a { color: var(--c-accent, #0080FF); }
    .sort > li.asc a:after, .sort > li.desc a:after {
        content: "";
        background-image: url(https://pack.victorpainer.com/templates/store/imgs/rating.webp);
        display: inline-block;
        vertical-align: middle;
        margin: -1px 0 0 .4em;
        width: 6px; height: 11px;
        -webkit-background-size: 6px auto; background-size: 6px auto;
    }
    .sort > li.asc a:after { background-position: 0 -11px; }

/* ── Calendar ── */
.calendar { width: 100%; text-align: center; }
.calendar tr td, .calendar tr th { padding: 3px; }
    .calendar tr td a { color: inherit; font-weight: bold; }
    .calendar tr td { padding: 5px 3px; color: #ccc; }
    .calendar tr td.weekday { color: #ea5f24; }
    .calendar tr th { background-color: #1a1a1a; font-weight: bold; text-transform: uppercase; color: #8a8a8a; }
    .calendar tr th.weekday { background-color: #ea5f24; color: #fff; }
    .calendar tr th.monthselect { background-color: transparent; color: #505050; padding-bottom: 15px; }
    .calendar tr th.monthselect a { color: #505050; }

/* ── Vote / poll progress ── */
.voteprogress, .pollprogress {
    overflow: hidden;
    height: 6px;
    margin-bottom: 10px;
    background-color: #1e1e1e;
    border-radius: 3px;
    margin-top: 6px;
}
    .voteprogress span, .pollprogress span {
        text-indent: -9999px;
        height: 6px;
        display: block;
        overflow: hidden;
        background: var(--c-accent, #0080FF);
    }
    .voteprogress .vote2, .pollprogress .poll2 { background-color: #ff453a; }
    .voteprogress .vote3, .pollprogress .poll3 { background-color: #32d74b; }
    .voteprogress .vote4, .pollprogress .poll4 { background-color: #5ab4ff; }
    .voteprogress .vote5, .pollprogress .poll5 { background-color: #ffa530; }

/* ── Star rating sprite ── */
.rating, .unit-rating { width: 115px; height: 23px; }
    .rating { font-size: 11px; }
    .unit-rating, .unit-rating li a:hover, .unit-rating li.current-rating {
        background-image: url(https://pack.victorpainer.com/templates/store/imgs/rating.webp);
        -webkit-background-size: 23px auto; background-size: 23px auto;
    }
    .unit-rating {
        list-style: none;
        margin: 0; padding: 0;
        position: relative;
        background-position: 0 -46px;
    }
    .unit-rating li { text-indent: -90000px; padding: 0; margin: 0; float: left; }
    .unit-rating li a {
        display: block;
        width: 23px; height: 23px;
        text-decoration: none;
        border: 0 none !important;
        text-indent: -9000px;
        z-index: 17;
        position: absolute;
        padding: 0;
    }
    .unit-rating li a:hover { background-position: 0 -23px; z-index: 2; left: 0; }
    .unit-rating a.r1-unit { left: 0; }
    .unit-rating a.r1-unit:hover { width: 23px; }
    .unit-rating a.r2-unit { left: 23px; }
    .unit-rating a.r2-unit:hover { width: 46px; }
    .unit-rating a.r3-unit { left: 46px; }
    .unit-rating a.r3-unit:hover { width: 69px; }
    .unit-rating a.r4-unit { left: 69px; }
    .unit-rating a.r4-unit:hover { width: 92px; }
    .unit-rating a.r5-unit { left: 92px; }
    .unit-rating a.r5-unit:hover { width: 115px; }
    .unit-rating li.current-rating {
        background-position: 0 0;
        position: absolute;
        height: 23px;
        display: block;
        text-indent: -9000px;
        z-index: 1;
        padding: 0;
    }

    .ratingplus  { color: var(--c-accent, #0080FF); }
    .ratingminus { color: #ff453a; }
    .ratingzero  { color: #505050; }

/* ── PM / Users table ── */
.userstop td, .pm td.pm_list, .pm th.pm_head { border-bottom: 1px solid #1e1e1e; padding: .833em .555em; color: #ccc; }
    table.pm, table.userstop { width: 100%; margin-bottom: 0; }
    table.pm select { width: 13.194em; }
    .userstop thead td, .pm td.pm_head { border-bottom: 1px solid #2a2a2a; font-weight: bold; }
    table.pm .navigation { border-top-width: 0; margin: 0; }

.pm th {
    text-align: left;
    font-weight: 500;
    white-space: nowrap;
    color: #8a8a8a;
}
.pm th.pm_checkbox { text-align: center; }
.pm_list.pm_subj, .pm_list.pm_icon, .pm_list.pm_last_user { cursor: pointer; }
.pm_list.pm_icon svg { width: 1.555em; height: 1.555em; vertical-align: middle; }

.pm_list.pm_icon.pm-unread-image  { color: var(--c-accent, #0080FF); }
.pm td.pm_list.pm_icon, .userstop td, th.pm_head.pm_icon { border-bottom: none; }
.pm_list.pm_icon.pm-reply-image   { color: rgba(0,128,255,.5); }
.pm_list.pm_icon.pm-read-image    { color: #505050; }

.pm_list .pm_last_message, .pm_list .pm_last_date, .pm_list .pm_with_user {
    color: #505050;
    font-size: calc(var(--font-size-lg) * .8);
}
.pm tbody > tr:hover { background-color: #1a1a1a; }

.pm_navigation { margin-top: .9em; }
.pm_navigation .navigation {
    display: inline-block;
    color: #8a8a8a;
    background-color: #131313;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    padding: .444em;
}
.pm_navigation .navigation a, .pm_navigation .navigation span {
    padding: 0.555em;
    min-width: 2.25rem;
    border-radius: 6px;
}
.pm_navigation .navigation span {
    background-color: var(--c-accent, #0080FF);
    color: #000;
    font-weight: 600;
}
.pm_navigation .navigation a { text-decoration: none; color: #8a8a8a; }
.pm_navigation .navigation a:hover { background-color: #1a1a1a; color: #ededed; }

/* ── Dropdown menu ── */
#dropmenudiv {
    padding: .73em 0; min-width: 10.18em; width: auto !important;
    font-size: var(--font-size-sm);
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    background-clip: padding-box;
    background-color: #131313;
}
    #dropmenudiv a {
        text-decoration: none !important;
        color: #ededed;
        display: block;
        padding: 3px 20px;
        border: 0 none;
        white-space: nowrap;
    }
    #dropmenudiv a:hover { background-color: #1a1a1a; }

/* ── Search suggestions ── */
#searchsuggestions {
    z-index: 2200;
    width: 23.15em;
    border-radius: 12px;
    background: #131313;
    box-shadow: 0 8px 40px rgba(0,0,0,0.7);
    border: 1px solid #2a2a2a;
    background-clip: padding-box;
    font-size: .9em;
    box-sizing: border-box;
}
    #searchsuggestions a, #searchsuggestions span.notfound { padding: 15px 25px; display: block; text-decoration: none; border-bottom: 1px solid #1e1e1e; }
    #searchsuggestions a { color: #ededed; }
    #searchsuggestions a:hover { background-color: #1a1a1a; }
    #searchsuggestions a span { display: block; cursor: pointer; }
    #searchsuggestions span.searchheading { display: block; font-weight: bold; margin-bottom: .2em; color: #ededed; }
    #searchsuggestions span.seperator { display: block; }
    #searchsuggestions span.seperator a { padding: 10px 0; text-align: center; border: 0 none; background-color: transparent; color: #505050; }
    #searchsuggestions span.notfound { padding: 15px 25px; display: block; color: #505050; }
    #searchsuggestions .break { display: none; }

/* ── UI overlay + dialog ── */
.ui-front { z-index: 1000; }
.ui-widget-overlay {
    background: #000;
    opacity: 0.65;
    left: 0; top: 0; right: 0; bottom: 0;
    position: fixed;
}
    .ui-helper-clearfix:after { clear: both; content: "."; display: block; height: 0; visibility: hidden }
    .ui-helper-clearfix { display: inline-block }
    * html .ui-helper-clearfix { height: 1% }
    .ui-helper-clearfix { display: block }

    .ui-dialog {
        text-align: left;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 370px;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.8);
        background-color: #131313;
        border: 1px solid #2a2a2a;
        background-clip: padding-box;
        outline: none;
    }
    .ui-dialog-titlebar {
        padding: .694em 1.04em;
        position: relative;
        background-color: #1a1a1a;
        border-bottom: 1px solid #2a2a2a;
        color: #ededed;
    }
    .ui-dialog-title { float: left; font-weight: 600; text-shadow: none; color: #ededed; }
    .ui-dialog-titlebar-close {
        position: absolute;
        right: .694em; top: 50%;
        margin-top: -1.11em !important;
        height: 1.597em !important;
        width: 2.22em;
        border: 0 none !important;
        background-color: inherit !important;
        box-shadow: none !important;
        padding: 0 !important;
    }
    .ui-dialog-titlebar-close .ui-icon {
        display: block;
        margin: 0.56em auto 0 auto;
        width: 0.75em;
        height: 0.75em;
        opacity: .5;
        font-weight: 600;
        font-size: var(--font-size-lg);
        background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
    }
    .ui-dialog-titlebar-close span.ui-button-text {
        display: block;
        margin: 0.56em auto 0 auto;
        width: 0.75em;
        height: 0.75em;
        background-size: .694em auto;
        background: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
        text-indent: -9999px;
        opacity: .5;
    }
    .ui-dialog-titlebar-close span.ui-button-text:hover { opacity: 1; }

    .ui-button {
        font-size: var(--font-size-sm);
        border: 0 none;
        vertical-align: middle;
        cursor: pointer;
        border-radius: 8px;
        outline: none;
        background-color: #2a2a2a;
        color: #ededed;
        padding: .58em 1.38em;
        text-decoration: none !important;
        box-shadow: none;
        box-sizing: border-box;
        transition: background .15s;
        text-shadow: none;
    }
    .ui-dialog-titlebar-close:hover .ui-icon { opacity: 1; }
    .ui-icon, .ui-button-icon-only { overflow: hidden; text-indent: -9999px; }
    .ui-dialog label { color: #8a8a8a; }
    .ui-dialog-content {
        padding: 1em;
        border: 1px solid #1e1e1e;
        overflow: auto;
        position: relative;
        zoom: 1;
        background: #131313;
        color: #ededed;
    }
    .loginbox.ui-dialog, .loginbox .ui-dialog-content { overflow: visible !important; }
    .ui-dialog-content h2 { display: inline; font-size: 1em; font-weight: bold; color: #ededed; }
    .ui-dialog .ui-dialog-buttonpane {
        padding: .694em 1em;
        text-align: right;
        background: #1a1a1a;
        border-top: 1px solid #2a2a2a;
    }
    .ui-draggable .ui-dialog-titlebar { cursor: move; }
    .ui-state-error { background: rgba(255,69,58,.1) !important; border: 1px solid rgba(255,69,58,.35); color: #ff453a; }
    .ui-button { margin: 0 3px; }
    .ui-helper-hidden-accessible { display: none; }

    .ui-button:hover { background-color: #333; }

    .ui-dialog-buttonset button:last-child {
        background-color: var(--c-accent, #0080FF);
        color: #000;
        font-weight: 600;
    }
    .ui-dialog-buttonset button:last-child:hover { background-color: #00f080; }
    .ui-dialog-buttonset button:first-child {
        background-color: #242424;
        color: #8a8a8a;
    }
    .ui-dialog-buttonset button:first-child:hover { background-color: #2e2e2e; color: #ededed; }
    .ui-dialog-buttonset button.ui-button-delete {
        background-color: rgba(255,69,58,.12);
        border: 1px solid rgba(255,69,58,.25);
        color: #ff453a;
        text-shadow: none;
    }
    .ui-dialog-buttonset button.ui-button-delete:hover {
        background-color: rgba(255,69,58,.22);
        color: #ff453a;
    }

/* ── TinyMCE dialogs ── */
.tox .tox-dialog__footer .tox-button--secondary {
    background-color: #2a2a2a !important;
    border-color: #2a2a2a !important;
    color: #ededed !important;
}
.tox .tox-button {
    background-color: var(--c-accent, #0080FF) !important;
    border-color: var(--c-accent, #0080FF) !important;
    color: #000 !important;
    font-weight: 600 !important;
}
.tox .tox-dialog__header {
    color: #ededed !important;
    background-color: #1a1a1a !important;
    border-bottom: 1px solid #2a2a2a !important;
}

/* ── TinyMCE oxide-dark: убираем синеву, подгоняем под тёмную гамму сайта ── */

/* Обёртка редактора */
.tox.tox-tinymce,
.tox .tox-tinymce {
    border-color: #2a2a2a !important;
    border-radius: 10px !important;
}

/* Шапка (тулбар + menubar) */
.tox .tox-editor-header {
    background-color: #1a1a1a !important;
    border-bottom: 1px solid #2a2a2a !important;
    box-shadow: none !important;
}
.tox .tox-toolbar,
.tox .tox-toolbar__overflow,
.tox .tox-toolbar__primary {
    background: #1a1a1a !important;
    border-bottom: none !important;
    box-shadow: none !important;
}
.tox .tox-toolbar__group {
    border-right-color: #2a2a2a !important;
}
.tox .tox-menubar {
    background: #1a1a1a !important;
    border-bottom: 1px solid #2a2a2a !important;
}

/* Кнопки тулбара — нейтральный цвет */
.tox .tox-tbtn {
    color: #505050 !important;
    border-radius: 6px !important;
}
.tox .tox-tbtn svg,
.tox .tox-tbtn__select-chevron svg { fill: #c6c6c6 !important; }

.dle-theme-dark{
  background-color:#0a0a0a!important;
}

/* Hover */
.tox .tox-tbtn:hover,
.tox .tox-tbtn__select-label:hover,
.tox .tox-split-button:hover { background: #252525 !important; color: #ededed !important; }
.tox .tox-tbtn:hover svg { fill: #ededed !important; }

/* Активная / нажатая кнопка → зелёный акцент вместо синего */
.tox .tox-tbtn--active,
.tox .tox-tbtn--enabled,
.tox .tox-tbtn--enabled:hover,
.tox .tox-tbtn--active:hover {
    background: rgba(0,128,255,.1) !important;
    color: #0080FF !important;
}
.tox .tox-tbtn--active svg,
.tox .tox-tbtn--enabled svg { fill: #0080FF !important; }

/* Split button */
.tox .tox-split-button__chevron svg { fill: #505050 !important; }
.tox .tox-split-button.tox-tbtn--enabled svg,
.tox .tox-split-button.tox-tbtn--active svg { fill: #0080FF !important; }

/* Строка состояния (statusbar) */
.tox .tox-statusbar {
    background: #1a1a1a !important;
    border-top: 1px solid #2a2a2a !important;
    color: #505050 !important;
}
.tox .tox-statusbar a,
.tox .tox-statusbar__path-item,
.tox .tox-statusbar__wordcount { color: #505050 !important; }
.tox .tox-statusbar a:hover { color: #8a8a8a !important; }

/* Выпадающие меню */
.tox .tox-menu,
.tox .tox-collection__group {
    background: #131313 !important;
    border: 1px solid #2a2a2a !important;
    border-radius: 10px !important;
    box-shadow: 0 8px 24px rgba(0,0,0,.6) !important;
}
.tox .tox-collection--list .tox-collection__item {
    color: #ccc !important;
    border-radius: 6px !important;
}
.tox .tox-collection--list .tox-collection__item:hover,
.tox .tox-collection--list .tox-collection__item--active {
    background: #1a1a1a !important;
    color: #ededed !important;
}
.tox .tox-collection--list .tox-collection__item--enabled {
    background: rgba(0,128,255,.08) !important;
    color: #0080FF !important;
}
.tox .tox-collection__item-checkmark svg,
.tox .tox-collection__item-icon svg { fill: #505050 !important; }
.tox .tox-collection--list .tox-collection__item--enabled .tox-collection__item-checkmark svg { fill: #0080FF !important; }

/* Контент-область (фон вокруг iframe) */
.tox .tox-edit-area {
    border-color: #2a2a2a !important;
}
.tox .tox-edit-area__iframe { background: #0a0a0a !important; }

/* Focused border — зелёный вместо синего */
.tox .tox-tinymce--toolbar-bottom .tox-editor-header { border-top: 1px solid #2a2a2a !important; }
.tox-tinymce:focus-within { border-color: #3a3a3a !important; }

/* Notifications */
.tox .tox-notification--info {
    background: rgba(0,128,255,.06) !important;
    border-color: rgba(0,128,255,.2) !important;
    color: #0080FF !important;
}
.tox .tox-notification--warning {
    background: rgba(255,165,48,.06) !important;
    border-color: rgba(255,165,48,.2) !important;
}
.tox .tox-notification--error {
    background: rgba(255,69,58,.06) !important;
    border-color: rgba(255,69,58,.2) !important;
}

/* Quickbar selection toolbar */
.tox .tox-pop__dialog {
    background: #131313 !important;
    border: 1px solid #2a2a2a !important;
    box-shadow: 0 4px 16px rgba(0,0,0,.6) !important;
}
.tox .tox-pop.tox-pop--bottom::before,
.tox .tox-pop.tox-pop--bottom::after { border-top-color: #2a2a2a !important; }
.tox .tox-pop.tox-pop--top::before,
.tox .tox-pop.tox-pop--top::after { border-bottom-color: #2a2a2a !important; }

.dle-popup-userprofileadmin .ui-button-delete { float: left; }
.dle-popup-userprofileadmin .ui-dialog-buttonset button:nth-child(2) { background-color: #2a2a2a; }

/* ── Autocomplete menu ── */
.ui-autocomplete { position: absolute; cursor: default; }
.ui-menu {
    list-style: none;
    padding: 4px; margin: 0;
    float: left;
    background: #131313;
    border: 1px solid #2a2a2a;
    color: #ededed;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}
.ui-menu .ui-menu { margin-top: -3px; }
.ui-menu .ui-menu-item { margin: 0; padding: .2em .4em; cursor: pointer; width: 100%; border-radius: 6px; }
.ui-menu .ui-menu-item:hover { background: #1a1a1a; }

/* ── BB editor textarea ── */
.bb-editor textarea {
    box-sizing: border-box;
    padding: 7px;
    border: 1px solid #2a2a2a;
    background: #0a0a0a;
    color: #ededed;
    width: 100%;
    box-shadow: none;
    transition: border-color .15s;
    margin-top: -1px;
    outline: none;
}
.bb-editor textarea:focus { border-color: var(--c-accent, #0080FF) !important; }

.emoji_box { width: 100%; max-width: 390px; }
.emoji_category { padding: 7px; clear: both; }
.emoji_list {
    margin-top: 5px; margin-bottom: 5px; width: 100%;
    font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'NotoColorEmoji', 'Segoe UI Symbol', 'Android Emoji', 'EmojiSymbols';
    font-size: 2em;
}
.emoji_symbol { float: left; margin-bottom: 10px; width: 12.5%; text-align: center; }
.emoji_symbol a, .emoji_symbol a:hover { cursor: pointer; text-decoration: none; }

/* ── Quick edit ── */
.quick-edit-text { padding: .4em; width: 350px; }
    .quick-edit-textarea {
        height: 250px; padding: 2px;
        border: 1px solid #2a2a2a;
        background: #0a0a0a;
        color: #ededed;
        width: 100%;
        box-shadow: none;
        transition: border-color .15s;
    }

#dlefastreplycomments { padding: 0 4% 10px 4%; }
#dle-comments-list > .comments-tree-list > li .comments-tree-list > li #dlefastreplycomments { padding: 0 0 10px 0; }

/* ── Text marker / selection ── */
#marker-bar, #txtselect_marker {
    display: block;
    visibility: hidden;
    position: absolute;
    z-index: 1200;
    opacity: 0;
    -webkit-transition: opacity .4s, visibility .1s linear .4s;
    transition: opacity .4s, visibility .1s linear .4s;
}
#txtselect_marker { cursor: pointer; background: url(../dleimages/marker.png) no-repeat 0 0; }
#txtselect_marker:hover { background-position: 0 -32px; }
#marker-bar {
    border: 1px solid #2a2a2a;
    border-radius: 15px;
    background: #131313;
    padding: 5px 10px;
    cursor: default;
    box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}
#marker-bar.show {
    -webkit-transition: opacity .4s, visibility 0s;
    transition: opacity .4s, visibility 0s;
    opacity: 1; visibility: visible;
}
#txtselect_marker.show {
    visibility: visible;
    width: 32px; height: 32px;
    -webkit-transition: opacity .4s, visibility 0s;
    transition: opacity .4s, visibility 0s;
    opacity: 1;
}
#marker-bar .masha-social, #marker-bar .masha-marker { cursor: pointer; display: block; margin: 0 5px; float: left; }
#marker-bar .masha-marker { line-height: 1em; color: #505050; border-bottom: 1px dotted #505050; margin-right: 10px; }
#marker-bar .masha-marker:hover { color: #ff453a; border-color: #ff453a; }

.user_selection, .user_selection_true { background: rgba(245,197,24,.08); padding: 2px 0; }
.user_selection a.txtsel_close, .user_selection_true a.txtsel_close { display: none; }
.user_selection .closewrap, .user_selection_true .closewrap { position: relative; }
.user_selection.hover a.txtsel_close, .user_selection_true.hover a.txtsel_close {
    display: inline-block;
    position: absolute;
    top: -7px; left: -5px;
    width: 33px; height: 33px;
    background: url(../dleimages/closemarker.png) 0 0 no-repeat;
}
.user_selection.hover a.txtsel_close:hover, .user_selection_true.hover a.txtsel_close:hover { background-position: 0 -33px; }

/* ── Share popup ── */
#share-popup {
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    background: #131313;
    position: absolute; z-index: 100;
    width: 414px;
    display: none;
    padding: 20px 0;
    opacity: 0;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    background-clip: padding-box;
    -webkit-transition: opacity .4s, visibility .1s linear .4s;
    transition: opacity .4s, visibility .1s linear .4s;
}
#share-popup.show { display: block; opacity: 1; -webkit-transition: opacity .4s, visibility 0s; transition: opacity .4s, visibility 0s; }
#share-popup .social { padding: 0 0 10px 17px; }
#share-popup .social p { padding-bottom: 10px; margin: 0; font-weight: bold; color: #ededed; }
#share-popup .social ul { list-style: none; margin: 0; padding: 0; }
#share-popup .social ul li { display: inline; margin-right: 20px; padding-top: 2px; }
#share-popup .social ul a { text-decoration: none; font-size: 12px; display: inline-block; color: #505050; }
#share-popup .social ul a:hover { text-decoration: underline; color: #8a8a8a; }
#share-popup .social a span {
    cursor: pointer;
    width: 20px; height: 20px;
    background: url(../dleimages/social-icons.png) 20px 20px no-repeat;
    display: inline-block;
    vertical-align: middle;
    margin: -3px 5px 0 0;
}
#share-popup .social .tw span { background-position: 0 -20px; }
#share-popup .social .tw:hover span { background-position: 0 0; }
#share-popup .social .fb span { background-position: -20px -20px; }
#share-popup .social .fb:hover span { background-position: -20px 0; }
#share-popup .social .vk span { background-position: -40px -20px; }
#share-popup .social .vk:hover span { background-position: -40px 0; }
#share-popup .social .gp span { background-position: -60px -20px; }
#share-popup .social .gp:hover span { background-position: -60px 0; }
#share-popup .link {
    clear: both;
    border-top: 1px solid #1e1e1e;
    padding: 10px 5px 0 10px;
    line-height: 1.2;
    overflow: hidden;
    margin: 0 7px;
}
#share-popup .link p { font-weight: bold; padding: 0 0 3px 0; margin: 0; color: #ededed; }
#share-popup .link span { color: #505050; font-size: 10px; display: block; padding-top: 3px; }
#share-popup .link a { display: block; color: var(--c-accent, #0080FF); }

.dle-alert, .dle-confirm, .dle-promt { padding: 20px 1em !important; }

/* ── Form inputs ── */
select, textarea, input[type="text"], input[type="password"], input[type="file"],
input[type="datetime"], input[type="datetime-local"], input[type="date"],
input[type="month"], input[type="time"], input[type="week"], input[type="number"],
input[type="email"], input[type="url"], input[type="search"], input[type="tel"],
input[type="color"] {
    display: inline-block;
    width: 302px;
    padding: 6px;
    vertical-align: middle;
    border-radius: 8px;
    background: #0a0a0a;
    border: 1px solid #2a2a2a;
    color: #ededed;
    -webkit-transition: border-color .15s; transition: border-color .15s;
    -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;
}

select {
    width: auto;
    padding: .35rem 2.2rem .35rem .65rem;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238a8a8a' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right .75rem center;
    background-size: 16px 12px;
    appearance: none;
}

select[multiple] { padding-right: .75rem; background-image: none; }

    textarea { margin: 0; overflow: auto; vertical-align: top; resize: vertical; }
    textarea:focus, select:focus, input[type="text"]:focus, input[type="password"]:focus,
    input[type="file"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus,
    input[type="date"]:focus, input[type="month"]:focus, input[type="time"]:focus,
    input[type="week"]:focus, input[type="number"]:focus, input[type="email"]:focus,
    input[type="url"]:focus, input[type="search"]:focus, input[type="tel"]:focus,
    input[type="color"]:focus, .uneditable-input:focus {
        border-color: var(--c-accent, #0080FF);
        outline: none;
    }
    input[type="file"], input[type="image"],
    input[type="submit"], input[type="reset"],
    input[type="button"] { width: auto; }
    input[type="search"] { -webkit-box-sizing: content-box; -moz-box-sizing: content-box; box-sizing: content-box; }
    input[type="search"]::-webkit-search-cancel-button,
    input[type="search"]::-webkit-search-decoration { -webkit-appearance: none; }
    select[multiple], select[size], textarea { height: auto; }
    input::-moz-placeholder, textarea::-moz-placeholder, input::-webkit-input-placeholder, textarea::-webkit-input-placeholder { opacity: 0.4; color: #8a8a8a; }

    input:focus { outline: none; }
    input[type="file"], input[type="image"] { padding: 0; border-width: 0; background-color: transparent; color: #8a8a8a; }
    .wide, .bb-editor textarea, .ui-dialog textarea, select#category, .timezoneselect, .twofactorselect, .quick-edit-text { width: 100% !important; }
    select#category { max-width: 24.31em !important; height: 9.72em !important; }
    #searchuser, #searchinput { width: 100% !important; margin-bottom: 10px; }

    .form_submit .c-captcha { float: right; }
    .c-captcha { position: relative; }
    .c-captcha:after { clear: both; display: block; content: ""; }
    .c-captcha > a { float: left; margin-right: 5px; }
    .c-captcha img { position: relative; display: block; width: 9.03em; height: 3.194em; z-index: 1; -webkit-transition: all ease .2s; transition: all ease .2s; }
    .c-captcha > input { float: left; width: 9.03em; height: 3.194em; }

    .dle-captcha { position: relative; }
    .dle-captcha:after { clear: both; display: block; content: ""; }
    .dle-captcha > a { float: left; margin-right: 5px; }
    .dle-captcha img { position: relative; display: block; width: 9.03em; height: 3.194em; -webkit-transition: all ease .2s; transition: all ease .2s; }
    .dle-captcha > input { float: left; width: 9.03em; height: 3.194em; }

/* ── Buttons ── */
.btn, .bbcodes, .btn-border {
    border: 0 none;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
    border-radius: 8px;
    outline: none;
    background-color: #fff;
    color: #000;
    text-shadow: none;
    padding: .486em 1.528em;
    text-decoration: none !important;
    box-shadow: none;
    box-sizing: border-box;
    font-weight: 600;
    -webkit-transition: opacity ease .15s; transition: opacity ease .15s;
}
    .btn > .icon { fill: #000; }
    .btn-white > .icon { fill: #000; }
    .btn-white { background-color: #fff; color: #000; }
        .btn-white:hover { background-color: #e8e8e8; }
    .btn:hover, .bbcodes:hover { opacity: .88; }

.bbcodes.cancelchanges { background-color: #242424; color: #8a8a8a; font-weight: 500; }
.bbcodes.cancelchanges:hover { background-color: #2e2e2e; color: #ededed; opacity: 1; }

    .btn-big { padding: .833em 1.875em; border-radius: 10px; }

    .btn-border {
        color: #ededed;
        border: 1px solid #2a2a2a !important;
        line-height: 1.528em;
        padding: .555em 1.389em;
        background-color: transparent !important;
        overflow: hidden;
        box-shadow: none;
        text-shadow: none;
        font-weight: 500;
    }
    .btn-border:hover { background-color: #1a1a1a !important; border-color: #3a3a3a !important; opacity: 1; }
    .btn-border.btn-big { padding: .694em 1.389em; }

/* ── xFields ── */
table.xfields { width: 100%; }
.xfields textarea, .xprofile textarea { width: 100%; height: 12.92em; margin-top: .555em; }
.xfields input[type="text"] { width: 100%; }
.xfieldsdescr { width: 13.89em; color: #8a8a8a; }
.xfields .bb-pane + textarea { margin-top: 0; }
.xfieldsnote { color: #505050; font-size: .9em; }
.xfields_table td { vertical-align: top; }
.xfieldsrow { padding-top: 10px; clear: both; }
.xfieldscolleft { float: left; width: 30%; padding-top: 6px; color: #8a8a8a; }
.xfieldscolright { float: left; width: 70%; }
.file-box {
    width: 95%;
    max-width: 437px;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    background-color: #131313;
    padding: 10px;
    margin-top: 10px;
}

/* ── Image galleries ── */
.xfieldimagegallery, .comments-image-gallery {
    margin: 0;
    padding: 10px;
    list-style: none;
    clear: both;
    display: flex;
    gap: 10px;
}
.xfieldimagegallery li, .comments-image-gallery li { list-style: none; margin: 0; padding: 0; }
.xfieldimagegallery li img, .comments-image-gallery li img {
    float: left;
    margin-right: 5px;
    border: 1px solid #2a2a2a;
    transition: box-shadow .3s;
    border-radius: 8px;
}
.xfieldimagegallery li img:hover, .comments-image-gallery li img:hover { box-shadow: 0 0 12px rgba(0,0,0,0.6); }

/* ── File uploader ── */
.qq-uploader { position: relative; width: 100%; }
.qq-upload-button { display: inline-block; margin-top: 5px; margin-bottom: 5px; cursor: pointer; }
.qq-upload-drop-area {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 2;
    max-width: 437px;
    background: rgba(0,128,255,.07);
    border: 1px solid rgba(0,128,255,.2);
    text-align: center;
    color: var(--c-accent, #0080FF);
}
.qq-upload-drop-area span { display: block; position: absolute; top: 50%; width: 100%; margin-top: -8px; font-size: 16px; }
.qq-upload-drop-area-active { background: rgba(0,128,255,.15); }
.sortable-ghost { opacity: 0.4; }

/* ── Disabled ── */
.btn.disabled, .btn[disabled], fieldset[disabled] .btn {
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.4;
}

/* ── Upload progress bar ── */
.progress {
    overflow: hidden;
    margin-top: 10px;
    margin-bottom: 10px;
    background-color: #1e1e1e;
    height: 10px;
    border-radius: 8px;
}
.progress .progress-bar {
    float: left;
    width: 0%;
    font-size: 12px;
    line-height: 20px;
    color: #000;
    text-align: center;
    background-color: var(--c-accent, #0080FF);
    -webkit-transition: width 0.6s ease; transition: width 0.6s ease;
    border-radius: 8px;
    height: 8px;
}
.progress-bar span {
    position: absolute;
    width: 1px; height: 1px;
    margin: -1px; padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    border: 0;
}
.progress-blue { background-color: #5ab4ff; }

/* ── Emoji ── */
span.emoji { margin-left: 0.313rem; margin-right: 0.313rem; }
.emoji { border: none; vertical-align: bottom; }
.native-emoji { font-size: 1.3em; font-family: 'Apple Color Emoji', 'Segoe UI Emoji', 'NotoColorEmoji', 'Segoe UI Symbol', 'Android Emoji', 'EmojiSymbols'; }

/* ── WS Editor (TinyMCE wrapper) ── */
.wseditor {
    border-top: 3px solid var(--c-accent, #0080FF);
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
}
.wseditor .tox-tinymce { border-top: none; }
#dlefastreplycomments .wseditor { margin-bottom: 10px; }
.dlecomments-editor .tox .tox-toolbar__primary, .dlefastedit-editor .tox .tox-toolbar__primary {
    border-top: 0;
    box-shadow: none;
}

/* ── TOC ── */
.mce-toc { border: 1px solid #2a2a2a; margin: 0 0 .7rem 0; background: #131313; border-radius: 8px; }
.mce-toc h2 { margin: 4px; color: #8a8a8a; font-size: 13px; }
.mce-toc ul { padding-left: 20px; list-style: none; margin-top: 0; margin-bottom: 0; margin-block-start: 1em; margin-block-end: 1em; }
.mce-toc ul ul { padding-left: 20px; margin-block-start: 0; margin-block-end: 0; }
.mce-toc li { list-style-type: none; }

/* ── Image helpers ── */
.image-bordered { border: 1px solid #2a2a2a; }
.image-shadows { box-shadow: 0 4px 16px rgba(0,0,0,0.5); }
.image-padded { padding: 0.5rem; }

/* ── Comments profile link ── */
.comments-user-profile { font-weight: bold; cursor: pointer; color: var(--c-accent, #0080FF); }

/* ── Spoiler chevron ── */
.title_spoiler svg {
    vertical-align: middle;
    margin-top: -.28em;
    margin-right: .47em;
    height: 1.11em;
    width: 1.11em;
}

.mce-accordion summary { cursor: pointer; }
.mobilewseditor .tox:not(.tox-tinymce-inline) .tox-editor-header { border-bottom: none; }

/* ── Self-delete link ── */
.self_delete_link {
    border: 0 none;
    display: inline-block;
    vertical-align: middle;
    cursor: pointer;
    padding: .833em 1.875em;
    border-radius: 10px;
    margin-left: 1.04em;
    outline: none;
    background-color: rgba(255,69,58,.1);
    color: #ff453a;
    border: 1px solid rgba(255,69,58,.22) !important;
    text-shadow: none;
    text-decoration: none !important;
    box-sizing: border-box;
    transition: background .15s;
}
.self_delete_link:hover { background-color: rgba(255,69,58,.2); }

input[type="text"].comments_author_field { width: 100%; margin-bottom: .694em; }

.user_fields .xfieldscolright { float: none; width: auto; }
.user_fields .form-check-input { margin: 0.417em 0.694em 0 0; }

/* ── Push notifications ── */
.DLEPush {
    z-index: 2001;
    position: fixed;
    right: 1.389em;
    top: 1.389em;
}

@keyframes DLEPush-show {
    0%   { transform: translateY(100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.DLEPush-notification.wrapper {
    animation-name: DLEPush-show;
    animation-duration: 1s;
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    color: #ededed;
    margin-bottom: .694em;
    width: 100%;
    max-width: 27.78em;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    background-color: #1a1a1a;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
}

.DLEPush-notification .DLEPush-icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.125em;
    height: 100%;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    text-align: center;
}
.DLEPush-notification .DLEPush-icon svg { width: 1.78em; height: 1.78em; }

.DLEPush-notification .DLEPush-header {
    font-weight: 500;
    grid-column: 2;
    grid-row: 1;
    font-size: var(--font-size-lg);
    margin-left: 1em;
    margin-top: .5em;
    color: #ededed;
}
.DLEPush-notification .DLEPush-header:empty { margin-top: 0; }

.DLEPush-notification .DLEPush-message {
    grid-column: 2;
    grid-row: 2;
    font-size: var(--font-size-sm);
    margin: 1.163em;
    color: #8a8a8a;
}
.DLEPush-notification .DLEPush-message li, .DLEPush-notification .DLEPush-message ul {
    list-style-type: none;
    padding-left: 0;
}

.DLEPush-notification .DLEPush-close {
    position: absolute;
    top: 8px; right: 10px;
    font-weight: 300;
    background: none;
    border: 0;
    font-size: calc(var(--font-size-lg) * 1.15);
    cursor: pointer;
    line-height: 1;
    padding: 0;
    color: #505050;
    outline: 0;
    opacity: 0.75;
}
.DLEPush-notification .DLEPush-close:hover { opacity: 1; color: #ededed; }

@media only screen and (min-width: 601px) {
    .DLEPush-notification.wrapper { min-width: 27.78em; }
}
@media only screen and (max-width: 600px) {
    .xfieldscolleft { float: none; width: 100%; }
    .xfieldscolright { float: none; width: 100%; }
}

/* Notification variants */
.DLEPush-notification.wrapper.push-success {
    background-color: rgba(0,128,255,.05);
    border-color: rgba(0,128,255,.18);
}
.DLEPush-notification.wrapper.push-success .DLEPush-icon {
    background-color: rgba(0,128,255,.12);
    color: var(--c-accent, #0080FF);
}

.DLEPush-notification.wrapper.push-warning {
    background-color: rgba(255,165,48,.05);
    border-color: rgba(255,165,48,.18);
}
.DLEPush-notification.wrapper.push-warning .DLEPush-icon {
    background-color: rgba(255,165,48,.12);
    color: #ffa530;
}

.DLEPush-notification.wrapper.push-error {
    background-color: rgba(255,69,58,.05);
    border-color: rgba(255,69,58,.18);
}
.DLEPush-notification.wrapper.push-error .DLEPush-icon {
    background-color: rgba(255,69,58,.12);
    color: #ff453a;
}

/* ── Quote / clipboard icons ── */
.quote_link { float: right; }
.quote_link svg { color: #505050; vertical-align: middle; }
.clipboard-copy-link svg { color: #505050; vertical-align: middle; margin-top: -3px; }

/* ── Smart captcha ── */
.smart-captcha { display: inline-block; }

/* ── Math ── */
.mathml-container { font-family: math; }
div.mathml-block { font-size: 1.1em; display: flex; align-items: center; justify-content: center; padding: .139em .35em; }
div.mathml-block .katex { font-size: 1.1em; }
span.mathml-inline { display: inline-block; vertical-align: middle; margin: 0 .12em; }

/* ── Hidden content reveal ── */
.dleshowhidden {
    color: var(--c-accent, #0080FF);
    background-color: rgba(0,128,255,.05);
    border: 1px solid rgba(0,128,255,.15);
    box-shadow: none;
    padding: .83em;
    border-radius: 8px;
}
