body {
    background-color: #1a1a2e;
    color: #ffffff;
    font-family: sans-serif;
    margin: 0;
    position: relative;
    overflow-x: hidden;
}

#particle-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

main {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    min-height: 100vh;
    text-align: center;
    padding-top: 100px;
}

#sidebar {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 600px;
    height: 400px;
    z-index: 2;
}

.character-container {
    width: 100%;
    height: 100%;
    background-image: url('assets/_Idle.png');
    background-size: 6000px 400px;
    cursor: pointer;
    transition: transform 0.3s ease;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    transform: scaleX(-1);
}

.character-container:hover {
    transform: scaleX(-1.02);
}

#content-wrapper {
    position: relative;
    z-index: 1;
    margin-top: 50px;
    padding-bottom: 50px;
}

.content-block {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background-color: rgba(26, 26, 46, 0.7);
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.content-block.left-image {
    flex-direction: row;
}

.content-block.right-image {
    flex-direction: row-reverse;
}

.text-content {
    flex: 1;
    padding: 20px;
}

.text-content h2 {
    font-size: 2em;
    color: #B22222;;
    margin-bottom: 10px;
}

.text-content p {
    font-size: 1.1em;
    line-height: 1.6;
}

.image-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
    padding: 20px;
}

.image-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease;
}

.image-content img:hover {
    transform: scale(1.03);
}

/* Стили для анимированных спрайтов */
.sprite-animation {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    background-repeat: no-repeat;
    background-position: 0 0;
    margin-bottom: 20px;
    border-radius: 8px;
    transition: transform 0.3s ease;
}



@media (max-width: 768px) {
    .content-block {
        flex-direction: column !important;
        text-align: center;
    }

    .image-content {
        margin-top: 20px;
    }

    .sprite-animation {
        width: 100% !important;
        height: auto !important;
    }
}

#portfolio-button {
    margin-top: 20px;
    padding: 15px 30px; /* Можете подкорректировать по необходимости */
    font-size: 1.2em;
    font-weight: bold;
    color: #ffffff; /* Белый цвет текста */
    background-color: transparent; /* Убираем фоновый цвет */
    border: 2px solid #ff0000; /* Красная рамка */
    border-radius: 50px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease; /* Изменил на all для более универсального перехода */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: inline-block;
    letter-spacing: 1px; /* Можно добавить небольшой отступ между буквами для "GAME?" */
}

#portfolio-button:hover {
    background-color: rgba(255, 0, 0, 0.1); /* Легкий красный фон при наведении */
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4); /* Чуть более выраженная тень при наведении */
}

#portfolio-button:active {
    transform: translateY(0);
    background-color: rgba(255, 0, 0, 0.2); /* Более заметный фон при нажатии */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Styling for the tab container */
.tabs {
display: flex;
    justify-content: center;
    margin-top: 50px; /* Уменьшим или удалим этот отступ, если нужно прижать сверху */
    position: relative;
    z-index: 1;

    /* Новые стили для прилегания */
    width: 80%; /* Соответствует ширине .tab-content */
    max-width: 1200px; /* Соответствует max-width .tab-content */
    margin-left: auto;
    margin-right: auto;
    top: 30px; /* Отступ от нижнего края кнопок до верхнего края контента */
    padding: 0 20px; /* Добавим небольшой padding, чтобы кнопки не упирались в края */
}

/* Styling for tab buttons */
.tab-button {
     padding: 15px 30px;
    margin: 0 5px;
    border: 2px solid transparent;
    background-color: rgba(26, 26, 46, 0.7); /* Цвет как у контентного блока */
    color: #ffffff;
    cursor: pointer;
    border-radius: 10px 10px 0 0; /* Скругленные только сверху */
    box-shadow: none; /* Убираем тень */
    font-size: 1.2em;
    font-weight: bold;
    flex-grow: 1; /* Чтобы кнопки занимали доступное пространство */
    max-width: 200px; /* Ограничим ширину кнопок */
    text-align: center;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2); /* Очень мягкая граница */
    box-shadow: 0 0 2px rgba(255, 255, 255, 0.3), /* Внутреннее свечение */
                0 0 4px rgba(255, 255, 255, 0.2); /* Внешнее свечение */
}

.tab-button:hover {
   background-color: rgba(40, 40, 60, 0.8); /* Чуть светлее при наведении */
    transform: none; /* Убираем эффект поднятия */
    box-shadow: none;
    border-color: #ff0000; /* Цвет красной рамки при наведении */
    box-shadow: 0 0 5px rgba(255, 255, 255, 0.6), /* Усиление при наведении */
                0 0 15px rgba(255, 0, 0, 0.7); /* Красное свечение */
}

.tab-button.active {
     background-color: #1a1a2e; /* Более темный цвет для активной вкладки, как у основного фона */
    transform: none;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.5); /* Тень сверху для активной вкладки */
    z-index: 2; /* Активная вкладка поверх */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: none; /* Убираем нижнюю границу, чтобы сливалась с контентом */
    box-shadow: 0 0 8px #ffffff,
                0 0 12px #ffffff;
    border: 1px solid #ffffff;
}

/* Hide all tab content by default */
.tab-content {
    display: none;
    padding: 20px;
    background-color: rgba(26, 26, 46, 0.7);
    border-radius: 0 10px 10px 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
     margin: 0px auto; /* Убираем верхний margin, чтобы прилегал к вкладкам */
    border-top-left-radius: 0; /* Убираем скругление сверху слева у контента по умолчанию */
    border-top-right-radius: 0; /* Убираем скругление сверху справа у контента по умолчанию */
    border-radius: 0 0 10px 10px; /* Скругляем только снизу */
    margin-top: -1px; /* Сдвигаем вверх, чтобы перекрыть нижнюю границу вкладок */
}

/* Show the active tab content */
.tab-content.active {
    display: block;
}

/* Basic styling for the TZ content */
.tz-section {
    margin-bottom: 20px;
}

.tz-section h2, .tz-section h3 {
    color: #DC143C; /* A crimson red for the headers */
}

.tz-section ul {
    list-style-type: none;
    padding-left: 0;
}

.tz-section li {
    background-color: rgba(40, 40, 60, 0.5);
    padding: 10px;
    margin-bottom: 5px;
    border-radius: 5px;
}

/* Для активной вкладки, если нужно, можно вернуть скругления, но лучше оставить так */
#portfolio-content.active {
    border-top-left-radius: 10px; /* Если Портфолио - первая вкладка, вернуть скругление слева */
}

#tz-content.active {
    border-top-right-radius: 10px; /* Если ТЗ - вторая вкладка, вернуть скругление справа */
}

.mechanics-block {
    padding: 20px;
}

.mechanics-block h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2em;
    color: #FFD700; /* Gold color for main header */
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.mechanics-block h3 {
    color: #ff6347; /* Tomato color for sub-headers */
    border-bottom: 2px solid #ff6347;
    padding-bottom: 5px;
}

.mechanics-block p {
    line-height: 1.6;
    margin-bottom: 15px;
}

.mechanics-block strong {
    color: #ffff99;
}

/* Убираем стандартные маркеры и отступы у списка */
#LyI {
    padding-left: 1; /* Убираем левый отступ у всего списка */
}

/* Настраиваем каждый элемент списка, чтобы он выглядел как абзац */
#LyI li {
    margin-left: 0; /* Убираем отступ у каждого элемента, если он есть */
    margin-bottom: 1em; /* Добавляем отступ между "абзацами" */
}