* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.container {
    overflow: visible;
}

body, html {
    background-color: #000;
    color: #fff;
    font-family: Arial, sans-serif;
    overflow: hidden;
    height: 100vh;
}

/* Заголовок */
header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    background-color: #1b1b1b;
    width: 100vw;
    position: relative;
}

.back-link, .name-link {
    color: #007bff;
    text-decoration: none;
    font-size: 16px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.back-link { left: 10px; }
.name-link { right: 10px; }

.title {
    font-size: 24px;
    font-weight: bold;
    color: #fff;
    text-align: center;
} 

/* Основная часть */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    gap: 20px;
    position: relative;
    overflow: visible;
}

/* Выпадающее меню */
.dropdown {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 5px 0;
    position: relative;
    z-index: 10;
}

.dropdown-btn {
    background-color: #333;
    color: white;
    padding: 15px 30px;
    font-size: 18px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80%;
    max-width: 400px;
    margin: 0 auto;
    left: calc(50% - 35px);
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.3);
}

.dropdown-btn:hover {
    background-color: #444;
}

/* Дополнительные стили для флагов и выпадающего меню */
.dropdown-content .currency-item img {
    width: 30px; /* Увеличенный размер флагов */
    height: 20px;
    margin-right: 8px; /* Уменьшенный отступ между флагом и текстом */
    overflow: visible;
    position: relative; /* Необходим для работы z-index */
    z-index: 10; /* Установите значение выше, чем у .time-selection */
}

.dropdown-content .currency-item {
    padding: 10px 15px; /* Отступы для элементов меню */
    display: flex;
    align-items: center;
    justify-content: center ; 
    gap: 5px; /* Уменьшенное расстояние между флагом и текстом */
    font-size: 16px;
    color: #e0e0e0;
    cursor: pointer;
    position: relative; /* Необходим для работы z-index */
    z-index: 10; /* Установите значение выше, чем у .time-selection */

}

.currency-item img, .dropdown-btn img {
    width: 24px;
    height: 16px;
    object-fit: cover;
    position: relative; /* Необходим для работы z-index */
    z-index: 10; /* Установите значение выше, чем у .time-selection */
}

/* Выпадающее меню */
.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    background-color: #1b1b1b; /* Тёмный фон */
    width: 95%; /* Уменьшаем ширину до 90% */
    max-height: 250px;
    overflow: auto;
    border-radius: 30px; /* Более округлые углы */
    box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.8);
    margin-top: 10px;
    padding: 10px 0;
    z-index: 20;
    left: 50%;
    transform: translateX(-50%); /* Центрируем меню */
    z-index: 10; /* Установите значение выше, чем у .time-selection */
}

.currency-item {
    padding: 10px 15px;
    display: flex;
    align-items: center;
    justify-content: center; /* Выравнивание по центру */
    font-size: 16px;
    color: #e0e0e0; /* Светлый текст */
    cursor: pointer;
    gap: 10px; /* Отступ между флагом и текстом */
}

.currency-item img {
    width: 20px;
    height: 14px;
    margin-right: 10px;
}

.currency-item:hover {
    background-color: #333; /* Более тёмный цвет при наведении */
    color: #007bff; /* Цвет выделения текста */
}

.currency-item.selected {
    color: #007bff; /* Цвет выделенного элемента */
    font-weight: bold;
}

/* Настройка полосы прокрутки */
.dropdown-content::-webkit-scrollbar {
    width: 5px;
}

.dropdown-content::-webkit-scrollbar-track {
    background: #1b1b1b; /* Тёмный фон полосы прокрутки */
    border-radius: 10px;
}

.dropdown-content::-webkit-scrollbar-thumb {
    background-color: #007bff; /* Синий цвет полосы прокрутки */
    border-radius: 10px;
}

/* Стили для контейнера робота и кнопки загрузки */
.robot-container {  
    position: relative;  
    display: flex;  
    justify-content: center;  
    align-items: center;  /* Используйте center для центрирования по вертикали */  
    height: 100vh;  
    overflow: hidden; /* Закрытие возможных переполнений */  
}  

.image-container {  
    position: relative;  
    display: inline-block;  
    /* Уберите top, если оно не работает */  
}  

.image {  
    max-width: 100%;  
    height: auto;  
    position: relative; /* Расположить изображение относительно контейнера */  
}  

.progress-container, .chat-bubble {
    position: absolute;
    display: none; /* Initially hidden */
}

/* Стили для кнопки загрузки */
.download-btn {
    position: fixed;
    bottom: 130px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    background-color: #007bff !important;
    color: #fff !important;
    width: 40px !important;
    height: 40px !important;
    border: none !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex;
    justify-content: center !important;
    align-items: center !important;
    font-size: 18px !important;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.3) !important;
    transition: background-color 0.3s, transform 0.2s !important;
    z-index: 10 !important;
    outline: none !important;
    text-align: center !important;
    user-select: none !important;
}


.hidden {
    display: none; /* Или можно использовать visibility: hidden; */
}

.download-btn:hover {
    background-color: #0056b3 !important;
}

.download-btn:active {
    transform: translateX(-50%) scale(0.95) !important;
}

/* Контейнер для прогресс-бара */
#progressContainer {
    position: fixed;
    width: 80%; /* или подходящая ширина */
    height: 10px;
    background-color: #ffffff;
    border-radius: 5px;
    overflow: hidden;
    bottom: 130px; /* Отступ от нижней части экрана, чтобы полоса находилась над нижней панелью */
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: none; /* По умолчанию скрыта */
}

#progressBar {  
    height: 130%; 
    background-color: rgb(0, 128, 255); /* Более светлый оттенок синего */    transition: width 0.5s;  
    width: 0;
    border-radius: 2px;
}

.progress-text {
    position: absolute;
    bottom: 20px; /* Смещение вниз от полосы прогресса */
    top: 0; /* Перемещение текста сразу под полосу прогресса */
    left: 50%;
    transform: translateX(-50%);
    color: rgb(0, 0, 0);
    font-size: 10px;
    font-weight: bold;
    text-shadow: 0px 0px 3px rgba(0, 0, 0, 0.5);
    z-index: 0;
    display: block;
}

header.group-header {
    display: flex;
    align-items: center;
    gap: 10px; /* Отступ между аватаркой и текстом */
    padding: 10px;
}

.group-avatar {
    width: 50px; /* Размер аватарки */
    height: 50px;
    border-radius: 50%; /* Скругление для создания круглой аватарки */
    object-fit: cover; /* Чтобы изображение занимало весь блок */
    flex-shrink: 0; /* Чтобы аватарка не сжималась */
}

/* Стиль для текстового облака */
.chat-bubble {
    display: none;
    margin: 0 auto;
    padding: 12px 20px;
    color: #5779e8; /* Белый текст */
    text-shadow: 2px 2px 4px rgba(45, 45, 45, 0.7); /* Тень текста */
    border-radius: 17px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    position: fixed;
    bottom: 75px;
    left: 50%; /* Дополнительное смещение влево */
    transform: translateX(-50%);
    z-index: 10;
    white-space: nowrap; /* Добавлено свойство */
}

/* Стиль для отображения результата */
.result-display {
    display: none;
    margin: 0 auto;
    padding: 12px 20px;
    background-color: #89abcf;
    color: #ffffff;
    font-size: 16px;
    font-weight: bold;
    border-radius: 20px;
    text-align: center;
    position: fixed;
    bottom: 400px;
    left: 60%; /* Дополнительное смещение влево */
    transform: translateX(-50%);
    z-index: 10;
    white-space: nowrap; /* Добавлено свойство */
}


/* Настройка шрифта и отступов для маленьких экранов */
@media screen and (max-width: 600px) {
    .chat-bubble {
        font-size: 14px; /* Немного уменьшите текст для маленьких экранов */
        padding: 10px 16px;
        max-width: 80%;
    }
}


button {  
    margin-top: -7px;   
    padding: 10px 20px;   
    border: none;   
    background-color: #007bff;   
    color: white;   
    border-radius: 5px;   
    cursor: pointer;   
    transition: background-color 0.3s;   
}  

button:hover {  
    background-color: #0056b3;   
} 

/* Временные кнопки */
.time-selection {
    display: flex;
    gap: 6px;
    justify-content: center;
    padding: 2px 0;
    margin-bottom: 0px;
    overflow-x: auto;
    white-space: nowrap;
    overflow: visible; /* Скрыть всё, что выходит за пределы */
}

.button {
    background-color: #333;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s, transform 0.2s;
}

.button:hover {
    background-color: #444;
    transform: scale(1.05);
}

.button.active {
    background-color: #007bff;
    color: #fff;
}

/* Кнопка графика */
.chart-btn {
    background-color: #333;
    color: #007bff;
    padding: 15px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.chart-btn:hover {
    background-color: #444;
    color: #fff;
    transform: scale(1.1);
}

/* Контейнер робота */
.robot-container {  
    position: relative;  
    display: flex;  
    justify-content: center;  
    align-items: center;  
    height: calc(100vh - 70px);
    overflow: hidden;
}  

.robot-image {  
    position: fixed;
    bottom: 30px;
    max-width: 800px;
    height: auto;  
    border-radius: 10px;
    z-index: 2; /* Элемент будет под всеми */
    width: 90%;
    max-width: 800px !important;
    transform: scale(1.2);
    margin-bottom: 65px;
}

/* Нижняя панель навигации */
.footer-nav {
    position: fixed;
    bottom: 0;
    width: 100%;
    display: flex;
    justify-content: space-around;
    background-color: #1b1b1b;
    padding: 10px 0;
    z-index: 5;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    transition: color 0.3s;
}

.footer-nav a i {
    font-size: 20px;
    margin-bottom: 5px;
}

.footer-nav a.selected {
    color: #007bff;
    font-weight: bold;
}

.header-container {
    margin-left: center;
}

.username {
    display: inline-block;
    font-size: 18px;
    color: #ffffff;
    font-weight: bold;
    margin-right: 30px; /* Отступ для индикатора */
}

.online-status {
    font-size: 14px;
    font-weight: bold;
    color: rgb(150, 150, 150);
    margin-left: -5%;
}

.result_text {
    font-size: 16px;
    position: absolute;
    top: 40%;
    left: 80%;
    transform: translate(-50%, -50%);
    text-align: center;
    border-radius: 17px;
}
