/* Прелоадер */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 25%, #16213e 50%, #0f3460 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
    color: #fff;
}

.preloader-logo h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #ffffff 0%, #ffcc00 50%, #ff6b6b 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite, preloaderPulse 2s ease-in-out infinite alternate;
    letter-spacing: 0.1em;
}

.preloader-subtitle {
    font-size: clamp(0.8rem, 2vw, 1.2rem);
    color: #ffcc00;
    margin-top: 10px;
    letter-spacing: 0.3em;
    font-weight: 300;
    opacity: 0.8;
}

.preloader-progress {
    margin: 40px 0;
}

.progress-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 15px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ffcc00, #ff6b6b);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: progressShine 2s infinite;
}

@keyframes progressShine {
    0% { left: -100%; }
    100% { left: 100%; }
}

.progress-text {
    font-size: 14px;
    color: #ccc;
    font-weight: 300;
}

.preloader-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.dot {
    width: 8px;
    height: 8px;
    background: #ffcc00;
    border-radius: 50%;
    animation: dotBounce 1.4s infinite ease-in-out;
}

.dot:nth-child(1) { animation-delay: -0.32s; }
.dot:nth-child(2) { animation-delay: -0.16s; }
.dot:nth-child(3) { animation-delay: 0s; }

@keyframes dotBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

@keyframes preloaderPulse {
    from { 
        filter: drop-shadow(0 0 20px rgba(255, 204, 0, 0.3));
        transform: scale(1);
    }
    to { 
        filter: drop-shadow(0 0 30px rgba(255, 204, 0, 0.6));
        transform: scale(1.02);
    }
}

/* Скрываем контент пока идет загрузка */
body.loading {
    overflow: hidden;
}

body.loading .sidebar,
body.loading .burger,
body.loading .blurred-bar,
body.loading main,
body.loading .section {
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
}

/* Добавляем готовность к анимации */
.sidebar,
.burger,
.blurred-bar,
main,
.section {
    transition: opacity 0.6s ease, transform 0.6s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

html, body {
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, #0f0f0f 0%, #1a1a2e 25%, #16213e 50%, #0f3460 100%);
    color: #fff;
    height: 100%;
    margin: 0; 
    padding: 0;
    position: relative;
}

/* Добавляем анимированный фон */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(255, 177, 153, 0.3) 0%, transparent 50%);
    animation: backgroundFloat 20s ease-in-out infinite;
    z-index: -1;
}

main {
    width: 100%;
}

/* Боковая панель с glassmorphism эффектом */
.sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

.sidebar.active {
    left: 0;
    animation: slideInLeft 0.4s ease-out;
}

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.sidebar ul {
    list-style: none;
    padding: 20px;
    margin-top: 60px;
}

.sidebar ul li {
    margin: 20px 0;
}

.sidebar ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 10px 15px;
    display: block;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.sidebar ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.sidebar ul li a:hover::before {
    left: 100%;
}

.sidebar ul li a:hover {
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.1);
    transform: translateX(5px);
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.5);
}

.burger {
    position: fixed;
    top: 20px;
    left: 20px;
    font-size: 24px;
    color: #fff;
    cursor: pointer;
    z-index: 1100;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.burger:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.burger.active {
    color: #ffcc00;
    transform: rotate(90deg) scale(1.1);
    background: rgba(255, 204, 0, 0.2);
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.4);
}

/* Размытый заголовок с современным дизайном */
.blurred-bar {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 100vw;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    z-index: 900;
    transition: all 0.3s ease;
}

.blurred-bar:hover {
    background: rgba(255, 255, 255, 0.08);
}

.social-icons {
    display: flex;
    gap: 20px;
}

.social-icons a {
    color: #fff;
    font-size: 20px;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 50%;
    position: relative;
    overflow: hidden;
}

.social-icons a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 204, 0, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.social-icons a:hover::before {
    width: 40px;
    height: 40px;
}

.social-icons a:hover {
    color: #ffcc00;
    transform: translateY(-2px) scale(1.1);
    text-shadow: 0 0 15px rgba(255, 204, 0, 0.6);
}

.hero-quote {
    font-size: 16px !important;
    color: #919191 !important;
    margin-top: 10px;
    font-style: italic;
}

@media (min-width: 601px) {
    .hero-quote {
        font-size: 18px;
    }
}

.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at center, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* --- HERO MODEL: canvas свободно позиционируется справа --- */
.hero-model {
    position: absolute;
    top: 10vh;
    right: 0vw; /* Позиционируем справа, частично за экраном */
    width: 80vw !important; /* Уменьшаем на 20% от оригинала */
    height: 80vh !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 0;
    min-height: 0;
    background: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    pointer-events: none;
}

.hero-model canvas {
    width: 100% !important;
    height: 100% !important;
    display: block;
    background: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    image-rendering: auto !important;
}

@media (max-width: 900px) {
    .hero-model {
        position: relative;
        top: 0;
        right: 0;
        width: 100vw !important;
        height: 50vh !important;
        border-radius: 1000px !important;
        margin-top: 20px;
    }
    .hero-model canvas {
        border-radius: 1000px !important;
    }
}

.hero-content {
    position: relative !important;
    z-index: 1000 !important;
    display: flex;
    flex-direction: row;
    align-items: center; /* Было flex-start, теперь центрируем по вертикали */
    gap: 40px;
    width: 100%;
    max-width: 1400px;
    padding: 40px 40px 0 40px;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1;
    padding: 20px 0 20px 0;
    text-align: left;
    animation: fadeInLeft 1s ease-out;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Центрируем текст по вертикали внутри блока */
    height: 100%;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-text h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 20px;
    font-weight: 700;
    background: linear-gradient(135deg, #ffffff 0%, #ffcc00 50%, #ff6b6b 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease infinite, textGlow 2s ease-in-out infinite alternate;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes textGlow {
    from { filter: drop-shadow(0 0 10px rgba(255, 204, 0, 0.3)); }
    to { filter: drop-shadow(0 0 20px rgba(255, 204, 0, 0.6)); }
}

.hero-text p {
    font-size: clamp(1rem, 3vw, 1.2rem);
    color: #e0e0e0;
    margin-bottom: 20px;
    line-height: 1.6;
    font-weight: 300;
}

.hero-quote {
    font-size: clamp(0.9rem, 2.5vw, 1.1rem);
    color: #ffcc00;
    margin: 20px 0;
    font-style: italic;
    padding: 15px;
    border-left: 3px solid #ffcc00;
    background: rgba(255, 204, 0, 0.05);
    border-radius: 0 8px 8px 0;
}

.hero-link {
    color: #ffcc00;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    padding: 10px 20px;
    border: 2px solid #ffcc00;
    border-radius: 25px;
    display: inline-block;
    margin-top: 20px;
    background: transparent;
    overflow: hidden;
}

.hero-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 204, 0, 0.2), transparent);
    transition: left 0.6s;
}

.hero-link:hover::before {
    left: 100%;
}

.hero-link:hover {
    color: #000;
    background: #ffcc00;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 204, 0, 0.3);
}

/* Удалены дублирующиеся правила для .hero-model */

@media (max-width: 900px) {
    .hero-model {
        width: 100vw !important;
        min-width: 0 !important;
        height: 400px !important;
        max-width: 100vw !important;
        max-height: 50vh !important;
        align-items: flex-end;
        margin-top: 24px;
        border-radius: 1000px !important;
    }
    .hero-model canvas {
        border-radius: 1000px !important;
    }
}

@media (min-width: 1025px) {
    .hero-model {
        max-width: 1600px !important;
        height: 1200px !important;
    }
}

/* Адаптивность для планшетов и десктопов */
@media (min-width: 601px) {
    .hero-text h1 {
        font-size: 96px;
    }
}


.hero-link {
    color: #ffcc00;
    text-decoration: none;
    transition: color 0.3s;
}

.hero-link:hover {
    color: #e6b800;
}

/* Удалены дублирующиеся правила для .hero-model */

#modelCanvas {
    width: 100%;
    height: 100%;
}

/* Адаптивность для планшетов и десктопов */
@media (min-width: 601px) {
    .hero-content {
        flex-direction: row; /* Слева направо на планшетах и десктопах */
        justify-content: space-between;
    }

    .hero-text {
        text-align: left;
        flex: 0.5; /* Текст занимает половину пространства */
    }

/* Удалены дублирующиеся правила для .hero-model в media queries */
}

/* Удалены дублирующиеся правила для .hero-model */

/* Удалены дублирующиеся правила для .hero-model */

/* ... (остальной код остается без изменений) */

#modelCanvas {
    width: 100%;
    height: 100%;
}

/* Категории и карусель */
#works {
    padding: 20px 10px;
    text-align: center;
    width: 100%;
    max-width: 100vw;
    position: relative !important;
}

.categories {
    margin-bottom: 20px;
}

.category-btn {
    position: relative;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    overflow: hidden;
}

.category-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.category-btn:hover::before {
    left: 100%;
}

.category-btn:hover,
.category-btn.active {
    background: rgba(255, 204, 0, 0.2);
    border-color: #ffcc00;
    color: #ffcc00;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 204, 0, 0.3);
}

.carousel {
    column-width: 140px;
    column-gap: 10px;
    padding: 10px;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    min-height: 1200px; /* Фиксированная минимальная высота, чтобы вместить все работы */
    z-index: 200;
}

.carousel-item {
    break-inside: avoid;
    margin-bottom: 10px;
    cursor: pointer;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s ease-out forwards;
    z-index: 200;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border-radius: 12px;
    position: relative;
}

.carousel-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border: 2px solid #ffcc00; /* Подсветка при наведении */
}

.carousel-item.frame-active {
    border: 3px solid #ffcc00;
    box-shadow: 0 0 20px rgba(255, 204, 0, 0.6);
    transform: scale(1.05);
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255, 204, 0, 0.1), rgba(255, 107, 107, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.carousel-item:hover::before {
    opacity: 1;
}


.carousel-item.has-project {
    box-shadow: 0 4px 10px rgb(255, 204, 0); /* Увеличенная тень */
}

.carousel-item.has-project:hover img, .carousel-item.has-project:hover video {
    transform: scale(1.1); /* Больше увеличение при наведении */
    box-shadow: 0 6px 30px rgb(255, 204, 0); /* Увеличенная тень при наведении */
}


.carousel-item:nth-child(2n) {
    opacity: 1;
    animation-delay: 0.2s;
}

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

.carousel-item img, .carousel-item video {
    width: 100%;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s;
    z-index: 200;
}

.carousel-item:hover img, .carousel-item:hover video {
    transform: scale(1.05);
    z-index: 200;
}

/* Модальное окно */
.modal {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    z-index: 1200;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: rgb(32, 32, 32);
    border-radius: 16px;
    padding: 20px;
    max-width: 80%;
    max-height: 100vh;
    overflow-y: auto;
    position: relative;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    /* Стилизация полосы прокрутки для Webkit-браузеров (Chrome, Edge, Safari) */
    scrollbar-width: thin; /* Для Firefox: делает полосу тоньше */
    scrollbar-color: #ffcc00 #333; /* Цвет ползунка и фона для Firefox */
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Для Webkit-браузеров */
.modal-content::-webkit-scrollbar {
    width: 8px; /* Ширина полосы */
}

.modal-content::-webkit-scrollbar-track {
    background: #333; /* Цвет фона полосы */
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ffcc00; /* Цвет ползунка (жёлтый, как в вашем дизайне) */
    border-radius: 4px;
    border: 2px solid #333; /* Добавляем обводку для контраста */
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #e6b800; /* Цвет при наведении */
}

.modal-content img, .modal-content video {
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
}

.modal-content h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

.modal-content p {
    font-size: 16px;
    color: #ccc;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 28px;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.close-modal:hover {
    color: #ffcc00;
    background: rgba(255, 204, 0, 0.2);
    transform: scale(1.1);
}

.modal-text {
    text-align: center;
    font-size: 16px;
    color: #ccc;
    line-height: 1.5;
}

.modal-image {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.modal-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.modal-video {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.modal-video video {
    width: 100%;
    height: auto;
    background: #000;
}

.modal-image-text {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.modal-image-text.image-left {
    flex-direction: row;
}

.modal-image-text.image-right {
    flex-direction: row-reverse;
}

.modal-image-text img,
.modal-image-text video {
    width: 50%;
    height: auto;
    object-fit: contain;
}

.modal-image-text .modal-text {
    width: 50%;
}

.modal-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.modal-media {
    flex: 1;
    min-width: 300px; /* Увеличиваем минимальную ширину */
    max-width: 600px;
}

.modal-media img, .modal-media video {
    width: 100%;
    height: auto;
    object-fit: contain;
}

/* Адаптивность */
@media (min-width: 601px) and (max-width: 1024px) {
    .carousel {
        column-width: 160px;
    }
    .carousel-item {
        width: 160px;
        z-index: 200;
    }
}

@media (min-width: 1025px) {
    .carousel {
        column-width: 180px;
    }
    .carousel-item {
        width: 180px;
        z-index: 200;
    }
}

.item-tooltip {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.8); /* Полупрозрачный фон */
    color: #ffeb94; /* Белый текст для контраста */
    padding: 8px 8px;
    border-radius: 4px;
    font-size: 12px; /* Небольшой размер текста */
    opacity: 0; /* Скрыт по умолчанию */
    transition: opacity 1s ease; /* Плавное появление/исчезновение */
    pointer-events: none; /* Не блокирует клики на работу */
    white-space: nowrap; /* Предотвращает перенос текста */
    z-index: 10; /* Убедимся, что tooltip выше других элементов */
}


.section {
    padding: 40px 10px;
    width: 100%;
    max-width: 100vw;
    background: #1a1a2e;
    color: #fff;
}

.section-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
    padding: 20px;
}

@media (max-width: 600px) {
    .section-content {
        max-width: 90%;
        padding: 15px;
    }
}

.contact {
    background: #16213e;
}

.section h2 {
    font-size: 32px;
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    color: #ffcc00;
}

.section p {
    font-size: 16px;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 15px;
}

.contact h2 {
    font-size: 32px;
    margin-bottom: 20px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
    color: #ffcc00;
}

.contact p {
    font-size: 16px;
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 15px;
}

.contact-link {
    color: #ffcc00;
    text-decoration: none;
    transition: color 0.3s;
}

.contact-link:hover {
    color: #e6b800;
}

.contact-form {
    max-width: 400px;
    margin: 60px auto 40px auto;
    padding: 32px 24px 24px 24px;
    background: rgba(20, 24, 40, 0.95);
    border-radius: 18px;
    box-shadow: 0 4px 32px 0 rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 10;
}
.contact-form input,
.contact-form textarea {
    padding: 12px 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: #23243a;
    color: #fff;
    outline: none;
    resize: none;
    box-shadow: 0 1px 4px 0 rgba(0,0,0,0.08);
    transition: background 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    background: #2d2e4a;
}
.contact-form button {
    background: linear-gradient(90deg, #ffcc00 0%, #e91e63 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px 0 rgba(233,30,99,0.08);
}
.contact-form button:hover {
    background: linear-gradient(90deg, #e91e63 0%, #ffcc00 100%);
}
#form-status {
    min-height: 24px;
    color: #ffcc00;
    font-size: 0.98rem;
    margin-top: 4px;
    text-align: center;
}
.contact-form-wrapper {
    max-width: 420px;
    margin: 60px auto 40px auto;
    padding: 0 8px;
    text-align: center;
}
.contact-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffcc00;
    letter-spacing: 0.02em;
}
.contact-form-desc {
    font-size: 1rem;
    color: #bbb;
    margin-bottom: 18px;
    line-height: 1.5;
}

/* Анимация при переключении */
.slider {
    background: linear-gradient(135deg, #2e3033, #000000); /* Фон в выключенном состоянии */
}

input:checked + .slider {
    background: linear-gradient(135deg, #ffcc00, #e91e63); /* Градиент при включении */
}

/* Анимации для фона и глобальные ключевые кадры */
@keyframes backgroundFloat {
    0%, 100% {
        transform: translate(0, 0) rotate(0deg);
    }
    33% {
        transform: translate(30px, -30px) rotate(1deg);
    }
    66% {
        transform: translate(-20px, 20px) rotate(-1deg);
    }
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .hero-content {
        flex-direction: column;
        gap: 20px;
        padding: 10px;
    }
    
    .hero-text {
        text-align: center;
    }
    
    .sidebar {
        width: 200px;
    }
}

/* Улучшение стилей для canvas 3D модели */
#modelCanvas1 {
    width: 100%;
    height: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

#modelCanvas1:hover {
    transform: scale(1.02);
}

.hero-content {
    position: relative !important;
    z-index: 1000 !important;
}

.hero-model {
    z-index: 1 !important;
    pointer-events: none !important;
}

.hero-model canvas {
    z-index: 1 !important;
    pointer-events: none !important;
}

.contact-form {
    max-width: 400px;
    margin: 60px auto 40px auto;
    padding: 32px 24px 24px 24px;
    background: rgba(20, 24, 40, 0.95);
    border-radius: 18px;
    box-shadow: 0 4px 32px 0 rgba(0,0,0,0.18);
    display: flex;
    flex-direction: column;
    gap: 18px;
    z-index: 10;
}
.contact-form input,
.contact-form textarea {
    padding: 12px 14px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    background: #23243a;
    color: #fff;
    outline: none;
    resize: none;
    box-shadow: 0 1px 4px 0 rgba(0,0,0,0.08);
    transition: background 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    background: #2d2e4a;
}
.contact-form button {
    background: linear-gradient(90deg, #ffcc00 0%, #e91e63 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 0;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 8px 0 rgba(233,30,99,0.08);
}
.contact-form button:hover {
    background: linear-gradient(90deg, #e91e63 0%, #ffcc00 100%);
}
#form-status {
    min-height: 24px;
    color: #ffcc00;
    font-size: 0.98rem;
    margin-top: 4px;
    text-align: center;
}
.contact-form-wrapper {
    max-width: 420px;
    margin: 60px auto 40px auto;
    padding: 0 8px;
    text-align: center;
}
.contact-form-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffcc00;
    letter-spacing: 0.02em;
}
.contact-form-desc {
    font-size: 1rem;
    color: #bbb;
    margin-bottom: 18px;
    line-height: 1.5;
}

.switch-container {
    position: fixed;
    top: 72px; /* ниже blurred-bar/social-icons */
    right: 24px;
    z-index: 900; /* ниже модалок, но выше контента */
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(24, 28, 43, 0.65); /* менее заметный фон */
    border-radius: 10px;
    box-shadow: none; /* убираем тень */
    border: 1px solid rgba(255,255,255,0.07); /* лёгкая граница */
    padding: 6px 12px 6px 10px;
    font-size: 0.97rem;
    color: #e0e0e0;
    user-select: none;
    opacity: 0.75;
    transition: background 0.2s, opacity 0.2s;
}
.switch-container:hover {
    background: rgba(24, 28, 43, 0.85);
    opacity: 1;
}
.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #23243a;
    border-radius: 22px;
    transition: background 0.3s;
}
.switch input:checked + .slider {
    background: linear-gradient(90deg, #ffe066 0%, #e0aaff 100%);
}
.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 4px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: none;
}
.switch input:checked + .slider:before {
    transform: translateX(16px);
    background: #fffbe6;
}
.switch-container span {
    font-size: 0.97rem;
    color: #e0e0e0;
    font-weight: 400;
    margin-left: 6px;
}
@media (max-width: 600px) {
    .switch-container {
        top: 56px;
        right: 6px;
        padding: 4px 7px 4px 6px;
        font-size: 0.92rem;
        border-radius: 8px;
    }
    .switch {
        width: 28px;
        height: 16px;
    }
    .slider:before {
        height: 9px;
        width: 9px;
        left: 2px;
        bottom: 3px;
    }
    .switch-container span {
        font-size: 0.92rem;
        margin-left: 4px;
    }
}