/* Добавь это к стилям .category-card и .project-card */
.category-card, .project-card {
    transition: transform 0.1s ease-out; /* Плавный возврат в центр */
    transform-style: preserve-3d; /* Позволяет внутренним элементам выходить вперед */
    perspective: 1000px;
}

/* Чтобы иконка или текст «всплывали» над карточкой */
.category-card i, .file-box, .text-content h2 {
    transform: translateZ(50px); /* Выносит элемент вперед на 50px */
}
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;700;800&display=swap');
:root { --accent: #ff3c3c; --accent-blue: #24a1de; --glass: rgba(255, 255, 255, 0.03); --glass-border: rgba(255, 255, 255, 0.08); }
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Plus Jakarta Sans', sans-serif; }
body { background: #050507; color: white; overflow-x: hidden; }

/* ФОН И ХЕДЕР */
.bg-visuals { position: fixed; inset: 0; z-index: -1; background: #050507; }
.orb { position: absolute; width: 800px; height: 800px; border-radius: 50%; filter: blur(140px); opacity: 0.15; animation: float 25s infinite alternate ease-in-out; }
.orb-1 { background: var(--accent); top: -20%; left: -10%; }
.orb-2 { background: var(--accent-blue); bottom: -20%; right: -10%; }
@keyframes float { 0% { transform: translate(0,0); } 100% { transform: translate(120px, 60px); } }

.main-navigator { position: sticky; top: 0; z-index: 1000; background: rgba(5,5,7,0.6); backdrop-filter: blur(25px); border-bottom: 1px solid var(--glass-border); padding: 15px 0; }
.header-inner { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 25px; }
.logo { font-weight: 800; font-size: 1.4rem; color: #fff; text-decoration: none; }
.nav-bar { display: flex; background: var(--glass); padding: 6px; border-radius: 18px; border: 1px solid var(--glass-border); gap: 5px; }
.nav-item { padding: 10px 22px; color: rgba(255,255,255,0.4); text-decoration: none; font-size: 0.85rem; font-weight: 700; border-radius: 14px; transition: 0.4s; }
.nav-item.active { background: var(--accent); color: white; }

/* Кнопка Назад */
.back-btn-main { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px; color: #fff; text-decoration: none; font-weight: 700; margin-bottom: 30px; transition: 0.3s; }
.back-btn-main:hover { background: var(--accent); }

/* Сетка карточек */
.main-container { max-width: 1200px; margin: 0 auto; padding: 40px 25px; }
.programs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); gap: 20px; }
.project-card { background: rgba(15,15,20,0.6); border: 1px solid var(--glass-border); border-radius: 30px; padding: 35px; transition: 0.4s; }
.project-card:hover { border-color: var(--accent); transform: translateY(-8px); }
.card-title { font-size: 1.6rem; margin-bottom: 15px; font-weight: 800; }
.project-card p { color: rgba(255,255,255,0.5); line-height: 1.6; margin-bottom: 25px; }
.download-btn { display: block; width: 100%; padding: 16px; background: var(--glass); color: white; text-align: center; text-decoration: none; border-radius: 15px; font-weight: 700; transition: 0.3s; border: 1px solid var(--glass-border); }
.download-btn:hover { background: var(--accent); border-color: var(--accent); }

.main-title { font-size: 3.5rem; font-weight: 900; text-align: center; }
.sub-title { color: rgba(255,255,255,0.4); text-align: center; margin-bottom: 50px; }
.reveal { opacity: 0; transform: translateY(30px); animation: rev 0.8s forwards; }
@keyframes rev { to { opacity: 1; transform: translateY(0); } }

@media (max-width: 768px) { .programs-grid { grid-template-columns: 1fr; } .header-inner { flex-direction: column; gap: 15px; } }
/* --- СТАТИСТИКА ПОД КАРТОЧКОЙ --- */
.stats-container-bottom {
    width: 92%;
    max-width: 440px;
    margin: 15px auto 50px; /* Отступ сверху от карточки и снизу до края экрана */
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.stats-container-bottom .stat-card {
    flex: 1;
    background: rgba(10, 10, 15, 0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 24px;
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: all 0.3s ease;
}

.stats-container-bottom .stat-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-red);
    transform: translateY(-5px);
}

.stats-container-bottom .stat-card i {
    font-size: 16px;
    color: var(--accent-blue);
    opacity: 0.8;
}

.stats-container-bottom .stat-value {
    font-size: 20px;
    font-weight: 800;
    display: block;
    background: linear-gradient(180deg, #fff, #999);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: center;
}

.stats-container-bottom .stat-label {
    font-size: 7px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
}

/* Адаптация под узкие экраны */
@media (max-width: 400px) {
    .stats-container-bottom .stat-value { font-size: 18px; }
    .stats-container-bottom .stat-card { padding: 12px 5px; }
}
/* --- СТИЛИ ДЛЯ ВПИСЫВАНИЯ АНИМЕ В ФОН --- */

/* Контейнер для аниме-фона */
.visual-anime {
    position: absolute;
    inset: 0;
    
    /* === ЗАМЕНИТЬ background.jpg НА ПУТЬ К ТВОЕМУ ФАЙЛУ === */
    background-image: url('../images/anime_character.jpg'); 
    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed; /* Эффект параллакса при скролле */
    
    /* === КЛЮЧЕВЫЕ НАСТРОЙКИ ДЛЯ КРАСИВОГО СЛИЯНИЯ === */
    
    /* Делаем его почти прозрачным, как эфир */
    opacity: 0.12; 
    
    /* Размываем, чтобы он не конкурировал с контентом */
    filter: blur(20px) contrast(1.1); 
    
    /* Управление наложением слоёв (важно для гейминга с туманностью) */
    z-index: -6; /* Самый нижний слой над базовым цветом */
    
    /* Плавное появление при загрузке */
    animation: animeFadeIn 1.5s ease-out forwards;
}

@keyframes animeFadeIn {
    from { opacity: 0; filter: blur(40px); }
    to { opacity: 0.12; filter: blur(20px) contrast(1.1); }
}

/* --- АДАПТАЦИЯ ДЛЯ ТЕЛЕФОНА --- */
@media (max-width: 768px) {
    .visual-anime {
        /* На мобилке можно сделать чуть заметнее, но ещё более размытым */
        opacity: 0.15;
        filter: blur(30px);
    }
}