/* Подключение шрифтов */
@font-face {
    font-family: 'KOT';
    src: url('fonts/KOT.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Stengazeta';
    src: url('fonts/Stengazeta.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

/* ==========================================
   ОСНОВНЫЕ СТИЛИ
   ========================================== */
body {
    font-family: 'KOT', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #200E26;
    background-image: linear-gradient(rgba(32, 14, 38, 0.85), rgba(32, 14, 38, 0.85)), url('catalog/wallpaper.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #ffffff;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    overflow-x: hidden; 
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Шапка */
header {
    text-align: center;
    padding: 40px 20px 20px 20px;
    max-width: 800px;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

.logo { 
    width: 200px; 
    height: 200px;
    object-fit: cover;
    background-color: rgba(255, 255, 255, 0.05);
    margin-bottom: 20px; 
    border-radius: 38px; 
    box-shadow: 0 4px 12px rgba(0,0,0,0.5); 
}
.about { font-size: 1.1em; line-height: 1.6; margin-bottom: 20px; color: #dddddd; }

.links a {
    display: inline-block; margin: 5px 10px; padding: 10px 20px;
    background-color: #0088cc; color: white; text-decoration: none;
    border-radius: 5px; font-weight: bold; transition: 0.2s;
}

.links a:hover { 
    transform: scale(1.05); 
    box-shadow: 0 0 15px rgba(0, 136, 204, 0.6); 
}

.links a.boosty { background-color: #f15f2c; }
.links a.boosty:hover { box-shadow: 0 0 15px rgba(241, 95, 44, 0.6); }

.links a.discord { background-color: #5865F2; } 
.links a.discord:hover { box-shadow: 0 0 15px rgba(88, 101, 242, 0.6); }

main {
    width: 100%; max-width: 1200px; padding: 0 20px 40px 20px; box-sizing: border-box;
    flex: 1; 
    min-height: 60vh;
}

/* Сетка для карточек */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 30px;
}

/* Стили карточки */
.game-card { 
    position: relative; 
    background: rgba(255, 255, 255, 0.03);
    border-radius: 15px;
    text-align: center; 
    text-decoration: none; 
    color: inherit; 
    cursor: pointer;
    overflow: hidden; 
    aspect-ratio: 2 / 3;
}

.game-card h3 { display: none; }

.game-card img {
    width: 100%; 
    height: 100%;
    object-fit: cover;
    display: block; 
    transition: 0.3s;
}

.card-overlay {
    position: absolute;
    left: 0;
    width: 100%;
    background: rgba(32, 14, 38, 0.9); 
    font-family: 'Stengazeta', sans-serif;
    padding: 15px 10px;
    box-sizing: border-box;
    transition: 0.3s ease-in-out;
    opacity: 0;
    z-index: 2;
    text-transform: uppercase;
    text-shadow: 0 2px 5px rgba(0,0,0,0.9);
}

.hover-title {
    top: 0;
    transform: translateY(-100%);
    font-size: 1.9em;
    letter-spacing: 1px;
}

.hover-category {
    bottom: 0;
    transform: translateY(100%);
    font-size: 1.4em;
    color: #ffffff;
    letter-spacing: 1px;
    border-top: 2px solid #553b60;
}

.clickable-category { cursor: pointer; }
.clickable-category:hover {
    background: rgba(241, 95, 44, 0.95);
    color: #ffffff;
    box-shadow: 0 -2px 10px rgba(241, 95, 44, 0.5);
}

.game-card:hover .card-overlay {
    opacity: 1;
    transform: translateY(0);
}

.game-card:hover img:not(.plat-img) {
    filter: blur(3px) brightness(0.5); 
    transform: scale(1.05); 
}

/* ==========================================
   ИНФОРМАЦИЯ В ЦЕНТРЕ КАРТОЧКИ (ДАТА И ПЛАТФОРМЫ)
   ========================================== */
.card-center-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: 0.3s ease-in-out;
    z-index: 3;
    width: 90%;
    pointer-events: none; /* Чтобы не перекрывать клик по карточке */
}

.game-card:hover .card-center-info {
    opacity: 1;
}

.card-date {
    background: rgba(32, 14, 38, 0.95);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 1.1em;
    font-family: 'Stengazeta', sans-serif;
    color: #ffffff;
    border: 1px solid #553b60;
    box-shadow: 0 4px 10px rgba(0,0,0,0.7);
    letter-spacing: 1px;
}

.card-platforms {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    background: rgba(32, 14, 38, 0.95);
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid #553b60;
    box-shadow: 0 4px 10px rgba(0,0,0,0.7);
}

.card-platforms .plat-img {
    width: 22px;
    height: 22px;
    object-fit: contain; /* Чтобы иконки не сплющило, если они не квадратные */
    fill: #ffffff;
    filter: drop-shadow(0 0 2px rgba(255,255,255,0.3)); 
}
.plat-text {
    color: #fff;
    font-size: 0.8em;
    font-weight: bold;
    text-transform: uppercase;
}

#main-catalog-grid {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px); 
}

#main-catalog-grid.visible-grid {
    opacity: 1;
    transform: translateY(0);
}

/* Подвал */
footer {
    width: 100%; text-align: center; padding: 25px 20px;
    background-color: rgba(18, 8, 22, 0.85); color: #888888; font-size: 0.95em;
    border-top: 1px solid #553b60; margin-top: auto; 
    opacity: 0; animation: fadeInUp 0.8s ease-out 0.4s forwards; 
}

/* Кнопка наверх */
#scrollToTopBtn {
    position: fixed; bottom: 30px; right: 30px; z-index: 99;
    background-color: #f15f2c; color: white; border: none; outline: none;
    cursor: pointer; width: 50px; height: 50px; border-radius: 50%;
    font-size: 1.5em; font-weight: bold; box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    transition: 0.3s; opacity: 0; visibility: hidden; display: flex; align-items: center; justify-content: center;
}
#scrollToTopBtn:hover { background-color: #d1491e; transform: scale(1.1); }
#scrollToTopBtn.show { opacity: 1; visibility: visible; }

/* ==========================================
   МОДАЛЬНЫЕ ОКНА (АНИМАЦИЯ И ЛОГИКА)
   ========================================== */
.donate-btn {
    display: inline-block; margin: 5px 10px; padding: 10px 20px;
    background: linear-gradient(45deg, #e056fd, #be2edd); color: white;
    text-decoration: none; border-radius: 5px; font-weight: bold; border: none;
    cursor: pointer; font-size: 1em; transition: 0.2s; font-family: inherit;
}
.donate-btn:hover { transform: scale(1.05); box-shadow: 0 0 15px rgba(190, 46, 221, 0.6); }

.modal {
    display: flex; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(18, 8, 22, 0.85); backdrop-filter: blur(5px);
    align-items: center; justify-content: center; 
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal.show { opacity: 1; visibility: visible; }

.modal-content {
    background-color: #200E26; padding: 30px; border-radius: 12px;
    border: 2px solid #553b60; width: 90%; max-width: 350px;
    text-align: center; position: relative; 
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
    box-shadow: 0 10px 40px rgba(0,0,0,0.8);
}
.modal.show .modal-content { transform: scale(1) translateY(0); }
.close-btn { position: absolute; top: 10px; right: 15px; color: #888; font-size: 28px; font-weight: bold; cursor: pointer; transition: 0.2s; z-index: 10; }
.close-btn:hover { color: #f15f2c; }

/* Донаты */
.donate-options { display: flex; flex-direction: column; gap: 12px; }
.don-link {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 12px; border-radius: 8px; color: white; text-decoration: none;
    font-weight: bold; font-size: 1.05em; transition: 0.2s;
}
.don-link:hover { transform: translateX(5px); opacity: 0.9; }
.don-link img { width: 24px; height: 24px; border-radius: 4px; }
.yoomoney { background-color: #8A2BE2; } .boosty-don { background-color: #f15f2c; }
.da { background-color: #ff7f50; } 

/* Окно Игры */
.game-modal-content { max-width: 800px; width: 95%; text-align: left; max-height: 90vh; overflow-y: auto; }
.game-title { text-align: center; color: #f15f2c; padding-bottom: 15px; margin-top: 0; border-bottom: none; }

.game-modal-body { display: flex; flex-wrap: wrap; gap: 25px; margin-top: 20px; }
.game-cover-container { flex: 0 0 250px; }
#modalGameCover { width: 100%; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.5); object-fit: cover; transition: 0.2s; }
#modalGameCover:hover { filter: brightness(1.1); transform: scale(1.02); }
.game-info { flex: 1; min-width: 300px; }
.game-description { color: #ddd; line-height: 1.6; margin-bottom: 20px; font-size: 1.05em; }

/* Сворачиваемые блоки */
.game-meta-block {
    background: rgba(85, 59, 96, 0.3); border-radius: 6px;
    margin-bottom: 15px; font-size: 0.95em; color: #ddd; border-left: 3px solid #e056fd; display: none; overflow: hidden;
}
.game-meta-header {
    padding: 10px 15px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.2s;
}
.game-meta-header:hover { background: rgba(85, 59, 96, 0.5); }
.game-meta-header strong { color: #f15f2c; font-size: 1.05em; margin: 0; }
.toggle-icon { font-size: 0.8em; transition: transform 0.3s ease; color: #e056fd; }

.game-meta-content {
    padding: 0 15px 10px 15px; max-height: 1000px; transition: max-height 0.4s ease, padding 0.4s ease, opacity 0.4s ease; opacity: 1;
}
.game-meta-block.collapsed .game-meta-content {
    max-height: 0; padding-top: 0; padding-bottom: 0; opacity: 0; pointer-events: none;
}
.game-meta-block.collapsed .toggle-icon { transform: rotate(-90deg); }

.screens-title { font-size: 1.1em; color: #aaa; margin-bottom: 10px; }
.screenshots-wrapper { position: relative; display: flex; align-items: center; margin-bottom: 25px; }

.scroll-btn {
    position: absolute; top: 50%; transform: translateY(-50%); background: rgba(32, 14, 38, 0.9);
    color: #f15f2c; border: 2px solid #553b60; width: 40px; height: 40px; border-radius: 50%;
    font-size: 1.2em; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; transition: 0.2s; box-shadow: 0 0 10px rgba(0,0,0,0.5);
    display: none;
}
.scroll-btn:hover { background: #f15f2c; color: white; border-color: #f15f2c; }
#scrollLeftBtn { left: -15px; } 
#scrollRightBtn { right: -15px; }

.game-screenshots {
    display: flex; gap: 10px; overflow-x: auto; padding-bottom: 10px; scroll-behavior: smooth; width: 100%;
}
.game-screenshots::-webkit-scrollbar { height: 8px; }
.game-screenshots::-webkit-scrollbar-track { background: #1a0b1e; border-radius: 4px; }
.game-screenshots::-webkit-scrollbar-thumb { background: #553b60; border-radius: 4px; }
.game-screenshots img { height: 120px; border-radius: 6px; object-fit: cover; border: 1px solid #553b60; transition: 0.2s; }
.game-screenshots img:hover { filter: brightness(1.2); transform: scale(1.05); }

.game-links { display: flex; gap: 15px; flex-wrap: wrap; }
.game-link-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 12px 20px; background: linear-gradient(45deg, #f15f2c, #d1491e); color: white;
    text-decoration: none; border-radius: 6px; font-weight: bold; transition: 0.2s; flex-grow: 1; 
}
.game-link-btn:hover { transform: translateY(-2px); filter: brightness(1.1); box-shadow: 0 5px 15px rgba(0,0,0, 0.4); }
.game-link-btn img { width: 20px; height: 20px; object-fit: contain; }

/* ==========================================
   ГАЛЕРЕЯ (LIGHTBOX)
   ========================================== */
.lightbox-modal { z-index: 2000; flex-direction: column; cursor: pointer; } 

.lightbox-modal .modal-content {
    background: transparent; border: none; box-shadow: none; width: 100%; max-width: 1200px;
    height: 80vh; display: flex; align-items: center; justify-content: center; transform: scale(0.95);
    cursor: default; 
}

#lightboxImg {
    max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.8); transition: opacity 0.2s;
    cursor: default; 
}
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(32, 14, 38, 0.9); color: #f15f2c; border: 2px solid #553b60; 
    width: 50px; height: 50px; border-radius: 50%; font-size: 1.5em; cursor: pointer; 
    display: flex; align-items: center; justify-content: center; transition: 0.2s; z-index: 10;
}
.lightbox-nav:hover { background: #f15f2c; color: white; border-color: #f15f2c; transform: translateY(-50%) scale(1.1); }
.lightbox-nav.prev { left: 5%; }
.lightbox-nav.next { right: 5%; }
.lightbox-counter { position: absolute; bottom: -40px; color: #fff; font-size: 1.2em; letter-spacing: 2px; }

/* ==========================================
   ФИЛЬТРЫ КАТАЛОГА
   ========================================== */
.filters-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 20px 0 40px 0; width: 100%; }

.filter-btn {
    background-color: rgba(255, 255, 255, 0.05); 
    border: 1px solid #553b60; 
    color: #dddddd;
    padding: 10px 20px; 
    border-radius: 20px; 
    font-size: 1em; 
    cursor: pointer; 
    transition: 0.3s; 
    font-family: inherit;
    position: relative; /* <-- ДОБАВЛЕНО для позиционирования точки */
}

/* --- ДОБАВИТЬ НИЖЕ --- */

/* Индикатор новинок */
.filter-btn.has-new::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 12px;
    height: 12px;
    background-color: #f15f2c; /* Оранжевый цвет в стиле Boosty/Новинок */
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(241, 95, 44, 0.8);
    border: 2px solid #200E26; /* Обводка в цвет фона, чтобы точка выделялась */
    animation: pulseDot 2s infinite; /* Легкая пульсация */
}

@keyframes pulseDot {
    0% { transform: scale(1); box-shadow: 0 0 5px rgba(241, 95, 44, 0.5); }
    50% { transform: scale(1.1); box-shadow: 0 0 10px rgba(241, 95, 44, 1); }
    100% { transform: scale(1); box-shadow: 0 0 5px rgba(241, 95, 44, 0.5); }
}

.filter-btn:hover { 
    background-color: rgba(255, 255, 255, 0.1); 
    transform: scale(1.05); 
    box-shadow: 0 0 15px rgba(241, 95, 44, 0.4);
    border-color: rgba(241, 95, 44, 0.5); 
}

.filter-btn.active {
    background: linear-gradient(45deg, #f15f2c, #d1491e); color: white; border-color: transparent;
    box-shadow: 0 0 20px rgba(241, 95, 44, 0.7); 
    transform: scale(1.05);
    font-weight: bold;
}

/* ==========================================
   КАРТОЧКИ ПОДПИСОК
   ========================================== */
/* Сетка жестко на 5 колонок для десктопа */
.grid.sub-layout {
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.sub-card {
    aspect-ratio: auto !important; 
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px 20px 10px;
    cursor: default;
    background: rgba(32, 14, 38, 0.6);
    justify-content: flex-start;
}

.sub-card:hover {
    transform: translateY(-5px); 
}

/* Скрываем только стандартные оверлеи и заголовки, картинки оставляем */
.sub-card h3, .sub-card .card-overlay {
    display: none !important; 
}

/* Стили для картинок подписки */
.sub-card {
    aspect-ratio: auto !important; 
    min-height: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 10px 20px 10px;
    cursor: pointer; /* <--- ИЗМЕНИЛИ ЗДЕСЬ */
    background: rgba(32, 14, 38, 0.6);
    justify-content: flex-start;
}

.sub-card .sub-img {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 480 / 300 !important; /* Идеальные родные пропорции */
    object-fit: contain !important; /* Влезает целиком без обрезки */
    flex: 0 0 auto !important; /* Запрет на растягивание */
    border-radius: 8px;
    margin-bottom: 15px;
    background: transparent;
}

/* Отменяем эффект размытия (блюра) от обычных игровых карточек */
.sub-card:hover .sub-img {
    filter: brightness(1.1) !important;
    transform: scale(1.02) !important;
}

/* На мобильных и узких экранах отменяем 5 в ряд, чтобы текст можно было прочитать */
@media (max-width: 1000px) {
    .grid.sub-layout {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }
}

/* ==========================================
   ПОИСК И СОРТИРОВКА
   ========================================== */
.search-sort-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    width: 100%;
    transition: opacity 0.3s ease;
}

.search-input, .sort-select {
    background-color: rgba(32, 14, 38, 0.8);
    border: 2px solid #553b60;
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 90px;
    font-size: 1.1em;
    font-family: inherit;
    outline: none;
    transition: 0.3s;
}

.search-input {
    flex: 1;
    min-width: 250px;
    max-width: 500px;
}

.sort-select {
    cursor: pointer;
    min-width: 200px;
}

.search-input:focus, .sort-select:focus {
    border-color: #f15f2c;
    box-shadow: 0 0 10px rgba(241, 95, 44, 0.4);
}

/* Скрываем панель, если открыта вкладка "Подписка" */
.search-sort-container.hidden {
    display: none;
}

/* ==========================================
   АНИМАЦИЯ ЗАГРУЗКИ (СКЕЛЕТОНЫ) ДЛЯ КАРТИНОК
   ========================================== */
.img-loading {
    /* Темно-фиолетовый градиент в стиле сайта */
    background: linear-gradient(90deg, rgba(85, 59, 96, 0.3) 25%, rgba(85, 59, 96, 0.6) 50%, rgba(85, 59, 96, 0.3) 75%);
    background-size: 200% 100%;
    animation: loadingPulse 1.5s infinite linear;
    border-radius: 6px;
    color: transparent !important; /* Прячем текст alt пока грузится */
}

@keyframes loadingPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Фиксируем размеры заглушек, чтобы они не схлопывались */
#modalGameCover.img-loading {
    min-height: 350px;
    width: 100%;
}

.game-screenshots img.img-loading {
    min-width: 213px; /* Примерная ширина под высоту 120px (16:9) */
    height: 120px;
}

/* Чтобы пункты выпадающего списка сортировки хорошо читались */
.sort-select option {
    background-color: #200E26;
    color: #ffffff;
}

/* ==========================================
   ПЕРЕКЛЮЧАТЕЛЬ ВЕРСИЙ В МОДАЛКЕ
   ========================================== */
.game-versions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    display: none; /* Скрыт по умолчанию */
}

.version-btn {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid #553b60;
    color: #dddddd;
    padding: 8px 15px;
    border-radius: 6px;
    font-size: 0.9em;
    cursor: pointer;
    transition: 0.3s;
    font-family: inherit;
}

.version-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #f15f2c;
}

.version-btn.active {
    background: linear-gradient(45deg, #f15f2c, #d1491e);
    color: white;
    border-color: transparent;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(241, 95, 44, 0.5);
}

/* ==========================================
   ПЛАШКА "НОВИНКА" НА КАРТОЧКЕ (ОБНОВЛЕННОЕ ПОЛОЖЕНИЕ)
   ========================================== */
.new-badge {
    position: absolute;
    top: 290px; /* <--- Переместили вниз */
    right: -5px;  /* <--- Переместили вправо */
    
    /* Тот же яркий градиент */
    background: linear-gradient(45deg, #f15f2c, #ff3366);
    color: #ffffff;
    font-family: 'Stengazeta', sans-serif;
    font-size: 1.3em;
    
    /* Скорректировали отступы и закругление для правого угла */
    padding: 6px 20px 6px 15px;
    border-radius: 8px 0 0 8px; /* <--- Закругление теперь слева */
    
    z-index: 10; /* Поверх всего */
    box-shadow: -4px 4px 10px rgba(0,0,0,0.6); /* Тень в другую сторону */
    
    pointer-events: none; /* Не мешает клику */
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Обновленная анимация для нового положения */
.game-card:hover .new-badge {
    transform: scale(1.05) translateX(-3px) translateY(-3px); /* <--- Сдвиг влево и вверх */
    transition: 0.3s ease;
}

/* ==========================================
   ПАГИНАЦИЯ (КНОПКИ СТРАНИЦ)
   ========================================== */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 40px;
    width: 100%;
    display: none; /* Скрыт по умолчанию */
}

.page-btn {
    background-color: rgba(32, 14, 38, 0.8);
    border: 2px solid #553b60;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 1.1em;
    font-family: inherit;
    cursor: pointer;
    transition: 0.3s;
}

.page-btn:hover:not(:disabled) {
    border-color: #f15f2c;
    background-color: rgba(241, 95, 44, 0.2);
}

.page-btn.active {
    background: linear-gradient(45deg, #f15f2c, #d1491e);
    border-color: transparent;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(241, 95, 44, 0.5);
}

.page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ==========================================
   МОДАЛКА СПИСКА БУСТЕРОВ
   ========================================== */
.boosters-modal-content {
    max-width: 500px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.boosters-list {
    overflow-y: auto;
    text-align: left;
    padding-right: 10px;
    margin-top: 10px;
}

.boosters-list::-webkit-scrollbar { width: 6px; }
.boosters-list::-webkit-scrollbar-track { background: #1a0b1e; border-radius: 4px; }
.boosters-list::-webkit-scrollbar-thumb { background: #f15f2c; border-radius: 4px; }

.tier-section {
    margin-bottom: 25px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #553b60;
}

.tier-title {
    font-size: 1.2em;
    font-family: 'Stengazeta', sans-serif;
    margin-bottom: 15px;
    color: #ffcc00;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
    letter-spacing: 1px;
}

.booster-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 6px 0;
    border-radius: 6px;
    font-size: 1.05em;
    font-weight: bold;
}

.booster-safe {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.15), transparent);
    color: #e0e0e0;
    border-left: 3px solid #4ade80;
}

.booster-nsfw {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.15), transparent);
    color: #ffcccc;
    border-left: 3px solid #ff43f2;
}

.nsfw-tag, .safe-tag {
    font-size: 0.75em;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.nsfw-tag { background: rgba(239, 68, 68, 0.2); color: #ff43f2; border: 1px solid #ff43f2; }
.safe-tag { background: rgba(74, 222, 128, 0.2); color: #4ade80; border: 1px solid #4ade80; }

.boosters-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 0.9em;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
}

.legend-safe { border-left: 3px solid #4ade80; padding-left: 8px; }
.legend-nsfw { border-left: 3px solid #ff43f2; padding-left: 8px; color: #ffcccc; }

/* ==========================================
   📱 АДАПТАЦИЯ ДЛЯ СМАРТФОНОВ (MOBILE)
   ========================================== */
@media (max-width: 768px) {
    /* Уменьшаем шапку и логотип */
    header { padding: 20px 10px 10px 10px; }
    .logo { width: 140px; height: 140px; border-radius: 25px; }
    .about { font-size: 0.95em; }

    /* Кнопки ссылок и доната делаем покомпактнее */
    .links a, .donate-btn {
        margin: 5px;
        padding: 8px 12px;
        font-size: 0.85em;
    }

    /* Фильтры: делаем горизонтальный скролл (свайп), чтобы они не занимали пол экрана в высоту */
    .filters-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
    }
    /* Прячем визуальный скроллбар, но оставляем возможность свайпать */
    .filters-container::-webkit-scrollbar { display: none; }
    .filter-btn { white-space: nowrap; font-size: 0.9em; padding: 8px 15px; }

    /* Поиск и сортировка: выстраиваем друг под другом на всю ширину */
    /* 1. ЖЕСТКО УБИВАЕМ ГОРИЗОНТАЛЬНЫЙ СКРОЛЛ */
    .search-sort-container { 
        flex-direction: column; 
        gap: 10px; 
        width: 100%;
        box-sizing: border-box; 
    }
    .search-input, .sort-select { 
        min-width: 0 !important; 
        width: 100%; 
        font-size: 1em; 
        box-sizing: border-box; /* Это главное: теперь padding не будет раздувать элементы за пределы экрана */
    }
    body, html {
        overflow-x: hidden; /* Запасной предохранитель от случайных свайпов вбок */
    }

    /* 2. ЧИНИМ МЕСИВО И ПЕРЕКРЫТИЯ НА КАРТОЧКЕ */
    .hover-title {
        font-size: 1.2em !important; /* Уменьшаем гигантский заголовок, чтобы он не лез на середину */
        line-height: 1.2;
        padding: 10px 5px;
    }

    .card-center-info {
        /* Делаем блок с датой и платформами чуть компактнее */
        transform: translate(-50%, -50%) scale(0.85); 
    }

    .hover-category {
        font-size: 1.1em !important; /* Уменьшаем нижнюю плашку */
        padding: 8px 5px;
    }

    /* Сетка: по умолчанию 240px это одна огромная карточка на весь экран телефона. 
       Делаем 150px, чтобы влезало ровно 2 карточки в ряд */
    .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; }

    /* Плашка "Новинка": жесткие пиксели (top: 290px) сломаются при изменении размера картинки. 
       Привязываем её к низу (над заголовком) */
    .new-badge {
        top: auto;
        bottom: 60px;
        font-size: 1.1em;
        padding: 4px 15px 4px 10px;
    }

    /* Модальное окно (Описание игры) */
    .modal-content { padding: 20px 15px; }
    .game-modal-body { flex-direction: column; gap: 15px; } /* Картинка сверху, текст снизу */
    
    .game-cover-container { flex: none; width: 100%; max-width: 250px; margin: 0 auto; }
    .game-info { min-width: 100%; flex: auto; }
    .game-description { font-size: 0.95em; }

    /* Кнопки скачивания растягиваем на всю ширину для удобного нажатия пальцем */
    .game-links { flex-direction: column; gap: 10px; }
    .game-link-btn { width: 100%; box-sizing: border-box; }

    /* Стрелки скролла скриншотов на телефоне не нужны, там работают родные свайпы пальцем */
    .scroll-btn { display: none !important; }
    
    /* Доска почета */
    .boosters-modal-content { max-height: 80vh; }
    .booster-item { font-size: 0.95em; }

    /* 1. Оставляем карточки в покое: дата и платформы будут появляться только при тапе (как и было задумано изначально) */
    
    /* 2. Исправляем вылезание текста за рамки в модальном окне игры */
    .game-modal-content {
        width: 90% !important;
        overflow-x: hidden; /* Жестко отрезаем всё, что пытается раздвинуть окно вбок */
    }
    .game-info {
        min-width: 0 !important; /* Убиваем ограничитель ширины, который ломал верстку */
        width: 100%;
        word-wrap: break-word; /* Заставляем длинные ссылки и слова переноситься, а не ломать экран */
        overflow-wrap: break-word;
    }

    /* 3. Исправляем обрезанные сверху категории (фильтры) */
    .filters-container {
        padding-top: 15px; /* Даем сверху место, чтобы точки "Новинка" и увеличенные активные кнопки не срезались */
        align-items: center; /* Выравниваем их по центру контейнера */
    }

    
}

/* ==========================================
   🎨 КАСТОМНЫЙ СКРОЛЛБАР (ДЛЯ ВСЕГО САЙТА)
   ========================================== */
/* Для браузеров Chrome, Safari, Edge, Яндекс.Браузер */
::-webkit-scrollbar {
    width: 8px;  /* Ширина вертикального скролла */
    height: 8px; /* Высота горизонтального скролла */
}

::-webkit-scrollbar-track {
    background: #1a0b1e; /* Темный фон дорожки (как у фона сайта) */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #ffcc00; /* Цвет самого ползунка (фиолетовый из палитры) */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f15f2c; /* При наведении ползунок становится фирменным оранжевым */
}

/* Для браузера Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #ffcc00 #1a0b1e;
}