/* Удаляем переменные светлой темы и оставляем только темную */
:root {
    --bg-color: #121212;
    --text-color: #f5f5f7;
    --card-bg: rgba(30, 30, 40, 0.7);
    --card-border: rgba(80, 120, 180, 0.4);
    --card-shadow: rgba(0, 0, 0, 0.4);
    --header-bg: rgba(0, 0, 10, 0.8);
    --accent-color: #4d8edb;
    --hover-color: #5d9ef0;
    --overlay-color: rgba(0, 0, 20, 0.6);
    --text-shadow: rgba(0, 150, 255, 0.7);
    --star-color: #ffffff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    height: 100vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
}

#main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background-color: rgba(0, 0, 10, 0.5);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
}

#starfield {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: -1 !important;
    background-color: #000 !important;
    pointer-events: none; 
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-small {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: bold;
    font-size: 1.2rem;
    text-decoration: none;
    color: #fff;
}

.logo-small img {
    width: 32px;
    height: 32px;
    transition: transform 0.3s;
}

.logo-small:hover img {
    transform: rotate(360deg);
}

.main-nav {
    display: flex;
    gap: 20px;
    align-items: center;
    max-width: 100%;
}

.nav-item {
    color: #fff;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-item:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #fff;
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-item:hover:after, .nav-item.active:after {
    width: 100%;
    left: 0;
}

.nav-item.active {
    color: #000;
    font-weight: 600;
}

.nav-item.play-game {
    background-color: #333;
    color: #fff;
    border-radius: 20px;
    padding: 8px 20px;
}

.nav-item.play-game:hover {
    background-color: #000;
    transform: scale(1.05);
}

.nav-item.play-game:after {
    display: none;
}

.fullscreen-section {
    min-height: 100vh;
    width: 100%;
    position: relative;
    padding: 100px 20px; 
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

.section-content {
    background-color: rgba(13, 17, 23, 0.3); 
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 40px;
    margin: 20px auto;
    max-width: 1200px;
    width: 90%;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 40px;
    text-align: center;
    position: relative;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 120, 255, 0.8), 0 0 20px rgba(0, 70, 180, 0.6);
}

.section-title:after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    background-color: #333;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

#home {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.home-content {
    text-align: center;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    position: relative;
    z-index: 10; 
    transform: translateY(-5%); 
}

.full-name {
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
}

#about {
    background-color: transparent !important;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
}

.photo-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    height: 200px; 
    width: 100%;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: transform 0.3s;
}

/* Изображение внутри карточки */
.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 1024px) {
    .photo-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav {
        gap: 10px;
        position: relative;
        max-width: 100%;
    }
    
    .nav-item {
        padding: 6px 12px;
        font-size: 0.9em;
    }
    
    .photo-gallery {
        grid-template-columns: 1fr;
    }
    
    .section-content {
        padding: 20px;
    }
    
    .photo-item {
        height: 200px; /* Немного меньше на мобильных, но всё равно выше чем раньше */
    }
}

/* Стили для snap-scrolling */
html {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Обновляем стили для секций */
section {
    min-height: 100vh;
    padding: 80px 20px; /* Увеличиваем padding для контента */
    box-sizing: border-box;
    overflow-y: auto; /* Разрешаем скролл внутри секции */
    -webkit-overflow-scrolling: touch;
}

/* Добавляем стили для контейнера с фотографиями */
.photos-container {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding: 20px 0;
    scroll-snap-type: none; /* Отключаем snap внутри контейнера с фото */
}

/* Опционально: если проблема все еще остается */
@supports (-webkit-touch-callout: none) {
    /* Специальные стили только для Safari на iOS */
    section {
        scroll-snap-align: none;
        min-height: auto;
    }
    
    html {
        scroll-snap-type: none;
    }
}

/* Анимации для элементов */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s ease forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Обновленные стили для секции проектов */
.projects-container {
    display: grid;
    grid-template-areas: 
        "featured featured featured"
        "regular regular regular";
    gap: 30px;
    padding: 20px 0;
}

/* Стили для избранных проектов */
.featured-projects {
    grid-area: featured;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.featured-project {
    background-color: rgba(30, 30, 35, 0.3);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    min-height: 400px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.featured-project:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    background-color: rgba(30, 30, 35, 0.4);
}

.featured-project::before {
    content: 'Featured';
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.8em;
    color: var(--accent-color);
}

.featured-project-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.featured-project-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.featured-project-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.featured-project-description {
    font-size: 1.1rem;
    margin-bottom: 20px;
    flex-grow: 1;
}

.featured-project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}


.featured-project-button {
    align-self: flex-start;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 10px;
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-project-button:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Модальное окно для деталей проекта */
.project-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.project-modal-content {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 40px;
    max-width: 800px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.modal-close:hover {
    transform: rotate(90deg);
}

/* Анимации */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-show {
    animation: modalFadeIn 0.3s ease forwards;
}

/* Стили для секции новостей */
#news {
    background-color: transparent !important;
}

.news-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px;
}

.news-item {
    background-color: rgba(13, 17, 23, 0.3); /* Такая же прозрачность */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 25px;
    position: relative;
    transition: transform 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
    background-color: rgba(22, 27, 34, 0.4);
}

.news-date {
    color: var(--accent-color);
    font-size: 0.8rem;
    margin-bottom: 8px;
    font-weight: 500;
}

.news-item h3 {
    margin: 10px 0;
    font-size: 1.4em;
}

.news-item p {
    color: #e0e0e0;
    line-height: 1.6;
}

.news-preview {
    margin-bottom: 15px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

.read-more-btn {
    background-color: rgba(65, 132, 228, 0.1);
    color: #4184e4;
    border: 1px solid rgba(65, 132, 228, 0.3);
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    align-self: flex-start;
    margin-top: auto;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-align: center;
}

.read-more-btn:hover {
    background-color: rgba(65, 132, 228, 0.2);
    transform: translateY(-2px);
}

/* Стилизация скроллбара */
.news-container::-webkit-scrollbar {
    width: 8px;
}

.news-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.news-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.news-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Стили для секции контактов */
#contacts {
    background-color: transparent !important;
}

.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    background-color: rgba(13, 17, 23, 0.3); /* Такая же прозрачность */
    backdrop-filter: blur(5px);
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.1em;
}

.contact-item i {
    font-size: 1.5em;
    color: #0066cc;
}



input, textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    font-size: 1em;
    transition: border-color 0.3s;
    background-color: rgba(30, 30, 35, 0.3);
    color: #fff;
    backdrop-filter: blur(5px);
}

input:focus, textarea:focus {
    background-color: rgba(40, 40, 45, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input::placeholder, textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}


/* Фоновые бананы */
.background-ball {
    display: none !important;
}

/* Модальное окно для фото */
.photo-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px; /* Добавляем отступ от краев */
    box-sizing: border-box;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto; /* Добавляем прокрутку, если содержимое не помещается */
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh; /* Ограничиваем высоту 90% от высоты окна */
    object-fit: contain; /* Обеспечивает полное отображение фото без обрезки */
    border-radius: 5px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.8);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 30px;
    color: white;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
}

.close-modal:hover {
    background-color: rgba(255, 0, 0, 0.7);
}

/* Кнопка "вверх" */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--accent-color);
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s, background-color 0.3s;
    border: none;
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    background-color: var(--hover-color);
}


.mobile-menu-toggle {
    display: none; /* Скрываем на десктопе */
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    z-index: 1000;
}

/* Адаптивный дизайн */
@media (max-width: 768px) {
    .header-content {
        justify-content: space-between; /* Размещаем логотип и кнопку меню по краям */
    }
    
    .mobile-menu-toggle {
        display: block; /* Показываем на мобильных */
    }
    
    .main-nav {
    position: fixed;
        top: 0;
        right: -100%; /* Начальное положение меню за пределами экрана */
        width: 80%; /* Ширина выпадающего меню */
        height: 100vh; /* Высота на весь экран */
        background-color: rgba(0, 0, 0, 0.9);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 70px 20px 20px;
        transition: right 0.3s ease;
        z-index: 999;
    }
    
    .main-nav.active {
        right: 0; /* Положение меню при активации */
    }
    
    .nav-item {
        margin: 10px 0;
        font-size: 1.1rem;
        width: 100%;
        text-align: center;
    }
    
    /* Стили для социальных иконок в мобильном меню */
    .social-icons {
        display: flex;
        justify-content: center;
        margin-top: 20px;
        gap: 15px;
    }
    
    .logo-small span {
        display: none;
    }
    
    .home-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .project-card, .contact-info, .contact-form {
        min-width: 100%;
    }
    
    /* Уменьшаем количество и размер вращающихся элементов */
    .rotating-element:nth-child(4),
    .rotating-element:nth-child(5) {
        display: none;
    }
    
    .rotating-element {
        width: 100px !important;
        height: 100px !important;
    }
    
    /* Улучшаем читаемость текста */
    .section-content {
        background-color: rgba(0, 0, 0, 0.6);
        padding: 20px;
        border-radius: 10px;
    }
    
    /* Усиливаем контраст для улучшения читаемости на мобильных */
    .background-effects::after {
        background-color: rgba(0, 0, 30, 0.7);
    }
    
    /* Более непрозрачные карточки */
    .project-card, .news-item, .photo-item, .contact-form, .contact-info {
        background-color: rgba(0, 10, 30, 0.8);
        backdrop-filter: blur(10px);
    }
}

/* Анимации появления элементов */
.animate-in {
    animation: fadeInUp 1s forwards;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s, transform 0.8s;
}

.fade-in.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.slide-in {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s, transform 0.8s;
}

.slide-in.slide-in {
    opacity: 1;
    transform: translateX(0);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Улучшения для секции Who Am I */
#about .photo-gallery {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s 0.3s, transform 1s 0.3s;
}

#about.animate-in .photo-gallery {
    opacity: 1;
    transform: translateY(0);
}

/* Анимация легкой пульсации для фона */
@keyframes pulse-bg {
    0% {
        transform: scale(1);
        filter: brightness(0.8) hue-rotate(0deg);
    }
    100% {
        transform: scale(1.05);
        filter: brightness(1) hue-rotate(10deg);
    }
}

/* Эффект свечения при наведении */
.project-card:hover, .news-item:hover, .photo-item:hover {
    box-shadow: 0 0 30px rgba(50, 100, 255, 0.5);
    border-color: rgba(100, 180, 255, 0.5);
}

/* Стиль для обычного текста */
p, .tech-tag, li {
    color: #e0e0e0;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
}

/* Стили для видеофона */
#background-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    transition: opacity 1s;
}

/* Canvas для звездного фона */
#stars-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
}

/* Добавляем полупрозрачное затемнение для каждой секции для лучшей читаемости */
.fullscreen-section::before {
    content: none;
}

/* Обновляем стили для кнопок и ссылок */
.nav-item, .submit-btn, .project-link, .back-to-top {
    background-color: rgba(20, 20, 25, 0.9);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3),
                inset 0 0 5px rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.nav-item:hover, .submit-btn:hover, .project-link:hover, .back-to-top:hover {
    background-color: rgba(40, 40, 45, 0.9);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4),
                inset 0 0 8px rgba(255, 255, 255, 0.2);
}

/* Стили для форм ввода */
input, textarea {
    background-color: rgba(0, 20, 40, 0.4);
    color: var(--text-color);
    border: 1px solid var(--card-border);
}

input:focus, textarea:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 8px rgba(50, 150, 255, 0.5);
}

/* Переключатель темы */
.theme-toggle {
    display: none;
}

.theme-toggle:hover {
    color: var(--accent-color);
}

/* Стили для игр */
.games-container {
    max-width: 1200px;
    margin: 100px auto 0;
    padding: 20px;
}

.games-title {
    text-align: center;
    margin-bottom: 50px;
}

.games-menu {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.game-option {
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.game-option:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px var(--card-shadow);
}

.game-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.start-game-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 30px;
    margin-top: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.start-game-btn:hover {
    background-color: var(--hover-color);
}

#game {
    width: 100%;
    height: 500px;
    display: flex;
    flex-direction: column;
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    margin-top: 30px;
}

.game-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 1.2rem;
    font-weight: bold;
}

#game-area {
    flex: 1;
    position: relative;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.back-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    margin-top: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
    align-self: center;
}

.back-btn:hover {
    background-color: var(--hover-color);
}

.red-ball {
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url('icons/sticker.webp');
    background-size: cover;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.red-ball:hover {
    transform: scale(1.1);
}

.game-over {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: var(--text-color);
    text-align: center;
    background-color: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 20px var(--card-shadow);
}

/* Улучшаем читаемость текста на фоне GIF */
h1, h2, h3, h4, h5, h6 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

p, li, span, label {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

/* Делаем карточки более контрастными для лучшей читаемости */
.project-card, .news-item, .photo-item, .contact-form, .contact-info, .game-option {
    background-color: rgba(13, 17, 23, 0.3); /* Такая же прозрачность */
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 20px rgba(0, 30, 100, 0.3);
}

/* Стили для анимации центрального изображения */
.center-image-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    overflow: visible;
}

.center-avatar {
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 30px rgba(0, 100, 255, 0.5);
    border: 3px solid rgba(255, 255, 255, 0.3);
    z-index: 10;
    transform-origin: center center;
}

/* Скрываем изображение изначально, чтобы избежать мигания при загрузке */
.center-avatar.init {
    opacity: 0;
    transform: scale(3);
}

/* Стили для анимации имени */
.name-animation-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    width: 100%;
    margin-bottom: 40px;
}

/* Стили для инициалов ZA */
.initials {
    position: absolute;
    font-size: 6rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 20px rgba(100, 200, 255, 0.8);
    opacity: 0; /* Начально скрыты */
    transform: scale(1.2);
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Полное имя */
.full-name {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow: visible;
}

/* Стили для слов */
.word {
    position: relative;
    overflow: visible;
    display: flex;
    align-items: center;
    height: 100px;
}

/* Общие стили для обоих слов */
.first-word, .second-word {
    font-size: 3.2rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(100, 200, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.2rem;
}

/* Пробел между словами */
.word-space {
    width: 2rem;
}

/* Стили для отдельных букв */
.letter {
    display: inline-block;
    opacity: 0; /* Начально скрыты */
    transform: translateX(-20px); /* Сдвинуты влево для анимации */
    margin: 0 -1px; /* Отрицательный margin для сближения букв */
    position: relative;
}

/* Первая буква в каждом слове */
.first-letter {
    margin-left: 0;
}

/* Стиль для подзаголовка */
.home-subtitle {
    text-align: center;
    font-size: 1.4rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
    color: #e0e0e0;
    margin-top: 20px;
    opacity: 0; /* Начально скрыт */
    letter-spacing: 1px;
}

/* Стили для остальных элементов на сайте */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
}

p, span, a, button, input, textarea, .nav-item {
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
    .initials {
        font-size: 4.5rem;
    }
    
    .first-word, .second-word {
        font-size: 2.5rem;
    }
    
    .word-space {
        width: 1rem;
    }
    
    .home-subtitle {
        font-size: 1.1rem;
    }
}

.absolute-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    text-align: center;
    z-index: 10;
}

/* Обновление для логотипа в навигации */
.logo, .nav-logo, .nav-brand, nav a:first-child {
    font-family: 'Orbitron', sans-serif !important;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Обновления для анимации имени */
.initials {
    font-family: 'Orbitron', sans-serif !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.first-word, .second-word {
    font-family: 'Orbitron', sans-serif !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.letter {
    font-family: 'Orbitron', sans-serif !important;
}

/* Если у вас есть другие места, где встречается ваше имя */
.author-name, .profile-name, .copyright-name {
    font-family: 'Orbitron', sans-serif !important;
}

/* Основной контейнер слайдера */
.photo-slider-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px 0;
    overflow: visible;
}

/* Обертка трека для обрезки контента */
.photos-track-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding: 30px 0;
}

/* Трек с фотографиями */
.photos-track {
    display: flex;
    width: 100%;
    gap: 20px;
    padding: 0 20px;
    transition: transform 0.6s ease;
}

/* Стили для слайдов */
.photo-slide {
    flex: 0 0 22%; /* Уменьшаем ширину для более вертикальной формы */
    transition: all 0.5s ease;
    position: relative;
    transform-origin: center center;
    transform-style: preserve-3d;
    perspective: 1000px;
    margin: 0 10px;
}

/* Карточка с фотографией - сильно вертикальный формат */
.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    aspect-ratio: 2/5; /* Выраженные вертикальные пропорции */
    width: 100%;
    cursor: pointer;
    transition: all 0.5s ease;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Стили для изображения - принудительно растягиваем по вертикали */
.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Заполняет все пространство */
    object-position: center; /* Центрирует изображение */
    transition: transform 0.5s;
}

/* Эффект при наведении */
.photo-slide:not(.active):hover .photo-item {
    transform: translateZ(10px) scale(0.98);
    filter: brightness(0.95);
}

/* Подпись к фото */
.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    backdrop-filter: blur(3px);
    transition: transform 0.3s;
}

/* Кнопки управления слайдером */
.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    z-index: 20;
    opacity: 0.7;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-button:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.8);
}

.prev-button {
    left: 10px;
}

.next-button {
    right: 10px;
}

/* Индикаторы слайдов */
.slider-indicators {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.indicator.active {
    background: #fff;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(100, 200, 255, 0.8);
}

/* Адаптивность */
@media (max-width: 992px) {
    .photo-slide {
        flex: 0 0 45%;
    }
}

@media (max-width: 576px) {
    .photo-slide {
        flex: 0 0 85%;
    }
}

/* Стили для слайдера в стиле AI_VAZOVSKY */
.team-slider-container {
    width: 100%;
    max-width: 1200px;
    margin: 50px auto;
    overflow: hidden;
    position: relative;
}

.team-slider {
    display: flex;
    gap: 0; /* Убираем зазоры между слайдами */
    transition: transform 0.4s ease;
    cursor: grab;
}

.team-slide {
    flex: 0 0 16.6666%; /* По умолчанию 6 слайдов */
    min-width: 0;
    padding: 0 5px;
    box-sizing: border-box;
    transition: all 0.4s ease;
}

.team-slide.active {
    flex: 0 0 33.3333%; /* Активный слайд занимает 2x ширины */
}

.team-photo {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    aspect-ratio: 3/5; /* Вертикальные пропорции как в примере */
    background-color: #f0f0f0;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: all 0.4s ease;
    filter: grayscale(100%); /* Все фото черно-белые */
}

.team-slide.active .team-photo img {
    filter: grayscale(0); /* Активное фото цветное */
}

.team-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s;
}

.team-slide.active .team-caption {
    opacity: 1; /* Показываем подпись только для активного слайда */
}

/* Адаптивность для разных экранов */
@media (max-width: 992px) {
    .team-slide {
        flex: 0 0 25%; /* 4 слайда на средних экранах */
    }
    
    .team-slide.active {
        flex: 0 0 50%; /* Активный слайд занимает половину */
    }
}

@media (max-width: 576px) {
    .team-slide {
        flex: 0 0 33.3333%; /* 3 слайда на маленьких экранах */
    }
    
    .team-slide.active {
        flex: 0 0 66.6666%; /* Активный слайд занимает 2/3 */
    }
}

/* Определяем браузер Safari */
@media not all and (min-resolution:.001dpcm) { 
    @supports (-webkit-appearance:none) {
        html {
            scroll-snap-type: none;
        }
        
        section {
            scroll-snap-align: none;
        }
    }
}

/* Стили для проектов */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.project-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    overflow: hidden; /* Предотвращаем выход содержимого за границы */
}

.project-content p {
    flex-grow: 1;
    margin-bottom: 0;
    overflow: auto;
    max-height: 120px;
    /* Улучшаем стиль скроллбара */
    scrollbar-width: thin; /* Firefox */
    scrollbar-color: rgba(65, 132, 228, 0.3) rgba(0, 0, 0, 0.1); /* Firefox */
}

/* Стили скроллбара для Webkit (Chrome, Safari) */
.project-content p::-webkit-scrollbar {
    width: 6px;
}

.project-content p::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.project-content p::-webkit-scrollbar-thumb {
    background: rgba(65, 132, 228, 0.3);
    border-radius: 3px;
}

.project-card {
    background-color: rgba(13, 17, 23, 0.3);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 480px; /* Увеличиваем минимальную высоту */
    height: auto; /* Позволяем карточке адаптироваться к содержимому */
    position: relative;
    backdrop-filter: blur(5px);
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 100, 255, 0.2);
}

.project-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
}

.project-content h3 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    color: #fff;
}

.project-card p {
    color: #ccc;
    margin-bottom: 20px;
    flex-grow: 1;
 /* Добавляем прокрутку для длинного текста */
    max-height: 120px;
}

.tech-stack {
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding-top: 10px;
    padding-bottom: 5px;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: 80px; /* Ограничиваем высоту блока тегов */
    overflow-y: auto; /* Добавляем вертикальную прокрутку при необходимости */
}

/* Стилизация скроллбара для tech-stack */
.tech-stack::-webkit-scrollbar {
    width: 4px;
}

.tech-stack::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.tech-stack::-webkit-scrollbar-thumb {
    background: rgba(65, 132, 228, 0.3);
    border-radius: 3px;
}

.tech-tag {
    background: rgba(65, 132, 228, 0.2);
    color: rgba(65, 132, 228, 1);
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.8em;
    white-space: nowrap;
    margin-bottom: 5px;
    display: inline-block;
}

.tech-tag.more-tags {
    background: rgba(100, 100, 100, 0.3);
    color: #ddd;
    font-style: italic;
}

.project-card, .featured-project {
    display: flex;
    flex-direction: column;
}

.project-card p, .featured-project p {
    flex-grow: 1;
    margin-bottom: 10px;
}


.project-link {
    display: inline-block;
    background-color: rgba(65, 132, 228, 0.1);
    color: #4184e4;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-align: center;
    border: 1px solid rgba(65, 132, 228, 0.3);
}

.project-link:hover {
    background-color: rgba(65, 132, 228, 0.2);
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: rgba(255, 193, 7, 0.2);
    color: #ffc107;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .project-card {
        min-height: auto; /* Для мобильных устройств полностью адаптивная высота */
        height: auto;
    }
}

.github-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    opacity: 0.7;
    transition: all 0.3s ease;
    z-index: 10;
}

.project-card:hover .github-icon {
    opacity: 1;
    transform: scale(1.1);
}


/* Стили для контактной секции */
#contact {
    background-color: #120824;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    position: relative;
}

#contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(65, 132, 228, 0.3) 0%, rgba(18, 8, 36, 0) 70%);
    pointer-events: none;
}

.contact-wrapper {
    max-width: 700px;
    width: 100%;
    padding: 0 20px;
    z-index: 1;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    color: #fff;
    font-size: 3.5rem;
    margin-bottom: 10px;
    text-align: center;
    font-weight: normal;
    text-shadow: 0 0 15px rgba(65, 132, 228, 0.3);
}

.contact-subtitle {
    text-align: center;
    color: #fff;
    margin-bottom: 40px;
    font-weight: 300;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #fff;
    padding: 15px 30px;
    font-size: 1rem;
    border-radius: 20px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.8s ease;
    margin-top: 10px;
}

.form-group:hover {
    transform: scale(1.05); /* Увеличение при наведении */
    background-color: rgba(65, 132, 228, 0.3); /* Изменение фона при наведении */
    cursor: pointer;
}

.form-group label {
    color: #ffffff;
    font-size: 0.9rem;
    margin-left: 15px;
    font-family: 'Montserrat', sans-serif;
}

.contact-form input,
.contact-form textarea {
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(65, 132, 228, 0.3);
    border-radius: 5px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: rgba(128, 0, 128, 0.5);
    outline: none;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.submit-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    padding: 15px 30px;
    font-size: 1rem;
    border-radius: 30px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.8s ease;
    margin-top: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.submit-btn:hover {
    background-color: rgba(65, 132, 228, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(65, 132, 228, 0.3);
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 10px;
    }
}

.news-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.news-modal-content {
    position: relative;
    background-color: rgba(25, 25, 35, 0.95);
    padding: 25px;
    width: 80%;
    max-width: 800px;
    max-height: 80vh;
    border-radius: 15px;
    box-shadow: 0 0 20px rgba(65, 132, 228, 0.3);
    animation: modalFadeIn 0.3s ease-out;
    overflow-y: auto; /* Добавляем прокрутку */
}

.news-modal-header {
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

.modal-title {
    color: #fff;
    margin: 0;
    font-family: 'Orbitron', sans-serif;
}

.modal-date {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9em;
    margin-top: 5px;
}

.news-modal-body {
    display: flex;
    flex-direction: column;
    overflow-y: auto; /* Добавляем прокрутку */
}

.modal-text {
    color: #fff;
    line-height: 1.6;
    margin-bottom: 15px;
}

.modal-image {
    margin-top: 15px;
}

.modal-image img {
    width: 100%;
    max-height: 400px;
    border-radius: 10px;
    object-fit: cover;
}

.news-modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s;
}

.news-modal-close:hover {
    color: rgba(65, 132, 228, 1);
}

@media (max-width: 768px) {
    .news-modal-content {
        width: 95%;
    }
}

.news-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 20px auto;
    max-width: 1000px;
    width: 90%;
}

.news-item {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
}

/* Увеличиваем области изображений */
.news-image {
    width: 300px;
    height: 180px;
    overflow: hidden;
    flex-shrink: 0;
}

/* Увеличиваем отступы в контенте */
.news-content {
    padding: 25px 30px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-item:hover .news-image img {
    transform: scale(1.05);
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .news-card {
        flex-direction: column;
    }
    
    .news-image {
        width: 100%;
        height: 200px;
    }
}

.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.news-card {
    display: flex;
    background-color: rgba(13, 17, 23, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
}

.news-item h3 {
    margin: 0 0 15px 0;
    font-size: 1.4rem;
    color: #fff;
}

.news-preview {
    margin-bottom: 15px;
    color: #ccc;
    font-size: 0.9rem;
    line-height: 1.6;
    flex-grow: 1;
}

.news-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 100, 255, 0.2);
}

@media (max-width: 768px) {
    .news-card {
        flex-direction: column;
    }
    
    .news-image {
        width: 100%;
    }
}

/* Стили для скроллбара в модальном окне */
.news-modal-content::-webkit-scrollbar {
    width: 8px;
}

.news-modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.news-modal-content::-webkit-scrollbar-thumb {
    background: rgba(65, 132, 228, 0.5);
    border-radius: 10px;
}

.news-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(65, 132, 228, 0.7);
}

/* Стили для team-slider (добавлены из team-slider.js) */
.team-modal-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.team-modal-container.visible {
    opacity: 1;
}

.team-modal-content {
    position: relative;
    background-color: rgba(20, 20, 20, 0.85);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 80%;
    max-height: 80%;
    overflow: hidden;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.team-modal-container.visible .team-modal-content {
    transform: scale(1);
}

.team-modal-image {
    display: block;
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
    object-fit: contain;
}

.team-modal-caption {
    color: white;
    padding: 15px 0 5px 0;
    text-align: center;
    font-size: 18px;
    font-weight: 500;
}

.team-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 1;
}

.team-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

.team-slider-container {
    overflow: hidden;
    position: relative;
}

.team-slider {
    display: flex;
    will-change: transform;
    box-sizing: border-box;
}

.team-slide {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    flex-shrink: 0;
    margin-right: 20px;
    box-sizing: border-box;
}

.team-slide img {
    transition: transform 0.3s ease, filter 0.3s ease;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
}

.team-slide.active img {
    filter: grayscale(0%);
}

.team-caption {
    opacity: 0.7;
    transform: translateY(5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.team-slide.active .team-caption {
    opacity: 1;
    transform: translateY(0);
}

.team-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.3s ease;
}

.team-slider-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.team-slider-nav.prev {
    left: 10px;
}

.team-slider-nav.next {
    right: 10px;
}

.slider-indicators {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 8px;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s ease;
}

.slider-dot.active {
    background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    .team-modal-content {
        max-width: 95%;
    }
    
    .team-modal-image {
        max-height: 60vh;
    }
    
    .team-modal-caption {
        font-size: 16px;
        padding: 15px 10px 5px;
        line-height: 1.3;
    }
    
    .team-slider-nav {
        width: 32px;
        height: 32px;
    }
    
    .slider-dot {
        width: 8px;
        height: 8px;
    }
    
    .team-caption {
        display: none;
    }
}

/* Стили для starfield-canvas */
.starfield-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: #000;
    pointer-events: none;
}
