/* ============================================================
   ТЁМНАЯ ТЕМА — ТОЛЬКО ДЛЯ МОБИЛЬНОЙ ВЕРСИИ
   ============================================================ */
@media only screen and (max-width: 960px) {

    /* === ОСНОВНОЙ ФОН И ТЕКСТ === */
    html.theme-dark body {
        background-color: #1e1e1e !important;
        color: #e0e0e0 !important;
    }
    html.theme-dark .all {
        color: #e0e0e0 !important;
        background-color: #1e1e1e !important;
    }
    html.theme-dark p,
    html.theme-dark div,
    html.theme-dark span,
    html.theme-dark h1,
    html.theme-dark h2,
    html.theme-dark h3,
    html.theme-dark h4,
    html.theme-dark h5,
    html.theme-dark h6,
    html.theme-dark b,
    html.theme-dark i {
        color: #e0e0e0 !important;
    }

    /* === ССЫЛКИ === */
    html.theme-dark a {
        color: #4caf7d !important;
    }

    /* === ШАПКА === */
    html.theme-dark .header,
    html.theme-dark .ahrefs {
        background-color: #1e1e1e !important;
    }
    html.theme-dark .header a {
        color: #e0e0e0 !important;
    }
    html.theme-dark .header a:hover {
        color: #4caf7d !important;
    }

    /* === ЛИНИИ === */
    html.theme-dark .line,
    html.theme-dark .content h1,
    html.theme-dark .content h2 {
        border-color: #3a3a3a !important;
    }

    /* === ДАТЫ === */
    html.theme-dark .date,
    html.theme-dark .abc a,
    html.theme-dark .bln {
        color: #7fb8dd !important;
    }

    /* === ЗАГОЛОВКИ МАТЕРИАЛОВ === */
    html.theme-dark .general-block h3 a,
    html.theme-dark .main-block h4 a,
    html.theme-dark .left-sidebar h3 a,
    html.theme-dark .right-block h3 a,
    html.theme-dark .station h3 a,
    html.theme-dark .books-list .minbook h3 a {
        color: #4caf7d !important;
    }
    html.theme-dark .general-block h3 a:hover,
    html.theme-dark .main-block h4 a:hover,
    html.theme-dark .right-block h3 a:hover,
    html.theme-dark .station h3 a:hover {
        color: #e0e0e0 !important;
    }

    /* === ПОЛЕ ПОИСКА === */
    html.theme-dark .search-input {
        background-color: #2a2a2a !important;
        border-color: #2a2a2a !important;
        color: #e0e0e0 !important;
    }
    html.theme-dark .search-input::placeholder {
        color: #808080 !important;
        font-weight: bold !important;
    }
    html.theme-dark .search-input:focus {
        border-color: #4caf7d !important;
    }

    /* === КНОПКА ПОИСКА === */
    html.theme-dark .search-submit {
        background-color: #2d7c3f !important;
    }
    html.theme-dark .search-submit:hover {
        background-color: #4caf7d !important;
    }

    /* === ФУТЕР — НЕ ТРОГАЕМ (по просьбе) === */

    /* === КНОПКА ПЕРЕКЛЮЧЕНИЯ ТЕМЫ === */
    .theme-toggle {
        display: inline-block;
        vertical-align: middle;
        margin-left: 8px;
        cursor: pointer;
        width: 20px;
        height: 20px;
        padding: 0;
        border: none;
        background: transparent;
        color: #292929;
        transition: color 0.3s ease;
    }
    .theme-toggle svg {
        display: block;
        width: 18px;
        height: 18px;
        fill: currentColor;
    }
    .theme-toggle:hover {
        color: #039240;
    }
    html.theme-dark .theme-toggle {
        color: #e0e0e0 !important;
    }
    html.theme-dark .theme-toggle:hover {
        color: #4caf7d !important;
    }

    /* Показываем луну в светлой теме, солнце — в тёмной */
    .theme-toggle .icon-sun { display: none; }
    .theme-toggle .icon-moon { display: block; }
    html.theme-dark .theme-toggle .icon-sun { display: block; }
    html.theme-dark .theme-toggle .icon-moon { display: none; }

    /* === ФОРМА ПОДПИСКИ === */
    html.theme-dark .subscribe-input,
    html.theme-dark input.search-input,
    html.theme-dark textarea.textarea {
        background-color: #2a2a2a !important;
        border-color: #4caf7d !important;
        color: #e0e0e0 !important;
    }
    html.theme-dark .subscribe-input::placeholder,
    html.theme-dark textarea.textarea::placeholder {
        color: #888 !important;
    }
    html.theme-dark .sub-submit {
        background-color: #2d7c3f !important;
        color: #fff !important;
    }
    html.theme-dark .sub-submit:hover {
        background-color: #4caf7d !important;
    }

    /* === БАННЕРЫ — приглушаем === */
    html.theme-dark .banner img,
    html.theme-dark .bookbanner img {
        filter: brightness(0.75) contrast(1.05) !important;
    }

    /* === МОДАЛЬНЫЕ ОКНА === */
    html.theme-dark .modal,
    html.theme-dark #subscribe-success > div,
    html.theme-dark #subscribe-error > div {
        background-color: #262626 !important;
        border-color: #4caf7d !important;
        color: #e0e0e0 !important;
    }
    html.theme-dark .modal p,
    html.theme-dark .modal h3,
    html.theme-dark #subscribe-success p,
    html.theme-dark #subscribe-error p {
        color: #e0e0e0 !important;
    }
    html.theme-dark .modal a {
        color: #4caf7d !important;
    }

    /* === АЛФАВИТ СЛОВАРЯ === */
    html.theme-dark .abc a {
        color: #7fb8dd !important;
    }
    html.theme-dark .abc a:hover {
        color: #4caf7d !important;
    }

    /* === КНОПКА «НАВЕРХ» === */
    html.theme-dark .scrollup {
        filter: invert(1) brightness(1.5) !important;
    }

    /* === COOKIE-БАННЕР === */
    html.theme-dark #cookie-box {
        background-color: #2d7c3f !important;
    }
}
/* ============================================================
   ТЁМНАЯ ТЕМА ДЛЯ STICKY-ПЛАШКИ (только мобилка)
   ============================================================ */
@media only screen and (max-width: 960px) {
    html.theme-dark #sticky-bar {
        background-color: #1e1e1e !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4) !important;
    }
    html.theme-dark #sticky-bar input {
        background-color: #2a2a2a !important;
        color: #e0e0e0 !important;
    }
    html.theme-dark #sticky-bar input::placeholder {
        color: #888 !important;
    }
    html.theme-dark #sticky-bar svg {
        stroke: #e0e0e0 !important;
    }
    html.theme-dark #sticky-bar a.mobile-menu {
        color: #e0e0e0 !important;
    }
}
/* ============================================================
   ТЁМНАЯ ТЕМА ДЛЯ БЛОКА «ОСТАЛИСЬ НЕЯСНОСТИ?»
   ============================================================ */
@media only screen and (max-width: 960px) {
    html.theme-dark .alim,
    html.theme-dark .alim p,
    html.theme-dark .ask-alim,
    html.theme-dark .ask-alim p {
        background-color: #2d3f2d !important;
        border-color: #4caf7d !important;
        color: #e0e0e0 !important;
    }
    html.theme-dark .alim a,
    html.theme-dark .ask-alim a {
        color: #7fb8dd !important;
        text-decoration: underline !important;
    }
    html.theme-dark .alim a:hover,
    html.theme-dark .ask-alim a:hover {
        color: #4caf7d !important;
    }
}