:root {
    --bg: #f4f7f9;
    --card-bg: #ffffff;
--text-main: #1a1c21; /* Улучшена контрастность */
--text-muted: #475569; /* Улучшена контрастность */
    --accent: #004bb3;
    --radius: 18px;
    --border: rgba(0, 0, 0, 0.05);
    --sidebar-bg: #ffffff;
    --tag-bg: #f1f3f6;
 /* Переменные хедера */
    --header-bg: #ffffff;
    --header-text: #333b4d;
    --nav-border: #f0f0f0;
    --input-bg: #f5f7f9;
    --content-width: 1100px;

            --card: #ffffff;
           
}


/* Правильное описание темной темы */
[data-theme="dark"] {
    --bg: #12141c;
    --card-bg: #1e212a;
    --text-main: #eef2ff;
    --text-muted: #a0aec0;
    --accent: #4da3ff;
    --border: rgba(255, 255, 255, 0.08);
    --sidebar-bg: #1e212a;
    --tag-bg: #2d323e;
    --header-bg: #1e212a;
    --input-bg: #2d323e;
}

/* Применяем переменные к блоку статьи в темной теме */
[data-theme="dark"] .app-card, 
[data-theme="dark"] .entry-content, 
[data-theme="dark"] .app-article { 
    background-color: var(--card-bg) !important;
    color: var(--text-main) !important;
}

/* Настраиваем заголовки внутри статьи */
[data-theme="dark"] .app-card h1,
[data-theme="dark"] .app-card h2,
[data-theme="dark"] .app-card h3 {
    color: var(--accent) !important;
}

/* Настраиваем ссылки, если они есть 
[data-theme="dark"] .app-card a {
    color: var(--accent);
    text-decoration: underline;
}*/

[data-theme="dark"] .related-title{
	color:white;
}

[data-theme="dark"] .related-item{
background: #2d323e;
border: 1px solid var(--border);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .related-item:hover{
background: #1e212a;
border: 1px solid var(--border);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .theme-trigger {
	background: azure;
}



[data-theme="dark"] .rel-title{
	color: white;
}


/* Цвет логотипа отдельно для темной темы */
[data-theme="dark"] .main-logo {
    color: #ffffff;
}







body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    background-color: var(--bg);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    transition: background 0.3s ease, color 0.3s ease;
}


.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
}



/* Контейнер галереи (скролл) */
.screenshots-container {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding-bottom: 15px;
    scrollbar-width: thin;
}

/* Сами изображения */
.screenshots-container img {
    /* Фиксируем высоту, чтобы галерея была аккуратной */
    height: 250px; 
    /* Ширина подстроится автоматически или будет фиксированной */
    width: auto;
    min-width: 150px;
    
    border-radius: 12px;
    
    /* ГЛАВНОЕ ИСПРАВЛЕНИЕ: сохраняем пропорции */
    object-fit: cover; 
    object-position: center;
    
    /* Убираем сжатие flex-элемента */
    flex-shrink: 0; 
    
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.screenshots-container img:hover {
    transform: scale(1.02);
}

.theme-toggle-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    background: var(--accent);
    color: #fff;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}
.main-header {
    background-color: var(--header-bg); /* Теперь она будет брать цвет из темы */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}
.section-header {
    margin: 30px 0 15px;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cat-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 800;
    margin: 30px 0 20px;
}

.cat-title i {
    background: var(--tag-bg);
    color: var(--accent);
    padding: 8px;
    border-radius: 8px;
    font-size: 16px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 15px;
    margin-bottom: 40px;
}


.rating-val, .rel-rating {
    color: #b45309 !important; /* Насыщенный янтарный, проходит тесты Google на контрастность */
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
}

.rating-val svg, .rel-rating svg {
    color: inherit !important;
    fill: currentColor;
}

.android-ver {
    color: #166534 !important; /* Насыщенный зеленый для читаемости */
    font-weight: 600;
}
.cat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 15px;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}

.cat-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--accent);
}

.cat-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-right: 15px;
}

.bg-blue { background: rgba(79, 70, 229, 0.1); color: #6366f1; }
.bg-cyan { background: rgba(8, 145, 178, 0.1); color: #22d3ee; }
.bg-red { background: rgba(220, 38, 38, 0.1); color: #f87171; }
.bg-orange { background: rgba(234, 88, 12, 0.1); color: #fb923c; }
.bg-purple { background: rgba(147, 51, 234, 0.1); color: #c084fc; }

.cat-info { flex: 1; }
.cat-name { font-weight: 700; font-size: 15px; }
.cat-count { font-size: 12px; color: var(--text-muted); }
.cat-arrow { color: var(--text-muted); opacity: 0.3; }


.app-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.app-item {
content-visibility: auto;
    contain-intrinsic-size: 140px 210px !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.app-item:hover { transform: translateY(-6px); }

.app-icon-wrapper {
    position: relative;
    width: 100%;
    max-width: 140px;
    aspect-ratio: 1 / 1;
    margin-bottom: 10px;
}

.app-icon {
    width: 100%;
    height: 100%;
    border-radius: 20px;
aspect-ratio: 1 / 1;
    object-fit: cover;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    background: #fff;
    border: 1px solid var(--border);
}

.app-title-g {
    font-weight: 600;
    font-size: 13px;
    line-height: 1.25;
    color: var(--text-main);
    
    /* Включаем обрезку */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Добавляем стандартное свойство для редактора */
    -webkit-box-orient: vertical;
    
    /* Прячем лишнее */
    overflow: hidden;
    
    /* Заменяем фиксированную высоту на максимальную */
    max-height: 33px; /* 13px * 1.25 * 2 строки = примерно 32.5px */
    
    margin-bottom: 4px;
}

.app-meta-info {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}

.sidebar {
    position: sticky;
    top: 90px;
    width: 300px;            /* Фиксируем ширину */
    min-width: 300px;        /* Не даем сжиматься при расчетах */
    flex-shrink: 0;          /* Запрещаем деформацию сетки */
    align-self: start;       /* Важно для Grid: липкость работает правильно только так */
    will-change: transform;  /* Подсказка браузеру вынести блок на отдельный слой видеокарты */
    
    /* Резервируем примерную высоту, чтобы браузер не считал её с нуля */
    min-height: 600px; 
}

.sidebar-block {
    background: var(--sidebar-bg);
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 25px;
    border: 1px solid var(--border);
}

.sidebar-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.top-app-item {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
    text-decoration: none;
    color: inherit;
}

.top-app-counter {
    font-size: 16px;
    font-weight: 800;
    opacity: 0.3;
    margin-right: 12px;
    width: 20px;
/* Добавь или измени эти свойства */
    color: var(--text-main); /* Используем основной темный текст вместо muted */
    font-weight: 800;        /* Делаем жирнее, чтобы цифра была четкой */
    opacity: 1;              /* Убедись, что нет прозрачности */
}

.top-app-icon {
    width: 40px;
    height: 40px;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
    margin-right: 12px;
    object-fit: cover;
    flex-shrink: 0;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;   
    contain: layout paint;
    will-change: transform;
}

.rating {
    color: #e67e22;
    font-weight: 700;
}


.top-app-name { font-size: 13px; font-weight: 600; }

.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    
    /* Эти 2 строки "прячут" сложность блока от алгоритмов Google */
    contain: content;
    content-visibility: auto;
}

.tag-item {
    display: inline-block;
    padding: 6px 12px;
    background: var(--tag-bg);
    border-radius: 20px;
    font-size: 13px;
    text-decoration: none;
    color: var(--text-main);
    
    /* Запрещаем браузеру пытаться перерисовывать теги по отдельности */
    contain: layout style;
}

.tag-item:hover {
    background: var(--accent);
    color: #fff;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 15px;
    margin: 30px 0;
    width: 100%;
}

.feature-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 15px;
    padding: 20px 10px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.05);
}

.fa-android {
    color: #a4c639; /* Зеленый цвет бренда Android */
    margin-right: 2px; /* Небольшой отступ от текста */
}

.app-specs .rating-val[style*="a4c639"] {
    font-weight: 600; /* Немного жирности для текста Android */
    transition: 0.3s;
}

.app-specs .rating-val[style*="a4c639"]:hover {
    filter: brightness(0.9); /* Слегка притемняет при наведении */
}

.feature-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 20px;
}

.icon-mod { background: #fff4d5; color: #f39c12; }
.icon-money { background: #fff9c4; color: #fbc02d; }
.icon-open { background: #f3e5f5; color: #9c27b0; }
.icon-premium { background: #fce4ec; color: #e91e63; }
.icon-ads { background: #ffebee; color: #f44336; }
.icon-fast { background: #e3f2fd; color: #1e88e5; }

.feature-card h3 { font-size: 14px; margin-bottom: 6px; font-weight: 700; }
.feature-card p { font-size: 11px; color: var(--text-muted); line-height: 1.3; margin: 0; }



.screenshot-item {
    aspect-ratio: 16 / 9; /* Или 9 / 16 для вертикальных игр */
    width: auto;
    height: 200px;
    background: #eee; /* Заглушка, пока фото грузится */
}

/* Основной контейнер иконки */
.icon-box {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px; /* Мягкие углы как на фото */
    font-size: 18px;
    margin-right: 15px;
    flex-shrink: 0;
}

/* Пастельные пары: фон и цвет иконки */
.bg-soft-blue   { background-color: #eef2ff; color: #4f46e5; }
.bg-soft-red    { background-color: #fef2f2; color: #ef4444; }
.bg-soft-orange { background-color: #fff7ed; color: #f97316; }
.bg-soft-purple { background-color: #f5f3ff; color: #8b5cf6; }
.bg-soft-cyan   { background-color: #ecfeff; color: #0891b2; }
.bg-soft-green  { background-color: #f0fdf4; color: #22c55e; }
.bg-soft-pink   { background-color: #fdf2f8; color: #ec4899; }
.bg-soft-yellow { background-color: #fefce8; color: #ca8a04; }

/* Чтобы иконка FontAwesome наследовала цвет от родителя */
.icon-box i {
    color: inherit; 
}

/* Обновленная шапка на Flexbox */
 .main-logo {
font-size: 24px;
    
    white-space: nowrap;
  
    margin: 0; 
    padding: 0;
        text-decoration: none;
        font-weight: 800;
        font-size: 24px;
        color: var(--header-text);
        letter-spacing: -1px;
display: inline-block;
    width: 185px; /* Точная ширина */
    height: 35px; /* Точная высота */
    contain: layout paint; /* ГОВОРИТ БРАУЗЕРУ: "Рисуй сразу, не жди ничего" */
    content-visibility: visible;
    }

/* Оболочка, которая держит всё в центре экрана */


/* Логотип (Левая часть) */
.header-left {    
flex: 1; /* Занимает 1 часть пространства */
    display: flex;
    justify-content: flex-start;
}

/* Поиск (Центральная часть) */
.header-center {
    flex: 1;                /* Занимает всё свободное место в центре */
    max-width: 500px;       /* Но не шире 500px, чтобы не растягивался на весь экран */
    margin: 0 20px;         /* Отступы от логотипа и кнопки темы */
}

/* Кнопка темы (Правая часть) */
.header-right {
  flex: 1;
    display: flex;
    justify-content: flex-end;
}


/* Основной контейнер шапки */
.header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
height: 70px;
}

/* Фиксируем размеры текстового логотипа */
.main-logo {
    display: inline-block;
    width: 185px;          /* Строго фиксируем ширину */
    height: 35px;          /* Строго фиксируем высоту */
    font-size: 24px;
    font-weight: 800;
    color: #333b4d;
    text-decoration: none;
    letter-spacing: -1px;
    line-height: 35px;
    white-space: nowrap;   /* Запрещаем перенос */
    overflow: hidden;      /* Прячем лишнее, пока грузится шрифт */
    
    /* Критически важно для PageSpeed: */
    contain: size layout;  
}

.main-logo span {
    color: #004bb3;
    font-weight: 700;
}


/* --- ОБЪЕДИНЕННЫЕ СТИЛИ ПОИСКА (БЕЗ ОШИБОК) --- */

.search-box {
    flex: 2; /* Занимает 2 части (шире логотипа) */
    display: flex;
    justify-content: center;
    max-width: 500px; /* Чтобы поиск не растягивался на весь экран */
}

.search-box form {
    display: flex;
    align-items: center;
    gap: 12px; /* Расстояние между полем и кнопкой для удобства нажатия */
    width: 100%;
    position: relative;
}

.search-box input {
    width: 100%;
    flex-grow: 1;
    min-height: 44px; /* Минимум 44px для прохождения теста Google */
    padding: 0 18px;
    border: 1px solid var(--nav-border);
    border-radius: 25px;
    background: var(--input-bg);
    color: var(--header-text);
    outline: none;
    font-size: 14px;
    transition: 0.2s;
}

.search-box input:focus {
    border-color: var(--accent);
    background: var(--header-bg);
}

.search-box button {
    /* Создаем крупную круглую кнопку 44x44px */
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    font-size: 18px; /* Иконка внутри будет крупнее */
}

.search-box button:hover {
    filter: brightness(1.1);
    transform: scale(1.05);
}
   .theme-trigger {
   
background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: inherit; /* Чтобы иконка сохранила свой цвет */
    display: flex;
    align-items: center;
    justify-content: center;   
        font-size: 20px;
        color: var(--header-text);
        width: 40px;
        height: 40px;
        border-radius: 50%;
        transition: 0.2s;
}

    .theme-trigger:hover {
        background: var(--input-bg);
    }

    /* Адаптация для телефонов */
    @media (max-width: 768px) {
        .header-wrapper {
            grid-template-columns: auto 1fr auto;
            gap: 10px;
        }

        .main-logo {
            font-size: 20px;
        }

        .search-box input {
            padding: 8px 15px;
            font-size: 12px;
        }
    }

    .tag-cloud {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 10px 0;
    }

    .tag-item {
        background: #ffffff;
        border: 1px solid #e2e8f0;
        color: #4a5568;
        padding: 6px 12px;
        border-radius: 10px;
        font-size: 13px;
        text-decoration: none;
        font-weight: 500;
        transition: all 0.2s ease;
    }

    .tag-item:hover {
        background: #5c8aff;
        color: #ffffff;
        border-color: #5c8aff;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(92, 138, 255, 0.25);
    }

            .breadcrumbs {
                padding-top: 25px;
            font-size: 13px;
            color: var(--text-muted);
            margin-bottom: 25px;
            text-align: left;
        }

        .breadcrumbs a {
            color: var(--text-muted);
            text-decoration: none;
        }

        .app-wrapper {
            position: relative;
            margin-top: 70px;
        }

        .app-icon-floating {
          width: 140px; /* Размер как в твоем исходнике */
    height: 140px;
    border-radius: 32px; /* Скругление как на Screenshot_14.png */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    position: absolute;
    top: -70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background: #fff;
    object-fit: cover;
        }

        .app-card {
            background-color: var(--card);
    border-radius: var(--radius);
    /* Увеличиваем padding-top, чтобы заголовок ушел ниже иконки */
    padding: 100px 25px 30px; 
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
        }

        .app-title {
            font-size: 24px;
    font-weight: 700;
    margin: 0 0 10px; /* Обнулили верхний отступ, так как padding карты его заменяет */
    color: var(--text-main);
        }

        .app-specs {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 15px;
            font-size: 14px;
            color: var(--text-muted);
            margin-bottom: 20px;
        }

        .rating-val {
            color: #ffa726;
            font-weight: 700;
        }

        .app-description {
            font-size: 15px;
            line-height: 1.7;
            text-align: left;
            max-width: 90%;
            margin: 0 auto 20px;
        }

        /* --- ТЕГИ --- */
        .app-tags {
            text-align: left;
            max-width: 700px;
            margin: 0 auto 30px;
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .tag-pill {
            display: inline-block;
            background: #f0f3f8;
            color: var(--text-muted);
            padding: 5px 12px;
            border-radius: 10px;
            font-size: 13px;
            text-decoration: none;
            font-weight: 500;
            transition: 0.2s;
        }

        .tag-pill:hover {
            background: var(--accent);
            color: #fff;
        }

        /* --- ВАРИАНТ 2: СПИСОК "GOOGLE PLAY STYLE" --- */
        .related-section {
            margin-top: 50px;
            text-align: left;
            max-width: 90%;
            margin: 40px auto 0;
            padding-top: 20px;
            border-top: 2px solid #f1f5f9;
        }

        .related-title {
            font-size: 19px;
            font-weight: 700;
            margin-bottom: 20px;
            color: #1e293b;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Установлено 3 колонки */
    gap: 12px;
}

        .related-item {
            display: flex;
            align-items: center;
            gap: 15px;
            padding: 12px;
            background: #f8fafc;
            border-radius: 16px;
            text-decoration: none;
            transition: background 0.2s ease;
        }

        .related-item:hover {
            background: #f1f5f9;
        }

        .related-item img {
            width: 58px;
            height: 58px;
            border-radius: 12px;
            object-fit: cover;
            flex-shrink: 0;
        }

        .rel-info {
            overflow: hidden;
            text-align: left;
        }

        .rel-title {
            font-size: 14px;
            font-weight: 700;
            color: #1a1c21;
            display: block;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            margin-bottom: 2px;
        }

        .rel-cat {
            font-size: 12px;
            color: #64748b;
            display: block;
            margin-bottom: 3px;
        }

        .rel-rating {
            font-size: 12px;
            color: #f59e0b;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 3px;
        }

        .app-screenshots {
            display: flex;
            gap: 12px;
            overflow-x: auto;
            margin: 20px 0 30px;
            padding-bottom: 10px;
            scrollbar-width: thin;
        }

        .app-screenshots img {
            height: 380px;
            border-radius: 18px;
            box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
            transition: 0.3s;
        }

        .download-container {
            margin-top: 40px;
            text-align: left;
        }

        .download-box {
            background: #f8fafd;
            border-radius: 20px;
            padding: 8px;
        }

        .download-link {
            background-color: var(--accent);
            color: white;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            border-radius: 16px;
            text-decoration: none;
            font-weight: 600;
        }

        @media (max-width: 600px) {
            .app-screenshots img {
                height: 260px;
            }

            .related-grid {
                grid-template-columns: 1fr;
            }

            /* На мобилках в один столбик */
        }
@media (max-width: 600px) {
            .app-grid {
                grid-template-columns: 1fr;
            }
        }

        .apps-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 15px;
        }

        .apps-item {
            background: var(--card);
            border-radius: var(--radius);
            padding: 15px;
            display: flex;
            align-items: center;
            text-decoration: none;
            color: inherit;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
            transition: 0.2s;
        }

        .apps-item:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
        }

        .apps-icon {
            width: 65px;
            height: 65px;
            border-radius: 15px;
            margin-right: 15px;
            object-fit: cover;
        }

        .apps-title {
            font-weight: 600;
            font-size: 15px;
            margin-bottom: 4px;
        }


        .mod-tag {
            background: #e8f5e9;
            color: #2e7d32;
            padding: 2px 6px;
            border-radius: 5px;
            font-size: 10px;
            font-weight: 700;
        }

        /* Стили пагинации */
        .pagination {
            display: flex;
            justify-content: center;
            gap: 8px;
            margin: 40px 0;
        }

        .page-link {
            padding: 10px 18px;
            background: var(--card);
            border-radius: 12px;
            text-decoration: none;
            color: var(--text);
            font-weight: 600;
            font-size: 14px;
            transition: 0.2s;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
        }

        .page-link:hover {
            background: var(--accent);
            color: #fff;
        }

        .page-link.active {
            background: var(--accent);
            color: #fff;
        }

/* ============================================================
   ЕДИНЫЙ БЛОК АДАПТАЦИИ (ЗАМЕНИТЬ ВСЁ ПОСЛЕ СТРОКИ 412)
   ============================================================ */

/* Планшеты и небольшие ноутбуки */
@media (max-width: 1024px) {
    .app-grid { 
        grid-template-columns: repeat(4, 1fr) !important; 
        gap: 12px; 
    }
    .features-grid { 
        grid-template-columns: repeat(3, 1fr); 
    }
}

/* Маленькие планшеты и большие телефоны */
@media (max-width: 850px) {
    .main-layout { 
        grid-template-columns: 1fr !important; 
    }
    .header-wrapper {
        grid-template-columns: auto 1fr auto;
        gap: 10px;
    }
    .app-grid { 
        grid-template-columns: repeat(3, 1fr) !important; 
    }
    .sidebar { 
        position: static; 
        margin-top: 30px;
    }
}

/* Телефоны (Portrait) */
@media (max-width: 600px) {
    /* Сетка главных новостей/игр */
    .app-grid { 
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important; /* ТЕПЕРЬ ТОЧНО 2 КОЛОНКИ */
        gap: 10px !important;
    }

    .app-item {
        width: 100% !important;
    }

    /* Шапка и Логотип */
    .main-logo {
        font-size: 20px;
    }
    .search-box input {
        padding: 8px 15px;
        font-size: 12px;
    }

    /* Скриншоты и похожие игры */
    .app-screenshots img {
        height: 260px !important;
    }
    .related-grid {
        grid-template-columns: 1fr !important;
    }
    .apps-grid {
        grid-template-columns: 1fr !important;
    }

    /* Иконки категорий */
    .features-grid { 
        grid-template-columns: repeat(2, 1fr) !important; 
    }

    /* Отступы карточки приложения */
    .app-card {
        padding: 80px 15px 25px !important;
    }
    .app-description {
        max-width: 100% !important;
    }
}

.main-footer {
    background: transparent;
    border-top: 1px solid var(--border);
    padding: 40px 0;
    margin-top: 40px;
    text-align: center;
}

/* Стилизуем логотип специально для футера */
.footer-logo-text {
    opacity: 0.8;
    font-size: 22px; /* Чуть меньше, чем в шапке */
    transition: opacity 0.3s ease;
}

.footer-logo-text:hover {
    opacity: 1;
}

.footer-info {
    font-size: 13px;
    color: var(--text-muted);
    margin: 15px 0;
    font-weight: 400;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

/* Темная тема подхватится автоматически благодаря переменным */