/* 1. ГЛОБАЛЬНЫЕ ТЕМНЫЕ ФОНЫ */
body, .body, .container, #content, .item-page, .blog, .category-list, .well, .navigation, aside, .sidebar-nav {
    background-color: #0f172a !important;
    color: #f1f5f9 !important;
}

/* 2. ОТСТУПЫ И ЧИТАЕМОСТЬ (Для компьютеров) */
.item-page, .category-desc, .content-category, .items-row, .blog-featured {
    padding: 25px !important;
    line-height: 1.6;
}

.well {
    padding: 15px !important;
    margin-bottom: 20px;
}

.body .container {
    background-color: #1e293b !important;
    border: 1px solid #334155;
    padding: 10px 20px !important;
    border-radius: 8px;
}

/* 3. ЯДЕРНАЯ ОЧИСТКА БЕЛЫХ ФОНОВ */
* { background-color: transparent !important; }

body, .body .container, .well, input, select, textarea, .nav-tabs > .active > a {
    background-color: #1e293b !important;
}
body { background-color: #0f172a !important; }

/* 4. ТВОИ РАБОЧИЕ ОБЛОЖКИ */
img.cover { width: 100px; height: 150px; margin: 10px; }
img.cover2 { width: 105px; height: 160px; }
img.cover3 { width: 100px; height: 150px; margin: 0px; }

/* 5. ЛОГОТИП (Светлый силуэт) */
.logo img, .brand img, img[src*="libsov.png"] {
    max-height: 90px !important;
    width: auto !important;
    filter: brightness(0) invert(1) drop-shadow(0 0 5px rgba(99, 102, 241, 0.4));
    mix-blend-mode: screen;
    padding: 10px 0;
}

/* 6. ПОИСК И ЗВЕЗДЫ */
#search-form, .search-query, .input-append input {
    max-width: 100% !important;
    box-sizing: border-box !important;
}
.search .input-append { display: flex !important; width: 100% !important; }

.star-rating, .rating-star, .extra_vote, .voting-symbol {
    font-size: 14px !important;
    line-height: 1 !important;
}

/* 7. ЦВЕТА ССЫЛОК И ТЕКСТА */
h1, h2, h3, .page-header h2, a { color: #818cf8 !important; text-shadow: none !important; }
a:hover { color: #93c5fd !important; text-decoration: none; }
.nav-list > li > a, .nav-list .nav-header { color: #94a3b8 !important; }

/* 8. АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ (Уменьшаем отступы) */
@media (max-width: 767px) {
    .item-page, .category-desc, .content-category, .items-row, .blog-featured {
        padding: 12px !important; /* Узкие отступы для телефонов */
    }
    .body .container {
        padding: 5px 10px !important;
    }
    h1, h2 {
        font-size: 20px !important;
    }
}

/* 9. УБИРАЕМ ЛИШНИЕ РАМКИ */
.thumbnail, img.img-polaroid {
    padding: 0 !important;
    border: 1px solid #334155 !important;
    background: none !important;
}

/* МАКСИМАЛЬНОЕ ИСПОЛЬЗОВАНИЕ ШИРИНЫ НА МОБИЛЬНЫХ */
@media (max-width: 767px) {
    /* Убираем внешние отступы у главного контейнера шаблона */
    .body .container {
        padding-left: 5px !important;
        padding-right: 5px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Убираем отступы у самого контента, оставляя минимум для читаемости */
    .item-page, .category-desc, .content-category {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* Растягиваем строки (rows), чтобы они не создавали лишних пустот */
    .row-fluid {
        width: 100% !important;
    }
}
