:root {
            --bg-dark: #050505;
            --bg-card: #111111;
            --accent-orange: #ff098c;
            --text-bright: #f5f5f5;
            --text-dim: #c7c7c7;
            --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        html { scroll-behavior: smooth; }

        body {
            margin: 0;
            background-color: var(--bg-dark);
            color: var(--text-bright);
            font-family: 'Montserrat', sans-serif;
            line-height: 1.6;
            overflow-x: hidden;
        }
        
        .content {
          position: relative;
          z-index: 1;
        
          color: white;
          padding: 100px;
        }

        h1, h2, h3, .logo-font {
            font-family: 'Orbitron', sans-serif;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            margin: 0;
        }

        header {
            background: rgba(5, 5, 5, 0.95);
            padding: 15px 5%;
            position: fixed;
            width: 100%;
            box-sizing: border-box;
            top: 0;
            left: 0;
            z-index: 1000;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-bottom: 1px solid #222;
        }

        .logo {
            font-size: 1.4rem;
            color: var(--accent-orange);
            text-decoration: none;
            letter-spacing: 2px;
            z-index: 1002;
        }

        .burger {
            display: none;
            cursor: pointer;
            flex-direction: column;
            justify-content: space-between;
            width: 26px;
            height: 18px;
            z-index: 1002;
        }

        .burger span {
            display: block;
            height: 2px;
            width: 100%;
            background-color: var(--text-bright);
            transition: var(--transition);
        }

        nav {
            display: flex;
            align-items: center;
        }

        nav a {
            color: var(--text-bright);
            text-decoration: none;
            margin-left: 30px;
            font-size: 0.85rem;
            font-weight: 600;
            transition: var(--transition);
        }

        nav a:hover { color: var(--accent-orange); }

        a:hover { color: var(--accent-orange); }

        a {
            color: var(--text-bright);
            font-weight: 600;
        }

        @media (max-width: 768px) {
            .burger { display: flex; }

            nav {
                position: fixed;
                top: 0;
                right: -100%;
                height: 100vh;
                width: 100%;
                background: var(--bg-dark);
                flex-direction: column;
                justify-content: center;
                transition: 0.4s;
            }

            nav.active { right: 0; }

            nav a {
                margin: 30px 0;
                font-size: 1.5rem;
            }

            .burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
            .burger.open span:nth-child(2) { opacity: 0; }
            .burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
        }

        section { padding: 100px 8% 60px; border-bottom: 1px solid var(--accent-orange); }

        .section-title {
            text-align: center;
            margin-bottom: 50px;
            font-size: clamp(1.5rem, 5vw, 2.2rem);
        }

        .hero {
            height: 32vh;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            background: radial-gradient(circle at center, rgba(255,94,0,0.08) 0%, rgba(0,0,0,1) 70%);
            border: none;
        }

        .hero {
          position: relative; /* Обязательно для позиционирования логотипа */
        }
        
        .hero-logo {
          position: absolute;
          top: 75px;
          left: 50px;
          width: 80px;
          height: 80px;
          z-index: 10;
        }

        .content-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 30px;
        }

        .card {
            background: var(--bg-card);
            border: 1px solid #1a1a1a;
            border-radius: 8px;
            overflow: hidden;
            transition: var(--transition);
            display: flex;
            flex-direction: column;
        }

        .card:hover {
            border-color: var(--accent-orange);
            transform: translateY(-5px);
            box-shadow: 0 10px 30px rgba(255,94,0,0.1);
        }

        .project-img {
            height: 220px;
            background-color: #1a1a1a;
            background-size: cover;
            background-position: center;
        }

        .card-info { padding: 30px; flex-grow: 1; }
        .card-info h3 { color: var(--accent-orange); margin-bottom: 10px; font-size: 1.3rem; }
        .card-info p { color: var(--text-dim); font-size: 0.95rem; margin: 0; }

        .blog-date {
            display: block;
            color: var(--accent-orange);
            font-size: 0.8rem;
            font-weight: 600;
            margin-bottom: 10px;
        }
        
        .class-blog-link{
            text-decoration: none;
        }

        .btn-container { text-align: center; margin-top: 50px; }

        .btn-outline {
            display: inline-block;
            padding: 14px 35px;
            color: var(--text-bright);
            text-decoration: none;
            border: 1px solid var(--text-bright);
            font-family: 'Orbitron', sans-serif;
            font-size: 0.8rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            transition: var(--transition);
            cursor: pointer;
            background: transparent;
        }

        .btn-outline:hover {
            background: var(--text-bright);
            color: var(--bg-dark);
        }

        footer {
            background: #000;
            padding: 60px 8% 40px;
            text-align: center;
        }

        .social-links {
            display: flex;
            justify-content: center;
            gap: 25px;
            margin-bottom: 30px;
        }

        .social-links svg {
            width: 24px;
            height: 24px;
            fill: var(--text-dim);
            transition: var(--transition);
        }

        .social-links a:hover svg { fill: var(--accent-orange); transform: scale(1.1); }

        .copyright { color: #8e8e8e; font-size: 0.8rem; margin-top: 20px; }

        #logo_game
        {
            width:150px;
            border: 1px solid var(--accent-orange);
            border-radius: 8px;
        }
        
        /* Контейнер галереи */
        #gallary {
            display: flex;          /* Включаем Flexbox */
            flex-wrap: wrap;        /* Позволяем картинкам переноситься на новую строку */
            gap: 10px;              /* Расстояние между картинками */
            justify-content: center; /* Центрируем содержимое */
            padding: 10px;
        }
        
        /* Стили для изображений */
        #gallary img {
            height: auto;           /* Сохраняем пропорции */
            object-fit: cover;      /* Чтобы картинки не искажались (если разная высота) */
            border: 1px solid white;
        }
        #gallary img:hover {
            border: 1px solid var(--accent-orange);
        }
        
        /* Десктопная версия (4 в ряд) */
        @media (min-width: 769px) {
            #gallary img {
                /* Вычитаем gap, чтобы 4 картинки влезли ровно в 100% ширины */
                width: calc(25% - 10px); 
            }
        }
        
        /* Мобильная версия (2 в ряд) */
        @media (max-width: 768px) {
            #gallary img {
                /* Вычитаем gap, чтобы 2 картинки влезли ровно в 100% ширины */
                width: calc(50% - 10px);
            }
        }
        
        #gallary_one img {
        width: 80vw;    /* 80% от ширины вьюпорта (экрана) */
        height: auto;   /* Автоматическая высота для сохранения пропорций */
        display: block; /* Убирает лишние отступы снизу */
        margin: 0 auto; /* Центрирует изображение внутри контейнера */
        }
        
        dialog::backdrop {
        background: rgba(0, 0, 0, 0.8); /* Темный фон */
        backdrop-filter: blur(5px);    /* Размытие заднего плана */
        }
        
        dialog {
            outline: none;
        }
        
        .video-container {
          width: 100%;           /* Растягиваем на всю ширину родителя */
          max-width: 800px;      /* (Опционально) ограничиваем макс. ширину */
          margin: 0 auto;        /* Центрируем */
        }
        
        .video-container iframe {
          width: 100%;
          height: auto;
          aspect-ratio: 16 / 9;  /* Магия здесь: сохраняет пропорции 16:9 */
        }
        
        .link_game {
          /* Основные свойства кнопки */
          display: inline-flex;
          align-items: center;
          justify-content: center;
          
          /* Размеры для создания квадрата */
          width: 30%;
          height: 50px;
          
          background-color: transparent;
          border: 2px solid var(--accent-orange);
          color: var(--accent-orange);
          
          text-decoration: none;
          text-transform: uppercase;
          font-family: sans-serif;
          font-weight: bold;
          font-size: 14px;
          text-align: center;
          
          transition: all 0.3s ease;
          cursor: pointer;
        }
        
        .link_game:hover {
          background-color: #000;
          color: #fff;
        }
        
        pre {
        background-color: #1e1e1e; /* Глубокий темно-серый, как в VS Code */
        color: #d4d4d4;
        padding: 10px;
        border-radius: 8px;
        overflow-x: auto; /* Горизонтальный скролл для длинных строк */
        font-family: 'Cascadia Code', 'Fira Code', 'Consolas', monospace;
        font-size: 14px;
        line-height: 1.5;
        border: 1px solid #333;
        -webkit-font-smoothing: antialiased;
        }
        
        @media (max-width: 768px) {
        pre {
            font-size: 12px; /* Чуть меньше шрифт для мобильных */
            padding: 12px;
            margin: 8px 0;
            border-radius: 4px;
            white-space: pre; /* Сохраняем форматирование без принудительного переноса */
            }
        }
        
        .language-csharp {
            display: block;
        }