* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
	background: #ffffff;
}

/* Скрыть все элементы шапки, кроме логотипа, на странице регистрации */
body.register-page .site-header .header-container > :not(.logo) {
    display: none !important;
}

/* Скрыть все элементы шапки, кроме логотипа, на странице входа */
body.login-page .site-header .header-container > :not(.logo) {
    display: none !important;
}

.site-header {
	padding: 1rem 2rem;
	background: #573f5f;
    height: 70px;
}

.header-container {
	
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.logo h1 {
	font-size: 1.8rem;
	font-weight: 700;
	display: flex;
	align-items: center;
	font-style: italic;
    
}

.logo-link {
	color: rgba(255, 255, 255, 0.95);
	text-decoration: none;
	letter-spacing: 0.5px;
    color: #ffffff;
}


.main-nav ul,
.login-nav ul {
	list-style: none;
	display: flex;
	gap: 0.2rem;
	align-items: center;
}


.nav-btn {
	color: rgba(255, 255, 255, 0.9);
	text-decoration: none;
	padding: 8px 20px;
	border-radius: 6px;
	transition: all 0.3s ease;
	font-weight: 500;
	background: rgba(255, 255, 255, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	font-size: 16px;
}

.nav-btn:hover {
	background: rgba(255, 255, 255, 0.25);
}


a.nav-btn.active {
    background: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 1);
    font-weight: 600;
}


a.nav-btn.disabled {
    color: rgba(255, 255, 255, 0.4);
    pointer-events: none;
    cursor: not-allowed;
}


.register {
	background: rgba(255, 255, 255, 0.15);
}

.register:hover {
	background: rgba(255, 255, 255, 0.35);
}

.user-menu {
	position: relative;
	z-index: 1050;
}

.user-menu-trigger {
	width: 44px;
	height: 44px;
	background: rgba(255, 255, 255, 0.15);
	border-radius: 50%;
	padding: 6px;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.user-menu-trigger:hover {
	background: rgba(255, 255, 255, 0.25);
	transform: scale(1.05);
}

.user-menu-trigger svg {
	width: 32px;
	height: 32px;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: -20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 8px 0;
    min-width: 150px;
    z-index: 1050;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 8px 16px;
    color: #333;
    text-decoration: none;
}

.dropdown-menu a:hover {
    background-color: #f5f5f5;
}

.user-menu:hover .dropdown-menu {
    display: block;
}

.variant-label {
	background: #fff;
	padding: 1rem;
	color: #333;
	font-weight: 500;
}

.main-nav ul,
.login-nav ul {
	flex-wrap: wrap;
	justify-content: center;
}

.login-nav ul {
    list-style: none;
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    margin-left: auto;
}

/* Убираем дополнительный отступ у кнопки */
.login-nav .nav-btn {
    margin-left: 0;
}

.main-container {
    display: flex;
    height: calc(100vh - 70px);
    width: 100%;
    position: relative;
    gap: 0;
    padding: 0;
    margin: 0;
}



.chat-and-saved-container {
    flex: 1;
    display: flex;
    overflow-y: auto;
    height: calc(100vh - 70px);
    position: relative;
    margin: 0;
    padding: 0;
    width: 100%;
}



.contents-container {
    width: 330px;
    background: white;
    overflow-y: auto;
    padding: 30px 20px 20px 20px;
    height: calc(100vh - 70px);
    position: sticky;
    top: 0;
    left: 0;
    flex-shrink: 0;
    margin: 0;
}

/* Стили для скроллбара главного контейнера */
.main-container::-webkit-scrollbar {
    width: 8px;
    position: fixed;
    right: 0;
}

.main-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.main-container::-webkit-scrollbar-thumb {
    background: #c4adc5;
    border-radius: 4px;
}

.main-container::-webkit-scrollbar-thumb:hover {
    background: #647697;
}

/* Убираем overflow у .chat-container, так как скролл теперь будет у родителя */
.chat-container {
    width: 100%;
    flex: 1;
    background: #d0cbd1;
    position: relative;
    margin: 0;
    min-height: calc(100vh - 70px);
    overflow: hidden;
}

.saved-chats-container {
    display: none;
}

/* Обновляем базовые стили для кнопки выбора учебника */
.select-textbook-btn {
    border-radius: 6px;
    background: #33583d;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: fit-content;
    margin: -12px auto 10px auto;
    display: block;
    font-weight: 500;
    padding: 10px 20px;
    font-size: 15px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.select-textbook-btn:hover {
    background: #2a4832;
    transform: translateY(-1px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
}

/* Переопределяем специфичные стили */
.send-btn {
    margin: 0; /* Убираем отступы для кнопки отправки */
    display: inline-flex; /* Для корректного размещения в flex-контейнере */
}

.textbook-dropdown {
    position: relative;
    padding: 0;
    margin-top: 10px;
    width: 100%;
    display: flex;
    align-items: center;
}

/* Удаляем стили для кнопки сворачивания */
.collapse-btn {
    display: none; /* Полностью скрываем элемент */
}

/* Удаляем связанные стили */
.collapse-btn:hover {
    display: none;
}

.collapse-btn svg {
    display: none;
}

.selected-textbook {
    padding: 10px;
    background-color: #f5eef5;
    border-radius: 8px;
    margin-top: 20px;
    display: inline-flex;
    align-items: center;
    gap: 15px;
    width: calc(100% + 3px);
    max-width: calc(100% + 3px);
    cursor: pointer;
    transition: all 0.3s ease;
}

.selected-book-cover {
    flex: 0 0 50px;
    width: 50px;
    height: 70px;
    min-width: 50px; /* Фиксированная минимальная ширина */
}

.selected-book-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin-bottom: 0;
}

.selected-book-info {
    font-size: 14px;
    font-weight: 500;
    color: #333;
    flex: 0 1 auto;
    text-align: left;
    padding: 0;
    white-space: normal;
    overflow: hidden;
    line-height: 1.3;
    max-height: 70px;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Уменьшаем количество строк до 2 */
    -webkit-box-orient: vertical;
    text-overflow: ellipsis;
}

.textbook-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#contents-list {
    list-style: none;
}


.chapter-title {
    font-size: 15px;
    font-weight: 600;
    color: #573f5f;
    padding: 12px 8px;
    margin: 10px 0 5px 0;
    background: #f5eef5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chapter-title:hover {
    background: #ebe0eb;
}

.paragraph-item {
    font-size: 14px;
    padding: 8px 8px 8px 20px;
    margin: 2px 0;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
    color: #573f5f;
}

.paragraph-item:hover {
    background: #f5eef5;
    color: #573f5f;
}

#contents-list ul {
    list-style: none;
    
}

/* Стили для центральной колонки */
.chat-box {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: transparent; /* Единый фон для всего чата */
    width: 100%;
    position: relative;
    max-width: none;
    box-sizing: border-box;
    overflow: hidden;
}


.messages-area {
    flex: 1;
    padding: 0px 70px 20px 70px;
    height: calc(100vh - 110px);
    position: relative;
    width: 100%;
    box-sizing: border-box;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 17%;
    min-height: 0;
    background-color: #d0cbd1;
}

.message {
    max-width: 800px;
    padding: 15px 20px;
    border-radius: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    width: fit-content;
    min-width: 50px;
}

.chatgpt-message {
    margin-right: auto;
    margin-left: 0;
    background: white;
    max-width: 800px;
    width: fit-content;
}

.user-message {
    position: relative;
    left: min(800px, 100%); /* Динамически следует за шириной сообщений бота */
    transform: translateX(-100%);
    background: #f4f7fc;
    color: #333;
    max-width: 800px;
    width: fit-content;
    align-self: flex-start;
}

.message p {
    margin-bottom: 10px;
}

.message p:last-child {
    margin-bottom: 0;
}

.message ol {
    padding-left: 20px;
    margin: 10px 0;
}

.message li {
    margin-bottom: 8px;
}

.message li:last-child {
    margin-bottom: 0;
}

.button-area {
    width: 100%;
	height: 60px;
	padding: 0px 15px 0px 0px;
    display: flex;
	background: #e5e4eb;
    padding: 10px;
    justify-content: flex-end;
    gap: 8px;
    
}

.input-area {
    position: sticky;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 5px 70px 5px 70px;
    background: #d0cbd1;
    box-sizing: border-box;
    display: flex;
    justify-content: flex-start;
    padding-left: 17%;
}



/* Добавляем фон к контейнеру ввода сообщения вместо всей области */
.message-input-container {
    display: flex;
    gap: 8px;
    width: 800px;
    background: transparent;
    padding: 2px;
    border-radius: 20px;
}

.input-section {
    flex: 1;
    background: #ffffff;
    border-radius: 20px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    min-height: 48px; /* Добавляем минимальную высоту */
}

#message-input {
    width: 100%;
    overflow-y: auto;
    padding: 0;
    border: none;
    resize: none;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
    background: transparent;
    min-height: 24px;
    max-height: 150px;
}

/* Стилизуем скроллбар для текстового поля */
#message-input::-webkit-scrollbar {
    width: 6px;
}

#message-input::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#message-input::-webkit-scrollbar-thumb {
    background: #c7c7c7;
    border-radius: 3px;
}

#message-input::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

#message-input:focus {
    outline: none;
}

/* Обновляем стили для кнопки отправки */
.send-btn {
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

.send-btn:hover {
    background: #e0e0e0; /* Более темный оттенок белого */
    transform: translateY(-1px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
}

/* Оставляем большую стрелку */
.send-btn svg {
    width: 36px;
    height: 36px;
}

.send-btn svg path {
    stroke: #33583d;
    stroke-width: 3;
}

/* Обновляем стили для переключателя */
.switch-button {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #666;
}

/* Стили для кнопок действий */
.action-buttons {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
    flex-wrap: nowrap;
    justify-content: flex-end;
    flex-direction: row;
    width: 100%;
    align-items: center;

}

.message-actions {
    display: flex;
    gap: 8px;
    margin-top: 7px;
    position: relative;
    padding-left: 0;
    margin-bottom: 22px;
}

.action-btn {
    padding: 6px 16px;
    background: #c7a95f;
    border-radius: 8px;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 13px;
    color: #fff;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-btn:hover {
    background: #b69344; /* Более темный оттенок золотистого */
    transform: translateY(-1px);
    box-shadow: 0 3px 5px rgba(0, 0, 0, 0.15);
}

.btn-icon {
    font-size: 14px; /* Уменьшен размер иконок */
}

.chat-options {
    position: relative;
}

.options-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.options-menu {
    position: absolute;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    display: none;
}

.chat-options:hover .options-menu {
    display: block;
}

.options-menu button {
    width: 100%;
    padding: 8px 12px;
    border: none;
    background: none;
    cursor: pointer;
    text-align: left;
}

.options-menu button:hover {
    background: #f0f0f0;
}

.switch-button input {
    display: none;
}

.slider {
    position: relative;
    width: 40px;
    height: 20px;
    background: #ccc;
    border-radius: 20px;
    cursor: pointer;
}

.slider:before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: 0.3s;
}

.switch-button input:checked + .slider {
    background: #556686;
}

.switch-button input:checked + .slider:before {
    transform: translateX(20px);
}

.contents-container h3 {
    font-size: 16px;
    font-weight: 600;
    color: #556686;
    padding: 15px;
    margin: 0;
    border-bottom: 1px solid #eee;
}

/* Стили для скроллбара */
.chat-and-saved-container::-webkit-scrollbar {
    width: 8px;
    position: absolute;
    right: 0;
}

.chat-and-saved-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chat-and-saved-container::-webkit-scrollbar-thumb {
    background: #adb6c5;
    border-radius: 4px;
}

.chat-and-saved-container::-webkit-scrollbar-thumb:hover {
    background: #647697;
}

/* Стили для главной страницы */
.welcome-container {
    background: #f8f5ff; /* Нежно-фиолетовый фон для всей страницы */
    min-height: calc(100vh - 70px);
}

.welcome-content {
    max-width: 1000px; /* Уменьшена ширина для лучшей читаемости */
    margin: 0 auto;
    padding: 60px 20px;
}

.main-title {
    font-size: 3.5rem;
    color: #573f5f;
    text-align: center;
    margin-bottom: 100px; /* Увеличиваем отступ с 80px до 100px */
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 2rem;
    color: #573f5f; /* Фиолетовый цвет, как у шапки */
    text-align: center;
    margin-bottom: 50px;
    font-weight: 600;
    line-height: 1.4;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Обновляем стили секций */
.section {
    margin-bottom: 100px;
    background: #ffffff; /* Белый фон для секций */
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(87, 63, 95, 0.05);
    transform: translateY(0);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: #573f5f; /* Сплошной цвет вместо градиента */
    border-radius: 5px 5px 0 0;
}

.section:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(87, 63, 95, 0.12);
}

.section h2 {
    font-size: 2.5rem;
    color: #573f5f; /* Фиолетовый цвет, как у шапки */
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section h3 {
    font-size: 1.8rem;
    color: #573f5f; /* Фиолетовый цвет, как у шапки */
    margin-bottom: 20px;
    font-weight: 600;
    line-height: 1.4;
}

.lead-text {
    font-size: 1.3rem;
    color: #444;
    line-height: 1.8;
    margin-bottom: 30px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Сетка преимуществ */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* Обновляем стили карточек преимуществ */
.benefit-card {
    background: #f2f2f2; /* Более серый фон для карточек */
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(87, 63, 95, 0.03);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.benefit-card:hover {
    background: #ebebeb; /* Чуть темнее при наведении */
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(87, 63, 95, 0.08);
}

.benefit-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #573f5f; /* Фиолетовый цвет, как у шапки */
}

.benefit-card p {
    font-size: 1.35rem; /* Увеличиваем с 1.2rem */
    line-height: 1.7;
    color: #444;
    margin-bottom: 20px;
}

.benefit-card ul {
    list-style: none;
    padding: 0;
}

.benefit-card li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    font-size: 1.35rem; /* Увеличиваем с 1.2rem */
    line-height: 1.6;
    color: #444;
}

.benefit-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #33583d;
    font-weight: bold;
}

/* Сетка аудитории */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Обновляем стили для элементов аудитории */
.audience-item {
    background: #f2f2f2; /* Более серый фон */
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(87, 63, 95, 0.05);
    box-shadow: 0 10px 20px rgba(87, 63, 95, 0.03);
    font-size: 1.35rem; /* Увеличиваем с 1.2rem */
    line-height: 1.5;
    color: #444;
}

.audience-item:hover {
    background: #ebebeb; /* Чуть темнее при наведении */
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(87, 63, 95, 0.1);
}

/* Шаги работы */
.steps-container {
    margin-top: 40px;
    display: grid;
    gap: 20px;
}

/* Обновляем стили шагов */
.step {
    background: #f2f2f2; /* Более серый фон */
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(87, 63, 95, 0.03);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
}

.step:hover {
    background: #f5f5f5; /* Чуть темнее при наведении */
    transform: translateX(20px);
    box-shadow: 0 20px 40px rgba(87, 63, 95, 0.08);
}

.step-number {
    width: 40px;
    height: 40px;
    min-width: 40px; /* Добавляем min-width чтобы предотвратить сжатие */
    border-radius: 50%;
    background: #573f5f;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    margin-right: 20px;
}

/* Убираем любые специфичные стили для шестого шага */
.step:nth-child(6) .step-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
}

/* Обновляем стили для финального призыва к действию */
.final-cta {
    text-align: center;
    background: #ffffff; /* Белый фон */
    padding: 50px;
    margin: -40px;
    border-radius: 25px;
}

.start-steps {
    margin: 40px 0;
}

.start-title {
    font-size: 1.6rem;
    color: #573f5f; /* Фиолетовый цвет, как у шапки */
    font-weight: 600;
    margin-bottom: 25px;
}

.start-steps ul {
    list-style: none;
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
}

.start-steps li {
    background: #f2f2f2; /* Более серый фон */
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(87, 63, 95, 0.03);
    transition: all 0.3s ease;
    font-size: 1.35rem; /* Увеличиваем с 1.2rem */
    line-height: 1.7;
    color: #444;
}

.start-steps li:hover {
    background: #ebebeb; /* Чуть темнее при наведении */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(87, 63, 95, 0.1);
}

.motto {
    font-size: 1.6rem;
    color: #333;
    font-style: italic;
    margin: 40px 0;
    font-weight: 600;
}

.welcome-cta {
    margin-top: 60px;
    margin-bottom: 60px;
    text-align: center;
}

.cta-button.primary {
    display: inline-block;
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    background: #33583d;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(87, 63, 95, 0.2);
}

.cta-button.primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(87, 63, 95, 0.3);
}

/* Адаптивность */
@media screen and (max-width: 768px) {
    .welcome-content {
        padding: 30px 15px;
    }

    .main-title {
        font-size: 2.5rem;
        margin-bottom: 40px; /* Немного меньший отступ на мобильных */
    }

    .subtitle {
        font-size: 1.6rem;
    }

    .section {
        padding: 25px 15px;
        margin-bottom: 50px;
    }

    .section h2 {
        font-size: 2rem;
    }

    .section h3 {
        font-size: 1.5rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .audience-grid {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .step-number {
        margin: 0 0 15px 0;
    }

    .final-cta {
        padding: 30px 15px;
        margin: -20px -15px;
    }

    .cta-button.primary {
        padding: 12px 35px;
        font-size: 1.1rem;
    }

    .section p,
    .benefit-card p,
    .benefit-card li,
    .audience-item,
    .step p,
    .start-steps li {
        font-size: 1.25rem; /* Немного меньше на мобильных */
    }
}

/* Стили для футера */
.site-footer {
    background: #573f5f;
    color: #fff;
    padding: 40px 0 20px;
    
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Стили для новой кнопки создания чата */
.new-chat-btn {
    display: none;
}



/* Стили для иконки профиля */
.profile-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-left: 10px;
}

.profile-icon:hover {
    background: rgba(255, 255, 255, 0.35);
}

.profile-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Обновляем стили для login-nav */
.login-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Добавляем стили для кнопки учебника в шапке */
.header-textbook-btn {
    display: none; /* По умолчанию скрыта для ПК */
}



.textbook-icon {
    width: 32px;
    height: 32px;
    transition: transform 0.2s ease;
}

.header-textbook-btn:hover .textbook-icon {
    transform: scale(1.1);
}




.header-textbook-btn:hover .textbook-icon,
.header-new-chat:hover .new-chat-icon {
    transform: scale(1.1);
}

.header-textbook-btn,
.header-new-chat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    width: auto; /* Убираем фиксированную ширину */
    height: 44px;
}

.button-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}



/* Удаляем кнопку содержания полностью */
.contents-toggle {
    display: none;
}





/* Скрываем кнопку нового чата */
.new-chat-btn {
    display: none;
}



/* Добавляем стили для кнопки нового чата в шапке */
.header-new-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15); /* Возвращаем прежний цвет */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 44px;
    gap: 8px;
}

.header-new-chat:hover {
    background: rgba(255, 255, 255, 0.25); /* Возвращаем прежний цвет при наведении */
}

.new-chat-icon {
    width: 32px; /* Увеличиваем размер иконки */
    height: 32px;
    transition: transform 0.2s ease;
}



/* Обновляем стили для текста кнопок в шапке */
.button-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}


/* Добавляем эффект при наведении для иконок */
.header-textbook-btn:hover .textbook-icon,
.header-new-chat:hover .new-chat-icon {
    transform: scale(1.1);
}





















/* Для мобильных устройств */
@media screen and (max-width: 950px) {
    .messages-area {
        padding-left: 15px;
        padding-right: 15px;
    }

    .input-area {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 10px 15px;
        background: #d3ced4; /* Добавляем фон */
        z-index: 100;
    }

    .message-input-container {
        width: 100%;
        margin: 0 auto;
        max-width: 100%;
    }

    .chat-box {
        height: 100%;
        padding-bottom: 0;
    }

    .main-container {
        margin-top: 60px; /* Убираем отступ сверху */
        height: calc(100vh - 60px); /* Высота экрана минус высота шапки */
        padding-top: 0; /* Убираем padding-top */
    }



    .chat-container {
        height: calc(100vh - 60px);
        margin-top: 0;
        position: relative;
    }

    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        height: 60px;
        padding: 0.5rem 1rem;
    }

    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Стили для логотипа */
    .logo h1 {
        font-size: 1.4rem;
        line-height: 1.1;
        text-align: left;
    }

    /* Стили для навигации */
    .header-nav ul {
        display: flex;
        align-items: center;
        gap: 15px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    /* Общие стили для иконок */
    .icon-btn {
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s;
    }

    .icon-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    /* Стили для иконки профиля */
    .profile-icon {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.3s;
    }

    .profile-icon:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    /* Скрываем старые кнопки */
    .contents-toggle:not(.icon-btn),
    .new-chat-btn:not(.icon-btn) {
        display: none;
    }

    /* Кнопка содержания */
    .contents-toggle {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: #33583d;
        color: white;
        border: none;
        padding: 12px 20px;
        border-radius: 25px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        z-index: 900;
        font-weight: 500;
    }

    /* Контейнер содержания */
    .contents-container {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: white;
        transition: 0.3s ease;
        z-index: 990;
        overflow-y: auto;
    }

    .contents-container.active {
        left: 0;
    }



    /* Область чата */
    .chat-box {
        height: calc(100vh - 60px); /* Высота экрана минус высота шапки */
        overflow: hidden; /* Предотвращаем прокрутку всего контейнера */
    }

    .messages-area {
        padding-top: 20px;
        height: calc(100vh - 120px); /* Корректируем высоту */
        padding-left: 15px;
        padding-right: 15px;
        margin-top: 0; /* Убираем отступ сверху */
        position: relative; /* Меняем на relative */
    }

    /* Область ввода остается как есть */
    .input-area {
        padding: 7px;
        position: fixed;
        background: #d3ced4;
    }

    .message-input-container {
        gap: 6px;
    }

    /* Кнопки действий */
    .message-actions {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        margin-top: 7px;
        margin-bottom: 22px;
    }

    .action-btn {
        padding: 10px 20px;
        border-radius: 20px;
        background: rgba(199, 169, 95, 0.9);
        backdrop-filter: blur(5px);
        font-size: 14px;
        white-space: nowrap;
    }

    /* Новый чат */
    .new-chat-btn {
        position: fixed;
        top: 70px;
        right: 15px;
        padding: 8px 15px;
        font-size: 14px;
        border-radius: 20px;
        z-index: 900;
    }

    .header-new-chat {
        padding: 8px;
    }
    
    .new-chat-icon {
        width: 32px;
        height: 32px;
    }

    /* Скрываем старую кнопку содержания */
    .contents-toggle {
        display: none;
    }

    .message-input-container {
        width: 100%;
    }

    .send-btn {
        width: 36px;
        height: 36px;
    }

    .send-btn svg {
        width: 32px;
        height: 32px;
    }

    /* Обновляем стили для кнопки Чаты */
    .nav-btn {
        padding: 8px 7px; /* Уменьшаем горизонтальный padding для уменьшения ширины */
        font-size: 15px;
        height: 41px;
    }

    .login-nav ul {
        gap: 10px;
    }




    .button-text {
        display: none;
    }

    .header-textbook-btn,
    .header-new-chat {
        width: 41px;
        height: 41px;
        padding: 7px;
    }

    .new-chat-icon {
        width: 27px;
        height: 27px;
    }




    .header-textbook-btn,
    .header-new-chat {
        width: 41px;
        height: 41px;
        padding: 7px;
    }

    .new-chat-icon {
        width: 27px;
        height: 27px;
    }




    /* Полностью скрываем кнопку содержания */
    .contents-toggle {
        display: none;
    }



    /* Удаляем кнопку нового чата */
    .new-chat-btn {
        display: none;
    }

    .button-text {
        display: none;
    }

    .header-textbook-btn,
    .header-new-chat {
        width: 41px;
        height: 41px;
        padding: 7px;
    }

    .input-area {
        padding: 7px;
        position: fixed;
        background: #d3ced4;
    }

    .header-textbook-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px 16px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        height: 44px;
        gap: 8px;
    }

    .header-textbook-btn:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    .chat-and-saved-container {
        flex: 1;
        display: flex;
        overflow-y: auto;
        height: calc(100vh - 60px);
        position: relative;
        margin: 0;
        padding: 0;
        width: 100%;
    }

    /* Обновляем стили для сообщений */
    .message {
        max-width: 90%;
        width: fit-content;
        min-width: 50px;
    }

    .chatgpt-message {
        margin-right: auto;
        margin-left: 0;
        max-width: 90%;
        width: fit-content;
    }

    .user-message {
        position: static; /* Сбрасываем позиционирование */
        left: auto;
        transform: none;
        margin-left: auto;
        margin-right: 0;
        align-self: flex-end;
        max-width: 85%;
    }

    /* Обновляем отступы в области сообщений */
    .messages-area {
        padding-left: 15px;
        padding-right: 15px;
    }

    .message {
        margin-bottom: 15px; /* Тот же отступ, что и в десктопной версии */
    }

    .message-actions {
        margin-top: 7px;
        margin-bottom: 22px;
    }

    /* Показываем и стилизуем кнопку книги на мобильных */
    .header-book-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 41px;
        height: 41px;
        padding: 7px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .header-book-btn:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    .book-icon {
        width: 27px;
        height: 27px;
    }
}

/* Скрываем элементы с классом mobile-only на десктопе */
.mobile-only {
    display: none;
}

/* Показываем элементы с классом mobile-only на мобильных устройствах */
@media screen and (max-width: 950px) {
    .mobile-only {
        display: block;
    }
}

.welcome-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1100; /* Выше, чем у auth-modal */
    backdrop-filter: blur(5px);
}
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}
.textbook-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1100; /* Увеличиваем z-index, чтобы был выше, чем у user-menu */
    backdrop-filter: blur(5px);
}


.paragraph-messages {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    background-color: #d0cbd1;
    overflow-y: auto;
}


.paragraph-info {
    display: flex;
    width: 800px;
    margin: 4px;
    padding: 16px 20px 0px 0px;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    text-align: center;
    z-index: 1;
    background: #d0cbd1;
    border: none;
    box-shadow: none;
}

/* Добавляем стили для модального окна выбора учебника */
.textbook-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1100; /* Увеличиваем z-index, чтобы был выше, чем у user-menu */
    backdrop-filter: blur(5px);
}

.textbook-modal-content {
    background: #faf9ff;
    border-radius: 16px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    padding: 0 30px 30px 30px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 10px 30px rgba(87, 63, 95, 0.2);
}

/* Обновляем стили для фиксированной шапки */
.textbook-modal-header {
    position: sticky;
    top: 0;
    background: #faf9ff;
    padding: 20px 30px; /* Уменьшаем padding сверху и снизу */
    margin: 0 -30px 20px -30px; /* Убираем отрицательный margin сверху */
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    z-index: 1;
}

/* Обновляем позицию кнопки закрытия */
.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: #573f5f;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.textbook-modal-content::-webkit-scrollbar {
    width: 8px;
}

.textbook-modal-content::-webkit-scrollbar-track {
    margin: 16px 0; /* Отступ сверху и снизу для сохранения закругления */
    background: #f1f1f1;
    border-radius: 4px;
}

.textbook-modal-content::-webkit-scrollbar-thumb {
    background: #adb6c5;
    border-radius: 4px;
}

.textbook-modal-content::-webkit-scrollbar-thumb:hover {
    background: #647697;
}

.textbook-modal h2 {
    color: #573f5f;
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
}

.grade-selector {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 20px 0;
}

.grade-select {
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #d8d0e7;
    font-size: 16px;
    background: #f5f2ff;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4b3f72;
    width: 200px; /* Фиксированная ширина для селекта */
    /* Добавляем стили для кастомной стрелки */
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b3f72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

.grade-select:hover {
    border-color: #6a5acd;
    background-color: #f3f0ff;
}

/* Стили для мобильных устройств */
@media screen and (max-width: 768px) {
    .grade-select {
        width: 180px; /* Немного уменьшаем ширину на мобильных */
    }
}

.textbooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.textbook-card {
    background: #e8e6f1;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(87, 63, 95, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #d8d2e8;
}

.textbook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(87, 63, 95, 0.15);
    background: #e0ddee; /* Еще более темный фон при наведении */
}

.textbook-cover-container {
    width: 150px;
    height: 200px;
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(87, 63, 95, 0.1);
    background: #e8e6f1;
}

.textbook-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.textbook-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #e8e6f1;
        padding: 15px;
    border-radius: 16px;
    width: 100%;
    margin-top: 15px;
}

.textbook-name {
    font-size: 18px;
    font-weight: 600;
    color: #000000; /* Черный цвет текста */
    margin-bottom: 10px;
}

.textbook-details {
    font-size: 14px;
    color: #000000; /* Черный цвет текста */
    margin-bottom: 20px;
}

.select-btn {
    padding: 10px 20px;
    background: #573f5f; /* Цвет как у шапки сайта */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
}

.select-btn:hover {
    background: #4a344c; /* Более темный оттенок цвета шапки */
    transform: translateY(-2px);
}

.close-modal-btn:hover {
    color: #33583d;
    transform: scale(1.1);
}

/* Адаптивные стили */

    
    .textbooks-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .textbook-cover-container {
        width: 120px;
        height: 160px;
    }
    
    .textbook-name {
        font-size: 16px;
    }
    
    .textbook-details {
        font-size: 13px;
    }
    
    .select-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Скрываем дублирующий заголовок с классом */
.grade-title {
    display: none;
}

/* Стили для страницы регистрации */
.auth-container {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: white;
}

.auth-container form {
    background: #e8e4eb; /* Делаем фон темнее */
    padding: 50px; /* Увеличиваем внутренние отступы */
    border-radius: 24px;
    width: 100%;
    max-width: 520px; /* Увеличиваем максимальную ширину */
    box-shadow: 0 10px 40px rgba(87, 63, 95, 0.15); /* Усиливаем тень */
}

.auth-container h1 {
    color: #573f5f;
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #573f5f;
    font-weight: 500;
    font-size: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(87, 63, 95, 0.1);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    color: #333;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #573f5f;
    background: white;
    box-shadow: 0 0 0 4px rgba(87, 63, 95, 0.1);
}

.auth-container .btn {
    width: 100%;
    padding: 14px;
    background: #33583d;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-container .btn:hover {
    background: #2a4832;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 88, 61, 0.2);
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: white;
    border: 2px solid rgba(87, 63, 95, 0.1);
    border-radius: 12px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.google-btn:hover {
    background: white;
    border-color: #573f5f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.google-btn img {
    width: 24px;
    height: 24px;
}

.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: rgba(87, 63, 95, 0.2);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: #e8e4eb;
    padding: 0 15px;
    color: #573f5f;
    font-size: 14px;
}

.links {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px; /* Добавляем отступ между ссылками */
}

.links a {
    color: #573f5f;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    position: relative; /* Для разделителя */
}

/* Добавляем разделитель между ссылками */
.links a:first-child:after {
    content: "•";
    position: absolute;
    right: -12px;
    color: rgba(87, 63, 95, 0.4);
}

.links a:hover {
    color: #33583d;
    text-decoration: underline;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 17px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Адаптивность для мобильных устройств */
@media screen and (max-width: 480px) {
    .auth-container {
        padding: 20px;
    }

    .auth-container form {
        padding: 40px 25px; /* Немного уменьшаем отступы для мобильных */
    }

    .auth-container h1 {
        font-size: 24px;
    }

    .form-group input,
    .google-btn {
        padding: 10px 14px;
    }

    .auth-container .btn {
        padding: 12px;
    }
}

/* Скрываем кнопку книги на десктопе */
.header-book-btn {
    display: none;
}

@media screen and (max-width: 950px) {
    /* ... existing code ... */

    /* Обновляем отступы между кнопками */
    .login-nav ul {
        gap: 10px; /* Устанавливаем единый отступ между всеми элементами */
    }

    /* Удаляем специальный отступ у кнопки книги */
    .header-book-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 41px;
        height: 41px;
        padding: 7px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    /* ... остальной код ... */
}

/* Добавлено для отображения ошибок при авторизации красным цветом */
.form-error {
    color: red;           /* Цвет текста ошибки */
    font-size: 17px;      /* Размер шрифта изменен на 17px */
    margin-top: 10px;     /* Отступ сверху */
}

/* Обновляем стили для мобильной версии */


    .contents-container.active {
        display: block;
    }

    /* Стили для кнопки книги в шапке */
    .header-book-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 41px;
        height: 41px;
        padding: 7px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .header-book-btn:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    /* Стили для выбранного учебника в мобильной версии */
    .selected-textbook {
        width: 100%;
        margin: 10px 0;
        box-sizing: border-box;
    }

    /* Стили для списка содержания */
    #contents-list {
        margin-top: 20px;
    }
}

/* Стили для анимации появления */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.fade-in {
    opacity: 0;
    visibility: hidden;
}

.fade-in.visible {
    opacity: 1;
    visibility: visible;
    animation: fadeInScale 1.2s cubic-bezier(0.17, 0.67, 0.83, 0.67) forwards;
}

/* Добавляем задержку для разных секций */
.section.fade-in:nth-child(1) { animation-delay: 0.2s; }
.section.fade-in:nth-child(2) { animation-delay: 0.4s; }
.section.fade-in:nth-child(3) { animation-delay: 0.6s; }
.section.fade-in:nth-child(4) { animation-delay: 0.8s; }
.section.fade-in:nth-child(5) { animation-delay: 1s; }

/* Стили для карточек преимуществ */
.benefit-card.fade-in {
    opacity: 0;
    transform: translateY(100px) scale(0.9);
    transition: all 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.benefit-card.fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Стили для шагов */
.step.fade-in {
    opacity: 0;
    transform: translateX(-100px) rotate(-5deg);
    transition: all 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.step.fade-in.visible {
    opacity: 1;
    transform: translateX(0) rotate(0);
}

/* Добавляем задержки для последовательного появления */
.benefit-card:nth-child(1) { transition-delay: 0.1s; }
.benefit-card:nth-child(2) { transition-delay: 0.2s; }
.benefit-card:nth-child(3) { transition-delay: 0.3s; }
.benefit-card:nth-child(4) { transition-delay: 0.4s; }
.benefit-card:nth-child(5) { transition-delay: 0.5s; }

.step:nth-child(1) { transition-delay: 0.1s; }
.step:nth-child(2) { transition-delay: 0.2s; }
.step:nth-child(3) { transition-delay: 0.3s; }
.step:nth-child(4) { transition-delay: 0.4s; }
.step:nth-child(5) { transition-delay: 0.5s; }
.step:nth-child(6) { transition-delay: 0.6s; }

/* Обновляем стили секций для более современного вида */
.section {
    margin-bottom: 100px;
    background: #ffffff; /* Белый фон для секций */
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(87, 63, 95, 0.05);
    transform: translateY(0);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: #573f5f; /* Сплошной цвет вместо градиента */
    border-radius: 5px 5px 0 0;
}

.section:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(87, 63, 95, 0.12);
}

/* Обновляем стили карточек */
.benefit-card {
    background: #f2f2f2; /* Более серый фон для карточек */
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(87, 63, 95, 0.03);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.benefit-card:hover {
    background: #ebebeb; /* Чуть темнее при наведении */
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(87, 63, 95, 0.08);
}

.benefit-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #573f5f; /* Фиолетовый цвет, как у шапки */
}

.benefit-card p {
    font-size: 1.2rem; /* Увеличен размер шрифта */
    line-height: 1.7;
    color: #444;
    margin-bottom: 20px;
}

.benefit-card ul {
    list-style: none;
    padding: 0;
}

.benefit-card li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    font-size: 1.2rem; /* Увеличен размер шрифта */
    color: #444;
    line-height: 1.6;
}

.benefit-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #33583d;
    font-weight: bold;
}

/* Сетка аудитории */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Обновляем стили для элементов аудитории */
.audience-item {
    background: #f2f2f2; /* Более серый фон */
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(87, 63, 95, 0.05);
    box-shadow: 0 10px 20px rgba(87, 63, 95, 0.03);
    font-size: 1.2rem;
    color: #444;
    line-height: 1.5;
}

.audience-item:hover {
    background: #ebebeb; /* Чуть темнее при наведении */
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(87, 63, 95, 0.1);
}

/* Шаги работы */
.steps-container {
    margin-top: 40px;
    display: grid;
    gap: 20px;
}

/* Обновляем стили шагов */
.step {
    background: #f2f2f2; /* Более серый фон */
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(87, 63, 95, 0.03);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
}

.step:hover {
    background: #f5f5f5; /* Чуть темнее при наведении */
    transform: translateX(20px);
    box-shadow: 0 20px 40px rgba(87, 63, 95, 0.08);
}

.step-number {
    width: 40px;
    height: 40px;
    min-width: 40px; /* Добавляем min-width чтобы предотвратить сжатие */
    border-radius: 50%;
    background: #573f5f;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    margin-right: 20px;
}

/* Убираем любые специфичные стили для шестого шага */
.step:nth-child(6) .step-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
}

/* Обновляем стили для финального призыва к действию */
.final-cta {
    text-align: center;
    background: #ffffff; /* Белый фон */
    padding: 50px;
    margin: -40px;
    border-radius: 25px;
}

.start-steps {
    margin: 40px 0;
}

.start-title {
    font-size: 1.6rem;
    color: #573f5f; /* Фиолетовый цвет, как у шапки */
    font-weight: 600;
    margin-bottom: 25px;
}

.start-steps ul {
    list-style: none;
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
}

.start-steps li {
    background: #f2f2f2; /* Более серый фон */
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(87, 63, 95, 0.03);
    transition: all 0.3s ease;
    font-size: 1.35rem; /* Увеличиваем с 1.2rem */
    line-height: 1.7;
    color: #444;
}

.start-steps li:hover {
    background: #ebebeb; /* Чуть темнее при наведении */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(87, 63, 95, 0.1);
}

.motto {
    font-size: 1.6rem;
    color: #333;
    font-style: italic;
    margin: 40px 0;
    font-weight: 600;
}

.welcome-cta {
    margin-top: 60px;
    margin-bottom: 60px;
    text-align: center;
}

.cta-button.primary {
    display: inline-block;
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    background: #33583d;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(87, 63, 95, 0.2);
}

.cta-button.primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(87, 63, 95, 0.3);
}

/* Адаптивность */
@media screen and (max-width: 768px) {
    .welcome-content {
        padding: 30px 15px;
    }

    .main-title {
        font-size: 2.5rem;
        margin-bottom: 40px; /* Немного меньший отступ на мобильных */
    }

    .subtitle {
        font-size: 1.6rem;
    }

    .section {
        padding: 25px 15px;
        margin-bottom: 50px;
    }

    .section h2 {
        font-size: 2rem;
    }

    .section h3 {
        font-size: 1.5rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .audience-grid {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .step-number {
        margin: 0 0 15px 0;
    }

    .final-cta {
        padding: 30px 15px;
        margin: -20px -15px;
    }

    .cta-button.primary {
        padding: 12px 35px;
        font-size: 1.1rem;
    }

    .section p,
    .benefit-card p,
    .benefit-card li,
    .audience-item,
    .step p,
    .start-steps li {
        font-size: 1.25rem; /* Немного меньше на мобильных */
    }
}

/* Стили для футера */
.site-footer {
    background: #573f5f;
    color: #fff;
    padding: 40px 0 20px;
    
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Стили для новой кнопки создания чата */
.new-chat-btn {
    display: none;
}



/* Стили для иконки профиля */
.profile-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-left: 10px;
}

.profile-icon:hover {
    background: rgba(255, 255, 255, 0.35);
}

.profile-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Обновляем стили для login-nav */
.login-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Добавляем стили для кнопки учебника в шапке */
.header-textbook-btn {
    display: none; /* По умолчанию скрыта для ПК */
}



.textbook-icon {
    width: 32px;
    height: 32px;
    transition: transform 0.2s ease;
}

.header-textbook-btn:hover .textbook-icon {
    transform: scale(1.1);
}




.header-textbook-btn:hover .textbook-icon,
.header-new-chat:hover .new-chat-icon {
    transform: scale(1.1);
}

.header-textbook-btn,
.header-new-chat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    width: auto; /* Убираем фиксированную ширину */
    height: 44px;
}

.button-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}



/* Удаляем кнопку содержания полностью */
.contents-toggle {
    display: none;
}





/* Скрываем кнопку нового чата */
.new-chat-btn {
    display: none;
}



/* Добавляем стили для кнопки нового чата в шапке */
.header-new-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15); /* Возвращаем прежний цвет */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 44px;
    gap: 8px;
}

.header-new-chat:hover {
    background: rgba(255, 255, 255, 0.25); /* Возвращаем прежний цвет при наведении */
}

.new-chat-icon {
    width: 32px; /* Увеличиваем размер иконки */
    height: 32px;
    transition: transform 0.2s ease;
}



/* Обновляем стили для текста кнопок в шапке */
.button-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}


/* Добавляем эффект при наведении для иконок */
.header-textbook-btn:hover .textbook-icon,
.header-new-chat:hover .new-chat-icon {
    transform: scale(1.1);
}





















/* Для мобильных устройств */
@media screen and (max-width: 950px) {
    .messages-area {
        padding-left: 15px;
        padding-right: 15px;
    }

    .input-area {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 10px 15px;
        background: #d3ced4; /* Добавляем фон */
        z-index: 100;
    }

    .message-input-container {
        width: 100%;
        margin: 0 auto;
        max-width: 100%;
    }

    .chat-box {
        height: 100%;
        padding-bottom: 0;
    }

    .main-container {
        margin-top: 60px; /* Убираем отступ сверху */
        height: calc(100vh - 60px); /* Высота экрана минус высота шапки */
        padding-top: 0; /* Убираем padding-top */
    }



    .chat-container {
        height: calc(100vh - 60px);
        margin-top: 0;
        position: relative;
    }

    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        height: 60px;
        padding: 0.5rem 1rem;
    }

    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Стили для логотипа */
    .logo h1 {
        font-size: 1.4rem;
        line-height: 1.1;
        text-align: left;
    }

    /* Стили для навигации */
    .header-nav ul {
        display: flex;
        align-items: center;
        gap: 15px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    /* Общие стили для иконок */
    .icon-btn {
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s;
    }

    .icon-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    /* Стили для иконки профиля */
    .profile-icon {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.3s;
    }

    .profile-icon:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    /* Скрываем старые кнопки */
    .contents-toggle:not(.icon-btn),
    .new-chat-btn:not(.icon-btn) {
        display: none;
    }

    /* Кнопка содержания */
    .contents-toggle {
        position: fixed;
        bottom: 20px;
        right: 20px;
        background: #33583d;
        color: white;
        border: none;
        padding: 12px 20px;
        border-radius: 25px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        z-index: 900;
        font-weight: 500;
    }

    /* Контейнер содержания */
    .contents-container {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: white;
        transition: 0.3s ease;
        z-index: 990;
        overflow-y: auto;
    }

    .contents-container.active {
        left: 0;
    }



    /* Область чата */
    .chat-box {
        height: calc(100vh - 60px); /* Высота экрана минус высота шапки */
        overflow: hidden; /* Предотвращаем прокрутку всего контейнера */
    }

    .messages-area {
        padding-top: 20px;
        height: calc(100vh - 120px); /* Корректируем высоту */
        padding-left: 15px;
        padding-right: 15px;
        margin-top: 0; /* Убираем отступ сверху */
        position: relative; /* Меняем на relative */
    }

    /* Область ввода остается как есть */
    .input-area {
        padding: 7px;
        position: fixed;
        background: #d3ced4;
    }

    .message-input-container {
        gap: 6px;
    }

    /* Кнопки действий */
    .message-actions {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        margin-top: 7px;
        margin-bottom: 22px;
    }

    .action-btn {
        padding: 10px 20px;
        border-radius: 20px;
        background: rgba(199, 169, 95, 0.9);
        backdrop-filter: blur(5px);
        font-size: 14px;
        white-space: nowrap;
    }

    /* Новый чат */
    .new-chat-btn {
        position: fixed;
        top: 70px;
        right: 15px;
        padding: 8px 15px;
        font-size: 14px;
        border-radius: 20px;
        z-index: 900;
    }

    .header-new-chat {
        padding: 8px;
    }
    
    .new-chat-icon {
        width: 32px;
        height: 32px;
    }

    /* Скрываем старую кнопку содержания */
    .contents-toggle {
        display: none;
    }

    .message-input-container {
        width: 100%;
    }

    .send-btn {
        width: 36px;
        height: 36px;
    }

    .send-btn svg {
        width: 32px;
        height: 32px;
    }

    /* Обновляем стили для кнопки Чаты */
    .nav-btn {
        padding: 8px 7px; /* Уменьшаем горизонтальный padding для уменьшения ширины */
        font-size: 15px;
        height: 41px;
    }

    .login-nav ul {
        gap: 10px;
    }




    .button-text {
        display: none;
    }

    .header-textbook-btn,
    .header-new-chat {
        width: 41px;
        height: 41px;
        padding: 7px;
    }

    .new-chat-icon {
        width: 27px;
        height: 27px;
    }




    .header-textbook-btn,
    .header-new-chat {
        width: 41px;
        height: 41px;
        padding: 7px;
    }

    .new-chat-icon {
        width: 27px;
        height: 27px;
    }




    /* Полностью скрываем кнопку содержания */
    .contents-toggle {
        display: none;
    }



    /* Удаляем кнопку нового чата */
    .new-chat-btn {
        display: none;
    }

    .button-text {
        display: none;
    }

    .header-textbook-btn,
    .header-new-chat {
        width: 41px;
        height: 41px;
        padding: 7px;
    }

    .input-area {
        padding: 7px;
        position: fixed;
        background: #d3ced4;
    }

    .header-textbook-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 8px 16px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
        height: 44px;
        gap: 8px;
    }

    .header-textbook-btn:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    .chat-and-saved-container {
        flex: 1;
        display: flex;
        overflow-y: auto;
        height: calc(100vh - 60px);
        position: relative;
        margin: 0;
        padding: 0;
        width: 100%;
    }

    /* Обновляем стили для сообщений */
    .message {
        max-width: 90%;
        width: fit-content;
        min-width: 50px;
    }

    .chatgpt-message {
        margin-right: auto;
        margin-left: 0;
        max-width: 90%;
        width: fit-content;
    }

    .user-message {
        position: static; /* Сбрасываем позиционирование */
        left: auto;
        transform: none;
        margin-left: auto;
        margin-right: 0;
        align-self: flex-end;
        max-width: 85%;
    }

    /* Обновляем отступы в области сообщений */
    .messages-area {
        padding-left: 15px;
        padding-right: 15px;
    }

    .message {
        margin-bottom: 15px; /* Тот же отступ, что и в десктопной версии */
    }

    .message-actions {
        margin-top: 7px;
        margin-bottom: 22px;
    }

    /* Показываем и стилизуем кнопку книги на мобильных */
    .header-book-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 41px;
        height: 41px;
        padding: 7px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .header-book-btn:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    .book-icon {
        width: 27px;
        height: 27px;
    }
}

/* Скрываем элементы с классом mobile-only на десктопе */
.mobile-only {
    display: none;
}

/* Показываем элементы с классом mobile-only на мобильных устройствах */
@media screen and (max-width: 950px) {
    .mobile-only {
        display: block;
    }
}

.welcome-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1100; /* Выше, чем у auth-modal */
    backdrop-filter: blur(5px);
}
.auth-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}
.textbook-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1100; /* Увеличиваем z-index, чтобы был выше, чем у user-menu */
    backdrop-filter: blur(5px);
}


.paragraph-messages {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 0;
    background-color: #d0cbd1;
    overflow-y: auto;
}

.paragraph-area {
    padding: 0px 70px 20px 0px; 
    position: relative;
    width: 100%;
        box-sizing: border-box;
    margin: 15px 0 0 0px;
    align-content: center;
    padding-left: 17%;
    min-height: 0;
    background-color: #d0cbd1;
    text-align: center; /* Добавляем это правило для центрирования текста */
}

.paragraph-info {
    display: flex;
    width: 800px;
    margin: 4px;
    padding: 16px 20px 0px 0px;
    font-size: 18px;
    font-weight: 600;
    color: #000000;
    text-align: center;
    z-index: 1;
    background: #d0cbd1;
    border: none;
    box-shadow: none;
}

/* Добавляем стили для модального окна выбора учебника */
.textbook-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1100; /* Увеличиваем z-index, чтобы был выше, чем у user-menu */
    backdrop-filter: blur(5px);
}

.textbook-modal-content {
    background: #faf9ff;
    border-radius: 16px;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    padding: 0 30px 30px 30px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 0 10px 30px rgba(87, 63, 95, 0.2);
}

/* Обновляем стили для фиксированной шапки */
.textbook-modal-header {
    position: sticky;
    top: 0;
    background: #faf9ff;
    padding: 20px 30px; /* Уменьшаем padding сверху и снизу */
    margin: 0 -30px 20px -30px; /* Убираем отрицательный margin сверху */
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    z-index: 1;
}

/* Обновляем позицию кнопки закрытия */
.close-modal-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: #573f5f;
    cursor: pointer;
    padding: 5px;
    transition: all 0.3s ease;
    z-index: 2;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.textbook-modal-content::-webkit-scrollbar {
    width: 8px;
}

.textbook-modal-content::-webkit-scrollbar-track {
    margin: 16px 0; /* Отступ сверху и снизу для сохранения закругления */
    background: #f1f1f1;
    border-radius: 4px;
}

.textbook-modal-content::-webkit-scrollbar-thumb {
    background: #adb6c5;
    border-radius: 4px;
}

.textbook-modal-content::-webkit-scrollbar-thumb:hover {
    background: #647697;
}

.textbook-modal h2 {
    color: #573f5f;
    font-size: 24px;
    margin-bottom: 25px;
    text-align: center;
}

.grade-selector {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 20px 0;
}

.grade-select {
    padding: 12px 20px;
    border-radius: 8px;
    border: 1px solid #d8d0e7;
    font-size: 16px;
    background: #f5f2ff;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #4b3f72;
    width: 200px; /* Фиксированная ширина для селекта */
    /* Добавляем стили для кастомной стрелки */
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234b3f72' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

.grade-select:hover {
    border-color: #6a5acd;
    background-color: #f3f0ff;
}

/* Стили для мобильных устройств */
@media screen and (max-width: 768px) {
    .grade-select {
        width: 180px; /* Немного уменьшаем ширину на мобильных */
    }
}

.textbooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px 0;
}

.textbook-card {
    background: #e8e6f1;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(87, 63, 95, 0.1);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 1px solid #d8d2e8;
}

.textbook-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(87, 63, 95, 0.15);
    background: #e0ddee; /* Еще более темный фон при наведении */
}

.textbook-cover-container {
    width: 150px;
    height: 200px;
    margin-bottom: 20px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(87, 63, 95, 0.1);
    background: #e8e6f1;
}

.textbook-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.textbook-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #e8e6f1;
    padding: 15px;
    border-radius: 16px;
    width: 100%;
    margin-top: 15px;
}

.textbook-name {
    font-size: 18px;
    font-weight: 600;
    color: #000000; /* Черный цвет текста */
    margin-bottom: 10px;
}

.textbook-details {
    font-size: 14px;
    color: #000000; /* Черный цвет текста */
    margin-bottom: 20px;
}

.select-btn {
    padding: 10px 20px;
    background: #573f5f; /* Цвет как у шапки сайта */
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 100%;
}

.select-btn:hover {
    background: #4a344c; /* Более темный оттенок цвета шапки */
    transform: translateY(-2px);
}

.close-modal-btn:hover {
    color: #33583d;
    transform: scale(1.1);
}

/* Адаптивные стили */

    
    .textbooks-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .textbook-cover-container {
        width: 120px;
        height: 160px;
    }
    
    .textbook-name {
        font-size: 16px;
    }
    
    .textbook-details {
        font-size: 13px;
    }
    
    .select-btn {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Скрываем дублирующий заголовок с классом */
.grade-title {
    display: none;
}

/* Стили для страницы регистрации */
.auth-container {
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: white;
}

.auth-container form {
    background: #e8e4eb; /* Делаем фон темнее */
    padding: 50px; /* Увеличиваем внутренние отступы */
    border-radius: 24px;
    width: 100%;
    max-width: 520px; /* Увеличиваем максимальную ширину */
    box-shadow: 0 10px 40px rgba(87, 63, 95, 0.15); /* Усиливаем тень */
}

.auth-container h1 {
    color: #573f5f;
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    font-weight: 700;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #573f5f;
    font-weight: 500;
    font-size: 15px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(87, 63, 95, 0.1);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    color: #333;
    background: white;
}

.form-group input:focus {
    outline: none;
    border-color: #573f5f;
    background: white;
    box-shadow: 0 0 0 4px rgba(87, 63, 95, 0.1);
}

.auth-container .btn {
    width: 100%;
    padding: 14px;
    background: #33583d;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.auth-container .btn:hover {
    background: #2a4832;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(51, 88, 61, 0.2);
}

.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background: white;
    border: 2px solid rgba(87, 63, 95, 0.1);
    border-radius: 12px;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.google-btn:hover {
    background: white;
    border-color: #573f5f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.google-btn img {
    width: 24px;
    height: 24px;
}

.divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.divider::before,
.divider::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(50% - 30px);
    height: 1px;
    background: rgba(87, 63, 95, 0.2);
}

.divider::before {
    left: 0;
}

.divider::after {
    right: 0;
}

.divider span {
    background: #e8e4eb;
    padding: 0 15px;
    color: #573f5f;
    font-size: 14px;
}

.links {
    text-align: center;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px; /* Добавляем отступ между ссылками */
}

.links a {
    color: #573f5f;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
    position: relative; /* Для разделителя */
}

/* Добавляем разделитель между ссылками */
.links a:first-child:after {
    content: "•";
    position: absolute;
    right: -12px;
    color: rgba(87, 63, 95, 0.4);
}

.links a:hover {
    color: #33583d;
    text-decoration: underline;
}

.alert {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 17px;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Адаптивность для мобильных устройств */
@media screen and (max-width: 480px) {
    .auth-container {
        padding: 20px;
    }

    .auth-container form {
        padding: 40px 25px; /* Немного уменьшаем отступы для мобильных */
    }

    .auth-container h1 {
        font-size: 24px;
    }

    .form-group input,
    .google-btn {
        padding: 10px 14px;
    }

    .auth-container .btn {
        padding: 12px;
    }
}

/* Скрываем кнопку книги на десктопе */
.header-book-btn {
    display: none;
}

@media screen and (max-width: 950px) {
    /* ... existing code ... */

    /* Обновляем отступы между кнопками */
    .login-nav ul {
        gap: 10px; /* Устанавливаем единый отступ между всеми элементами */
    }

    /* Удаляем специальный отступ у кнопки книги */
    .header-book-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 41px;
        height: 41px;
        padding: 7px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    /* ... остальной код ... */
}

/* Добавлено для отображения ошибок при авторизации красным цветом */
.form-error {
    color: red;           /* Цвет текста ошибки */
    font-size: 17px;      /* Размер шрифта изменен на 17px */
    margin-top: 10px;     /* Отступ сверху */
}

/* Обновляем стили для мобильной версии */


    .contents-container.active {
        display: block;
    }

    /* Стили для кнопки книги в шапке */
    .header-book-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 41px;
        height: 41px;
        padding: 7px;
        background: rgba(255, 255, 255, 0.15);
        border: none;
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.3s ease;
    }

    .header-book-btn:hover {
        background: rgba(255, 255, 255, 0.25);
    }

    /* Стили для выбранного учебника в мобильной версии */
    .selected-textbook {
        width: 100%;
        margin: 10px 0;
        box-sizing: border-box;
    }

    /* Стили для списка содержания */
    #contents-list {
        margin-top: 20px;
    }
}

/* Стили для анимации появления */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.fade-in {
    opacity: 0;
    visibility: hidden;
}

.fade-in.visible {
    opacity: 1;
    visibility: visible;
    animation: fadeInScale 1.2s cubic-bezier(0.17, 0.67, 0.83, 0.67) forwards;
}

/* Добавляем задержку для разных секций */
.section.fade-in:nth-child(1) { animation-delay: 0.2s; }
.section.fade-in:nth-child(2) { animation-delay: 0.4s; }
.section.fade-in:nth-child(3) { animation-delay: 0.6s; }
.section.fade-in:nth-child(4) { animation-delay: 0.8s; }
.section.fade-in:nth-child(5) { animation-delay: 1s; }

/* Стили для карточек преимуществ */
.benefit-card.fade-in {
    opacity: 0;
    transform: translateY(100px) scale(0.9);
    transition: all 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.benefit-card.fade-in.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Стили для шагов */
.step.fade-in {
    opacity: 0;
    transform: translateX(-100px) rotate(-5deg);
    transition: all 0.8s cubic-bezier(0.17, 0.67, 0.83, 0.67);
}

.step.fade-in.visible {
    opacity: 1;
    transform: translateX(0) rotate(0);
}

/* Добавляем задержки для последовательного появления */
.benefit-card:nth-child(1) { transition-delay: 0.1s; }
.benefit-card:nth-child(2) { transition-delay: 0.2s; }
.benefit-card:nth-child(3) { transition-delay: 0.3s; }
.benefit-card:nth-child(4) { transition-delay: 0.4s; }
.benefit-card:nth-child(5) { transition-delay: 0.5s; }

.step:nth-child(1) { transition-delay: 0.1s; }
.step:nth-child(2) { transition-delay: 0.2s; }
.step:nth-child(3) { transition-delay: 0.3s; }
.step:nth-child(4) { transition-delay: 0.4s; }
.step:nth-child(5) { transition-delay: 0.5s; }
.step:nth-child(6) { transition-delay: 0.6s; }

/* Обновляем стили секций для более современного вида */
.section {
    margin-bottom: 100px;
    background: #ffffff; /* Белый фон для секций */
    padding: 50px;
    border-radius: 30px;
    box-shadow: 0 20px 40px rgba(87, 63, 95, 0.05);
    transform: translateY(0);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    overflow: hidden;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: #573f5f; /* Сплошной цвет вместо градиента */
    border-radius: 5px 5px 0 0;
}

.section:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(87, 63, 95, 0.12);
}

/* Обновляем стили карточек */
.benefit-card {
    background: #f2f2f2; /* Более серый фон для карточек */
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(87, 63, 95, 0.03);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
}

.benefit-card:hover {
    background: #ebebeb; /* Чуть темнее при наведении */
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 20px 40px rgba(87, 63, 95, 0.08);
}

.benefit-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #573f5f; /* Фиолетовый цвет, как у шапки */
}

.benefit-card p {
    font-size: 1.2rem; /* Увеличен размер шрифта */
    line-height: 1.7;
    color: #444;
    margin-bottom: 20px;
}

.benefit-card ul {
    list-style: none;
    padding: 0;
}

.benefit-card li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    font-size: 1.2rem; /* Увеличен размер шрифта */
    color: #444;
    line-height: 1.6;
}

.benefit-card li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #33583d;
    font-weight: bold;
}

/* Сетка аудитории */
.audience-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

/* Обновляем стили для элементов аудитории */
.audience-item {
    background: #f2f2f2; /* Более серый фон */
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(87, 63, 95, 0.05);
    box-shadow: 0 10px 20px rgba(87, 63, 95, 0.03);
    font-size: 1.2rem;
    color: #444;
    line-height: 1.5;
}

.audience-item:hover {
    background: #ebebeb; /* Чуть темнее при наведении */
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(87, 63, 95, 0.1);
}

/* Шаги работы */
.steps-container {
    margin-top: 40px;
    display: grid;
    gap: 20px;
}

/* Обновляем стили шагов */
.step {
    background: #f2f2f2; /* Более серый фон */
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(87, 63, 95, 0.03);
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 20px;
}

.step:hover {
    background: #f5f5f5; /* Чуть темнее при наведении */
    transform: translateX(20px);
    box-shadow: 0 20px 40px rgba(87, 63, 95, 0.08);
}

.step-number {
    width: 40px;
    height: 40px;
    min-width: 40px; /* Добавляем min-width чтобы предотвратить сжатие */
    border-radius: 50%;
    background: #573f5f;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.2rem;
    margin-right: 20px;
}

/* Убираем любые специфичные стили для шестого шага */
.step:nth-child(6) .step-number {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
}

/* Обновляем стили для финального призыва к действию */
.final-cta {
    text-align: center;
    background: #ffffff; /* Белый фон */
    padding: 50px;
    margin: -40px;
    border-radius: 25px;
}

.start-steps {
    margin: 40px 0;
}

.start-title {
    font-size: 1.6rem;
    color: #573f5f; /* Фиолетовый цвет, как у шапки */
    font-weight: 600;
    margin-bottom: 25px;
}

.start-steps ul {
    list-style: none;
    padding: 0;
    max-width: 600px;
    margin: 0 auto;
}

.start-steps li {
    background: #f2f2f2; /* Более серый фон */
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(87, 63, 95, 0.03);
    transition: all 0.3s ease;
    font-size: 1.35rem; /* Увеличиваем с 1.2rem */
    line-height: 1.7;
    color: #444;
}

.start-steps li:hover {
    background: #ebebeb; /* Чуть темнее при наведении */
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(87, 63, 95, 0.1);
}

.motto {
    font-size: 1.6rem;
    color: #333;
    font-style: italic;
    margin: 40px 0;
    font-weight: 600;
}

.welcome-cta {
    margin-top: 60px;
    margin-bottom: 60px;
    text-align: center;
}

.cta-button.primary {
    display: inline-block;
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #ffffff;
    background: #33583d;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(87, 63, 95, 0.2);
}

.cta-button.primary:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(87, 63, 95, 0.3);
}

/* Адаптивность */
@media screen and (max-width: 768px) {
    .welcome-content {
        padding: 30px 15px;
    }

    .main-title {
        font-size: 2.5rem;
        margin-bottom: 40px; /* Немного меньший отступ на мобильных */
    }

    .subtitle {
        font-size: 1.6rem;
    }

    .section {
        padding: 25px 15px;
        margin-bottom: 50px;
    }

    .section h2 {
        font-size: 2rem;
    }

    .section h3 {
        font-size: 1.5rem;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .audience-grid {
        grid-template-columns: 1fr;
    }

    .step {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }

    .step-number {
        margin: 0 0 15px 0;
    }

    .final-cta {
        padding: 30px 15px;
        margin: -20px -15px;
    }

    .cta-button.primary {
        padding: 12px 35px;
        font-size: 1.1rem;
    }

    .section p,
    .benefit-card p,
    .benefit-card li,
    .audience-item,
    .step p,
    .start-steps li {
        font-size: 1.25rem; /* Немного меньше на мобильных */
    }
}

/* Стили для футера */
.site-footer {
    background: #573f5f;
    color: #fff;
    padding: 40px 0 20px;
    
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* Стили для новой кнопки создания чата */
.new-chat-btn {
    display: none;
}



/* Стили для иконки профиля */
.profile-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-left: 10px;
}

.profile-icon:hover {
    background: rgba(255, 255, 255, 0.35);
}

.profile-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* Обновляем стили для login-nav */
.login-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* Добавляем стили для кнопки учебника в шапке */
.header-textbook-btn {
    display: none; /* По умолчанию скрыта для ПК */
}



.textbook-icon {
    width: 32px;
    height: 32px;
    transition: transform 0.2s ease;
}

.header-textbook-btn:hover .textbook-icon {
    transform: scale(1.1);
}




.header-textbook-btn:hover .textbook-icon,
.header-new-chat:hover .new-chat-icon {
    transform: scale(1.1);
}

.header-textbook-btn,
.header-new-chat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    width: auto; /* Убираем фиксированную ширину */
    height: 44px;
}

.button-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}



/* Удаляем кнопку содержания полностью */
.contents-toggle {
    display: none;
}





/* Скрываем кнопку нового чата */
.new-chat-btn {
    display: none;
}



/* Добавляем стили для кнопки нового чата в шапке */
.header-new-chat {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.15); /* Возвращаем прежний цвет */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 44px;
    gap: 8px;
}

.header-new-chat:hover {
    background: rgba(255, 255, 255, 0.25); /* Возвращаем прежний цвет при наведении */
}

.new-chat-icon {
    width: 32px; /* Увеличиваем размер иконки */
    height: 32px;
    transition: transform 0.2s ease;
}



/* Обновляем стили для текста кнопок в шапке */
.button-text {
    color: white;
    font-size: 14px;
    font-weight: 500;
}


/* Добавляем эффект при наведении для иконок */
.header-textbook-btn:hover .textbook-icon,
.header-new-chat:hover .new-chat-icon {
    transform: scale(1.1);
}





















/* Для мобильных устройств */
@media screen and (max-width: 950px) {
    .messages-area {
        padding-left: 15px;
        padding-right: 15px;
    }

    .input-area {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 10px 15px;
        background: #d3ced4; /* Добавляем фон */
        z-index: 100;
    }

    .message-input-container {
        width: 100%;
        margin: 0 auto;
        max-width: 100%;
    }

    .chat-box {
        height: 100%;
        padding-bottom: 0;
    }

    .main-container {
        margin-top: 60px; /* Убираем отступ сверху */
        height: calc(100vh - 60px); /* Высота экрана минус высота шапки */
        padding-top: 0; /* Убираем padding-top */
    }



    .chat-container {
        height: calc(100vh - 60px);
        margin-top: 0;
        position: relative;
    }

    .site-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        height: 60px;
        padding: 0.5rem 1rem;
    }

    .header-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    /* Стили для логотипа */
    .logo h1 {
        font-size: 1.4rem;
        line-height: 1.1;
        text-align: left;
    }

    /* Стили для навигации */
    .header-nav ul {
        display: flex;
        align-items: center;
        gap: 15px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    /* Общие стили для иконок */
    .icon-btn {
        background: none;
        border: none;
        padding: 8px;
        cursor: pointer;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.3s;
    }

    .icon-btn:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    /* Стили для иконки профиля */
    .profile-icon {
        width: 40px;
        height: 40px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.3s;
    }

    .profile-icon:hover {
        background: rgba(255, 255, 255, 0.25);
    }
