/* Стили для фона с анимацией */
#backgroundCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    opacity: 0.8;
}

/* Общие стили */
body {
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    background-color: #0a0014; /* Глубокий черный фон */
    color: #fff; /* Белый текст */
    line-height: 1.6;
    overflow-x: hidden;
    scroll-behavior: smooth; /* Плавная прокрутка */
    user-select: none; /* Запрещаем выделение текста по умолчанию */
    width: 100%; /* Фиксированная ширина */
    min-width: 100%; /* Минимальная ширина */
    box-sizing: border-box; /* Правильный расчет размеров */
    /* Убираем радиальный градиент, так как теперь он будет частью canvas */
    /* background-image: radial-gradient(circle at 50% 50%, #1a0033 0%, #0a0014 70%); */
}

/* Разрешаем выделение текста только для сообщений в чате */
.message-content {
    user-select: text !important; /* Принудительно разрешаем выделение текста */
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* Запрещаем выделение для аватаров в чате */
.avatar {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Контейнер для текста */
#content {
    max-width: 800px;
    margin: 0 auto;
    padding: 100px 20px; /* Большие отступы для прокрутки */
    box-sizing: border-box; /* Правильный расчет размеров */
    width: 100%; /* Полная ширина */
    position: relative;
    z-index: 1;
}

/* Неоновый глоу для заголовков и текста */
h1, h2, p {
    text-shadow: 0 0 10px #9900ff, 0 0 20px #9900ff, 0 0 30px #9900ff;
    opacity: 0; /* Начальная прозрачность */
    transform: translateY(20px); /* Начальное смещение */
    transition: opacity 1s ease, transform 1s ease, text-shadow 0.5s ease, color 0.5s ease;
    letter-spacing: 1px;
}

h1.active, h2.active, p.active {
    opacity: 1; /* Видимость */
    transform: translateY(0);
}

/* Анимация исчезновения */
h1:not(.active), h2:not(.active), p:not(.active) {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

/* Заголовки строго по центру */
h1, h2 {
    text-align: center;
    margin: 200px 0 100px; /* Огромные отступы сверху и снизу */
    font-weight: 800;
    position: relative;
}

h1 {
    font-size: 3.8rem;
    color: #cc33ff; /* Нежный фиолетовый неон */
    background: linear-gradient(to right, #9900ff, #cc33ff, #ff66ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px rgba(153, 0, 255, 0.5); /* Уменьшена интенсивность */
}

h2 {
    font-size: 3.5rem;
    color: #bb00ff; /* Фиолетовый неон */
    background: linear-gradient(to right, #9900ff, #cc33ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 0 15px rgba(153, 0, 255, 0.5); /* Уменьшена интенсивность */
}

/* Параграфы */
p {
    font-size: 1.4rem;
    color: #e6ccff; /* Более нежный светло-фиолетовый */
    margin: 90px 0 400px; /* Огромные отступы сверху и снизу */
    text-align: center;
    font-family: 'Montserrat', sans-serif; /* Текст по центру */
    line-height: 1.8;
}

.end {
    font-size: 1.4rem;
    color: #e6ccff; /* Более нежный светло-фиолетовый */
    margin: 80px 0 100px; /* Огромные отступы сверху и снизу */
    text-align: center; /* Текст по центру */
}

/* Анимация появления */
h1.active, h2.active, p.active {
    opacity: 1; /* Видимость */
    transform: translateY(0);
}

/* Неоновое свечение при наведении */
h1:hover, h2:hover, p:hover {
    text-shadow: 0 0 15px #cc33ff, 0 0 30px #cc33ff, 0 0 45px #cc33ff;
    color: #fff; /* Легкое изменение цвета текста */
    transform: scale(1.02); /* Легкое увеличение текста */
    transition: text-shadow 0.5s ease, color 0.5s ease, transform 0.5s ease;
}

/* Стили для кнопки */
.button-container {
    text-align: center;
    margin: 200px 0 100px; /* Отступы сверху и снизу */
    opacity: 0; /* Начальная прозрачность */
    transform: translateY(20px) translateX(500px); /* Начальное смещение */
    transition: opacity 1s ease, transform 1s ease;
}

.button-container.active {
    opacity: 1; /* Видимость */
    transform: translateY(0) translateX(0);
}

.neon-button {
    display: inline-block;
    padding: 15px 30px;
    font-size: 1.4rem;
    color: #fff;
    background: linear-gradient(45deg, #9900ff, #cc33ff);
    border: none;
    border-radius: 50px;
    text-decoration: none;
    text-shadow: 0 0 10px #bb00ff, 0 0 20px #bb00ff;
    box-shadow: 0 0 10px #bb00ff, 0 0 20px #bb00ff, inset 0 0 10px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    position: relative;
    overflow: hidden;
}

.neon-button:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: rotate(30deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.neon-button:hover {
    background: linear-gradient(45deg, #cc33ff, #ff66ff);
    box-shadow: 0 0 15px #cc33ff, 0 0 30px #cc33ff, 0 0 45px #cc33ff;
    transform: scale(1.05) translateY(-3px);
}

.neon-button:hover:before {
    opacity: 1;
}

/* Стили для фиксированной полосы */

/* Декоративные элементы */
body::before,
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none; /* Чтобы не мешали взаимодействию */
    z-index: -1; /* На заднем плане */
    opacity: 0.3; /* Снижаем непрозрачность */
}

/* Неоновые линии */
body::before {
    background: radial-gradient(circle, rgba(204, 51, 255, 0.05) 10%, transparent 10.01%); /* Уменьшена интенсивность */
    background-size: 20px 20px;
    animation: moveLines 15s linear infinite;
}

@keyframes moveLines {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

/* Мелкие частицы (звёзды) */
body::after {
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 1%, transparent 1.01%); /* Уменьшена интенсивность */
    background-size: 30px 30px;
    animation: moveParticles 25s linear infinite;
}

@keyframes moveParticles {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-100%);
    }
}

/* Плавающие круги */
.floating-circle {
    position: fixed;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(204, 51, 255, 0.1), transparent 70%); /* Уменьшена интенсивность */
    border-radius: 50%;
    animation: float 15s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
    filter: blur(20px);
}

.floating-circle:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-duration: 18s;
    width: 400px;
    height: 400px;
}

.floating-circle:nth-child(2) {
    top: 50%;
    left: 70%;
    animation-duration: 22s;
    width: 350px;
    height: 350px;
}

.floating-circle:nth-child(3) {
    top: 80%;
    left: 30%;
    animation-duration: 15s;
    width: 250px;
    height: 250px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-30px) scale(1.1);
    }
}

#footer-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #2e232d94; /* Слегка светлее черного */
    color: #fff; /* Цвет текста */
    padding: 10px 0; /* Отступы сверху и снизу */
    z-index: 1000; /* Чтобы полоса была поверх других элементов */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    justify-content: space-between; /* Распределяем элементы по ширине */
    align-items: center; /* Выравниваем по вертикали */
    transition: box-shadow 0.5s ease, text-shadow 0.5s ease; /* Плавное изменение свечения */
}

#footer-bar:hover {
    box-shadow: 0 0 5px rgba(255, 0, 255, 0.8), /* Свечение при наведении */
                0 0 10px rgba(255, 0, 255, 0.6),
                0 0 15px rgba(255, 0, 255, 0.4);
}

/* Стили для текста слева */
.left-text {
    margin-left: 20px; /* Отступ слева */
    font-size: 14px;
    opacity: 0.8;
    letter-spacing: 1px;
}

/* Стили для центрального текста (ссылки) */
.center-text {
    font-size: 22px;
    text-align: center;
    color: #b76cfd; /* Более нежный светло-фиолетовый */
    text-decoration: underline; /* Добавляем подчеркивание для обозначения ссылки */
    font-family: 'Russo One', sans-serif;
    transition: color 0.3s ease, text-shadow 0.3s ease; /* Плавное изменение цвета и свечения */
    letter-spacing: 2px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
}

.center-text:before {
    content: "Telegram Channel ↗"; /* Добавляем текст и стрелку для обозначения внешней ссылки */
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.center-text:hover:before {
    opacity: 1;
}

.center-text:hover {
    color: #ffffff; /* Изменение цвета при наведении */
    text-shadow: 0 0 5px rgba(255, 102, 255, 0.5),
                 0 0 10px rgba(255, 102, 255, 0.3),
                 0 0 15px rgba(255, 102, 255, 0.2); /* Уменьшена интенсивность */
}

/* Стили для текста справа */
.right-text {
    margin-right: 20px; /* Отступ справа */
    font-size: 14px;
    opacity: 0.8;
    letter-spacing: 1px;
}

.top-buttons {
    position: fixed; /* Фиксированное позиционирование */
    top: 2%; /* Привязка к верхнему краю */
    left: -2%; /* Привязка к левому краю */
    width: 100%; /* Ширина на весь экран */
    display: flex;
    justify-content: right; /* Центрирование кнопок */
    gap: 20px; /* Расстояние между кнопками */
    padding: 10px; /* Отступы внутри контейнера */
    background-color: rgba(0, 0, 0, 0.0); /* Полупрозрачный фон */
    z-index: 1000; /* Чтобы кнопки были поверх других элементов */
}

.top-button {
    display: inline-block;
    padding: 15px 20px;
    font-size: 1.4rem;
    color: #fff;
    background: linear-gradient(45deg, #9900ff, #cc33ff);
    border: none;
    border-radius: 50px;
    text-decoration: none;
    text-shadow: 0 0 10px #bb00ff;
    box-shadow: 0 0 10px #bb00ff, 0 0 20px rgba(187, 0, 255, 0.3); /* Уменьшена интенсивность */
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    opacity: 1;
    transform: translateY(5px);
    position: relative;
    overflow: hidden;
}

.top-button:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: rotate(30deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.top-button:hover {
    background: linear-gradient(45deg, #cc33ff, #ff66ff);
    box-shadow: 0 0 15px #cc33ff, 0 0 30px rgba(204, 51, 255, 0.3); /* Уменьшена интенсивность */
    transform: scale(1.05) translateY(0);
}

.top-button:hover:before {
    opacity: 1;
}

#scrollToTopBtn {
    display: block;
    margin: 0 auto; /* Центрирование кнопки */
    padding: 15px 30px;
    font-size: 1.4rem;
    color: #fff;
    background: linear-gradient(45deg, #9900ff, #cc33ff);
    border: none;
    border-radius: 50px;
    text-decoration: none;
    text-shadow: 0 0 10px #bb00ff;
    box-shadow: 0 0 10px #bb00ff, 0 0 20px rgba(187, 0, 255, 0.3); /* Уменьшена интенсивность */
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
}

#scrollToTopBtn:before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    transform: rotate(30deg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

#scrollToTopBtn:hover {
    background: linear-gradient(45deg, #cc33ff, #ff66ff);
    box-shadow: 0 0 15px #cc33ff, 0 0 30px rgba(204, 51, 255, 0.3); /* Уменьшена интенсивность */
    transform: scale(1.05) translateY(-3px);
}

#scrollToTopBtn:hover:before {
    opacity: 1;
}

.button-up {
    text-align: center;
    margin: 0px 0 100px; /* Отступы сверху и снизу */
    opacity: 0; /* Начальная прозрачность */
    transform: translateY(20px) translateX(-500px);/* Смещение вниз и вправо */
    transition: opacity 1s ease, transform 1s ease;
}

.button-up.active {
    opacity: 1; /* Видимость */
    transform: translateY(0) translateX(0);
}

/* Медиазапрос для мобильных устройств */
@media screen and (max-width: 768px) {
    #content {
        padding: 50px 15px;
        max-width: 100%;
        margin: 0 auto; /* Центрирование */
    }

    h1 {
        font-size: clamp(2rem, 7vw, 2.8rem);
        margin: 60px 0 30px;
    }

    h2 {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
        margin: 60px 0 30px;
    }

    p {
        font-size: clamp(1rem, 4vw, 1.3rem);
        margin: 20px 0 60px;
    }
    
    p.end {
        margin: 40px 0 50px;
    }

    .neon-button, .top-button {
        font-size: clamp(1rem, 4vw, 1.2rem);
        padding: clamp(10px, 2.5vw, 15px) clamp(18px, 4.5vw, 30px);
    }

    .top-buttons {
        top: 10px;
        right: 10px;
        left: auto;
        width: auto;
        justify-content: flex-end;
        gap: 10px;
    }

    #footer-bar {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 5px;
        padding: 8px 0;
        font-size: clamp(14px, 4vw, 18px);
    }

    .left-text, .right-text {
        display: none;
    }

    .center-text {
        font-size: clamp(14px, 4vw, 20px);
    }

    .floating-circle {
        display: none;
    }

    .testimonial {
        display: none;
    }
    .testimonial-log {
        display: none;
    }
    
    .button-container {
        text-align: center;
        margin: 200px 0 100px; /* Отступы сверху и снизу */
        opacity: 1; /* Начальная прозрачность */
        transform: translateY(0) translateX(0); /* Исправлено смещение */
        transition: opacity 1s ease, transform 1s ease;
    }
}

.trail {
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: rgba(204, 51, 255, 0.5); /* Уменьшена интенсивность */
    border-radius: 50%;
    pointer-events: none;
    transition: opacity 0.5s;
    z-index: -1;
    filter: blur(2px);
}

.testimonial {
    position: absolute;
    width: 280px;
    padding: 15px;
    background: rgba(25, 0, 51, 0.3); /* Более нежный фон */
    backdrop-filter: blur(10px);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 1s ease, transform 1s ease;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(153, 0, 255, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.1); /* Уменьшена интенсивность */
    border: 1px solid rgba(204, 51, 255, 0.2); /* Уменьшена интенсивность */
}

.testimonial-log {
    position: fixed; /* Изменено с absolute на fixed для фиксации */
    width: 330px;
    padding: 15px;
    background: rgba(25, 0, 51, 0.3); /* Более нежный фон */
    backdrop-filter: blur(10px);
    border-radius: 20px;
    opacity: 0;
    transition: opacity 1s ease;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 0 20px rgba(255, 0, 234, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.1); /* Уменьшена интенсивность */
    border: 1px solid rgba(204, 51, 255, 0.2); /* Уменьшена интенсивность */
}

.testimonial-log-text {
    color: #e6ccff; /* Более нежный светло-фиолетовый */
    font-size: 22px;
    margin-bottom: 20px; /* Уменьшен отступ снизу */
    transition: color 0.3s ease;
    line-height: 1.2;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 0 5px rgba(153, 0, 255, 0.3); /* Уменьшена интенсивность */
    text-align: center; /* Центрирование текста */
    margin-top: -3px; /* Поднимаем текст выше */
}

.testimonial-log.down {
    top: 50px;
    left: 250px; /* Изменено для фиксации в нужном месте */
    text-align: left;
}

.testimonial.left {
    left: -400px; /* Начальная позиция за пределами экрана */
    top: 2000px;
    transform: translateX(0);
}

.testimonial.right {
    right: -400px; /* Начальная позиция за пределами экрана */
    top: 1600px;
    transform: translateX(0);
}

.testimonial.left-2 {
    left: -400px; /* Начальная позиция за пределами экрана */
    top: 3000px;
    transform: translateX(0);
}

.testimonial.right-2 {
    right: -400px; /* Начальная позиция за пределами экрана */
    top: 2600px;
    transform: translateX(0);
}

.testimonial.left-3 {
    left: -400px; /* Начальная позиция за пределами экрана */
    top: 4000px;
    transform: translateX(0);
}

.testimonial.right-3 {
    right: -400px; /* Начальная позиция за пределами экрана */
    top: 3600px;
    transform: translateX(0);
}

.testimonial.left-4 {
    left: -400px; /* Начальная позиция за пределами экрана */
    top: 4000px;
    transform: translateX(0);
}

.testimonial.active {
    opacity: 1;
}
.testimonial-log.down.active {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.testimonial.left.active, 
.testimonial.left-2.active, 
.testimonial.left-3.active, 
.testimonial.left-4.active {
    transform: translateX(10px); /* Появление ближе к левому краю */
}

.testimonial.right.active, 
.testimonial.right-2.active, 
.testimonial.right-3.active {
    transform: translateX(-10px); /* Появление ближе к правому краю */
}

.testimonial.down.active {
    transform: translateX(-50%) translateY(0);
}

.testimonial-text {
    color: #e6ccff; /* Более нежный светло-фиолетовый */
    font-size: 16px;
    margin-bottom: 50px;
    transition: color 0.3s ease;
    line-height: 1.2;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 0 5px rgba(153, 0, 255, 0.3); /* Уменьшена интенсивность */
}

.stars {
    color: #cc33ff; /* Фиолетовые звезды */
    font-size: 20px;
    text-align: center;
    letter-spacing: 3px;
    margin-top: 10px;
    margin-bottom: 10px; /* Добавлен отступ снизу */
    text-shadow: 0 0 5px rgba(255, 102, 255, 0.5); /* Уменьшена интенсивность */
    font-family: 'Montserrat', sans-serif;
}
.chat-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #9900ff, #cc33ff);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(153, 0, 255, 0.7), inset 0 0 10px rgba(255, 255, 255, 0.3);
    z-index: 10000;
    transition: all 0.3s ease;
    border: 2px solid #cc33ff;
}

.chat-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 35px rgba(153, 0, 255, 1), inset 0 0 15px rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #aa00ff, #dd44ff);
}

.chat-button:active {
    transform: scale(0.95);
}

.chat-icon {
    color: rgb(0, 0, 0);
    /* Исправлен огромный радиус нажатия, убран padding */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Стили для окна чата */
.chat-container {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 320px;
    height: 450px;
    background-color: rgba(10, 0, 20, 0.85);
    border: 2px solid #9900ff;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    z-index: 999;
    transform: translateX(400px);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 0 25px rgba(153, 0, 255, 0.7);
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.chat-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(90deg, transparent 0%, rgba(153, 0, 255, 0.1) 50%, transparent 100%),
        radial-gradient(circle at 50% 50%, rgba(153, 0, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    opacity: 0.7;
}

.chat-container.active {
    transform: translateX(0);
}

.chat-header {
    padding: 12px 15px;
    background: linear-gradient(90deg, #9900ff, #cc33ff);
    color: white;
    border-top-left-radius: 13px;
    border-top-right-radius: 13px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.7);
    position: relative;
    overflow: hidden;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.close-chat:hover {
    transform: scale(1.1);
    text-shadow: 0 0 10px rgba(255, 255, 255, 1);
    background-color: rgba(255, 255, 255, 0.2);
}

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(26, 0, 51, 0.3) 0%, rgba(10, 0, 20, 0.3) 70%),
        repeating-linear-gradient(0deg, rgba(153, 0, 255, 0.05) 0px, rgba(153, 0, 255, 0.05) 1px, transparent 1px, transparent 10px);
    scrollbar-width: thin;
    scrollbar-color: #9900ff rgba(26, 0, 51, 0.5);
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: rgba(26, 0, 51, 0.5);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #9900ff;
    border-radius: 3px;
    box-shadow: 0 0 5px rgba(153, 0, 255, 0.7);
}

.admin-message, .user-message {
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    font-family: 'Quicksand', sans-serif;
    box-shadow: 0 0 15px rgba(153, 0, 255, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

.admin-message {
    align-self: flex-start;
    background-color: rgba(26, 0, 51, 0.8);
    color: #e6ccff;
    border-bottom-left-radius: 5px;
    text-shadow: 0 0 5px rgba(153, 0, 255, 0.3);
    border-left: 2px solid #9900ff;
}

.admin-message::before {
    content: '';
    position: absolute;
    left: -5px;
    bottom: 0;
    width: 10px;
    height: 10px;
    background-color: rgba(26, 0, 51, 0.8);
    border-bottom-left-radius: 10px;
}

.user-message {
    align-self: flex-end;
    background: linear-gradient(135deg, #9900ff, #cc33ff);
    color: white;
    border-bottom-right-radius: 5px;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
    border-right: 2px solid #cc33ff;
}

.user-message::before {
    content: '';
    position: absolute;
    right: -5px;
    bottom: 0;
    width: 10px;
    height: 10px;
    background: linear-gradient(135deg, #9900ff, #cc33ff);
    border-bottom-right-radius: 10px;
}

.chat-input-container {
    display: flex;
    padding: 12px;
    border-top: 1px solid #9900ff;
    background-color: rgba(26, 0, 51, 0.7);
    border-bottom-left-radius: 13px;
    border-bottom-right-radius: 13px;
    position: relative;
    overflow: hidden;
}

.chat-input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #cc33ff, transparent);
}

#chatInput {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #9900ff;
    border-radius: 20px;
    background-color: rgba(10, 0, 20, 0.7);
    color: #e6ccff;
    font-family: 'Quicksand', sans-serif;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 8px rgba(153, 0, 255, 0.4), 0 0 5px rgba(153, 0, 255, 0.3);
    caret-color: #cc33ff;
}

#chatInput:focus {
    outline: none;
    box-shadow: inset 0 0 12px rgba(153, 0, 255, 0.6), 0 0 10px rgba(153, 0, 255, 0.5);
    border-color: #cc33ff;
    background-color: rgba(26, 0, 51, 0.5);
}

#chatInput::placeholder {
    color: rgba(230, 204, 255, 0.5);
}

#sendMessage {
    margin-left: 8px;
    padding: 8px 15px;
    background: linear-gradient(90deg, #9900ff, #cc33ff);
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(153, 0, 255, 0.5);
    position: relative;
    overflow: hidden;
    font-size: 14px;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#sendMessage:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(153, 0, 255, 0.8);
    background: linear-gradient(90deg, #aa00ff, #dd44ff);
}

#sendMessage:active {
    transform: translateY(1px);
    box-shadow: 0 0 15px rgba(153, 0, 255, 0.6);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .chat-container {
        width: 90%;
        height: 60%;
        bottom: 80px;
        right: 5%;
        left: 5%;
    }
    
    .chat-button {
        bottom: 10px;
        right: 10px;
    }
    
    #sendMessage {
        min-width: 60px;
        padding: 8px 12px;
    }
}

/* Стили для проектов */
.projects-container {
    margin: 20px 0;
    width: 100%;
}

.project-category {
    margin-bottom: 50px;
}

.project-category h3 {
    margin-bottom: 25px;
    color: #cc33ff;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(153, 0, 255, 0.7);
    text-align: center;
}

.project-list {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
}

.project-card {
    background: rgba(26, 0, 51, 0.6);
    border-radius: 15px;
    overflow: hidden;
    width: 300px;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(153, 0, 255, 0.3);
    border: 1px solid rgba(153, 0, 255, 0.2);
    backdrop-filter: blur(10px);
    border-left: 3px solid #cc33ff;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 25px rgba(153, 0, 255, 0.6);
    border-left: 3px solid #ff66ff;
}

.project-info {
    padding: 25px;
}

.project-info h4 {
    color: #e6ccff;
    margin-bottom: 15px;
    font-size: 1.4rem;
    text-shadow: 0 0 10px rgba(153, 0, 255, 0.5);
    position: relative;
    padding-bottom: 12px;
}

.project-info h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, #9900ff, transparent);
}

.project-info p {
    color: #e6ccff;
    margin: 0 0 25px 0;
    font-size: 1rem;
    line-height: 1.5;
    text-shadow: none;
}

.project-link {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(45deg, #9900ff, #cc33ff);
    color: #fff;
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    border: 1px solid transparent;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 10px rgba(153, 0, 255, 0.5);
}

.project-link:hover {
    background: transparent;
    border-color: #cc33ff;
    color: #e6ccff;
    box-shadow: 0 0 15px rgba(153, 0, 255, 0.7);
    text-shadow: 0 0 8px rgba(153, 0, 255, 0.7);
}

/* Media queries для адаптивности проектов */
@media (max-width: 768px) {
    .project-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .project-card {
        width: 100%;
        max-width: none;
    }
    
    .project-category h3 {
        font-size: 1.6rem;
    }

    .project-info {
        padding: 15px;
    }

    .project-info h4 {
        font-size: 1.1rem;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }

    .project-info h4::after {
        width: 40px;
    }

    .project-info p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin: 0 0 20px 0;
    }

    .project-link {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* Стили для кнопок услуг */
.services-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin: 40px 0;
}

.service-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 200px;
    background: rgba(26, 0, 51, 0.6);
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    padding: 20px;
    box-shadow: 0 0 20px rgba(153, 0, 255, 0.3);
    border: 1px solid rgba(153, 0, 255, 0.2);
}

.service-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(153, 0, 255, 0.1), transparent 70%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-button:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 30px rgba(153, 0, 255, 0.6);
}

.service-button:hover::before {
    opacity: 1;
}

.service-icon {
    font-size: 60px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.service-text {
    color: #e6ccff;
    font-size: 1.2rem;
    text-align: center;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(153, 0, 255, 0.5);
    position: relative;
    z-index: 1;
}

@media (max-width: 768px) {
    .service-button {
        width: 150px;
        height: 150px;
    }
    
    .service-icon {
        font-size: 40px;
    }
    
    .service-text {
        font-size: 1rem;
    }
}

/* Музыкальный плеер */
.music-player {
    position: fixed;
    bottom: 60px;
    right: 20px;
    z-index: 100;
    width: auto;
    transition: all 0.3s ease;
}

.player-container {
    display: flex;
    align-items: center;
    padding: 10px;
    background: rgba(26, 0, 51, 0.8);
    border-radius: 50px;
    box-shadow: 0 0 15px rgba(153, 0, 255, 0.5);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(153, 0, 255, 0.3);
    transition: all 0.3s ease;
}

.player-container:hover {
    box-shadow: 0 0 20px rgba(153, 0, 255, 0.8);
}

.player-disc {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(45deg, #320d4f, #9900ff);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    position: relative;
    overflow: hidden;
    animation: rotate 8s linear infinite paused;
}

.player-disc.playing {
    animation-play-state: running;
}

.player-disc-inner {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #e6ccff;
    box-shadow: 0 0 10px rgba(230, 204, 255, 0.8);
}

.player-controls {
    display: flex;
    flex-direction: column;
    width: 180px;
}

.track-info {
    margin-bottom: 5px;
}

.track-name {
    color: #e6ccff;
    font-size: 0.9rem;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(153, 0, 255, 0.7);
    white-space: nowrap;
}

.track-author {
    color: #cc99ff;
    font-size: 0.8rem;
    opacity: 0.8;
}

.control-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    gap: 10px;
}

.player-button {
    background: none;
    border: none;
    color: #e6ccff;
    width: 25px;
    height: 25px;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
}

.player-button:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.player-button svg {
    width: 100%;
    height: 100%;
}

.play-icon, .pause-icon {
    position: absolute;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.play-icon {
    opacity: 1;
}

.pause-icon {
    opacity: 0;
}

.player-active .play-icon {
    opacity: 0;
    transform: scale(0.8);
}

.player-active .pause-icon {
    opacity: 1;
    transform: scale(1);
}

.volume-container {
    display: flex;
    align-items: center;
}

.volume-icon {
    width: 16px;
    height: 16px;
    color: #cc99ff;
    margin-right: 5px;
}

.volume-slider {
    -webkit-appearance: none;
    width: 80px;
    height: 4px;
    background: rgba(204, 153, 255, 0.3);
    border-radius: 2px;
    outline: none;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e6ccff;
    box-shadow: 0 0 5px rgba(230, 204, 255, 0.8);
    cursor: pointer;
}

.volume-slider::-moz-range-thumb {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e6ccff;
    box-shadow: 0 0 5px rgba(230, 204, 255, 0.8);
    cursor: pointer;
    border: none;
}

@keyframes rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .music-player {
        bottom: 70px;
        right: 10px;
    }
    
    .player-container {
        padding: 8px;
    }
    
    .player-disc {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }
    
    .player-controls {
        width: 150px;
    }
}

/* Стили для переключателя скримера */
.screamer-toggle-container {
    position: fixed;
    bottom: 50px;
    left: 20px;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toggle-label {
    color: #e6ccff;
    font-size: 1rem;
    font-family: 'Russo One', sans-serif;
    text-shadow: 0 0 8px rgba(153, 0, 255, 0.7);
    user-select: none;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(26, 0, 51, 0.8);
    border: 1px solid #9900ff;
    border-radius: 34px;
    transition: all 0.4s;
    box-shadow: inset 0 0 8px rgba(153, 0, 255, 0.5);
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #e6ccff;
    border-radius: 50%;
    transition: all 0.4s;
    box-shadow: 0 0 10px rgba(230, 204, 255, 0.8);
}

input:checked + .slider {
    background-color: #9900ff;
    box-shadow: 0 0 15px rgba(153, 0, 255, 0.8);
}

input:checked + .slider:before {
    transform: translateX(24px);
}

/* Адаптивность для переключателя */
@media (max-width: 768px) {
    .screamer-toggle-container {
        bottom: 55px; /* Поднимаем над футером на мобилках */
        left: 15px;
    }
}

/* AI Chat Styles */
.ai-chat-container {
    background: rgba(26, 0, 51, 0.6);
    border-radius: 15px;
    overflow: hidden;
    width: 100%;
    max-width: 900px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 25px rgba(153, 0, 255, 0.4);
    border: 1px solid rgba(153, 0, 255, 0.3);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    position: relative;
}

/* Стили для элементов форматирования в сообщениях ИИ */
.message-content strong {
    font-weight: bold;
    color: #ff66ff;
}

.message-content em {
    font-style: italic;
    color: #cc99ff;
}

.message-content code {
    font-family: monospace;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 2px 4px;
    border-radius: 3px;
    color: #00ffcc;
}

.message-content br {
    margin-bottom: 8px;
    display: block;
    content: "";
}

/* Дополнительная стилизация для улучшения читаемости */
.ai-message .message-content {
    line-height: 1.4;
}

#clear-chat-button {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

#clear-chat-button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: #cc33ff;
    transform: scale(1.1) rotate(15deg);
    color: #fff;
}

.side-panel {
    flex-grow: 1;
    background: rgba(26, 0, 51, 0.3);
    border-radius: 15px;
    border: 1px solid rgba(153, 0, 255, 0.2);
    backdrop-filter: blur(5px);
    box-shadow: inset 0 0 20px rgba(153, 0, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.interactive-text {
    position: absolute;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(230, 204, 255, 0.4);
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    pointer-events: none;
    user-select: none;
    z-index: 3;
    text-shadow: 0 0 8px rgba(230, 204, 255, 0.2);
    white-space: nowrap;
}

.interactive-text span {
    display: inline-block;
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.panel-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.ai-chat-history {
    flex: 1 1 0;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    scrollbar-width: thin;
    scrollbar-color: #9900ff rgba(26, 0, 51, 0.5);
}

.ai-chat-history::-webkit-scrollbar {
    width: 8px;
}

.ai-chat-history::-webkit-scrollbar-track {
    background: rgba(26, 0, 51, 0.5);
    border-radius: 4px;
}

.ai-chat-history::-webkit-scrollbar-thumb {
    background: #9900ff;
    border-radius: 4px;
    box-shadow: 0 0 5px rgba(153, 0, 255, 0.7);
}

.ai-chat-history .ai-message, .ai-chat-history .user-message {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    max-width: 95%;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-chat-history .user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    font-family: 'Russo One', sans-serif;
}

.ai-avatar {
    background: linear-gradient(45deg, #cc33ff, #ff66ff);
    color: white;
    box-shadow: 0 0 10px #cc33ff;
}

.user-avatar {
    background: linear-gradient(45deg, #444, #888);
    color: #e0e0e0;
}

.message-content {
    padding: 15px 20px;
    border-radius: 20px;
    background-color: rgba(10, 0, 20, 0.7);
    color: #e6ccff;
    line-height: 1.6;
    font-size: 1.1rem;
    box-shadow: inset 0 0 10px rgba(153, 0, 255, 0.3);
}

.ai-message .message-content {
    border-bottom-left-radius: 5px;
    border: 1px solid rgba(204, 51, 255, 0.4);
}

.user-message .message-content {
    border-bottom-right-radius: 5px;
    background: rgba(40, 30, 50, 0.8);
    border: 1px solid rgba(150, 150, 150, 0.3);
}

.ai-chat-input-area {
    display: flex;
    padding: 15px;
    border-top: 1px solid rgba(153, 0, 255, 0.4);
    background-color: rgba(26, 0, 51, 0.5);
    gap: 10px;
    align-items: flex-end;
}

.model-selector-container {
    flex-shrink: 0;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

#model-selector {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: rgba(10, 0, 20, 0.8);
    border: 1px solid #9900ff;
    border-radius: 25px;
    padding: 15px 40px 15px 20px;
    color: #e6ccff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(153, 0, 255, 0.5);
    height: 52px; /* Match textarea padding + border */
}

/* Добавляем атрибут для отображения короткого названия на мобильных */
#model-selector option::before {
    content: attr(data-full);
}

#model-selector:focus {
    outline: none;
    box-shadow: inset 0 0 15px rgba(153, 0, 255, 0.7), 0 0 10px rgba(153, 0, 255, 0.5);
    border-color: #cc33ff;
}

.model-selector-container::after {
    content: '▾';
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    color: #cc33ff;
    pointer-events: none;
    font-size: 1.5rem;
}

#ai-chat-input {
    flex-grow: 1;
    padding: 15px 20px;
    border: 1px solid #9900ff;
    border-radius: 25px;
    background-color: rgba(10, 0, 20, 0.8);
    color: #e6ccff;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: inset 0 0 10px rgba(153, 0, 255, 0.5);
    caret-color: #cc33ff;
    resize: none; /* Запрещаем ручное изменение размера */
    overflow: hidden; /* Скрываем скроллбар */
    max-height: 120px; /* Максимальная высота */
    min-height: 52px; /* Минимальная высота, соответствующая одной строке */
}

#ai-chat-input:focus {
    outline: none;
    box-shadow: inset 0 0 15px rgba(153, 0, 255, 0.7), 0 0 10px rgba(153, 0, 255, 0.5);
    border-color: #cc33ff;
}

#ai-chat-input::placeholder {
    color: rgba(230, 204, 255, 0.5);
}

#ai-send-button {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    background: linear-gradient(45deg, #9900ff, #cc33ff);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 15px rgba(153, 0, 255, 0.6);
}

#ai-send-button:hover {
    transform: scale(1.1);
    box-shadow: 0 0 25px rgba(153, 0, 255, 0.9);
}

#ai-send-button:active {
    transform: scale(1);
    box-shadow: 0 0 10px rgba(153, 0, 255, 0.5);
}

@media (max-width: 768px) {
    .ai-chat-container {
        height: 80vh;
        margin: 20px 0;
    }
    .message-content {
        font-size: 1rem;
        padding: 12px 15px;
    }
    .ai-chat-input-area {
        padding: 10px;
    }
    #ai-chat-input {
        padding: 12px 15px;
        min-height: 46px; /* Match button/selector height on mobile */
    }
    #ai-send-button {
        width: 46px;
        height: 46px;
    }
    .ai-message, .user-message {
        max-width: 95%;
    }
    
    /* Стили для мобильного отображения селектора модели */
    #model-selector {
        width: 70px;
        padding: 12px 30px 12px 12px;
        font-size: 0.85rem;
        height: 46px;
    }
    
    .model-selector-container::after {
        right: 10px;
        font-size: 1.2rem;
    }
}

/* Styles for AI page body */
body.ai-page-body {
    overflow: hidden; /* Prevent scrolling on the page level */
    display: flex;
    flex-direction: column;
    height: 100vh;
}
.ai-page-body .floating-circle {
    display: none;
}
/* New container to center the chat window on the AI page */
.ai-chat-page-container {
    flex-grow: 1;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 20px;
    padding-top: 80px; /* Make space for top buttons */
    box-sizing: border-box;
    gap: 20px;
}

/* Hide side panels on smaller screens */
@media (max-width: 1200px) {
    .side-panel {
        display: none;
    }

    .ai-chat-page-container {
        gap: 0;
    }
}

.kwork-notice {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 3vw !important;
    color: rgba(255, 100, 100, 0.1) !important; /* Цвет самого текста, почти прозрачный */
    font-weight: 800 !important;
    text-transform: uppercase !important;
    text-align: center !important;
    z-index: 0 !important; /* Возвращаем под основной контент */
    pointer-events: none !important;
    font-family: 'Russo One', sans-serif !important;
    line-height: 1.2 !important;
    width: 80vw !important; /* Возвращаем ширину, чтобы было больше пространства */
    letter-spacing: 2px !important;
    /* Создаем многослойную тень для эффекта "глоу" */
    text-shadow: 
        0 0 10px rgba(255, 0, 0, 0.4),
        0 0 25px rgba(255, 0, 0, 0.3),
        0 0 50px rgba(255, 0, 0, 0.2) !important;
}

.project-link.disabled {
    opacity: 0.4;
}

/* Стили для RGB эффекта на поддомене rgb. */

@keyframes rgb-hue-rotate {
    0% {
        filter: hue-rotate(0deg);
    }
    100% {
        filter: hue-rotate(360deg);
    }
}

html.rgb-effect {
    animation: rgb-hue-rotate 5s linear infinite;
}

/* Стили для rain эффекта на поддомене rain. */
html.rain-effect {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 50%, #2c3e50 100%);
    position: relative;
    overflow: hidden;
}

html.rain-effect body {
    background: rgba(44, 62, 80, 0.9);
    color: #ecf0f1;
}

/* Дождевые капли - создаем множественные слои для более реалистичного эффекта */
html.rain-effect::before {
    content: '';
    position: fixed;
    top: -100px;
    left: 0;
    width: 100%;
    height: calc(100vh + 200px);
    background-image: 
        /* Основные дождевые полосы */
        linear-gradient(transparent 0%, rgba(174, 194, 218, 0.6) 5%, rgba(174, 194, 218, 0.6) 95%, transparent 100%),
        linear-gradient(transparent 0%, rgba(174, 194, 218, 0.4) 5%, rgba(174, 194, 218, 0.4) 95%, transparent 100%),
        linear-gradient(transparent 0%, rgba(174, 194, 218, 0.3) 5%, rgba(174, 194, 218, 0.3) 95%, transparent 100%),
        /* Дополнительные тонкие линии */
        linear-gradient(transparent 0%, rgba(255, 255, 255, 0.15) 5%, rgba(255, 255, 255, 0.15) 95%, transparent 100%),
        linear-gradient(transparent 0%, rgba(255, 255, 255, 0.1) 5%, rgba(255, 255, 255, 0.1) 95%, transparent 100%);
    background-size: 
        2px 15px,
        1px 12px, 
        1px 10px,
        1px 8px,
        1px 6px;
    background-repeat: repeat;
    background-position: 
        0px 0px,
        15px 0px,
        35px 0px,
        8px 0px,
        25px 0px;
    animation: 
        rain-fall-heavy 0.3s linear infinite,
        rain-fall-medium 0.4s linear infinite,
        rain-fall-light 0.5s linear infinite,
        rain-fall-fine 0.2s linear infinite,
        rain-fall-mist 0.6s linear infinite;
    pointer-events: none;
    z-index: 1000;
    opacity: 0.8;
    transform: skewX(-15deg); /* Наклон дождя */
}

@keyframes rain-fall-heavy {
    0% {
        background-position: 0px -15px, 15px -12px, 35px -10px, 8px -8px, 25px -6px;
    }
    100% {
        background-position: 0px calc(100vh + 15px), 15px calc(100vh + 12px), 35px calc(100vh + 10px), 8px calc(100vh + 8px), 25px calc(100vh + 6px);
    }
}

@keyframes rain-fall-medium {
    0% {
        background-position: 10px -12px, 28px -10px, 42px -8px, 18px -6px, 38px -4px;
    }
    100% {
        background-position: 10px calc(100vh + 12px), 28px calc(100vh + 10px), 42px calc(100vh + 8px), 18px calc(100vh + 6px), 38px calc(100vh + 4px);
    }
}

@keyframes rain-fall-light {
    0% {
        background-position: 5px -10px, 22px -8px, 47px -6px, 12px -4px, 32px -2px;
    }
    100% {
        background-position: 5px calc(100vh + 10px), 22px calc(100vh + 8px), 47px calc(100vh + 6px), 12px calc(100vh + 4px), 32px calc(100vh + 2px);
    }
}

@keyframes rain-fall-fine {
    0% {
        background-position: 3px -8px, 19px -6px, 41px -4px, 27px -2px, 44px 0px;
    }
    100% {
        background-position: 3px calc(100vh + 8px), 19px calc(100vh + 6px), 41px calc(100vh + 4px), 27px calc(100vh + 2px), 44px calc(100vh + 0px);
    }
}

@keyframes rain-fall-mist {
    0% {
        background-position: 7px -6px, 24px -4px, 39px -2px, 14px 0px, 29px 2px;
    }
    100% {
        background-position: 7px calc(100vh + 6px), 24px calc(100vh + 4px), 39px calc(100vh + 2px), 14px calc(100vh + 0px), 29px calc(100vh - 2px);
    }
}

/* Молнии - множественные вспышки с разными задержками */
html.rain-effect::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: 999;
    animation: lightning-flash 12s infinite;
}

/* Дополнительные молнии через псевдо-элементы контейнеров */
html.rain-effect body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: 998;
    animation: lightning-flash-2 15s infinite;
}

html.rain-effect body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    pointer-events: none;
    z-index: 997;
    animation: lightning-flash-3 18s infinite;
}

@keyframes lightning-flash {
    0%, 92%, 94%, 96%, 98%, 100% {
        background: transparent;
        box-shadow: none;
    }
    93% {
        background: rgba(255, 255, 255, 0.15);
        box-shadow: inset 0 0 100px rgba(135, 206, 250, 0.4);
    }
    95% {
        background: rgba(255, 255, 255, 0.25);
        box-shadow: inset 0 0 150px rgba(135, 206, 250, 0.6);
    }
    97% {
        background: rgba(255, 255, 255, 0.08);
        box-shadow: inset 0 0 75px rgba(135, 206, 250, 0.3);
    }
}

@keyframes lightning-flash-2 {
    0%, 88%, 90%, 92%, 94%, 100% {
        background: transparent;
        box-shadow: none;
    }
    89% {
        background: rgba(255, 255, 255, 0.12);
        box-shadow: inset 0 0 80px rgba(173, 216, 230, 0.5);
    }
    91% {
        background: rgba(255, 255, 255, 0.20);
        box-shadow: inset 0 0 120px rgba(173, 216, 230, 0.7);
    }
    93% {
        background: rgba(255, 255, 255, 0.06);
        box-shadow: inset 0 0 60px rgba(173, 216, 230, 0.4);
    }
}

@keyframes lightning-flash-3 {
    0%, 85%, 86%, 88%, 100% {
        background: transparent;
        box-shadow: none;
    }
    85.5% {
        background: rgba(255, 255, 255, 0.08);
        box-shadow: inset 0 0 60px rgba(176, 196, 222, 0.4);
    }
    87% {
        background: rgba(255, 255, 255, 0.18);
        box-shadow: inset 0 0 100px rgba(176, 196, 222, 0.6);
    }
}

/* Мрачная цветовая схема для rain темы */
html.rain-effect .hero h1 {
    color: #bdc3c7;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

html.rain-effect .hero .description {
    color: #95a5a6;
}

html.rain-effect .top-button {
    background: rgba(52, 73, 93, 0.8);
    color: #ecf0f1;
    border: 1px solid rgba(149, 165, 166, 0.3);
}

html.rain-effect .top-button:hover {
    background: rgba(52, 73, 93, 1);
    border-color: rgba(149, 165, 166, 0.6);
}

html.rain-effect .floating-circle {
    background: rgba(149, 165, 166, 0.1);
    border: 1px solid rgba(149, 165, 166, 0.2);
}

html.rain-effect #content h1 {
    color: #bdc3c7;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

html.rain-effect .project-card {
    background: rgba(52, 73, 93, 0.6);
    border: 1px solid rgba(149, 165, 166, 0.2);
}

html.rain-effect .project-card h4 {
    color: #ecf0f1;
}

html.rain-effect .project-card p {
    color: #bdc3c7;
}

html.rain-effect .project-link {
    background: rgba(149, 165, 166, 0.8);
    color: #2c3e50;
}

html.rain-effect .project-link:hover {
    background: rgba(149, 165, 166, 1);
}

/* AI чат стили для rain темы */
html.rain-effect .ai-chat-container {
    background: rgba(52, 73, 93, 0.9);
    border: 1px solid rgba(149, 165, 166, 0.3);
}

html.rain-effect .message {
    background: rgba(44, 62, 80, 0.8);
    border: 1px solid rgba(149, 165, 166, 0.2);
    color: #ecf0f1;
}

html.rain-effect .user-message {
    background: rgba(149, 165, 166, 0.8);
    color: #2c3e50;
}

html.rain-effect .input-area input {
    background: rgba(44, 62, 80, 0.8);
    border: 1px solid rgba(149, 165, 166, 0.3);
    color: #ecf0f1;
}

html.rain-effect .input-area button {
    background: rgba(149, 165, 166, 0.8);
    color: #2c3e50;
}

html.rain-effect .input-area button:hover {
    background: rgba(149, 165, 166, 1);
}

/* Дополнительные стили для rain темы */
html.rain-effect .chat-button {
    background: rgba(52, 73, 93, 0.9);
    border: 2px solid rgba(149, 165, 166, 0.5);
    color: #ecf0f1;
}

html.rain-effect .chat-button:hover {
    background: rgba(52, 73, 93, 1);
    border-color: rgba(149, 165, 166, 0.8);
}

html.rain-effect .chat-container {
    background: rgba(44, 62, 80, 0.95);
    border: 1px solid rgba(149, 165, 166, 0.3);
}

html.rain-effect .chat-header {
    background: rgba(52, 73, 93, 0.9);
    border-bottom: 1px solid rgba(149, 165, 166, 0.3);
    color: #ecf0f1;
}

html.rain-effect .admin-message {
    background: rgba(52, 73, 93, 0.8);
    border: 1px solid rgba(149, 165, 166, 0.3);
    color: #ecf0f1;
}

html.rain-effect .user-message {
    background: rgba(149, 165, 166, 0.8);
    color: #2c3e50;
}

html.rain-effect #chatInput {
    background: rgba(44, 62, 80, 0.8);
    border: 1px solid rgba(149, 165, 166, 0.4);
    color: #ecf0f1;
}

html.rain-effect #chatInput::placeholder {
    color: rgba(236, 240, 241, 0.6);
}

html.rain-effect #sendMessage {
    background: rgba(149, 165, 166, 0.8);
    color: #2c3e50;
    border: 1px solid rgba(149, 165, 166, 0.5);
}

html.rain-effect #sendMessage:hover {
    background: rgba(149, 165, 166, 1);
}

html.rain-effect .close-chat {
    color: #ecf0f1;
    background: rgba(231, 76, 60, 0.8);
}

html.rain-effect .close-chat:hover {
    background: rgba(231, 76, 60, 1);
}