/* css/style.css - GLOBAL STYLES ONLY */

/* =========================================
   1. Основные настройки и сброс
   ========================================= */

html {
    line-height: 1.15;
    -webkit-text-size-adjust: 100%;
    box-sizing: border-box;
    height: 100%;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    background-color: #000000;
    color: #f5f5f7;
    font-family: 'Courier New', Courier, monospace;
    padding-top: 130px; /* Отступ под фиксированную шапку */
    padding-bottom: 0;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;

    /* Глобальный фон (переопределяется на страницах игр) */
    background-image: radial-gradient(circle at 50% 0%, #2c2c2e 0%, #000000 100%);
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: cover;
}

main {
    flex: 1 0 auto;
    width: 100%;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* =========================================
   2. Утилиты (Эффекты стекла - используются везде)
   ========================================= */

.glass-effect {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* =========================================
   3. Header (Шапка) - Глобальный элемент
   ========================================= */

.header {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1240px;
    height: 75px;
    z-index: 9999;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), background 0.4s;
    background: rgba(15, 15, 15, 0.6);
    backdrop-filter: blur(25px) saturate(180%);
    -webkit-backdrop-filter: blur(25px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 60px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}

.header.header-hidden {
    transform: translateX(-50%) translateY(-150%);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 30px;
}

.header-content-wrapper {
    display: contents;
}

.header-left {
    flex: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    z-index: 10002;
}

.header-center {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 15px;
}

/* Логотип */
.logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 20px;
    color: #fff;
    letter-spacing: -0.5px;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    min-width: 150px; 
}

.logo-cursor {
    display: inline-block;
    width: 8px;
    height: 20px;
    background-color: #4cd964;
    margin-left: 5px;
    animation: blink 1s step-end infinite;
    box-shadow: 0 0 8px #4cd964;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* Меню (Десктоп) */
.menu__list {
    display: flex;
    list-style: none;
    padding: 5px;
    margin: 0;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.menu__item { position: relative; }
.menu__item:not(:last-child) { margin-right: 5px; }

.menu__link {
    display: block;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    color: #999;
    border-radius: 40px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.menu__link:hover { color: #fff; text-shadow: 0 0 10px rgba(255, 255, 255, 0.6); }
.menu__link.active { color: #000; background: #fff; box-shadow: 0 0 15px rgba(255, 255, 255, 0.5); }

/* Выпадающее меню (Dropdown) */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 180px;
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(30px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 8px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    margin-top: 15px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10000;
    pointer-events: none;
}

.menu__item.dropdown-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: #ccc;
    font-size: 13px;
    font-weight: bold;
    border-radius: 12px;
    transition: 0.2s;
    text-align: center;
}
.dropdown-menu a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* Социальные иконки */
.header-socials {
    display: flex;
    gap: 8px;
    padding-right: 15px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
}

.header-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: #aaa;
    transition: all 0.3s ease;
}

.header-social-btn svg, .header-social-btn img {
    width: 18px !important;
    height: 18px !important;
    display: block;
    fill: currentColor;
    object-fit: contain;
}
.header-social-btn img { filter: grayscale(100%) brightness(0.7); transition: 0.3s; }
.header-social-btn:hover { transform: scale(1.1); color: #fff; }
.header-social-btn.telegram:hover { background: rgba(0, 136, 204, 0.2); border-color: #0088cc; color: #0088cc; }
.header-social-btn.itch:hover { background: rgba(250, 92, 92, 0.2); border-color: #fa5c5c; color: #fa5c5c; }
.header-social-btn.itch:hover img { filter: brightness(0) invert(1); }

/* Переключатель языка */
.lang-switcher {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
    padding: 2px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    touch-action: none;
    user-select: none;
    height: 40px;
    min-width: 140px;
}

.lang-glider {
    position: absolute;
    top: 2px; bottom: 2px; left: 2px;
    width: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    border-radius: 40px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: left 0.5s cubic-bezier(0.23, 1, 0.32, 1), width 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 1;
}

.lang-btn {
    position: relative;
    z-index: 2;
    flex: 1;
    text-align: center;
    background: transparent;
    color: #666;
    padding: 0;
    font-size: 13px;
    font-weight: 800;
    line-height: 36px;
    border-radius: 40px;
    transition: color 0.3s ease;
    pointer-events: none;
}
.lang-btn.active { color: #fff; text-shadow: 0 0 10px rgba(255, 255, 255, 0.5); }

/* =========================================
   4. Мобильная навигация (Bottom Bar)
   ========================================= */

.mobile-menu-toggle { display: none; }

.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    height: 65px;
    z-index: 9998;
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 35px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    justify-content: space-around;
    align-items: center;
    padding: 0 10px;
}

.mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    width: 60px;
    height: 100%;
    gap: 4px;
    transition: 0.3s;
    cursor: pointer;
}

.nav-icon {
    width: 20px; height: 20px;
    background: #888;
    mask-size: contain; -webkit-mask-size: contain;
    mask-repeat: no-repeat; -webkit-mask-repeat: no-repeat;
    transition: 0.3s;
}

.mobile-nav-link.active { color: #fff; }
.mobile-nav-link.active .nav-icon { background: #4cd964; box-shadow: 0 0 10px #4cd964; }

/* Всплывающее меню проектов (Мобильное) */
.mobile-projects-popup {
    position: fixed;
    bottom: 95px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 200px;
    background: rgba(25, 25, 25, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10000;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
}
.mobile-projects-popup.show { opacity: 1; visibility: visible; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.mobile-projects-popup a {
    display: block; padding: 12px 15px; color: #ccc;
    font-size: 14px; font-weight: bold; text-align: center;
    border-radius: 12px; transition: 0.2s;
}
.mobile-projects-popup a:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

/* =========================================
   5. Базовая карточка проекта (используется на главной)
   ========================================= */
/* Примечание: Специфические карточки для архива/новостей вынесены в их CSS, 
   но базовая структура нужна для index.html */

.project-card {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 30px;
    padding: 30px;
    margin-bottom: 50px;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
    background: rgba(30, 30, 30, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
}
.project-card:hover {
    background: rgba(40, 40, 40, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px) scale(1.01);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}
.project-image {
    position: relative; aspect-ratio: 16/9; border-radius: 16px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); border: 1px solid rgba(255, 255, 255, 0.05);
}
.project-image img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.project-gif { opacity: 0; transition: opacity 0.4s; z-index: 2; }
.project-card:hover .project-gif { opacity: 1; }
.project-info { display: flex; flex-direction: column; justify-content: center; }
.project-name { font-size: 32px; margin: 0 0 15px 0; color: #fff; text-shadow: 0 5px 20px rgba(0, 0, 0, 0.8); }
.project-desc { color: #ccc; font-size: 15px; line-height: 1.7; margin-bottom: 25px; }

/* Теги разработчиков (Dev Tags) */
.dev-list { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, 0.08); }
/* css/indexstyle.css (или style.css) */

/* Обновленный контейнер разработчика в карточке */
.dev-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    font-weight: bold;
    color: #ddd;
    background: rgba(255, 255, 255, 0.05); /* Легкий фон */
    padding: 6px 14px;
    border-radius: 50px;
    border: 1px solid transparent; /* Готовим границу для ховера */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); /* Плавная анимация как у Team */
    cursor: pointer;
    text-decoration: none;
}

/* Эффект наведения на весь блок */
.dev-item:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(76, 217, 100, 0.3); /* Зеленоватая рамка */
    transform: translateY(-3px); /* Подпрыгивание (меньше чем у больших аватарок) */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4); /* Тень */
    color: #fff;
}

/* Аватарка внутри */
.dev-mini-ava {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    object-fit: cover;
    transition: all 0.3s ease;
}

/* Эффект наведения на аватарку (при наведении на блок) */
.dev-item:hover .dev-mini-ava {
    border-color: #4cd964; /* Зеленая обводка */
    box-shadow: 0 0 10px rgba(76, 217, 100, 0.5); /* Зеленое свечение */
    transform: scale(1.15); /* Увеличение */
}
/* =========================================
   6. Footer (Подвал) - Глобальный
   ========================================= */

.site-footer {
    flex-shrink: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #020202;
    padding: 50px 0;
    margin-top: auto;
    font-family: 'Courier New', Courier, monospace;
    width: 100%;
}
.footer-credits { color: #666; font-size: 14px; margin-bottom: 15px; display: flex; justify-content: center; align-items: center; }
.footer-copyright { color: #333; font-size: 12px; text-align: center; }
.footer-link { color: #ccc; text-decoration: none; border-bottom: 1px dashed rgba(76, 217, 100, 0.3); }
.footer-link:hover { color: #4cd964; border-bottom-color: #4cd964; }

/* =========================================
   7. Media Queries (Адаптив)
   ========================================= */

@media (max-width: 900px) {
    body { padding-top: 100px; } /* Компенсация шапки */
    
    .header {
        top: 15px; width: 95%; border-radius: 30px; height: 60px;
        background: rgba(10, 10, 10, 0.85); justify-content: center;
    }

    .header-content-wrapper {
        display: flex; flex-direction: column;
        position: absolute; top: 70px; right: 0; left: auto;
        width: 250px;
        background: rgba(20, 20, 20, 0.95);
        backdrop-filter: blur(20px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 20px; padding: 20px; gap: 20px;
        opacity: 0; visibility: hidden;
        transform: translateY(-10px) scale(0.95);
        transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        pointer-events: none;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    }
    .header.mobile-menu-open .header-content-wrapper {
        opacity: 1; visibility: visible;
        transform: translateY(0) scale(1); pointer-events: all;
    }

    .header-center { display: none; }
    .header-right { display: flex; flex-direction: column; width: 100%; gap: 20px; align-items: center; }
    .header-socials { border-right: none; padding: 0; justify-content: center; width: 100%; }
    .lang-switcher { width: 100%; }

    /* Бургер меню */
    .mobile-menu-toggle {
        display: flex; flex-direction: column; justify-content: space-between;
        width: 30px; height: 20px;
        background: transparent; border: none; cursor: pointer;
        z-index: 10001; padding: 0;
    }
    .mobile-menu-toggle span {
        display: block; width: 100%; height: 3px;
        background-color: #fff; border-radius: 2px;
        transition: all 0.3s ease;
    }
    /* Анимация бургера */
    .header.mobile-menu-open .mobile-menu-toggle span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .header.mobile-menu-open .mobile-menu-toggle span:nth-child(2) { opacity: 0; }
    .header.mobile-menu-open .mobile-menu-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    .mobile-bottom-nav { display: flex; }
    .project-card { grid-template-columns: 1fr; gap: 20px; padding: 20px; }
    .site-footer { padding-bottom: 120px; }
}
