/* Масштаб UI на десктопе (веб без Telegram).
   height: 100dvh/zoom компенсирует то, что Chrome умножает 100dvh на zoom,
   из-за чего scroll-контейнеры уходили за нижний край вьюпорта. */
body.web-desktop {
    zoom: 1.35;
    height: calc(100dvh / 1.35);
}

/* Глобальное отключение выделения текста */
* {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

/* Разрешаем выделение для input, textarea и редактируемых элементов */
input,
textarea,
[contenteditable="true"],
[contenteditable="plaintext-only"] {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

/* Inter Font Family - Оптимизированная версия (только 3 самых используемых начертания) */

/* Regular (400) - базовый шрифт */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap; /* Не блокирует рендеринг */
}

/* Medium (500) - основной для UI */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* SemiBold (600) - для заголовков и акцентов */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* Fallback для font-weight 700 (Bold) → будет использовать 600 (SemiBold) */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-SemiBold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* Fallback для font-weight 300 (Light) → будет использовать 400 (Regular) */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter-Regular.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

/* Устанавливаем Inter как шрифт по умолчанию для всех элементов */
* {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

:root {
    --app-main-bg-color: #121417;
}

html {
    overscroll-behavior: none;
}

body {
    background-color: var(--app-main-bg-color);
    color: white;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    height: 100dvh;
    width: 100%;
    overflow: hidden;
    position: relative;
    overscroll-behavior: none;
    transition: background-color 0.22s ease, background-image 0.25s ease;
}

h2{
    font-size: 24px !important;
    color: #fff !important;
    padding-top: 8px;
}

.card {
    background-color: #16181C;
    border-radius: 24px;
    padding: 20px;
}

.card-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 8px;
}

.card-row:last-of-type {
    border-bottom: none;
    margin-bottom: 15px;
}

.card-value {
    font-weight: 500;
    font-size: 14px;
}





.card-label{
    font-size: 20px;
    color: #fff;
}

.card-secondary-label{
    font-size: 14px;
    color: #727272;
}

.margin-bottom-15px{
    margin-bottom: 15px;
}

.center-height {
    display: grid;
    align-items: center;
    height: 100%;
    width: 100%;
}

.button-blue-primary{
    border: none;
    outline: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    /* padding-top: 8px; */
    gap: 10px;

    /* max-width: 318px; */
    width: 100%;
    height: 100%;
    transition: all 0.19s ease-in-out;
    cursor: pointer;

    max-height: 45px;
    min-height: 45px;

    background: #3282d7;
    border-radius: 24px;

    /* Inside auto layout */
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;   

    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    line-height: 1.2;
}


/* нужно при наведении ит табе цвет чуть менять у button-blue-primary  */

.button-blue-primary:hover{
    
    background: #2266b0 !important;
}   
.button-blue-primary:active{
    
    background: #2266b0 !important;
}
.button-blue-primary:disabled,
.button-blue-primary[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

.button-wa-primary {
    border: none;
    outline: none;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 10px 20px;
    gap: 10px;
    width: 100%;
    height: 100%;
    transition: all 0.19s ease-in-out;
    cursor: pointer;
    max-height: 45px;
    min-height: 45px;
    background: #1FAD5F;
    border-radius: 24px;
    font-weight: 500;
    font-size: 16px;
    color: #FFFFFF;
}
.button-wa-primary:hover {
    background: #178A4B !important;
}
.button-wa-primary:active {
    background: #178A4B !important;
}
.button-wa-primary:disabled,
.button-wa-primary[disabled] {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Универсальные стили для системы переключения с индикатором */
.toggle-switch {
    position: relative;
    background: #333;
    border-radius: 25px;
    display: flex;
    padding: 5px;
    /* max-width: 400px; */
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    min-height: 45px; /* Минимальная высота для предотвращения схлопывания */
    max-width: 100%;
}

.toggle-switch__bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1d2025;
    border-radius: 25px;
    z-index: 0;
    display: flex; /* Добавляем flex для правильного отображения */
    padding: 5px; /* Внутренние отступы */
    overflow: hidden; /* Скрываем переполнение */
}

.toggle-switch__btn {
    /* padding: 8px 15px 10px 15px; */
    font-size: 14px;
    border: none;
    background: transparent;
    color: #84858A;
    cursor: pointer;
    position: relative;
    z-index: 2;
    flex: 1;
    border-radius: 25px;
    transition: color 0.3s;
    font-weight: 600;
    box-sizing: border-box;
    min-height: 34px; /* Минимальная высота кнопки */
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-switch__btn--active {
    color: #DCDDE0;
}

.toggle-switch__indicator {
    position: absolute;
    height: var(--indicator-height, calc(100% - 10px));
    background-color: #3F444C;
    border-radius: var(--indicator-border-radius, 25px);
    left: 0;
    top: var(--indicator-top, 5px);
    transition: transform 0.3s ease, width 0.3s ease, opacity 0.2s ease;
    z-index: 1;
    box-sizing: border-box;
    transform-origin: left center;
    opacity: 1; /* Видимый по умолчанию */
    /* Добавляем поддержку зума через CSS переменные */
    --indicator-height: calc(100% - 10px);
    --indicator-top: 5px;
    --indicator-border-radius: 25px;
}

/* Динамические стили для индикатора - теперь управляются через JavaScript */
/* Убираем фиксированные стили, так как ширина и позиция рассчитываются динамически */

.toggle-content__item {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

.toggle-content__item::-webkit-scrollbar {
    display: none; /* Safari and Chrome */
}

.toggle-content__item {
    display: none;
}

.toggle-content__item--active {
    display: block;
}


input::-webkit-inner-spin-button,
input::-webkit-outer-spin-button {
    -webkit-appearance: none; /* убираем стандартный вид */
    margin: 0;               /* на всякий случай сброс отступов */
}

/* Firefox */
input[type="number"] {
    -moz-appearance: textfield; /* превращаем в обычное текстовое поле */
    appearance: textfield; /* стандартное свойство для совместимости */
}

/* (Необязательно) Сбрасываем обводку, если она лишняя */
input[type="number"] {
    appearance: textfield;  /* поддержка новых спецификаций */
}

/* Стили для устранения FOUT (Flash of Unstyled Text) */
.fonts-loading {
    visibility: hidden;
}

.fonts-loaded {
    visibility: visible;
}

/* Плавное появление контента после загрузки шрифтов */
.fonts-loading .main-container {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.fonts-loaded .main-container {
    opacity: 1;
}

/* Дополнительная оптимизация для быстрого отображения */
.fonts-loading .bottom-menu {
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.fonts-loaded .bottom-menu {
    opacity: 1;
}

.virtual-point {
    position: fixed;
    left: 50%;
    top: 0;
    width: 1px;
    height: 1px;
    background: transparent;
    z-index: 1;
    pointer-events: none;
}

/* ─── Email Login Overlay (браузер без Telegram) ─── */
#elo-login-view,
#elo-register-view {
    width: 100%;
}
/* ═══════════════ AUTH OVERLAY ═══════════════ */
#email-login-overlay {
    position: fixed;
    inset: 0;
    background: #121417;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}

.elo__card {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: elo-appear 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes elo-appear {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

.elo__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.elo__logo-svg {
    flex-shrink: 0;
}
.elo__logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #f0f0f5;
    letter-spacing: -0.5px;
}

#email-login-overlay .elo__card .elo__title {
    font-size: 15px !important;
    font-weight: 500 !important;
    color: #8b8fa3 !important;
    margin: 0 0 20px !important;
    text-align: center;
    line-height: 1.4 !important;
}

#email-login-overlay .toggle-switch {
    margin-bottom: 24px;
}

.elo__content {
    width: 100%;
}
.elo__content .toggle-content__item {
    display: none;
    animation: elo-fade-in 0.3s ease;
}
.elo__content .toggle-content__item--active {
    display: block;
}
@keyframes elo-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.elo__form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.elo__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.elo__label {
    font-size: 12px;
    color: #8b8fa3;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.elo__input {
    width: 100%;
    background: #1e2328;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    color: #f0f0f5;
    font-size: 15px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: 12px 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}
.elo__input::placeholder {
    color: #555a6e;
}
.elo__input:focus {
    border-color: rgba(50,130,215,0.5);
    box-shadow: 0 0 0 3px rgba(50,130,215,0.1);
}
.elo__pass-wrap {
    position: relative;
}
.elo__pass-wrap .elo__input {
    padding-right: 48px;
}
.elo__eye {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #555a6e;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}
.elo__eye:hover {
    color: #8b8fa3;
}

.elo__error {
    background: rgba(220, 80, 80, 0.08);
    border: 1px solid rgba(220, 80, 80, 0.2);
    border-radius: 12px;
    color: #e07070;
    font-size: 13px;
    padding: 10px 14px;
    text-align: center;
}

.elo__submit {
    margin-top: 4px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    border-radius: 100px;
    border: none;
    color: #fff;
    background: #3282d7;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 20px rgba(50,130,215,0.3);
}
.elo__submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(50,130,215,0.4);
}
.elo__submit:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.elo__footer-hint {
    margin-top: 24px;
    font-size: 12px;
    color: #555a6e;
    letter-spacing: 1px;
}

@media (max-width: 480px) {
    .elo__card {
        padding: 0 4px;
    }
}