/* =========================================
   1. ЗМІННІ ТА БАЗОВІ НАЛАШТУВАННЯ
   ========================================= */
:root {
    --primary-color: #21ba45;
    --primary-hover: #16ab39;
    --text-color: #2c3e50;
    --meta-color: #636e72;
    --bg-card: #ffffff;
    --border-color: #e0e0e0;
    --radius-lg: 8px;
    --radius-round: 50px;
}

body {
    background-color: #f9f9f9 !important;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Виправлення відступу для шапки (актуальне) */
.files-layout-fix {
    padding-top: 100px !important;
    margin-top: 0 !important;
    min-height: 85vh;
}

/* =========================================
   2. ГОЛОВНА СТОРІНКА (СПИСОК МОДІВ)
   ========================================= */

/* --- Верхня панель пошуку --- */
.files-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 20px;
    flex-wrap: wrap;
}

.files-search-wrapper {
    flex-grow: 1;
    min-width: 300px;
}

/* Заокруглений пошук */
.ui.input.rounded-search input {
    border-radius: var(--radius-round) !important;
    padding-left: 20px !important;
    border: 1px solid var(--border-color) !important;
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
    transition: all 0.2s;
}

.ui.input.rounded-search input:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 3px rgba(33, 186, 69, 0.1);
}

.files-controls-wrapper {
    display: flex;
    gap: 15px;
    align-items: center;
}

.ui.dropdown.rounded-dropdown {
    border-radius: var(--radius-round) !important;
    border: 1px solid var(--border-color);
}

/* --- Лейаут (Сайдбар + Контент) --- */
.files-layout-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    align-items: start;
}

/* --- Сайдбар фільтрів --- */
.files-sidebar {
    background: transparent;
}

.filter-block {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
    padding: 15px;
}

.filter-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #444;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-list.scrollable {
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
}

.filter-list.scrollable::-webkit-scrollbar { width: 6px; }
.filter-list.scrollable::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

.filter-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.95rem;
    color: #555;
    padding: 4px 0;
}

.filter-checkbox-item:hover { color: #000; }
.filter-checkbox-item input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* --- Картки модів (Grid/List System) --- */
.results-meta {
    margin-bottom: 15px;
    color: #888;
    font-size: 0.9rem;
    font-weight: 600;
}

.mods-display-container {
    display: grid;
    gap: 15px;
}

/* Стиль картки */
.mod-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    text-decoration: none !important;
    color: inherit !important;
}

.mod-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.08);
    border-color: var(--primary-color);
}

.mod-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: contain;
    background-color: #2b2b2b;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.mod-card-body {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.mod-card-titles {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.mod-card-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-color);
}

.mod-card-author {
    font-size: 0.85rem;
    color: #888;
}

.mod-card-desc {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.5;
    margin-bottom: 10px;
    flex-grow: 1;
}

.mod-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--meta-color);
    margin-top: auto;
}

.mod-stats {
    display: flex;
    gap: 15px;
    font-weight: 600;
}
.mod-stats i.icon { margin-right: 4px; }

.mod-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mod-badge {
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
}
.loader-badge { background: #e3f2fd; color: #1565c0; }
.cat-badge { background: #f1f8e9; color: #33691e; }

/* Режим списку (View List) */
.view-list { grid-template-columns: 1fr; }
.view-list .mod-card {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
}
.view-list .mod-card-icon-wrapper { flex-shrink: 0; }
.view-list .mod-card-footer {
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
    margin-top: 8px;
    width: 100%;
}

/* Режим сітки (View Grid) */
.view-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.view-grid .mod-card {
    flex-direction: column;
    height: 100%;
}
.view-grid .mod-card-icon-wrapper { margin-bottom: 15px; }
.view-grid .mod-card-icon {
    width: 56px; height: 56px;
}
.view-grid .mod-card-desc {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}
.view-grid .mod-card-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

/* Пагінація */
.centered-pagination {
    margin-top: 30px !important;
    justify-content: center !important;
    display: flex !important;
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
}
.centered-pagination .item {
    border-radius: 50% !important;
    margin: 0 4px;
    border: 1px solid #ddd !important;
    background: #fff !important;
    min-width: 36px;
    height: 36px;
    padding: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.centered-pagination .item.active {
    background-color: var(--primary-color) !important;
    color: #fff !important;
    border-color: var(--primary-color) !important;
}

/* =========================================
   3. СТОРІНКА ПЕРЕГЛЯДУ МОДУ (view.php)
   ========================================= */

.mod-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 50px;
    margin-top: 0 !important;
    padding-top: 20px;
}

/* Білі блоки контейнера */
.mod-card-block {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    padding: 24px;
    margin-bottom: 20px;
}

/* Шапка моду */
.mod-header-section {
    display: flex;
    gap: 24px;
}

.mod-icon-large {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    object-fit: contain;
    background-color: #2c2c2c;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.mod-header-info { flex-grow: 1; }

.mod-title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    color: #1a1a1a;
    line-height: 1.2;
}

.mod-summary {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.5;
}

.mod-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
    align-items: center;
}

/* Кнопка завантажити */
.btn-modrinth-download {
    background-color: #21ba45 !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    border-radius: 6px !important;
    padding: 12px 24px !important;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.1s, background-color 0.2s;
    box-shadow: 0 2px 0 #16ab39 !important;
    text-decoration: none !important;
}
.btn-modrinth-download:hover {
    background-color: #16ab39 !important;
    transform: translateY(-1px);
}
.btn-modrinth-download:active {
    transform: translateY(1px);
    box-shadow: none !important;
}

/* Сітка контенту (Single Page Grid) */
.mod-content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
    align-items: start;
}

/* Вкладки (Tabs) */
.mod-tabs-menu {
    margin-bottom: 0 !important;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    gap: 20px;
}
.mod-tab-btn {
    padding: 15px 5px;
    font-weight: 700;
    color: #666;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    font-size: 1.05em;
}
.mod-tab-btn:hover { color: #333; }
.mod-tab-btn.active {
    color: #21ba45;
    border-bottom-color: #21ba45;
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* Сайдбар (Single Page) */
.sidebar-header {
    font-weight: 800;
    font-size: 0.8rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    color: #888;
    letter-spacing: 0.5px;
}

/* --- Нові бейджі оточення (Environment Badges) --- */
.env-badges-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.env-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #f8f9fa; /* Світло-сірий фон як у Modrinth */
    border: 1px solid #dce0e5; /* Тонка рамка */
    color: #343a40;
    padding: 6px 12px;
    border-radius: 20px; /* Округлі кути */
    font-size: 0.9em;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: default;
}

.env-badge:hover {
    background-color: #e9ecef;
    border-color: #ced4da;
}

.env-badge i.icon {
    margin: 0;
    font-size: 1.1em;
    color: #495057;
}

/* Опціонально: іконка сервера трохи менша, якщо вони разом */
.env-badge .combined-icons i.server.icon {
    font-size: 0.85em;
    margin-left: -2px;
}

/* Посилання сайдбару */
.sidebar-link {
    display: flex;
    align-items: center;
    padding: 8px 0;
    color: #444;
    transition: color 0.2s;
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid #f9f9f9;
}
.sidebar-link:hover { color: #21ba45; }
.sidebar-link i { margin-right: 10px; opacity: 0.7; width: 16px; text-align: center;}

/* Теги */
.tag-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #f3f4f5;
    border: 1px solid #e0e0e0;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
    color: #555;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* Журнал змін */
.changelog-item {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.changelog-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.changelog-version { font-size: 1.2em; font-weight: 800; color: #333; }
.changelog-date { color: #888; font-size: 0.9em; }
.changelog-body { font-size: 0.95em; color: #444; line-height: 1.6; }
.changelog-body ul { padding-left: 20px; }
.changelog-body h1, .changelog-body h2 { font-size: 1.1em; font-weight: bold; margin-top: 10px;}

/* Таблиця версій */
.versions-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}
.versions-table th {
    text-align: left;
    color: #666;
    font-size: 0.9em;
    font-weight: 700;
    padding: 15px 20px !important;
    border-bottom: 2px solid #eee;
    background-color: #fcfcfc;
}
.versions-table td {
    padding: 16px 20px !important;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle !important;
}
.versions-table tr:last-child td { border-bottom: none; }
.versions-table tr:hover { background-color: #f9fbfd; }

.v-name {
    font-weight: 800;
    color: #2c3e50;
    display: block;
    font-size: 1.1em;
    margin-bottom: 4px;
}
.v-meta {
    font-size: 0.85em;
    color: #888;
    display: block;
}

/* =========================================
   4. АДАПТИВНІСТЬ (MOBILE)
   ========================================= */
@media (max-width: 900px) {
    /* Для Single Page */
    .mod-content-grid { grid-template-columns: 1fr; }
    .mod-header-section { flex-direction: column; align-items: center; text-align: center; }
    .mod-meta-row { justify-content: center; }
    .btn-modrinth-download { width: 100%; justify-content: center; }

    /* Для Home/List Page */
    .files-layout-grid {
        grid-template-columns: 1fr; /* Сайдбар ховається або переноситься */
    }
    .files-sidebar {
        display: none; /* Тимчасово ховаємо, потрібна кнопка для модалки */
    }
    .mobile-filters-btn { display: block !important; margin-bottom: 15px; }

    /* Адаптація карток */
    .view-list .mod-card {
        flex-direction: column;
    }
    .view-list .mod-card-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .mod-card-icon {
        width: 48px; height: 48px;
    }
}

@media (max-width: 767px) {
    /* Додатково для дуже малих екранів */
    .files-layout-fix {
        padding-top: 70px !important; /* Менший відступ шапки */
    }
}

.mobile-filters-btn { display: none; }

.loader-svg-icon { width: 18px; height: 18px; margin-right: 8px; vertical-align: text-bottom; fill: currentColor; }
    
    .loader-sidebar-item {
        display: flex; align-items: center; padding: 6px 0; color: #2c3e50; font-weight: 600; text-decoration: none; transition: color 0.2s;
    }
    .loader-sidebar-item:hover { color: #21ba45; }

    .version-tag-link {
        display: inline-block; padding: 5px 12px; margin: 3px; background-color: #e8f5e9; 
        color: #2e7d32; border-radius: 15px; font-weight: 600; font-size: 0.9em; 
        text-decoration: none; transition: all 0.2s ease; border: 1px solid #c8e6c9;
    }
    .version-tag-link:hover {
        background-color: #21ba45; color: #fff; border-color: #21ba45; transform: translateY(-1px);
    }

    .author-sidebar-row {
        display: flex; align-items: center; gap: 10px; margin-bottom: 5px;
    }
    .author-link-sidebar {
        font-weight: 800; color: #2c3e50; text-decoration: none; font-size: 1.1em;
    }
    .author-link-sidebar:hover { text-decoration: underline; color: #21ba45; }
	
/* --- ГАЛЕРЕЯ --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 колонки */
    gap: 15px;
}

.gallery-item {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #f9f9f9;
    aspect-ratio: 16 / 9; /* Співвідношення сторін */
    transition: transform 0.2s, box-shadow 0.2s;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Заповнення без спотворень */
    display: block;
}

/* Підпис поверх картинки при наведенні (опціонально) */
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 8px;
    font-size: 0.85em;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* Адаптивність галереї */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 колонки на планшетах */
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr; /* 1 колонка на мобільних */
    }
}
.sidebar-icon-svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex-shrink: 0;
}

/* --- СТИЛІ ДЛЯ СИСТЕМИ ФАЙЛІВ (ДОПОВНЕННЯ) --- */

/* SVG іконки в сайдбарі */
.sidebar-icon-svg-wrapper {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sidebar-icon-svg {
    width: 100%;
    height: 100%;
    fill: currentColor; /* Щоб успадковувати колір тексту */
}

/* Посилання на автора в картці */
.author-link-card {
    color: #666;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.author-link-card:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Іконки категорій */
.filter-checkbox-item i.icon {
    font-size: 1.1em;
    color: #777;
    transition: color 0.2s;
}
.filter-checkbox-item:hover i.icon {
    color: #333;
}
.filter-checkbox-item input:checked ~ span i.icon {
    color: var(--primary-color);
}
/* --- СТИЛІ ДЛЯ СТОРІНКИ ПЕРЕГЛЯДУ (view.php) --- */

/* Іконки лоадерів */
.loader-svg-icon {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    vertical-align: text-bottom;
    fill: currentColor;
}

/* Елемент списку лоадерів в сайдбарі */
.loader-sidebar-item {
    display: flex;
    align-items: center;
    padding: 6px 0;
    color: #2c3e50;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}
.loader-sidebar-item:hover {
    color: #21ba45;
}

/* Версії в сайдбарі */
.version-sidebar-item {
    display: block;
    padding: 4px 8px;
    margin: 2px 0;
    border-radius: 4px;
    background-color: #f8f9fa;
    color: #495057;
    font-weight: 500;
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.2s;
}
.version-sidebar-item:hover {
    background-color: #e9ecef;
    color: #21ba45;
}

.version-more-btn {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.85em;
    cursor: pointer;
    font-style: italic;
}

/* Категорії */
.category-sidebar-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    color: #555;
    margin: 0 6px 6px 0;
    text-decoration: none;
    transition: all 0.2s;
}
.category-sidebar-item:hover {
    border-color: #21ba45;
    color: #21ba45;
}

/* Автор */
.author-link {
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}
.author-link:hover {
    text-decoration: underline;
    color: #21ba45;
}

/* Галерея та Lightbox */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #eee;
    background: #f9f9f9;
    aspect-ratio: 16 / 9;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: zoom-in;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 2;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 8px;
    font-size: 0.85em;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* Пагінація галереї */
.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.pag-btn {
    background: #fff;
    border: 1px solid #ddd;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    color: #555;
    transition: all 0.2s;
}

.pag-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #ccc;
}

.pag-btn:disabled {
    opacity: 0.5;
    cursor: default;
}
/* --- ВИПРАВЛЕННЯ КОНТЕНТУ В ОПИСІ --- */

/* Автоматичне зменшення зображень, щоб не ламали сайт */
.markdown-body img {
    max-width: 100% !important; /* Не ширше батьківського блоку */
    height: auto !important;    /* Зберігати пропорції */
    display: block;
    margin: 10px auto;          /* Центрувати */
    border-radius: 6px;         /* Округлення */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Видалення зайвих відступів у заголовків в описі */
.markdown-body h1, 
.markdown-body h2, 
.markdown-body h3 {
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    border-bottom: none; /* Прибираємо лінії, якщо заважають */
}

/* Прибираємо маркери списків, якщо вони вилазять */
.markdown-body ul, .markdown-body ol {
    padding-left: 20px;
}
/* --- СТИЛІ ДЛЯ ТЕКСТУ В LIGHTBOX (Fancybox) --- */

/* Контейнер підпису */
.fancybox__caption {
    text-align: center;
    padding: 15px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.6) 100%);
    backdrop-filter: blur(4px);
    width: 100%;
}

/* Заголовок зображення */
.fb-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
    font-family: 'Inter', sans-serif;
}

/* Опис зображення */
.fb-desc {
    font-size: 0.95rem;
    color: #e0e0e0;
    line-height: 1.5;
    max-width: 800px;
    margin: 0 auto;
    font-weight: 400;
}
/* Приховати розбиті зображення в описі */
.markdown-body img {
    max-width: 100%;
    height: auto;
    display: block; 
    /* Якщо картинка все ж лишилась, робимо її акуратною, 
       але код PHP вище має їх видалити повністю */
}

/* Приховати іконки "розбитого зображення" */
.markdown-body img:not([src]), 
.markdown-body img[src=""], 
.markdown-body img[src="broken"] {
    display: none !important; 
}
/* --- Активні фільтри (Теги) --- */
.active-filters-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

/* Стиль самого тегу */
.filter-tag {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 20px; /* Округлі кути як на Modrinth */
    padding: 6px 12px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.filter-tag:hover {
    background-color: #fce8e6; /* Легкий червоний відтінок при наведенні */
    border-color: #e57373;
    color: #d32f2f;
}

.filter-tag i.icon {
    margin: 0 0 0 8px; /* Відступ хрестика */
    font-size: 0.8em;
    opacity: 0.6;
}

.filter-tag:hover i.icon {
    opacity: 1;
}

/* Кнопка "Очистити все" */
.clear-filters-btn {
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: 1px solid transparent;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-filters-btn:hover {
    background-color: #e0e0e0;
    color: #000;
}
.clear-filters-btn i.icon {
    margin-right: 5px;
}