@import url('../css2');
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

:root {
    --bg-white: #ffffff;
    --bg-light: #f0f2f5;
    --text-primary: #1e293b;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --border-color: #e2e8f0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
    --button-gradient: linear-gradient(135deg, #10b981, #059669);
    --hover-bg: rgba(16, 185, 129, 0.05);
    --header-gradient: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(255,255,255,0.7));
    --accent-green-rgb: 16, 185, 129;
    --trend-line-color: #6366f1;
    --ma-line-color: #f59e0b;
    --axis-color: #64748b;
    --chart-bg: #ffffff;
}

[data-theme="dark"] {
    --bg-white: #0f172a;
    --bg-light: #1e293b;
    --text-primary: #f1f5f9;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --border-color: #334155;
    --shadow-color: rgba(0, 0, 0, 0.3);
    --card-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.2);
    --button-gradient: linear-gradient(135deg, #10b981, #059669);
    --hover-bg: rgba(16, 185, 129, 0.1);
    --header-gradient: linear-gradient(135deg, rgba(15,23,42,0.9), rgba(15,23,42,0.7));
    --accent-green-rgb: 16, 185, 129;
    --trend-line-color: #818cf8;
    --ma-line-color: #fbbf24;
    --axis-color: #94a3b8;
    --chart-bg: #0f172a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

html {
    height: 100%;
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Manrope', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.02em;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    background-image: 
        radial-gradient(circle at 90% 10%, rgba(var(--accent-green-rgb), 0.1) 0%, transparent 40%),
        radial-gradient(circle at 10% 90%, rgba(var(--accent-green-rgb), 0.05) 0%, transparent 40%);
    background-attachment: fixed;
    padding-bottom: 70px;
    /* Для Mini App - предотвращаем pull-to-refresh только при скролле вверх от начала */
    overscroll-behavior-y: contain;
}

.app-wrapper {
    display: grid;
    grid-template-columns: 320px 1fr;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "header header"
        "sidebar main";
    min-height: calc(100vh - 70px);
    position: relative;
    max-width: 1440px;
    margin: 0 auto;
    width: 100%;
    overflow: visible; /* Разрешаем скролл на основном контейнере */
    box-sizing: border-box;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    grid-area: header;
    transition: box-shadow 0.3s ease, background-color 0.3s ease;
}

.brand-name {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    white-space: nowrap;
}

.brand-logo {
    height: 34px;
    width: auto;
    margin-top:-2px;
    object-fit: contain;
    flex-shrink: 0;
}

.brand-name h2 {
    font-size: 14px;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    margin-left: auto;
}

.theme-switcher {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: 6px;
    padding: 3px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.theme-button {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    margin: 0 1px;
}

/* В светлой теме иконка переключения на тёмную тему должна быть почти чёрной */
[data-theme="light"] .theme-button[data-theme="dark"] svg {
    fill: #000000;
    opacity: 0.9;
}

.theme-button svg {
    width: 18px;
    height: 18px;
    fill: var(--text-primary);
    opacity: 0.7;
    transition: all 0.2s ease;
}

.theme-button.active {
    background-color: var(--accent-green);
}

.theme-button.active svg {
    fill: white;
    opacity: 1;
}

.theme-button:hover:not(.active) {
    background-color: var(--hover-bg);
}

.language-menu {
    position: relative;
    user-select: none;
    font-size: 12px;
    cursor: pointer;
    z-index: 150;
}

.language-current {
    display: flex;
    align-items: center;
    background-color: var(--bg-light);
    border-radius: 6px;
    padding: 4px 8px;
    gap: 4px;
    font-weight: 500;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
}

.language-current:hover {
    background-color: var(--hover-bg);
}

.language-options {
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 8px;
    background-color: var(--bg-white);
    border-radius: 8px;
    min-width: 160px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 200;
    max-height: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    overflow: hidden;
}

.language-menu.active .language-options {
    max-height: 280px;
    opacity: 1;
    border: 1px solid var(--border-color);
    overflow-y: auto;
}

.language-option {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.language-option:hover {
    background-color: var(--hover-bg);
}

.language-option.active {
    background-color: rgba(16, 185, 129, 0.1);
    font-weight: 500;
}

.flag-img {
    width: 16px;
    height: auto;
    border-radius: 2px;
}

.dropdown-arrow {
    width: 12px;
    height: 12px;
    transition: transform 0.3s ease;
}

.language-menu.active .dropdown-arrow {
    transform: rotate(180deg);
}

.left-panel {
    grid-area: sidebar;
    background-color: var(--bg-white);
    padding: 24px;
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible; /* Разрешаем выход выпадающих списков за пределы панели */
}

.brand-logo {
    font-family: 'Montserrat', sans-serif;
}

.brand-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.config-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible; /* Разрешаем видимость выпадающих списков */
    min-height: 0; /* Важно для flex */
}

.config-title {
    display: flex;
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 10px;
}

.config-icon {
    color: var(--accent-green);
}

.config-heading {
    font-size: 20px;
    font-weight: 600;
    line-height: 1;
    display: flex;
    align-items: center;
    color: var(--text-primary);
}

.config-heading svg {
    color: var(--accent-green);
    flex-shrink: 0;
}

.settings-gear-icon {
    stroke: var(--accent-green) !important;
    color: var(--accent-green);
}

.star-icon-label {
    stroke: currentColor;
    color: var(--text-primary);
}

.mode-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    background-color: var(--bg-light);
    border-radius: 10px;
    padding: 5px;
    overflow: hidden;
}

.mode-button {
    flex: 1;
    padding: 12px 14px;
    text-align: center;
    font-size: 15px;
    font-weight: 500;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s ease;
    border-radius: 8px;
}

.mode-button.active {
    background-color: var(--accent-green);
    color: white;
    box-shadow: 0 3px 10px rgba(var(--accent-green-rgb), 0.2);
}

.mode-button:hover:not(.active):not(.disabled) {
    background-color: var(--hover-bg);
}

.mode-button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.mode-button.unavailable {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

.mode-button.unavailable::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    border-radius: inherit;
}

.form-field {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
    font-weight: 500;
}

.dropdown-select {
    position: relative;
    user-select: none;
}

.dropdown-display {
    background-color: var(--bg-light);
    padding: 14px 18px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 500;
    position: relative;
    transition: all 0.2s ease;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dropdown-display::after {
    content: "";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--text-primary);
    transition: transform 0.2s ease;
}

.dropdown-select.active .dropdown-display::after {
    transform: translateY(-50%) rotate(180deg);
}

.dropdown-select.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.dropdown-select.disabled .dropdown-display {
    cursor: not-allowed;
    pointer-events: none;
}

.dropdown-select.disabled .dropdown-display:hover {
    background-color: var(--bg-light);
}

.dropdown-list {
    position: absolute;
    background-color: var(--bg-white);
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10000; /* Высокий приоритет, чтобы список был поверх всех элементов */
    margin-top: 8px;
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    max-height: 400px; /* Увеличиваем максимальную высоту */
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-green) var(--bg-light);
    /* Добавляем padding-bottom, чтобы последние элементы были видны полностью */
    padding-bottom: 20px;
    /* Используем scroll-padding для правильного скролла к последним элементам */
    scroll-padding-bottom: 20px;
}

/* Ограничиваем высоту dropdown для таймфреймов, чтобы был скролл и не конфликтовал с результатом сигнала */
#time-list {
    max-height: 150px; /* Уменьшаем высоту, чтобы не накладывался на блок результата */
    overflow-y: auto;
    /* Убеждаемся, что список не выходит за пределы видимой области перед блоком результата */
    margin-bottom: 0;
}

/* Ограничиваем высоту dropdown для валютных пар, чтобы был скролл и не конфликтовал с результатом сигнала */
#pair-list {
    max-height: 220px; /* Увеличиваем высоту, но не доходим до блока результата */
    overflow-y: auto;
    /* Убеждаемся, что список не выходит за пределы видимой области перед блоком результата */
    margin-bottom: 0;
}

.dropdown-list.hidden {
    display: none;
}

.dropdown-list:not(.hidden) {
    display: block;
}

.list-category {
    padding: 10px 15px;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-green);
    background-color: rgba(16, 185, 129, 0.05);
    border-bottom: 1px solid var(--border-color);
    /* убираем липкое позиционирование, чтобы заголовки не наслаивались при скролле */
    position: relative;
    z-index: 1;
}

.dropdown-option {
    padding: 10px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dropdown-option:hover, .dropdown-option.selected {
    background-color: var(--hover-bg);
}

.hidden-select {
    display: none;
}

.action-button {
    position: relative;
    overflow: hidden;
    background: var(--button-gradient);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--accent-green-rgb), 0.25);
    letter-spacing: 0.3px;
    height: 54px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.action-button-center {
    text-align: center;
    justify-content: center;
}

.action-button-secondary {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 2px solid var(--accent-green);
    box-shadow: 0 4px 15px rgba(var(--accent-green-rgb), 0.1);
    gap: 8px;
}

.action-button-secondary:hover {
    background: rgba(16, 185, 129, 0.15);
    box-shadow: 0 6px 20px rgba(var(--accent-green-rgb), 0.2);
}

/* Убираем светлые засветы для кнопки "вернуться на главную" */
.action-button-secondary::before {
    display: none;
}

.button-icon {
    width: 18px;
    height: 18px;
}

.signal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.action-button:hover {
    box-shadow: 0 6px 20px rgba(var(--accent-green-rgb), 0.35);
    transform: translateY(-2px);
}

.action-button:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(var(--accent-green-rgb), 0.2);
}

.action-button::before {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(rgba(255,255,255,0.8), transparent 70%);
    border-radius: 50%;
    top: var(--y, 0);
    left: var(--x, 0);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.action-button:hover::before {
    opacity: 0.3;
}

.action-button.loading {
    background: linear-gradient(45deg, var(--accent-green) 25%, #059669 25%, #059669 50%, var(--accent-green) 50%, var(--accent-green) 75%, #059669 75%);
    background-size: 40px 40px;
    animation: loading-gradient 2s linear infinite;
}

@keyframes loading-gradient {
    0% { background-position: 0 0; }
    100% { background-position: 40px 40px; }
}

.telegram-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    padding: 14px;
    border-radius: 25px;
    background-color: #0088cc;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 4px 10px rgba(0, 136, 204, 0.2);
}

.telegram-link:hover {
    background-color: #0077b5;
    transform: translateY(-1px);
}

.telegram-svg {
    width: 22px;
    height: 22px;
}

/* Флаги инструментов (спрайт Pocket Option) */
.asset-flags {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 6px;
}

.asset-label {
    flex: 1;
}

.star-icon {
    margin-left: 8px;
    flex-shrink: 0;
    opacity: 0.9;
    stroke: white;
    color: white;
}

.flag-icon {
    display: inline-block;
    width: 21px;
    height: 21px;
    background-image: url('sprites-retina.png');
    background-repeat: no-repeat;
    background-size: 396px 396px;
    border-radius: 50%;
    /* Fallback для случаев, когда спрайт не загрузился */
    background-color: var(--bg-light);
    /* Принудительная загрузка для iOS */
    -webkit-background-size: 396px 396px;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Fallback для флагов, если спрайт не загрузился - скрыт */
.flag-icon::after {
    content: '';
    display: none; /* Скрываем зеленый круг fallback */
    width: 100%;
    height: 100%;
    background-color: var(--accent-green);
    opacity: 0.3;
    border-radius: 50%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
}

/* Точные позиции флагов из спрайта Pocket Option */
.flag-icon-eur { background-position: -220px -132px; }
.flag-icon-usd { background-position: -330px -352px; }
.flag-icon-aud { background-position: -110px -88px; }
.flag-icon-cad { background-position: -132px -154px; }
.flag-icon-chf { background-position: -176px 0; }
.flag-icon-jpy { background-position: 0 -264px; }
.flag-icon-gbp { background-position: -176px -220px; }
.flag-icon-lbp { background-position: -176px -264px; }
.flag-icon-omr { background-position: -110px -308px; }
.flag-icon-cny { background-position: -176px -132px; }
.flag-icon-clp { background-position: -176px -88px; }
.flag-icon-cop { background-position: -44px -176px; }
.flag-icon-dzd { background-position: -110px -198px; }
.flag-icon-myr { background-position: -264px -286px; }
.flag-icon-sgd { background-position: -44px -330px; }
.flag-icon-thb { background-position: -352px -198px; }
.flag-icon-yer { background-position: -88px -374px; }
.flag-icon-nok { background-position: -308px -220px; }
.flag-icon-pkr { background-position: -308px -308px; }
.flag-icon-brl { background-position: 0 -154px; }
.flag-icon-try { background-position: -44px -352px; }
.flag-icon-aed { background-position: -66px -44px; }
.flag-icon-huf { background-position: -44px -242px; }
.flag-icon-nzd { background-position: -44px -308px; }
.flag-icon-rub { background-position: -330px -286px; }
.flag-icon-bhd { background-position: -132px -132px; }
.flag-icon-ngn { background-position: -308px -110px; }
.flag-icon-tnd { background-position: -352px -286px; }
.flag-icon-mxn { background-position: -242px -286px; }
.flag-icon-sar { background-position: -330px -308px; }
.flag-icon-kes { background-position: -66px -264px; }
.flag-icon-qar { background-position: -330px -132px; }
.flag-icon-uah { background-position: -154px -352px; }
.flag-icon-php { background-position: -286px -308px; }
.flag-icon-idr { background-position: -132px -242px; }
.flag-icon-bdt { background-position: -110px -132px; }
.flag-icon-vnd { background-position: -374px -110px; }
.flag-icon-ars { background-position: -110px 0; }
.flag-icon-zar { background-position: -176px -374px; }

/* Истекший сигнал и анимация скрытия */
.signal-expired {
    text-align: center;
    padding: 20px;
}

.signal-expired-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--accent-green);
    margin-bottom: 8px;
}

.signal-expired-subtitle {
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0.8;
}

.signal-fade-out {
    animation: signalFadeOut 0.6s ease forwards;
}

@keyframes signalFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}
/* Дополнительные валюты */
.flag-icon-mad { background-position: -286px -88px; }
.flag-icon-cnh { background-position: -176px -132px; } /* такой же как CNY */
.flag-icon-egp { background-position: -220px -44px; }
.flag-icon-inr { background-position: -264px -44px; }
.flag-icon-jod { background-position: -264px -176px; }

.content-area {
    grid-area: main;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    /* Убираем все overflow - скролл только на уровне страницы */
}

.trade-signal, .price-chart {
    background-color: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    width: 100%;
    box-sizing: border-box;
}

.trade-signal {
    min-height: auto;
    padding: 16px;
    margin-bottom: 0;
    order: 1; /* Фиксированный order - никогда не меняется */
    flex-shrink: 0;
    position: relative;
    /* Блок сигнала всегда остается на своем месте */
}

.price-chart {
    min-height: 500px;
    height: 500px;
    margin-bottom: 0;
    order: 2;
    padding: 0;
    padding-bottom: 0;
    overflow: hidden;
    display: none;
    position: relative;
}

.price-chart.active.otc-chart {
    min-height: auto;
    height: auto;
    padding-bottom: 0;
    margin-bottom: 0;
}

.price-chart.active {
    display: flex;
    flex-direction: column;
}

/* Контейнер для OTC изображения */
.otc-image-container {
    display: none;
    width: 100%;
    height: auto;
    min-height: auto;
    max-height: none;
    padding: 0;
    margin-top: 0;
    margin-bottom: 0;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
    background-color: transparent;
}

.otc-signal-image {
    max-width: 100%;
    max-height: none;
    width: 100%;
    height: auto;
    min-height: auto;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background-color: transparent;
    margin: 0;
    padding: 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.otc-signal-image:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Селектор индикаторов над графиком */
.chart-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chart-indicator-select {
    position: relative;
}

.indicator-toggle {
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.indicator-toggle:hover {
    background-color: var(--hover-bg);
}

.chart-toolbar {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 100;
    display: flex;
    gap: 8px;
}

.chart-toolbar-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-toolbar-btn:hover {
    background: var(--hover-bg);
    border-color: var(--accent-green);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.chart-toolbar-btn svg {
    width: 16px;
    height: 16px;
}

.price-chart {
    position: relative;
}

.chart-controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10000;
    display: flex;
    gap: 8px;
    flex-direction: column;
    background: rgba(19, 23, 34, 0.95);
    padding: 8px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    pointer-events: auto;
}

.chart-control-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chart-control-btn:hover {
    background: var(--hover-bg);
    border-color: var(--accent-green);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.chart-control-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.chart-control-btn svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.indicator-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    padding: 10px 12px;
    background-color: var(--bg-white);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    min-width: 230px;
    display: none;
    z-index: 50;
    max-height: 260px;
    overflow-y: auto;
}

.indicator-dropdown.open {
    display: block;
}

.indicator-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    padding: 6px 0;
    cursor: pointer;
}

.indicator-option input {
    width: 14px;
    height: 14px;
}

.signal-top, .chart-top {
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.top-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.signal-svg, .chart-svg {
    color: var(--accent-green);
}

.signal-heading, .chart-heading {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
}

.timestamp {
    background-color: var(--accent-green);
    color: white;
    padding: 5px 10px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.signal-content {
    padding: 24px;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.signal-empty {
    text-align: center;
    color: var(--text-primary);
    opacity: 0.7;
    font-size: 16px;
    padding: 15px;
}

.signal-details {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.signal-pair {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.signal-pair .signal-flags {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.signal-pair .signal-flags .flag-icon {
    width: 21px;
    height: 21px;
    border-radius: 50%;
}

/* .signal-prestart удалён по просьбе пользователя */

.signal-direction {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 15px 0;
    padding: 16px 20px;
    border-radius: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.signal-direction.green {
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.signal-direction.red {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.signal-text {
    font-size: 20px;
    font-weight: 600;
}

.arrow-icon {
    width: 44px;
    height: 44px;
    margin-left: 15px;
    position: relative;
    overflow: visible;
}

/* Поворачиваем стрелку для BUY (покупка) на 90 градусов (180 от -90), противоположно SELL */
.signal-direction.green .arrow-icon {
    transform: rotate(90deg);
    animation: arrowPulseUp 3.5s ease-in-out infinite;
}

/* Поворачиваем стрелку для SELL (продажа) на 90 градусов, чтобы вправо стало вниз */
.signal-direction.red .arrow-icon {
    transform: rotate(90deg);
    animation: arrowPulseDown 3.5s ease-in-out infinite;
}

/* Эффект свечения/волны для BUY (движение вверх) */
.signal-direction.green .arrow-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, transparent 0%, rgba(16, 185, 129, 0.6) 50%, transparent 100%);
    animation: waveUp 3.5s ease-in-out infinite;
    pointer-events: none;
    border-radius: 50%;
}

/* Эффект свечения/волны для SELL (движение вниз) */
.signal-direction.red .arrow-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(239, 68, 68, 0.6) 50%, transparent 100%);
    animation: waveDown 3.5s ease-in-out infinite;
    pointer-events: none;
    border-radius: 50%;
}

@keyframes waveUp {
    0% {
        transform: translateY(100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes waveDown {
    0% {
        transform: translateY(-100%);
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: translateY(100%);
        opacity: 0;
    }
}

/* Анимация для BUY - движение вверх (противоположно SELL, после поворота 90deg, translateX вверх = отрицательное значение) */
@keyframes arrowPulseUp {
    0% {
        transform: rotate(90deg) translateX(0);
        opacity: 1;
    }
    25% {
        transform: rotate(90deg) translateX(-1.5px);
        opacity: 0.9;
    }
    50% {
        transform: rotate(90deg) translateX(-3px);
        opacity: 0.85;
    }
    75% {
        transform: rotate(90deg) translateX(-1.5px);
        opacity: 0.9;
    }
    100% {
        transform: rotate(90deg) translateX(0);
        opacity: 1;
    }
}

/* Анимация для SELL - движение вниз (после поворота 90deg, translateX вниз = положительное значение) */
@keyframes arrowPulseDown {
    0% {
        transform: rotate(90deg) translateX(0);
        opacity: 1;
    }
    25% {
        transform: rotate(90deg) translateX(1.5px);
        opacity: 0.9;
    }
    50% {
        transform: rotate(90deg) translateX(3px);
        opacity: 0.85;
    }
    75% {
        transform: rotate(90deg) translateX(1.5px);
        opacity: 0.9;
    }
    100% {
        transform: rotate(90deg) translateX(0);
        opacity: 1;
    }
}

.signal-time-info {
    display: flex;
    width: 100%;
    margin-top: 8px;
    padding: 12px 16px;
    background-color: var(--bg-light);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border-color);
    align-items: center;
    gap: 12px;
}

.signal-comment {
    padding: 4px 0;
    font-size: 12px;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.signal-comment-text {
    flex: 1;
    line-height: 1.3;
}

.signal-comment-text--small {
    font-size: 11px;
}

.comment-fade {
    animation: commentFade 0.2s ease-out forwards;
}

@keyframes commentFade {
    0% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-3px); }
}

.comment-dots {
    display: inline-flex;
    gap: 2px;
}

.comment-dots span {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background-color: var(--accent-green);
    animation: commentDots 1.2s infinite ease-in-out;
}

.comment-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.comment-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes commentDots {
    0%, 80%, 100% { transform: scale(0.4); opacity: 0.4; }
    40% { transform: scale(1); opacity: 1; }
}

.signal-timeframe, .signal-probability {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.signal-timeframe span, .signal-probability span {
    font-size: 12px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.signal-timeframe .value, .signal-probability .value {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-green);
}

.signal-timer {
    padding: 0;
    background: transparent;
    display: inline;
}

#timer-value {
    font-size: 16px;
    font-weight: 600;
    color: white;
    font-variant-numeric: tabular-nums;
}

.chart-container {
    width: 100%;
    height: calc(100% - 60px);
    min-height: 320px;
    position: relative;
    overflow: visible;
    padding: 10px;
    box-sizing: border-box;
}

.chart-container svg {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
}

/* Стили для линии тренда и индикаторов */
.chart-container svg .trend-line {
    stroke: var(--trend-line-color) !important;
    filter: drop-shadow(0 0 3px rgba(99, 102, 241, 0.4));
    transition: stroke 0.3s ease, opacity 0.3s ease;
}

[data-theme="dark"] .chart-container svg .trend-line {
    filter: drop-shadow(0 0 4px rgba(129, 140, 248, 0.6));
}

.chart-container svg .ma-line {
    stroke: var(--ma-line-color) !important;
    filter: drop-shadow(0 0 3px rgba(245, 158, 11, 0.4));
    transition: stroke 0.3s ease, opacity 0.3s ease;
}

[data-theme="dark"] .chart-container svg .ma-line {
    filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.6));
}

/* Улучшенная видимость индикаторов */
.chart-container svg .indicators-group {
    pointer-events: none;
}

.chart-container svg .trend-line-group {
    pointer-events: none;
}

/* Стили для осей графика */
.chart-container svg .chart-axis {
    stroke: var(--axis-color) !important;
    transition: stroke 0.3s ease, opacity 0.3s ease;
}

.chart-container svg .chart-tick {
    stroke: var(--axis-color) !important;
    transition: stroke 0.3s ease, opacity 0.3s ease;
}

.chart-container svg text {
    fill: var(--text-primary) !important;
    transition: fill 0.3s ease;
}

/* Улучшенная видимость в темной теме */
[data-theme="dark"] .chart-container svg .chart-axis {
    opacity: 0.5 !important;
}

[data-theme="dark"] .chart-container svg .chart-tick {
    opacity: 0.7 !important;
}

[data-theme="dark"] .chart-container svg text {
    opacity: 0.9 !important;
}

.chart-meta {
    display: flex;
    justify-content: space-between;
    padding: 8px 24px;
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 500;
}

.meta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.meta-label {
    font-size: 10px;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-green);
}

.page-footer {
    width: 100%;
    text-align: center;
    margin-top: auto;
    padding: 20px;
    font-size: 13px;
    opacity: 0.7;
}

.lock-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lock-modal.hidden {
    display: none;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.modal-box {
    position: relative;
    background-color: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    padding: 28px 24px;
    min-width: 320px;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    border: 1px solid var(--border-color);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lock-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 20px;
    color: var(--accent-red);
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
}

.modal-text {
    font-size: 15px;
    text-align: center;
    margin-bottom: 20px;
    color: var(--text-primary);
    opacity: 0.9;
    line-height: 1.6;
}

.modal-button {
    padding: 12px 24px;
    background-color: var(--accent-green);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
    font-size: 15px;
    box-shadow: 0 4px 10px rgba(var(--accent-green-rgb), 0.2);
}

.modal-button:hover {
    background-color: #059669;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(var(--accent-green-rgb), 0.3);
}

.loading-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.loading-dots {
    display: flex;
    justify-content: center;
    margin: 12px 0;
}

.loading-animation > div:last-child {
    color: var(--text-primary);
    opacity: 0.8;
    font-size: 14px;
    margin-top: 8px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    margin: 0 4px;
    background-color: var(--accent-green);
    border-radius: 50%;
    animation: loadingDots 1.5s infinite ease-in-out;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingDots {
    0%, 100% { transform: scale(0.3); opacity: 0.3; }
    50% { transform: scale(1); opacity: 1; }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes popIn {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.progress-container {
    padding: 0 24px 16px 24px;
    margin-top: 16px;
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 14px;
    background-color: var(--bg-light);
    border-radius: 7px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-fill {
    height: 100%;
    background: var(--button-gradient);
    border-radius: 7px;
    transition: width 1s linear;
    box-shadow: 0 1px 3px rgba(var(--accent-green-rgb), 0.3);
}

.progress-text {
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0.8;
    margin-top: 10px;
    text-align: center;
    font-weight: 500;
}

.notification-badge {
    display: inline-block;
    background-color: var(--accent-green);
    color: white;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
    margin-top: 12px;
    animation: fadeIn 0.5s ease, pulse 2s infinite;
    box-shadow: 0 2px 8px rgba(var(--accent-green-rgb), 0.3);
    font-weight: 500;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(var(--accent-green-rgb), 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(var(--accent-green-rgb), 0); }
    100% { box-shadow: 0 0 0 0 rgba(var(--accent-green-rgb), 0); }
}

.timeframe-group {
    display: block;
}

.timeframe-group.hidden {
    display: none;
}

/* Нижнее меню навигации */
.bottom-nav {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background-color: var(--bg-white);
    border-top: 1px solid var(--border-color);
    display: flex !important;
    justify-content: center;
    align-items: center;
    padding: 8px 0;
    z-index: 9910002 !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    height: 70px;
    visibility: visible !important;
    opacity: 1 !important;
}

.nav-item {
    flex: 1;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 12px;
    margin: 0 8px;
}

.nav-item:hover {
    background-color: var(--hover-bg);
}

.nav-item.active {
    background-color: rgba(16, 185, 129, 0.1);
}

.nav-item.active .nav-icon {
    color: var(--accent-green);
}

.nav-item.active .nav-label {
    color: var(--accent-green);
    font-weight: 600;
}

.nav-icon {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    opacity: 0.7;
    transition: all 0.2s ease;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

.nav-label {
    font-size: 12px;
    color: var(--text-primary);
    opacity: 0.7;
    transition: all 0.2s ease;
    font-weight: 500;
    white-space: nowrap; /* всегда в одну строку */
}

/* Страница конкурсов */
.contests-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 70px;
    background-color: var(--bg-light);
    z-index: 999;
    overflow: hidden; /* Блокируем скролл на странице */
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    max-height: 100dvh; /* Dynamic viewport height для мобильных */
}

.contests-page .main-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.contests-page.hidden {
    display: none;
}

.contests-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
    flex: 1;
    overflow-y: auto; /* Разрешаем скролл только внутри контейнера */
    -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
    touch-action: pan-y; /* Разрешаем только вертикальный скролл */
}

.contests-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.contests-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.contests-subtitle {
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0.7;
}

.contests-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.contest-card {
    background-color: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.contest-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.1);
}

.contest-card.featured {
    border: 2px solid var(--accent-green);
    box-shadow: 0 10px 30px -5px rgba(16, 185, 129, 0.2);
}

.contest-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.contest-image {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

.contest-main-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    border-radius: 16px;
    object-fit: contain;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.contest-main-image:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(15, 23, 42, 0.4);
}

/* Адаптация изображения конкурса для разных экранов */
@media screen and (max-width: 768px) {
    .contest-main-image {
        border-radius: 12px;
        max-width: 100%;
    }
    
    .contest-image {
        padding: 15px;
    }
}

@media screen and (max-width: 480px) {
    .contest-main-image {
        border-radius: 10px;
    }
    
    .contest-image {
        padding: 10px;
    }
}

.iphone-display {
    font-size: 80px;
    line-height: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.contest-info {
    padding: 24px;
}

.contest-name {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.contest-description {
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0.8;
    line-height: 1.6;
    margin-bottom: 20px;
}

.contest-details {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    padding: 16px;
    background-color: var(--bg-light);
    border-radius: 12px;
}

.contest-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
    opacity: 0.9;
}

.contest-detail-item svg {
    width: 18px;
    height: 18px;
    color: var(--accent-green);
    flex-shrink: 0;
}

.contest-detail-item strong {
    color: var(--accent-green);
    font-weight: 600;
}

.contest-requirements {
    margin-bottom: 24px;
    padding: 16px;
    background-color: var(--bg-light);
    border-radius: 12px;
}

.contest-requirements h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.contest-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contest-requirements li {
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0.9;
    padding: 6px 0;
    line-height: 1.6;
}

.contest-participate-btn {
    width: 100%;
    padding: 16px 24px;
    background: var(--button-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--accent-green-rgb), 0.25);
}

.contest-participate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-green-rgb), 0.35);
}

.contest-participate-btn:active:not(:disabled) {
    transform: translateY(0);
}

.contest-participate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: var(--bg-light);
    color: var(--text-primary);
    box-shadow: none;
}

.contest-participate-btn svg {
    width: 20px;
    height: 20px;
}

.contest-participating-status {
    width: 100%;
    padding: 16px 24px;
    background: var(--bg-light);
    color: var(--accent-green);
    border: 2px solid var(--accent-green);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 2px 8px rgba(var(--accent-green-rgb), 0.1);
}

.contest-participating-status svg {
    width: 20px;
    height: 20px;
    stroke-width: 3;
}

/* Страница промокодов */
.promocodes-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 70px;
    background-color: var(--bg-light);
    z-index: 999;
    overflow: hidden; /* Блокируем скролл на странице */
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    max-height: 100dvh; /* Dynamic viewport height для мобильных */
}

.promocodes-page .main-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.promocodes-page.hidden {
    display: none;
}

.promocodes-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: 20px;
    flex: 1;
    overflow-y: auto; /* Разрешаем скролл только внутри контейнера */
    -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
    touch-action: pan-y; /* Разрешаем только вертикальный скролл */
}

.promocodes-header {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.promocodes-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.promocodes-subtitle {
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0.7;
}

.promocodes-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.promocode-card,
.promocode-info-card,
.promocode-active-card {
    background-color: var(--bg-white);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    padding: 24px;
    transition: all 0.3s ease;
}

.promocode-card:hover,
.promocode-info-card:hover,
.promocode-active-card:hover {
    box-shadow: 0 15px 35px -5px rgba(0, 0, 0, 0.1);
}

.promocode-form-section {
    width: 100%;
}

.promocode-form-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.promocode-input-wrapper {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.promocode-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background-color: var(--bg-light);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.promocode-input:focus {
    outline: none;
    border-color: var(--accent-green);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(var(--accent-green-rgb), 0.1);
}

.promocode-input::placeholder {
    text-transform: none;
    letter-spacing: normal;
    font-weight: 400;
    opacity: 0.5;
}

.promocode-activate-btn {
    padding: 14px 24px;
    background: var(--button-gradient);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(var(--accent-green-rgb), 0.25);
    white-space: nowrap;
}

.promocode-activate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(var(--accent-green-rgb), 0.35);
}

.promocode-activate-btn:active:not(:disabled) {
    transform: translateY(0);
}

.promocode-activate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.promocode-activate-btn svg {
    width: 20px;
    height: 20px;
}

.promocode-message {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: none;
    animation: fadeIn 0.3s ease;
}

.promocode-message.success {
    display: block;
    background-color: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.promocode-message.error {
    display: block;
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Toast уведомление для копирования промокода */
.toast-notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.95) 0%, rgba(5, 150, 105, 0.95) 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
    z-index: 99999999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    pointer-events: none;
    backdrop-filter: blur(10px);
    min-width: 250px;
    max-width: 90%;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.toast-notification.toast-error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.95) 0%, rgba(220, 38, 38, 0.95) 100%);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.toast-notification.toast-info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.95) 0%, rgba(37, 99, 235, 0.95) 100%);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.toast-icon {
    font-size: 20px;
    line-height: 1;
}

.toast-message {
    font-size: 15px;
    font-weight: 600;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    flex: 1;
    text-align: center;
}

.promocode-info-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.promocode-info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.promocode-info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.info-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.info-text {
    flex: 1;
}

.info-text strong {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.info-text p {
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0.8;
    line-height: 1.6;
    margin: 0;
}

.promocode-action-button-wrap {
    margin-top: 12px;
}

.promocode-action-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: var(--button-gradient);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(var(--accent-green-rgb), 0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.promocode-action-button svg {
    width: 18px;
    height: 18px;
}

.promocode-action-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(var(--accent-green-rgb), 0.5);
}

.promocode-active-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.promocode-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.promocode-item {
    padding: 16px;
    background-color: var(--bg-light);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    cursor: pointer;
}

.promocode-item:hover {
    background-color: var(--hover-bg);
    border-color: var(--accent-green);
    transform: translateX(4px);
}

.promocode-code {
    font-size: 18px;
    font-weight: 700;
    color: var(--accent-green);
    letter-spacing: 2px;
    margin-bottom: 8px;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    font-family: 'Courier New', monospace;
}

.promocode-bonus {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-green);
    margin-bottom: 4px;
}

.promocode-desc {
    font-size: 13px;
    color: var(--text-primary);
    opacity: 0.7;
}

/* Страница AI ассистента */
.assistant-page {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 70px;
    background-color: var(--bg-light);
    z-index: 999;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* Для мобильных устройств - используем 100vh для правильной работы с клавиатурой */
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height для мобильных */
    /* Для iOS - учитываем safe area */
    padding-bottom: env(safe-area-inset-bottom, 0);
    /* Предотвращаем прокрутку страницы вверх при открытии клавиатуры */
    overscroll-behavior: contain;
}

.assistant-page .main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    flex-shrink: 0;
}

.assistant-page.hidden {
    display: none;
}

.assistant-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 12px;
    min-height: 0;
    overflow: hidden; /* Убираем overflow, чтобы контролировать скролл внутри chat-container */
    /* Для правильной работы с клавиатурой */
    position: relative;
    height: 100%;
    /* Чат занимает всю доступную высоту */
    max-height: 100%;
    gap: 12px; /* Отступы между элементами */
}

.assistant-header {
    text-align: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 12px;
    flex-shrink: 0; /* Не сжимается */
}

.assistant-clear-btn {
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.assistant-clear-btn:hover {
    background-color: var(--hover-bg);
}

.assistant-faq {
    margin-bottom: 12px;
    padding: 12px 16px;
    border-radius: 10px;
    background-color: var(--bg-light);
    flex-shrink: 0; /* Не сжимается */
}

.assistant-faq-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-primary);
}

.assistant-faq-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.assistant-faq-item {
    flex: 1 1 45%;
    min-width: 140px;
    border: none;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 11px;
    background-color: var(--bg-white);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.assistant-faq-item:hover {
    background-color: var(--hover-bg);
}

.assistant-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.assistant-subtitle {
    font-size: 12px;
    color: var(--text-primary);
    opacity: 0.7;
    margin-bottom: 8px;
}

.chat-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-white);
    border-radius: 0; /* Убираем скругление для полноэкранного вида */
    box-shadow: none; /* Убираем тень для полноэкранного вида */
    border: none; /* Убираем границу */
    overflow: hidden;
    min-height: 0;
    /* Для мобильных - чтобы контейнер правильно работал с клавиатурой */
    position: relative;
    max-height: 100%;
    height: 100%;
    /* Используем flex для правильного распределения пространства */
    display: flex;
    flex-direction: column;
    /* Чат занимает всю доступную высоту */
    margin: 0;
    padding: 0;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-green) var(--bg-light);
    -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
    touch-action: pan-y; /* Разрешаем только вертикальный скролл */
    min-height: 0; /* Важно для flex */
    /* Дополнительный padding снизу для видимости последних сообщений и поля ввода */
    padding-bottom: 120px;
    /* Улучшаем видимость сообщений */
    background-color: var(--bg-light);
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background-color: var(--accent-green);
    border-radius: 4px;
}

.chat-welcome {
    text-align: center;
    padding: 30px 16px;
    color: var(--text-primary);
    margin: 20px 0;
}

.welcome-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    color: var(--accent-green);
    opacity: 0.8;
}

.chat-welcome h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.chat-welcome p {
    font-size: 14px;
    opacity: 0.85;
    line-height: 1.6;
}

.chat-message {
    display: flex;
    gap: 10px;
    animation: fadeIn 0.3s ease;
    max-width: 85%;
    margin-bottom: 4px;
}

.chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

.chat-message.assistant {
    align-self: flex-start;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 20%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-avatar.user {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 2px solid rgba(16, 185, 129, 0.3);
}

.message-avatar.user svg {
    width: 100%;
    height: 100%;
    display: block;
}

.message-avatar.assistant {
    background: var(--bg-light);
    color: var(--accent-green);
    padding: 2px;
    overflow: hidden;
}

.message-avatar.assistant img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 20%;
}

.message-content {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 15px;
    line-height: 1.6;
    word-wrap: break-word;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chat-message.user .message-content {
    background: var(--button-gradient);
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(var(--accent-green-rgb), 0.3);
}

.chat-message.assistant .message-content {
    background: var(--bg-white);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Стили для кликабельных ссылок в сообщениях ассистента */
.chat-message.assistant .message-content .chat-link {
    color: var(--accent-green);
    text-decoration: underline;
    word-break: break-all;
    transition: color 0.2s ease;
}

.chat-message.assistant .message-content .chat-link:hover {
    color: #059669;
    text-decoration: underline;
}

.chat-message.assistant .message-content .chat-link:visited {
    color: #047857;
}

.chat-input-container {
    border-top: 1px solid var(--border-color);
    padding: 12px 16px;
    background-color: var(--bg-white);
    position: sticky;
    bottom: 70px; /* Поднимаем над нижним меню (70px высота меню) */
    z-index: 100;
    flex-shrink: 0;
    /* Для мобильных - учитываем safe area */
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
    /* Обеспечиваем видимость на всех устройствах */
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    /* Улучшаем видимость при длинных ответах */
    margin-top: auto;
}

.chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    max-width: 100%;
}

.chat-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    background-color: var(--bg-light);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.chat-input:focus {
    outline: none;
    border-color: var(--accent-green);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(var(--accent-green-rgb), 0.1);
}

.chat-send-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: none;
    background: var(--button-gradient);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(var(--accent-green-rgb), 0.2);
}

.chat-send-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--accent-green-rgb), 0.3);
}

.chat-send-btn:active {
    transform: translateY(0);
}

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

.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.chat-message .loading-dots {
    display: flex;
    gap: 6px;
    padding: 4px 0;
}

.chat-message .loading-dots span {
    width: 8px;
    height: 8px;
    background-color: var(--accent-green);
    border-radius: 50%;
    animation: loadingDots 1.4s infinite ease-in-out;
}

.chat-message .loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.chat-message .loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

/* Адаптивность для планшетов */
@media screen and (max-width: 1024px) {
    .app-wrapper {
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "sidebar"
            "main";
    }
    
    .left-panel {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 20px 24px;
    }
    
    .content-area {
        display: flex;
        flex-direction: column;
    }
    
    .trade-signal, .price-chart {
        width: 100%;
        margin-right: 0;
    }
    
    .trade-signal {
        min-height: 300px;
    }
    
    .price-chart {
        min-height: 400px;
        height: auto;
    }
}

/* Адаптивность для мобильных */
@media screen and (max-width: 768px) {
    
    body {
        padding-bottom: 70px;
    }
    
    .app-wrapper {
        grid-template-columns: 1fr;
        min-height: calc(100vh - 70px);
    }
    
    .left-panel {
        padding: 16px 20px;
    }
    
    .content-area {
        padding: 16px;
    }
    
    .trade-signal, .price-chart {
        margin-bottom: 16px;
        border-radius: 12px;
    }
    
    .trade-signal {
        min-height: 300px;
    }
    
    .price-chart {
        min-height: 400px;
        height: 400px;
    }
    
    .tradingview-widget-container {
        height: 400px !important;
        min-height: 400px !important;
    }
    
    .chart-container {
        height: calc(100% - 50px);
        min-height: 250px;
    }
    
    .signal-direction {
        padding: 12px 16px;
    }
    
    .arrow-icon {
        width: 36px;
        height: 36px;
    }
    
    .mode-toggle {
        flex-direction: row;
        padding: 4px;
    }
    
    .mode-button {
        margin-bottom: 0;
        padding: 10px 8px;
        font-size: 14px;
    }
    
    .signal-top, .chart-top {
        padding: 15px 20px;
    }
    
    .signal-content {
        padding: 20px;
    }
    
    .progress-container {
        padding: 0 20px 20px 20px;
        margin-top: 6px;
    }
    
    .signal-time-info {
        margin-top: 12px;
        margin-bottom: 6px;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .signal-timeframe, .signal-probability {
        gap: 2px;
    }
    
    .signal-timeframe .value, .signal-probability .value {
        font-size: 14px;
    }
    
    .signal-timeframe span, .signal-probability span {
        font-size: 10px;
    }
    
    .progress-bar {
        margin-top: 10px;
        height: 12px;
    }
    
    .progress-text {
        font-size: 13px;
        margin-top: 8px;
    }
    
    .chart-meta {
        padding: 10px 20px;
        font-size: 13px;
    }
    
    .meta-value {
        font-size: 14px;
    }
    
    .meta-label {
        font-size: 9px;
    }
    
    .assistant-container {
        padding: 10px;
    }
    
    .chat-messages {
        padding: 10px;
        gap: 8px;
    }
    
    .chat-message {
        max-width: 90%;
    }
    
    .contests-container {
        padding: 16px;
    }
    
    .contest-card {
        margin-bottom: 16px;
    }
    
    .contest-info {
        padding: 20px;
    }
    
    .contest-name {
        font-size: 20px;
    }
    
    .contest-details {
        flex-direction: column;
        gap: 12px;
    }
    
    .iphone-display {
        font-size: 60px;
    }
    
    .promocodes-container {
        padding: 16px;
    }
    
    .promocode-input-wrapper {
        flex-direction: column;
    }
    
    .promocode-activate-btn {
        width: 100%;
        justify-content: center;
    }
    
    .promocode-info-item {
        flex-direction: column;
        gap: 12px;
    }
    
    .info-icon {
        font-size: 24px;
    }
}

/* Средние мобильные устройства */
@media screen and (max-width: 640px) and (min-width: 481px) {
    .signal-time-info {
        margin: 12px 0 6px 0;
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .signal-timeframe .value, .signal-probability .value {
        font-size: 14px;
    }
    
    .signal-timeframe span, .signal-probability span {
        font-size: 10px;
    }
}

/* Очень маленькие мобильные устройства */
@media screen and (max-width: 480px) {
    .trade-signal {
        min-height: 300px;
    }
    
    .price-chart {
        min-height: 350px;
        height: 350px;
    }
    
    .tradingview-widget-container {
        height: 350px !important;
        min-height: 350px !important;
    }
    
    .chart-top {
        padding: 12px 16px;
    }
    
    .chart-heading {
        font-size: 16px;
    }
    
    .signal-time-info {
        margin: 10px 0 6px 0;
        padding: 6px 10px;
        font-size: 11px;
        border-radius: 8px;
    }
    
    .signal-timeframe, .signal-probability {
        gap: 1px;
    }
    
    .signal-timeframe .value, .signal-probability .value {
        font-size: 13px;
        font-weight: 600;
    }
    
    .signal-timeframe span, .signal-probability span {
        font-size: 9px;
        letter-spacing: 0.3px;
    }
    
    .signal-content {
        padding: 16px;
    }
    
    .signal-pair {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .signal-direction {
        padding: 10px 14px;
        margin: 12px 0;
    }
    
    .signal-text {
        font-size: 18px;
    }
    
    .arrow-icon {
        width: 32px;
        height: 32px;
        margin-left: 12px;
    }
    
    .progress-container {
        padding: 0 16px 16px 16px;
        margin-top: 4px;
    }
    
    .progress-bar {
        margin-top: 8px;
        height: 10px;
    }
    
    .progress-text {
        font-size: 12px;
        margin-top: 6px;
    }
    
    .chart-meta {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .meta-value {
        font-size: 13px;
    }
    
    .meta-label {
        font-size: 9px;
    }
    
    .chart-container {
        height: calc(100% - 45px);
        min-height: 220px;
    }
    
    .bottom-nav {
        height: 65px;
    }
    
    .nav-item {
        padding: 6px 12px;
    }
    
    .nav-icon {
        width: 22px;
        height: 22px;
    }
    
    .nav-label {
        font-size: 11px;
    }
    
    /* Оптимизация для Telegram Mini App */
    .assistant-container {
        padding: 0px;
        gap: 8px;
        /* Чат занимает всю доступную высоту */
        height: 100%;
        max-height: 100%;
    }
    
    .assistant-header {
        padding: 10px 12px;
        margin-bottom: 8px;
    }
    
    .assistant-title {
        font-size: 16px;
        margin-bottom: 4px;
    }
    
    .assistant-subtitle {
        font-size: 11px;
        margin-bottom: 6px;
    }
    
    .assistant-clear-btn {
        padding: 5px 10px;
        font-size: 11px;
        margin-top: 6px;
    }
    
    .assistant-faq {
        margin-bottom: 8px;
        padding: 8px 10px;
    }
    
    .assistant-faq-title {
        font-size: 11px;
        margin-bottom: 5px;
    }
    
    .assistant-faq-item {
        min-width: 120px;
        padding: 5px 8px;
        font-size: 10px;
    }
    
    .chat-messages {
        padding: 8px;
        gap: 8px;
        /* Увеличиваем padding-bottom для видимости при открытой клавиатуре и длинных ответах */
        padding-bottom: 140px;
        /* Плавный скролл на мобильных */
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
    }
    
    .chat-welcome {
        padding: 16px 8px;
    }
    
    .welcome-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 10px;
    }
    
    .chat-welcome h3 {
        font-size: 14px;
        margin-bottom: 6px;
    }
    
    .chat-welcome p {
        font-size: 11px;
    }
    
    .message-avatar {
        width: 28px;
        height: 28px;
    }
    
    .message-content {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .chat-input-container {
        padding: 12px;
        bottom: 70px; /* Поднимаем над нижним меню на мобильных */
        /* Для мобильных - дополнительный padding снизу для клавиатуры */
        padding-bottom: calc(12px + env(safe-area-inset-bottom, 0));
        /* Увеличиваем z-index для мобильных */
        z-index: 200;
    }
    
    .chat-input {
        padding: 12px 14px;
        font-size: 16px; /* Предотвращаем зум на iOS */
        max-height: 100px;
    }
    
    .chat-send-btn {
        width: 42px;
        height: 42px;
    }
    
    .chat-send-btn svg {
        width: 20px;
        height: 20px;
    }
    
    /* Стили для win-message на мобильных */
    .win-title {
        font-size: 32px;
        margin-bottom: 8px;
    }
    
    .win-subtitle {
        font-size: 16px;
    }
    
    .win-price-info {
        margin-top: 16px;
        max-width: 280px;
        padding: 12px;
        gap: 10px;
    }
    
    .win-price-row {
        font-size: 13px;
    }
    
    .next-signal-btn {
        margin-top: 16px;
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* TradingView Widget Container - исправлено для Mini App */
.tradingview-widget-container {
    width: 100% !important;
    max-width: 100% !important;
    height: 500px;
    min-height: 500px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Скрываем верхнюю панель TradingView если она появляется */
.tradingview-widget-container iframe {
    border: none;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* Скрываем серую панель сверху TradingView */
.tradingview-widget-container > div:first-child > div:first-child,
.tradingview-widget-container [class*="header"],
.tradingview-widget-container [class*="toolbar"],
.tradingview-widget-container [class*="top"] {
    display: none !important;
}

/* Скрываем серую панель через селекторы TradingView */
.tradingview-widget-container iframe {
    margin-top: 0 !important;
}

/* Прячем верхнюю серую панель через отрицательный margin для iframe */
.tradingview-widget-container {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Скрываем нижнюю синюю панель TradingView */
.tradingview-widget-container [class*="bottom"],
.tradingview-widget-container [class*="footer"],
.tradingview-widget-container [class*="toolbar-bottom"],
.tradingview-widget-container > div:last-child > div:last-child {
    display: none !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Скрываем элементы верхней панели внутри iframe через CSS переменные */
.tradingview-widget-container > div {
    overflow: hidden !important;
}

.tradingview-widget-container > div:first-child {
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
    box-sizing: border-box;
}

.price-chart {
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    height: 500px;
    min-height: 500px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    position: relative;
    visibility: visible !important;
    opacity: 1 !important;
}

/* YOU WIN сообщение */
.win-message {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 1) 0%, rgba(251, 191, 36, 1) 100%); /* Полностью непрозрачный фон */
    border-radius: 12px;
    z-index: 100000; /* Очень высокий z-index, чтобы скрыть все за собой */
    animation: winPopIn 0.5s ease;
    pointer-events: none;
    /* Скрываем все элементы за уведомлением */
    backdrop-filter: blur(10px);
}

.win-message.hidden {
    display: none !important;
}

.win-title {
    font-size: 48px;
    font-weight: 700;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 12px;
    /* Убрана анимация winBounce */
}

.win-subtitle {
    font-size: 20px;
    color: white;
    opacity: 0.95;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.win-price-info {
    margin-top: 20px;
    width: 100%;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.win-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.win-price-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.win-price-value {
    color: rgba(255, 255, 255, 1);
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

.next-signal-btn {
    margin-top: 20px;
    padding: 12px 24px;
    background-color: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    pointer-events: auto;
}

.next-signal-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
}

.next-signal-btn:active {
    transform: translateY(0);
}

@keyframes winPopIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes winBounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Конфетти анимация */
.confetti {
    position: fixed;
    width: 10px;
    height: 10px;
    top: -10px;
    z-index: 10000;
    animation: confettiFall linear forwards;
    border-radius: 2px;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(var(--max-height, 70vh)) rotate(720deg);
        opacity: 0;
    }
}

/* Анимация зеленых плюсиков (как в Telegram) */
.plus-animation {
    position: fixed;
    width: 24px;
    height: 24px;
    top: -30px;
    z-index: 99999999; /* Максимальный z-index, чтобы плюсики были видны поверх всего */
    animation: plusFall linear forwards;
    pointer-events: none;
}

.plus-animation svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 3px 6px rgba(16, 185, 129, 0.7));
}

@keyframes plusFall {
    0% {
        transform: translateY(0) translateX(0) rotate(var(--start-rotation, 0deg));
        opacity: 1;
    }
    60% {
        transform: translateY(calc(var(--max-height, 50vh) * 0.6)) translateX(var(--horizontal-offset, 0px)) rotate(calc(var(--start-rotation, 0deg) + 180deg));
        opacity: 0.8;
    }
    100% {
        transform: translateY(var(--max-height, 50vh)) translateX(calc(var(--horizontal-offset, 0px) * 1.5)) rotate(calc(var(--start-rotation, 0deg) + 360deg));
        opacity: 0;
    }
}

/* Анимация красных крестиков (как в Telegram) */
.cross-animation {
    position: fixed;
    width: 24px;
    height: 24px;
    top: -30px;
    z-index: 99999999; /* Максимальный z-index, чтобы крестики были видны поверх всего */
    animation: crossFall linear forwards;
    pointer-events: none;
}

.cross-animation svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 3px 6px rgba(255, 0, 0, 0.7));
}

@keyframes crossFall {
    0% {
        transform: translateY(0) translateX(0) rotate(var(--start-rotation, 0deg));
        opacity: 1;
    }
    60% {
        transform: translateY(calc(var(--max-height, 50vh) * 0.6)) translateX(var(--horizontal-offset, 0px)) rotate(calc(var(--start-rotation, 0deg) + 180deg));
        opacity: 0.8;
    }
    100% {
        transform: translateY(var(--max-height, 50vh)) translateX(calc(var(--horizontal-offset, 0px) * 1.5)) rotate(calc(var(--start-rotation, 0deg) + 360deg));
        opacity: 0;
    }
}

/* Анимация оранжевых знаков равно (для возврата) */
.equals-animation {
    position: fixed;
    width: 24px;
    height: 24px;
    top: -30px;
    z-index: 99999999; /* Максимальный z-index, чтобы знаки равно были видны поверх всего */
    animation: equalsFall linear forwards;
    pointer-events: none;
}

.equals-animation svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 3px 6px rgba(251, 146, 60, 0.7));
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes equalsFall {
    0% {
        transform: translateY(0) translateX(0) rotate(var(--start-rotation, 0deg));
        opacity: 1;
    }
    60% {
        transform: translateY(calc(var(--max-height, 50vh) * 0.6)) translateX(var(--horizontal-offset, 0px)) rotate(calc(var(--start-rotation, 0deg) + 180deg));
        opacity: 0.8;
    }
    100% {
        transform: translateY(var(--max-height, 50vh)) translateX(calc(var(--horizontal-offset, 0px) * 1.5)) rotate(calc(var(--start-rotation, 0deg) + 360deg));
        opacity: 0;
    }
}

.trade-signal {
    position: relative;
}

/* Обеспечиваем правильное отображение на мобильных */
@media screen and (max-width: 480px) {
    
    .chart-controls {
        top: 8px;
        right: 8px;
        padding: 6px;
        gap: 6px;
    }
    
    .chart-control-btn {
        width: 36px;
        height: 36px;
    }
    
    .chart-control-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .content-area {
        padding: 12px;
        gap: 12px;
    }
    
    .trade-signal {
        padding: 12px;
    }
    
    .tradingview-widget-container {
        height: 400px;
        min-height: 400px;
        /* Исправление для iPhone 17 Pro Max и других новых устройств */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: contents;
    }
    
    .price-chart {
        height: 400px;
        min-height: 400px;
        /* Исправление для iPhone 17 Pro Max */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    /* Специфичные исправления для iPhone 17 Pro Max (высокое разрешение) */
    @media screen and (min-width: 430px) and (max-width: 480px) and (-webkit-min-device-pixel-ratio: 3) {
        .flag-icon {
            /* Принудительная перезагрузка спрайта для высокого DPI */
            background-image: url('sprites-retina.png?retry=iphone17');
            -webkit-background-size: 396px 396px;
            background-size: 396px 396px;
            /* Принудительное обновление для iOS */
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
        
        .tradingview-widget-container iframe {
            /* Принудительное обновление для высокого DPI */
            -webkit-transform: translateZ(0) scale(1);
            transform: translateZ(0) scale(1);
        }
    }
    
    /* Адаптация модального окна для очень маленьких экранов */
    .signal-modal-content {
        padding: 16px;
        max-width: 95%;
    }
    
    .robot-animation {
        width: 240px;
        height: 180px;
    }
    
    .laptop-center {
        width: 240px;
        height: 170px;
    }
    
    .laptop-screen-center {
        height: 140px;
        padding: 8px;
    }
    
    .laptop-logo-center {
        width: 20px;
        height: 20px;
    }
    
    .laptop-base-center {
        width: 260px;
        height: 14px;
    }
    
    .robot-head {
        width: 50px;
        height: 50px;
    }
    
    .robot-torso {
        width: 70px;
        height: 60px;
    }
    
    .robot-screen {
        width: 55px;
        height: 45px;
    }
    
    .signal-modal-text h3 {
        font-size: 16px;
    }
    
    .signal-modal-text p {
        font-size: 12px;
    }
}

/* Модальное окно с роботом */
.signal-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000000; /* Выше чем нижнее меню (9910002) */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.signal-modal.hidden {
    display: none;
}

/* Скрываем нижнее меню когда показывается модальное окно */
.signal-modal:not(.hidden) ~ .bottom-nav,
body:has(.signal-modal:not(.hidden)) .bottom-nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

.signal-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
}

.signal-modal-content {
    position: relative;
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 24px 12px 24px;
    background: linear-gradient(135deg, #10b981 0%, #fbbf24 100%);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(16, 185, 129, 0.4);
    animation: popIn 0.5s ease;
    max-width: 90%;
    max-height: 90vh;
    gap: 6px;
}

.signal-modal-text {
    text-align: center;
    color: white;
    margin-top: 0;
    padding-top: 0;
    position:relative;
    top:-30px;
}

.signal-modal-text h3 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.signal-modal-text p {
    font-size: 13px;
    opacity: 0.95;
}

/* Новый дизайн робота */
.robot-animation {
    width: 280px;
    height: 240px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

.laptop-center-scene {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: none;
    transform-style: flat;
}

/* Ноутбук по центру */
.laptop-center {
    position: relative;
    width: 280px;
    height: 200px;
    transform: none;
    transform-style: flat;
    animation: laptopFloatCenter 3s ease-in-out infinite;
}

.laptop-screen-center {
    width: 100%;
    height: 160px;
    background: var(--chart-bg);
    border: 4px solid var(--border-color);
    border-radius: 10px 10px 3px 3px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 30px rgba(16, 185, 129, 0.4),
        inset 0 0 40px rgba(0, 0, 0, 0.8),
        0 6px 20px rgba(0, 0, 0, 0.6);
    padding: 10px;
    transform: none;
    transform-style: flat;
}

.laptop-logo-center {
    position: absolute;
    top: 10px;
    right: 12px;
    width: 24px;
    height: 24px;
    z-index: 5;
    animation: laptopLogoPulseCenter 2.5s ease-in-out infinite;
}

.laptop-logo-img-center {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 6px var(--accent-green));
}

.laptop-chart-container-center {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    color: var(--accent-green);
}

.laptop-chart-center {
    width: 100%;
    height: 100%;
    opacity: 0.95;
}

.laptop-chart-center .candle-up-center {
    fill: var(--accent-green);
    color: var(--accent-green);
}

.laptop-chart-center .candle-down-center {
    fill: var(--accent-red);
    color: var(--accent-red);
}

.laptop-screen-glow-center {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(16, 185, 129, 0.15) 0%, 
        transparent 50%, 
        rgba(16, 185, 129, 0.08) 100%);
    pointer-events: none;
    animation: screenGlowCenter 3s ease-in-out infinite;
}

.laptop-base-center {
    width: 280px;
    height: 18px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 0 0 5px 5px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.6);
    margin: 0 auto;
    transform: none;
}

[data-theme="dark"] .laptop-base-center {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
}

/* Анимации для ноутбука */
@keyframes laptopFloatCenter {
    0%, 100% { transform: translateY(0px) rotateY(0deg) rotateX(0deg); }
    50% { transform: translateY(-8px) rotateY(0deg) rotateX(0deg); }
}

@keyframes laptopLogoPulseCenter {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 6px var(--accent-green)); }
    50% { transform: scale(1.15); filter: drop-shadow(0 0 10px var(--accent-green)); }
}

@keyframes screenGlowCenter {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.7; }
}

/* Увеличение модального окна в 2 раза на ПК */
@media screen and (min-width: 1024px) {
    .signal-modal-content {
        padding: 24px 28px 16px 28px;
        border-radius: 24px;
        gap: 8px;
    }
    
    .robot-animation {
        width: 320px;
        height: 270px;
    }
    
    .laptop-center {
        width: 320px;
        height: 230px;
    }
    
    .laptop-screen-center {
        height: 180px;
        border: 5px solid var(--border-color);
        border-radius: 12px 12px 4px 4px;
        padding: 12px;
        box-shadow: 
            0 0 35px rgba(16, 185, 129, 0.4),
            inset 0 0 50px rgba(0, 0, 0, 0.8),
            0 8px 25px rgba(0, 0, 0, 0.6);
    }
    
    .laptop-logo-center {
        top: 12px;
        right: 16px;
        width: 28px;
        height: 28px;
    }
    
    .laptop-base-center {
        width: 320px;
        height: 22px;
        border-radius: 0 0 6px 6px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    }
    
    .signal-modal-text {
        top: -35px;
    }
    
    .signal-modal-text h3 {
        font-size: 22px;
        margin-bottom: 8px;
    }
    
    .signal-modal-text p {
        font-size: 16px;
    }
    
    @keyframes laptopFloatCenter {
        0%, 100% { transform: translateY(0px) rotateY(0deg) rotateX(0deg); }
        50% { transform: translateY(-10px) rotateY(0deg) rotateX(0deg); }
    }
}

/* Анимации свечей в ноутбуке */
.candles-group-center .candle-center {
    opacity: 0;
    animation: candleAppearCenter 0.5s ease-out forwards;
}

.candles-group-center .candle-center:nth-child(1) { animation-delay: 0s; }
.candles-group-center .candle-center:nth-child(2) { animation-delay: 0.15s; }
.candles-group-center .candle-center:nth-child(3) { animation-delay: 0.3s; }
.candles-group-center .candle-center:nth-child(4) { animation-delay: 0.45s; }
.candles-group-center .candle-center:nth-child(5) { animation-delay: 0.6s; }
.candles-group-center .candle-center:nth-child(6) { animation-delay: 0.75s; }
.candles-group-center .candle-center:nth-child(7) { animation-delay: 0.9s; }
.candles-group-center .candle-center:nth-child(8) { animation-delay: 1.05s; }

@keyframes candleAppearCenter {
    0% { 
        opacity: 0;
        transform: translateY(10px) scale(0.8);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.trend-line-center {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: trendLineDrawCenter 2s ease-in-out infinite;
}

@keyframes trendLineDrawCenter {
    0% {
        stroke-dashoffset: 200;
        opacity: 0;
    }
    50% {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
}

.analysis-line-center {
    animation: analysisLinePulseCenter 2.5s ease-in-out infinite;
}

@keyframes analysisLinePulseCenter {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

/* Робот держит ноутбук - новая анимация */
.robot-holding-laptop {
    position: relative;
    width: 200px;
    height: 240px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: perspective(600px) rotateY(-15deg);
    transform-style: preserve-3d;
    animation: robotFloatHolding 3s ease-in-out infinite;
}

/* Голова робота */
.robot-head-holding {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    border-radius: 20px 20px 10px 10px;
    position: relative;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    margin-bottom: 10px;
    animation: robotHeadMoveHolding 2s ease-in-out infinite;
    overflow: visible;
    z-index: 3;
}

[data-theme="dark"] .robot-head-holding {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.robot-antenna-holding {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 12px;
    background: linear-gradient(180deg, var(--accent-green) 0%, #fbbf24 100%);
    border-radius: 2px 2px 0 0;
    animation: antennaPulseHolding 1.5s ease-in-out infinite;
}

.robot-face-holding {
    padding: 12px 8px 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.robot-eyes-holding {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.robot-eye-holding {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, var(--accent-green) 0%, #fbbf24 100%);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.9);
    animation: robotEyeBlinkHolding 2.5s ease-in-out infinite;
    overflow: hidden;
}

.eye-pupil-holding {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
    animation: pupilMoveHolding 3s ease-in-out infinite;
}

.robot-mouth-holding {
    width: 32px;
    height: 6px;
    background: linear-gradient(90deg, var(--accent-green) 0%, #fbbf24 100%);
    border-radius: 3px;
    animation: robotMouthMoveHolding 1.2s ease-in-out infinite;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.6);
}

/* Тело робота */
.robot-body-holding {
    width: 100px;
    height: 80px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 2;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 8px;
}

[data-theme="dark"] .robot-body-holding {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.robot-chest-logo {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    z-index: 10;
    animation: robotChestLogoPulse 2.2s ease-in-out infinite;
    background: var(--bg-white);
    border-radius: 50%;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .robot-chest-logo {
    background: var(--bg-light);
}

.robot-chest-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Руки робота, держащие ноутбук */
.robot-arms-holding {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
    margin-top: 10px;
    z-index: 1;
}

.robot-arm-holding {
    width: 8px;
    height: 50px;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    position: relative;
}

[data-theme="dark"] .robot-arm-holding {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.robot-arm-holding.left {
    animation: robotArmLeftHolding 2.5s ease-in-out infinite;
    transform-origin: top center;
}

.robot-arm-holding.right {
    animation: robotArmRightHolding 2.5s ease-in-out infinite;
    transform-origin: top center;
}

.robot-hand-holding {
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 12px;
    height: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    border-radius: 0 0 5px 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .robot-hand-holding {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.robot-hand-holding.left {
    animation: robotHandWorkLeftHolding 1.5s ease-in-out infinite;
}

.robot-hand-holding.right {
    animation: robotHandWorkRightHolding 1.5s ease-in-out infinite;
}

/* Ноутбук в руках */
.laptop-in-hands {
    position: relative;
    width: 140px;
    height: 100px;
    transform: perspective(400px) rotateY(10deg) rotateX(-5deg);
    transform-style: preserve-3d;
    animation: laptopFloatHolding 2s ease-in-out infinite;
    z-index: 2;
}

.laptop-screen-holding {
    width: 100%;
    height: 80px;
    background: var(--chart-bg);
    border: 3px solid var(--border-color);
    border-radius: 6px 6px 2px 2px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(16, 185, 129, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.8),
        0 4px 15px rgba(0, 0, 0, 0.5);
    padding: 6px;
}

.laptop-logo-holding {
    position: absolute;
    top: 3px;
    right: 5px;
    width: 14px;
    height: 14px;
    z-index: 5;
    animation: laptopLogoPulseHolding 2.5s ease-in-out infinite;
}

.laptop-logo-img-holding {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 4px var(--accent-green));
}

.laptop-chart-container-holding {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    color: var(--accent-green);
}

.laptop-chart-holding {
    width: 100%;
    height: 100%;
    opacity: 0.95;
}

.laptop-chart-holding .candle-up {
    fill: var(--accent-green);
    color: var(--accent-green);
}

.laptop-chart-holding .candle-down {
    fill: var(--accent-red);
    color: var(--accent-red);
}

.laptop-screen-glow-holding {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(16, 185, 129, 0.1) 0%, 
        transparent 50%, 
        rgba(16, 185, 129, 0.05) 100%);
    pointer-events: none;
    animation: screenGlowHolding 3s ease-in-out infinite;
}

.laptop-base-holding {
    width: 150px;
    height: 6px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 0 0 3px 3px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
}

[data-theme="dark"] .laptop-base-holding {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%);
}

/* Ноги робота */
.robot-legs-holding {
    display: flex;
    gap: 20px;
    margin-top: 8px;
    z-index: 1;
}

.robot-leg-holding {
    width: 10px;
    height: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    border-radius: 5px 5px 0 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    animation: robotLegMoveHolding 1.5s ease-in-out infinite;
}

[data-theme="dark"] .robot-leg-holding {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.robot-leg-holding.left {
    animation-delay: 0s;
}

.robot-leg-holding.right {
    animation-delay: 0.75s;
}

.laptop-screen {
    width: 100%;
    height: 100px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    border: 3px solid #2a2a2a;
    border-radius: 8px 8px 2px 2px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 0 20px rgba(16, 185, 129, 0.3),
        inset 0 0 30px rgba(0, 0, 0, 0.8),
        0 4px 15px rgba(0, 0, 0, 0.5);
    padding: 8px;
}

.laptop-logo {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 16px;
    height: 16px;
    z-index: 5;
    animation: laptopLogoPulse 2.5s ease-in-out infinite;
}

.laptop-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.8));
}

.laptop-chart-container {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.laptop-chart {
    width: 100%;
    height: 100%;
    opacity: 0.95;
}

.laptop-screen-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, 
        rgba(16, 185, 129, 0.1) 0%, 
        transparent 50%, 
        rgba(16, 185, 129, 0.05) 100%);
    pointer-events: none;
    animation: screenGlow 3s ease-in-out infinite;
}

.laptop-base {
    width: 220px;
    height: 8px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
}

/* Кресло с роботом */
.chair-with-robot {
    position: relative;
    width: 140px;
    height: 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 1;
    transform: perspective(400px) rotateY(-5deg);
    transform-origin: center bottom;
    margin-top: 0;
}

/* Спинка кресла */
.chair-back {
    width: 120px;
    height: 60px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 8px 8px 0 0;
    position: relative;
    box-shadow: 
        0 -4px 15px rgba(0, 0, 0, 0.4),
        inset 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 2px solid #3a3a3a;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.chair-logo {
    width: 24px;
    height: 24px;
    z-index: 5;
    animation: chairLogoPulse 2.5s ease-in-out infinite;
}

.chair-logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.9));
}

/* Сиденье кресла */
.chair-seat {
    width: 100px;
    height: 12px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border: 2px solid #3a3a3a;
    border-top: none;
    position: relative;
}

/* Робот за ноутбуком */
.robot-at-laptop {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: robotWork 3s ease-in-out infinite;
}

.robot-head-laptop {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    border-radius: 16px 16px 8px 8px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-bottom: 6px;
    animation: robotHeadWork 2.5s ease-in-out infinite;
    overflow: visible;
    transform-origin: bottom center;
}

.robot-antenna-laptop {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 10px;
    background: linear-gradient(180deg, #10b981 0%, #fbbf24 100%);
    border-radius: 2px 2px 0 0;
    animation: antennaAnalyze 1.8s ease-in-out infinite;
}

.robot-face-laptop {
    padding: 10px 6px 6px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.robot-eyes-laptop {
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-bottom: 6px;
}

.robot-eye-laptop {
    width: 14px;
    height: 14px;
    background: linear-gradient(135deg, #10b981 0%, #fbbf24 100%);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.8);
    animation: robotEyeAnalyze 2s ease-in-out infinite;
    overflow: hidden;
}

.eye-pupil-laptop {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: #000;
    border-radius: 50%;
    animation: pupilAnalyze 4s ease-in-out infinite;
}

.robot-mouth-laptop {
    width: 28px;
    height: 5px;
    background: linear-gradient(90deg, #10b981 0%, #fbbf24 100%);
    border-radius: 3px;
    animation: robotMouthAnalyze 1.5s ease-in-out infinite;
    box-shadow: 0 2px 5px rgba(16, 185, 129, 0.5);
}

.robot-body-laptop {
    width: 80px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.robot-chest-laptop {
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    border-radius: 10px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 5px;
    margin-bottom: 4px;
    min-height: 40px;
}

.robot-arms-laptop {
    display: flex;
    justify-content: space-between;
    width: 160px;
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.robot-arm-laptop {
    width: 5px;
    height: 40px;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    border-radius: 3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
}

.robot-arm-laptop.left {
    animation: robotArmWorkLeft 2s ease-in-out infinite;
    transform-origin: top center;
}

.robot-arm-laptop.right {
    animation: robotArmWorkRight 2s ease-in-out infinite;
    transform-origin: top center;
}

/* Кисти рук */
.robot-hand {
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 10px;
    height: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    border-radius: 0 0 4px 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.robot-hand.left {
    animation: robotHandWorkLeft 1.5s ease-in-out infinite;
}

.robot-hand.right {
    animation: robotHandWorkRight 1.5s ease-in-out infinite;
}

/* Анимации свечей */
.candles-group .candle {
    opacity: 0;
    animation: candleAppear 0.5s ease-out forwards;
}

.candles-group .candle:nth-child(1) { animation-delay: 0s; }
.candles-group .candle:nth-child(2) { animation-delay: 0.15s; }
.candles-group .candle:nth-child(3) { animation-delay: 0.3s; }
.candles-group .candle:nth-child(4) { animation-delay: 0.45s; }
.candles-group .candle:nth-child(5) { animation-delay: 0.6s; }
.candles-group .candle:nth-child(6) { animation-delay: 0.75s; }
.candles-group .candle:nth-child(7) { animation-delay: 0.9s; }
.candles-group .candle:nth-child(8) { animation-delay: 1.05s; }

.trend-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: trendLineDraw 2s ease-in-out infinite;
}

.analysis-line {
    animation: analysisLinePulse 2.5s ease-in-out infinite;
}

/* Keyframes */
@keyframes robotWork {
    0%, 100% { transform: translateX(-50%) translateY(0px); }
    50% { transform: translateX(-50%) translateY(-2px); }
}

@keyframes robotHeadWork {
    0%, 100% { 
        transform: rotate(0deg) translateY(0);
    }
    30% { 
        transform: rotate(-3deg) translateY(-1px);
    }
    60% { 
        transform: rotate(3deg) translateY(0);
    }
    90% { 
        transform: rotate(0deg) translateY(-1px);
    }
}

@keyframes chairLogoPulse {
    0%, 100% { 
        transform: scale(1); 
        filter: drop-shadow(0 0 6px rgba(16, 185, 129, 0.9)); 
    }
    50% { 
        transform: scale(1.1); 
        filter: drop-shadow(0 0 10px rgba(16, 185, 129, 1)); 
    }
}

@keyframes robotEyeAnalyze {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

@keyframes pupilAnalyze {
    0%, 100% { transform: translate(-50%, -50%); }
    20% { transform: translate(-40%, -45%); }
    40% { transform: translate(-50%, -50%); }
    60% { transform: translate(-60%, -45%); }
    80% { transform: translate(-50%, -50%); }
}

@keyframes robotMouthAnalyze {
    0%, 100% { width: 26px; }
    50% { width: 30px; }
}

@keyframes robotArmWorkLeft {
    0%, 100% { 
        transform: rotate(-25deg) translateX(-5px);
    }
    50% { 
        transform: rotate(-35deg) translateX(-8px);
    }
}

@keyframes robotArmWorkRight {
    0%, 100% { 
        transform: rotate(25deg) translateX(5px);
    }
    50% { 
        transform: rotate(35deg) translateX(8px);
    }
}

@keyframes robotHandWorkLeft {
    0%, 100% { 
        transform: translateX(-50%) rotate(0deg);
    }
    25% { 
        transform: translateX(-50%) rotate(-5deg);
    }
    50% { 
        transform: translateX(-50%) rotate(0deg);
    }
    75% { 
        transform: translateX(-50%) rotate(5deg);
    }
}

@keyframes robotHandWorkRight {
    0%, 100% { 
        transform: translateX(-50%) rotate(0deg);
    }
    25% { 
        transform: translateX(-50%) rotate(5deg);
    }
    50% { 
        transform: translateX(-50%) rotate(0deg);
    }
    75% { 
        transform: translateX(-50%) rotate(-5deg);
    }
}


@keyframes antennaAnalyze {
    0%, 100% { transform: translateX(-50%) scaleY(1); opacity: 1; }
    50% { transform: translateX(-50%) scaleY(1.15); opacity: 0.85; }
}

@keyframes candleAppear {
    0% { 
        opacity: 0;
        transform: translateY(10px) scale(0.8);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes trendLineDraw {
    0% {
        stroke-dashoffset: 200;
        opacity: 0;
    }
    50% {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
}

@keyframes analysisLinePulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes screenGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes laptopLogoPulse {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px rgba(16, 185, 129, 0.8)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 8px rgba(16, 185, 129, 1)); }
}

/* Анимации для робота, держащего ноутбук */
@keyframes robotFloatHolding {
    0%, 100% { transform: perspective(600px) rotateY(-15deg) translateY(0px); }
    50% { transform: perspective(600px) rotateY(-15deg) translateY(-5px); }
}

@keyframes robotHeadMoveHolding {
    0%, 100% { transform: rotate(0deg) translateY(0); }
    30% { transform: rotate(-2deg) translateY(-1px); }
    60% { transform: rotate(2deg) translateY(0); }
    90% { transform: rotate(0deg) translateY(-1px); }
}

@keyframes antennaPulseHolding {
    0%, 100% { transform: translateX(-50%) scaleY(1); opacity: 1; }
    50% { transform: translateX(-50%) scaleY(1.2); opacity: 0.8; }
}

@keyframes robotEyeBlinkHolding {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

@keyframes pupilMoveHolding {
    0%, 100% { transform: translate(-50%, -50%); }
    25% { transform: translate(-40%, -45%); }
    50% { transform: translate(-50%, -50%); }
    75% { transform: translate(-60%, -45%); }
}

@keyframes robotMouthMoveHolding {
    0%, 100% { width: 30px; }
    50% { width: 34px; }
}

@keyframes robotChestLogoPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
    50% { transform: translateX(-50%) scale(1.1); opacity: 0.9; }
}

@keyframes robotArmLeftHolding {
    0%, 100% { transform: rotate(-20deg); }
    50% { transform: rotate(-25deg); }
}

@keyframes robotArmRightHolding {
    0%, 100% { transform: rotate(20deg); }
    50% { transform: rotate(25deg); }
}

@keyframes robotHandWorkLeftHolding {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-50%) rotate(-3deg); }
    50% { transform: translateX(-50%) rotate(0deg); }
    75% { transform: translateX(-50%) rotate(3deg); }
}

@keyframes robotHandWorkRightHolding {
    0%, 100% { transform: translateX(-50%) rotate(0deg); }
    25% { transform: translateX(-50%) rotate(3deg); }
    50% { transform: translateX(-50%) rotate(0deg); }
    75% { transform: translateX(-50%) rotate(-3deg); }
}

@keyframes laptopFloatHolding {
    0%, 100% { transform: perspective(400px) rotateY(10deg) rotateX(-5deg) translateY(0px); }
    50% { transform: perspective(400px) rotateY(10deg) rotateX(-5deg) translateY(-3px); }
}

@keyframes laptopLogoPulseHolding {
    0%, 100% { transform: scale(1); filter: drop-shadow(0 0 4px var(--accent-green)); }
    50% { transform: scale(1.1); filter: drop-shadow(0 0 8px var(--accent-green)); }
}

@keyframes screenGlowHolding {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes robotLegMoveHolding {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

/* Анимации свечей в ноутбуке */
.candles-group-holding .candle-holding {
    opacity: 0;
    animation: candleAppearHolding 0.5s ease-out forwards;
}

.candles-group-holding .candle-holding:nth-child(1) { animation-delay: 0s; }
.candles-group-holding .candle-holding:nth-child(2) { animation-delay: 0.15s; }
.candles-group-holding .candle-holding:nth-child(3) { animation-delay: 0.3s; }
.candles-group-holding .candle-holding:nth-child(4) { animation-delay: 0.45s; }
.candles-group-holding .candle-holding:nth-child(5) { animation-delay: 0.6s; }
.candles-group-holding .candle-holding:nth-child(6) { animation-delay: 0.75s; }
.candles-group-holding .candle-holding:nth-child(7) { animation-delay: 0.9s; }
.candles-group-holding .candle-holding:nth-child(8) { animation-delay: 1.05s; }

@keyframes candleAppearHolding {
    0% { 
        opacity: 0;
        transform: translateY(10px) scale(0.8);
    }
    100% { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.trend-line-holding {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    animation: trendLineDrawHolding 2s ease-in-out infinite;
}

@keyframes trendLineDrawHolding {
    0% {
        stroke-dashoffset: 200;
        opacity: 0;
    }
    50% {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
}

.analysis-line-holding {
    animation: analysisLinePulseHolding 2.5s ease-in-out infinite;
}

@keyframes analysisLinePulseHolding {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.robot-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.robot-head-new {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    border-radius: 20px 20px 10px 10px;
    position: relative;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    margin-bottom: 10px;
    animation: robotHeadMove 1.5s ease-in-out infinite;
    overflow: visible;
}

.robot-antenna {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 12px;
    background: linear-gradient(180deg, #10b981 0%, #fbbf24 100%);
    border-radius: 2px 2px 0 0;
    animation: antennaPulse 1.5s ease-in-out infinite;
}

.robot-face {
    padding: 12px 8px 8px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.robot-eyes-new {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
}

.robot-eye-new {
    width: 16px;
    height: 16px;
    background: linear-gradient(135deg, #10b981 0%, #fbbf24 100%);
    border-radius: 50%;
    position: relative;
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.9);
    animation: robotEyeBlink 2.5s ease-in-out infinite;
    overflow: hidden;
}

.eye-pupil {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 8px;
    height: 8px;
    background: #000;
    border-radius: 50%;
    animation: pupilMove 3s ease-in-out infinite;
}

.robot-mouth-new {
    width: 32px;
    height: 6px;
    background: linear-gradient(90deg, #10b981 0%, #fbbf24 100%);
    border-radius: 3px;
    animation: robotMouthMove 1.2s ease-in-out infinite;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.6);
}

.robot-body-new {
    width: 100px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.robot-chest {
    width: 100%;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    border-radius: 15px;
    position: relative;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    padding: 8px;
    margin-bottom: 8px;
}

.robot-logo-new {
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    z-index: 10;
    animation: robotLogoPulse 2s ease-in-out infinite;
}

.robot-logo-img-new {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.robot-screen-new {
    width: 100%;
    height: 65px;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    border-radius: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 3px 12px rgba(0, 0, 0, 0.7);
    margin-top: 20px;
    padding: 6px;
}

.screen-grid {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.15;
}

.grid-line {
    position: absolute;
    width: 100%;
    height: 1px;
    background: #10b981;
    animation: gridPulse 2s ease-in-out infinite;
}

.grid-line:nth-child(1) { top: 33%; }
.grid-line:nth-child(2) { top: 50%; }
.grid-line:nth-child(3) { top: 67%; }

.candles-chart-new {
    width: 100%;
    height: 100%;
    animation: candlesDraw 3s ease-in-out infinite;
}

.robot-arms-new {
    display: flex;
    justify-content: space-between;
    width: 120px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
}

.robot-arm-new {
    width: 8px;
    height: 45px;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    border-radius: 4px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.robot-arm-new.left {
    animation: robotArmLeft 2s ease-in-out infinite;
    transform-origin: top center;
}

.robot-arm-new.right {
    animation: robotArmRight 2s ease-in-out infinite;
    transform-origin: top center;
}

.robot-legs {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.robot-leg {
    width: 10px;
    height: 30px;
    background: linear-gradient(135deg, #ffffff 0%, #e8e8e8 100%);
    border-radius: 5px 5px 0 0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    animation: robotLegMove 1.5s ease-in-out infinite;
}

.robot-leg.left {
    animation-delay: 0s;
}

.robot-leg.right {
    animation-delay: 0.75s;
}

@keyframes robotFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes robotHeadMove {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

@keyframes robotEyeBlink {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

@keyframes robotMouthMove {
    0%, 100% { width: 30px; }
    50% { width: 35px; }
}

@keyframes loadingBarMove {
    0% { transform: translateX(-30px); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(30px); opacity: 0; }
}

@keyframes robotArmLeft {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(-15deg); }
}

@keyframes robotArmRight {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(15deg); }
}

@keyframes robotLogoPulse {
    0%, 100% { transform: translateX(-50%) scale(1); opacity: 1; }
    50% { transform: translateX(-50%) scale(1.15); opacity: 0.85; }
}

@keyframes candlesDraw {
    0% { opacity: 0.8; transform: translateX(-5px); }
    20% { opacity: 1; transform: translateX(0); }
    80% { opacity: 1; transform: translateX(0); }
    100% { opacity: 0.8; transform: translateX(3px); }
}

@keyframes antennaPulse {
    0%, 100% { transform: translateX(-50%) scaleY(1); opacity: 1; }
    50% { transform: translateX(-50%) scaleY(1.2); opacity: 0.8; }
}

@keyframes pupilMove {
    0%, 100% { transform: translate(-50%, -50%); }
    25% { transform: translate(-40%, -45%); }
    50% { transform: translate(-50%, -50%); }
    75% { transform: translate(-60%, -45%); }
}

@keyframes gridPulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.25; }
}

@keyframes robotLegMove {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
