/* Стили для мобильного сайдбара */
.sidebar-container {
    position: relative;
}

/* Стили для подсказок свайпа */
.swipe-hint {
    position: fixed;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    z-index: 1060;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    max-width: 100px;
    display: flex;
    align-items: center;
}

.swipe-hint.show {
    opacity: 1;
}

.swipe-hint-left {
    left: 10px;
    bottom: 80px;
}

.swipe-hint-right {
    right: 10px;
    bottom: 80px;
}

.swipe-arrow {
    display: inline-block;
    font-size: 14px;
    margin: 0 5px;
    animation: pulse 1.5s infinite;
}

.swipe-text {
    font-size: 11px;
    max-width: 80px;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
    }
}

/* Улучшенный скролл на мобильных устройствах */
.mobile-device .overflow-auto {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

/* Специальные стили для iOS */
.ios-device input[type="number"],
.ios-device input[inputmode="numeric"] {
    -webkit-appearance: none;
    margin: 0;
}

@media (max-width: 767.98px) {
    /* Изменяем сайдбар для мобильных устройств */
    .col-md-2.bg-light.h-100 {
        position: fixed;
        left: -100%;
        top: 0;
        width: 80%;
        height: 100vh !important;
        z-index: 1040;
        transition: left 0.3s ease-in-out !important;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
        padding-top: 0 !important;
    }
    
    /* Класс для отображения сайдбара */
    .col-md-2.bg-light.h-100.show-sidebar {
        left: 0;
    }
    
    /* Основная область расширяется на всю ширину */
    .col-md-7 {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%;
    }
    
    /* Затемнение для фона при открытом сайдбаре */
    .sidebar-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 1040;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }
    
    .sidebar-backdrop.show {
        display: block;
        opacity: 1;
    }
    
    /* Улучшения для Safari на iOS */
    .overflow-auto {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Предотвращаем скролл основного контента при открытом сайдбаре */
    body.sidebar-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
}

/* Дополнительные стили для мобильной адаптации */
@media (max-width: 767.98px) {
    /* Улучшения для чата на мобильных */
    .col-md-3.h-100 {
        position: fixed;
        top: 0;
        right: -100%;
        width: 85%;
        height: 100vh !important;
        z-index: 1050;
        background-color: #fff;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
        padding-top: 0 !important; 
        opacity: 0;               /* плавная прозрачность */
        isolation: isolate;
        will-change: transform, opacity;
  transition:
    right 0.3s ease-in-out,
    opacity 0.3s ease-in-out !important;
    
}
    

    /* Улучшаем отображение чата при его открытии на мобильных */
    .col-md-3.h-100.show-chat {
        right: 0;
        display: flex;
        flex-direction: column;
        opacity: 0.99;
        transform: translateX(0);
    }
    /* Кнопка чата на мобильных видима всегда */
    #open-chat {
        display: block !important;
        z-index: 1040;
    }
    
    /* Полноэкранная основная область для калькуляторов */
    .col-md-7.h-100 {
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Стили для карточек калькуляторов на мобильных */
    .card.h-100 {
        margin-bottom: 1rem;
        height: auto !important; /* Отменяем растягивание на всю высоту */
    }
    
    /* Улучшения для карточек ассистентов */
    .assistant-card {
        margin-bottom: 1rem;
        height: auto !important; /* Отменяем растягивание на всю высоту */
    }

    /* Помогаем пользователю понять, что элементы интерактивны */
    .calculator-toggle,
    .saved-calc-link,
    .sidebar-toggle,
    #close-sidebar,
    .calculator-link {
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    /* Увеличение области касания для удобства на мобильных */
    .btn-sm {
        min-height: 30px;
        min-width: 30px;
    }
    
    /* Улучшаем видимость текущего выбранного элемента */
    .text-primary, 
    .saved-calc-link.text-primary,
    .calculator-link.text-primary {
        font-weight: 600;
    }
    
    /* Дополнительная подсказка для свайпа (появляется только один раз) */
    .swipe-hint {
        position: fixed;
        bottom: 80px;
        left: 20px;
        background-color: rgba(0, 0, 0, 0.7);
        color: white;
        padding: 10px 15px;
        border-radius: 20px;
        font-size: 13px;
        animation: fadeInOut 3s forwards;
        z-index: 1070;
        display: none;
    }
    
    .swipe-hint.show {
        display: block;
    }
    
    @keyframes fadeInOut {
        0% { opacity: 0; }
        20% { opacity: 1; }
        80% { opacity: 1; }
        100% { opacity: 0; }
    }
}

/* CSS переменные для адаптивной высоты на мобильных */
:root {
    --vh: 1vh;
}
/* Улучшаем отображение модалов на мобильных */
@media (max-width: 767.98px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: 12px;
    }
    
    .modal-header {
        padding: 0.75rem 1rem;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem;
    }
}

/* Фиксы для полей ввода на мобильных */
@media (max-width: 767.98px) {
    input, select, textarea, .form-control {
        font-size: 16px !important; /* Предотвращает зум на iOS */
    }
    
    .form-control:focus {
        box-shadow: none; /* Убираем свечение, которое может выглядеть некрасиво на мобильных */
    }
}

/* Корректируем высоту на мобильных устройствах используя CSS-переменную */
@media (max-width: 767.98px) {
    .min-vh-100 {
        min-height: calc(var(--vh, 1vh) * 100) !important;
    }
}

/* Стили для кнопок управления мобильным сайдбаром и чатом */
@media (max-width: 767.98px) {
    /* Общие стили для обеих кнопок */
    .sidebar-toggle,
    #open-chat {
        position: fixed;
        bottom: 18px;
        z-index: 1050;
        width: 60px;
        height: 60px;
    }
    
    /* Позиционирование кнопок по горизонтали */
    .sidebar-toggle {
        left: 20px;
    }
    
    #open-chat {
        right: 20px;
    }
    
    /* Скрываем кнопку сайдбара когда он открыт */
    body.sidebar-open .sidebar-toggle {
        display: none !important;
    }
    
    /* Скрываем кнопку чата когда он открыт */
    body.chat-open #open-chat {
        display: none !important;
    }
    
    /* Стили для иконки сайдбара */
    .sidebar-toggle {
        border-radius: 50%;
        background-color: var(--bs-primary);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
        border: 1px solid var(--bs-primary);
        transition: transform 0.2s, background-color 0.3s, color 0.3s;
    }
    
    /* Эффект при наведении на кнопку сайдбара */
    .sidebar-toggle:hover, .sidebar-toggle:focus {
        background-color: white;
        color: var(--bs-primary);
    }
    
    .sidebar-toggle i.bi {
        font-size: 1.8rem;
        transition: color 0.3s;
    }
    
    /* Изменение цвета иконки на белый при наведении */
    .sidebar-toggle:hover i.bi, 
    .sidebar-toggle:focus i.bi {
        color: var(--bs-primary);
    }
    
    .sidebar-toggle:active {
        transform: scale(0.95);
    }
}
/* Мобильные стили для скрытия сайдбара и расширения чата */
@media (max-width: 768px) {
	.content-section, .footer-container, .header-container {
		width: 100%;
        padding: 0 15px;
	}
	.auth-container {
		width: 90%;
	}

    /* Скрываем сайдбар по умолчанию и делаем его доступным через кнопку */
    #sidebar {
        position: fixed;
        left: -100%; /* За пределами экрана */
        width: 100%;
        height: 100vh;
        background-color: #f7f7f7;
        transition: transform 0.3s ease;
        z-index: 1000;
    }
	/* Показываем сайдбар, когда он в состоянии :target */
    #sidebar:target {
        transform: translateX(100%);
    }
	
	#sidebar.hidden {
		transform: translateX(-100%);
	}
    /* Кнопка для открытия сайдбара */
    #toggle-sidebar {
        display: block;
        position: relative;
        border: none;
        padding: 0;
        z-index: 1100;
        cursor: pointer;
        color: black;
    }
	#toggle-sidebar:hover {
  		background: none;
    }
    /* Увеличиваем ширину контента на мобильных устройствах */
    #content {
        margin-left: 0;
        max-width: 100%;
        padding: 10px;
    }

    /* Контейнер чата на всю ширину */
    #chat-wrapper, #chat-container {
        width: 100%;
    }

	#send-button .send-text {
        display: none;
    }
    /* Карточки ассистентов: одна колонка на мобильных */
    .assistant-card {
        flex: 1 1 100%;
    }

    /* Увеличение и стилизация кнопок на мобильных */
    .price-button, .price-button-outline {
        width: 100%;
        font-size: 0.9rem;
    }

    /* Карточки ассистентов на всю ширину */
    .assistant-list {
        flex-direction: column;
		width: 90%;
    }

 
	.assistant-avatar {
        opacity: 1; /* Изображение всегда видно */
    }

    .assistant-short-video {
        display: none; /* Скрываем видео на мобильных устройствах */
    }

    .assistant-info:hover .assistant-avatar,
    .assistant-card:hover .assistant-avatar {
        opacity: 1; /* На мобильных изображение остаётся видимым при наведении */
    }
    /* Скрываем или упрощаем неважные элементы на маленьких экранах */
    .header-center nav ul {
        flex-direction: column;
        align-items: flex-start;
        padding: 0;
    }


	/* Скрыть текст логотипа и центральное меню */
    .header-left .logo-text,
    .header-center {
        display: none;
    }

    /* Отображение кнопки-гармошки для меню */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        position: relative;
        width: 44px;
        height: 44px;
        cursor: pointer;
        z-index: 1100;
        color: #333;
        border-radius: 50%;
        transition: all 0.2s ease;
        margin-left: 5px;
    }

    .mobile-menu-toggle:active {
        background-color: rgba(0, 0, 0, 0.05);
    }

    .mobile-menu-toggle svg {
        width: 24px;
        height: 24px;
        transition: transform 0.3s ease;
    }

    /* Анимация иконки меню при активации */
    #mobile-menu-checkbox:checked ~ .mobile-menu-toggle svg {
        transform: rotate(90deg);
    }

    /* Скрытый чекбокс */
    .mobile-menu-checkbox {
        position: absolute;
        opacity: 0;
        visibility: hidden;
    }

    /* Стилизация мобильного меню */
    .mobile-menu {
        display: block;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: 0;
        overflow: hidden;
        background-color: #fff;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        transition: height 0.3s ease, opacity 0.2s ease;
        opacity: 0;
    }

    /* Активное мобильное меню */
    #mobile-menu-checkbox:checked ~ .mobile-menu {
        height: auto;
        max-height: calc(100vh - 60px);
        opacity: 1;
        overflow-y: auto;
    }

    /* Стили для пунктов мобильного меню */
    .mobile-menu nav ul {
        flex-direction: column;
        padding: 10px 0;
        margin: 0;
        list-style: none;
    }

    .mobile-menu nav ul li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }

    .mobile-menu nav ul li a {
        display: block;
        padding: 15px 20px;
        color: #333;
        font-size: 16px;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .mobile-menu nav ul li a:hover,
    .mobile-menu nav ul li a:active {
        background-color: #f8f9fa;
        color: var(--bs-primary);
    }

    /* Улучшение выравнивания хедера */
    .header-container {
        display: flex;
        align-items: center;
        position: relative;
        height: 60px;
        padding: 0 15px;
    }

    /* Логотип на мобильных */
    .header-left {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        flex: 1;
        height: 100%;
    }
    
    /* Отображение логотипа */
    .header-left .logo {
        display: flex;
        align-items: center;
        height: 100%;
        margin-right: 10px;
    }
    
    /* Wrapper для кнопки-гармошки */
    .menu-toggle-wrapper {
        display: flex;
        align-items: center;
        height: 100%;
    }
    
    /* Отображение кнопки-гармошки для меню */
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        background: none;
        border: none;
        width: 44px;
        height: 44px;
        cursor: pointer;
        z-index: 1100;
        color: #333;
        border-radius: 50%;
        transition: all 0.2s ease;
        margin-left: 5px;
        padding-top: 5px;
    }

    /* Позиционирование правой части хедера */
    .header-right {
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    /* Компактные стили для переключателя языка */
    .language-switcher-container {
        margin-right: 10px;
    }

    .language-icon {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .user-avatar-container {
        width: 36px;
        height: 36px;
    }

    .user-avatar {
        width: 100%;
        height: 100%;
    }
    
    /* Улучшенное выпадающее меню языка */
    .language-dropdown {
        right: 0;
        left: auto;
        width: 160px;
    }
    
    /* Улучшенное выпадающее меню пользователя */
    .user-dropdown {
        right: 0;
        left: auto;
        width: 200px;
    }

    /* Модальные окна на мобильных */
	.modal-dialog {
   		width: 95%; /* Модальное окно занимает почти всю ширину экрана */
  		margin: 20px auto;
		max-width: 100%;
	}

	.modal-content {
 	   padding: 15px;
	}
	.post_img {
		height: 200px !important;
	}
	/* Прокручиваемые теги на мобильных устройствах */
    .tags-menu {
        padding-top: 0 !important;
    }
	.tags-menu ul {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        padding: 0.5rem 0;
        margin: 0;
        scroll-behavior: smooth;
    }

    .tags-menu li {
        display: inline-block;
        margin-right: 10px;
    }

    .tags-menu .badge {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        text-transform: capitalize;
        white-space: nowrap;
        background-color: #f8f9fa;
        color: #333;
    }

    /* Дополнительные стили при наведении */
    .tags-menu .badge:hover {
        background-color: #333;
        color: #fff;
    }

    /* Удаляем ограничение высоты для контейнера чата */
    #global-chat-container {
        display: flex;
        flex-direction: column;
        max-height: 100%;
    }
    
    /* Окно чата занимает всё доступное пространство */
    #global-chat-window {
        flex: 1;
        overflow-y: auto;
        padding-bottom: 70px !important; /* Оставляем место для инпута */
    }
    
    /* Заголовок чата фиксированной высоты */
    #global-chat-container .border-bottom {
        flex-shrink: 0;
    }

  .tooltip-text {
    display: none;
  }

    .btn-primary {
        font-size: 1rem; /* Уменьшенный размер текста для мобильных */
        padding: 0.6rem 1.5rem; /* Уменьшенные отступы */
    }

    .header-content {
        padding-left: 15px; /* Меньшие отступы на узких экранах */
        padding-right: 15px; /* Меньшие отступы на узких экранах */
    }

    .blog-title {
        width: 100%; /* 50% на десктопах */
    }
}

/* Docs: hide floating "Send to Chat" button on mobile */
@media (max-width: 767.98px) {
  #selection-popup { display: none !important; }
}

@media (max-width: 768px) {
    .assistant-slider-video {
   		display: none;
	}
	.assistant-avatar {
		display: block;
	}
	.title-container .title {
		font-size: 2.5rem;
	}
	.title-container .subtitle {
		font-size: 1rem;
	}
	.carousel-control-next, .carousel-control-prev {
        position: static; /* Отменяем абсолютное позиционирование */
        display: inline-block;
        margin-top: 10px; /* Отступ сверху для отделения от изображения */
        width: auto;
        transform: none;
    }
}

/* Общие стили для кнопок закрытия в мобильной версии */
#close-sidebar {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: #f8f9fa;
    color: #6c757d;
    transition: all 0.2s ease;
    z-index: 1060;
    border: none;
}

/* Кнопка закрытия чата - остается в естественном потоке (справа) */
#close-chat {
    position: relative;
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: #6c757d;
    transition: all 0.2s ease;
    border: none;
}

#close-sidebar:hover {
    background-color: #e9ecef;
    color: #495057;
    transform: scale(1.05);
}

#close-sidebar:active {
    transform: scale(0.95);
}

#close-chat:hover {
    color: #495057;
}

/* Стили для иконок закрытия */
#close-sidebar svg,
#close-chat svg {
    width: 24px;
    height: 24px;
}

/* Позиционирование кнопки закрытия чата */
#global-chat-container #close-chat {
    position: relative;
    top: auto;
    right: auto;
}

/* Keep close button on the right side (same as desktop) on mobile */
@media (max-width: 767.98px) {
  #global-chat-container #close-chat {
    position: relative !important;
    right: auto !important;
    left: auto !important;
    top: auto !important;
    background: transparent;
    box-shadow: none;
    z-index: auto;
  }
}

/* Корректировка стилей контейнера чата */
#global-chat-container .border-bottom {
    position: relative;
    padding-bottom: 0.75rem;
}
/* Стили для аватара в кнопке чата */
.chat-avatar-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden; 
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #007bff;
    box-shadow: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5; 
    animation: none;
    border: 2px solid #007bff;
}

.chat-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 50%;
}

.chat-avatar-wrapper svg {
    width: 24px;
    height: 24px;
    fill: white;
}

/* Стили для контейнера кнопки чата */
/* Примечание: основные стили для .chat-icon-container определены в main.css */
.chat-icon-container {
    display: flex;
    z-index: 1060;
}

/* Стили для медиа-контейнера */
.media-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Стили для аватара ассистента */
.assistant-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
/* Современный стиль мобильного хедера */
@media (max-width: 768px) {
    header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
        padding: 10px 0;
        transition: all 0.3s ease;
        z-index: 1000;
    }
    
    /* Эффект сжатия хедера при скролле */
    header.scrolled {
        padding: 5px 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    /* Исправленный стиль логотипа */
    .header-left .logo {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        margin: 0;
    }
    
    .header-left .logo-image {
        width: 24px !important;
        height: 24px !important;
        margin-right: 5px;
        transition: all 0.3s ease;
        object-fit: contain; /* Сохраняем пропорции */
    }
    
    .header-left .logo-text {
        display: none; /* Скрываем текст на совсем маленьких экранах */
        transition: all 0.3s ease;
    }
    
    /* Показываем текст логотипа на экранах от 480px */
    @media (min-width: 480px) {
        .header-left .logo-text {
            display: inline-block;
        }
    }
    
    /* Анимация для кнопки меню */
    .mobile-menu-toggle {
        position: relative;
        overflow: hidden;
    }
    
    .mobile-menu-toggle::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 123, 255, 0.1);
        border-radius: 50%;
        transform: translate(-50%, -50%) scale(0);
        transition: transform 0.3s ease;
    }
    
    .mobile-menu-toggle:active::after {
        transform: translate(-50%, -50%) scale(1);
    }
    
    /* Стили для активных пунктов меню */
    .mobile-menu nav ul li a.active {
        color: var(--bs-primary);
        font-weight: 500;
        background-color: rgba(0, 123, 255, 0.05);
        border-left: 3px solid var(--bs-primary);
    }
    
    /* Затемнение при открытом мобильном меню */
    .menu-backdrop {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        width: 100%;
        height: calc(100vh - 60px);
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    #mobile-menu-checkbox:checked ~ .menu-backdrop {
        display: block;
        opacity: 1;
    }
}


@media (max-width: 768px) {
    /* Увеличенная ширина кнопки Sign In */
    .chat-button {
        padding: 8px 16px;
        font-size: 14px;
        border-radius: 20px;
        min-width: 110px;
        text-align: center;
        white-space: nowrap;
    }
    
    /* Корректировка позиционирования иконки меню */
    .mobile-menu-toggle {
        left: 10px;
    }
    
    /* Корректировка области для логотипа и меню */
    .header-container {
        padding: 0 10px;
    }

    /* Корректировка правой части хедера */
    .header-right {
        right: 10px;
    }
}

@media (max-width: 768px) {
    /* Улучшенная иконка языка */
    .language-icon {
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: all 0.2s ease;
    }
    
    .language-icon:active {
        background-color: rgba(0, 0, 0, 0.05);
        transform: scale(0.95);
    }
    
    /* Улучшенное выпадающее меню языка */
    .language-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        width: 160px;
        background-color: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 1200;
        overflow: hidden;
    }
    
    .language-dropdown ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .language-dropdown .language-option {
        padding: 12px 16px;
        font-size: 14px;
        cursor: pointer;
        transition: all 0.2s ease;
        display: flex;
        align-items: center;
    }
    
    .language-dropdown .language-option:hover,
    .language-dropdown .language-option:active {
        background-color: rgba(0, 123, 255, 0.05);
    }
    
    /* Стили для пользовательского аватара */
    .user-avatar-container {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.2s ease;
        background-color: #f8f9fa;
    }
    
    .user-avatar-container:active {
        transform: scale(0.95);
    }
    
    /* Улучшенное выпадающее меню пользователя */
    .user-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        width: 220px;
        background-color: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        z-index: 1200;
        overflow: hidden;
        padding: 8px 0;
        margin-top: 8px;
    }
    
    .user-dropdown-header {
        padding: 12px 16px;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .user-dropdown ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    
    .user-option {
        padding: 0;
        margin: 0;
    }
    
    .user-option a {
        padding: 12px 16px;
        display: flex;
        align-items: center;
        font-size: 14px;
        transition: all 0.2s ease;
    }
    
    .user-option a:hover,
    .user-option a:active {
        background-color: rgba(0, 123, 255, 0.05);
    }
}
.sign-in-text {
    display: none;
}

/* Hide entire button on mobile */
@media (max-width: 768px) {
    .header-right > .btn-primary {
        display: none !important;
    }
}

@media (max-width: 768px) {
    /* Контейнер для центральной кнопки */
    .mobile-calc-center {
        display: flex;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        z-index: 990;
    }
    
    /* Сама кнопка */
    .mobile-calc-btn {
        display: block;
        font-size: 13px;
        padding: 6px 12px;
        border-radius: 20px;
        white-space: nowrap;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 480px) {
    .mobile-calc-btn {
        font-size: 12px;
        padding: 5px 10px;
    }
}