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

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

/* =========================================================================
   БАЗОВЫЙ BODY С ФОНАМИ
   ========================================================================= */
body { 
    background-color: #06070a;
    color: #ffffff; 
    font-family: 'Montserrat', sans-serif; 
    padding-bottom: 90px; 
    min-height: 100vh;
    min-height: 100dvh;
    background-size: cover;
    background-position: center top;
    background-attachment: fixed;
    transition: background-image 0.3s ease-in-out;
}

body.bg-main { 
    background-image: url('../bg-main.jpg?v=22') !important; 
    background-size: cover !important;
    background-position: center top !important;
}

body.bg-sub { 
    background-image: url('../bg-sub.jpg?v=22') !important; 
    background-size: cover !important;
    background-position: center top !important;
}

/* КОНТРОЛЬ ОТОБРАЖЕНИЯ ЭКРАНОВ */
.view-section { display: none !important; }
.view-section.active { 
    display: flex !important; 
    flex-direction: column; 
    gap: 12px; 
    padding: 0 16px; 
}

/* =========================================================================
   1. ШАПКА
   ========================================================================= */
.top-header { 
    padding: 16px 16px 12px 16px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.brand-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo-badge {
    width: 36px;
    height: 36px;
    border-radius: 11px;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.25) 0%, rgba(255, 159, 28, 0.25) 100%);
    border: 1px solid rgba(255, 107, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 16px rgba(255, 107, 0, 0.45);
    flex-shrink: 0;
}

.brand-text-col {
    display: flex;
    flex-direction: column;
}

.brand-title { 
    font-size: 17px; 
    font-weight: 900; 
    color: #ffffff;
    line-height: 1.15;
    letter-spacing: 0.4px;
}

.brand-subtitle { 
    font-size: 9px; 
    color: #ff8c00; 
    font-weight: 800; 
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-top: 2px;
}

.header-controls { 
    display: flex; 
    flex-direction: row; 
    gap: 8px; 
    align-items: center; 
}

.header-glass-capsule {
    background: rgba(18, 18, 24, 0.82);
    border: 1px solid rgba(255, 107, 0, 0.4);
    border-radius: 20px;
    padding: 3px 8px;
    backdrop-filter: blur(14px);
    display: flex;
    align-items: center;
    box-shadow: 0 0 12px rgba(255, 107, 0, 0.18);
}

.clean-lang-select {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 800;
    outline: none;
    cursor: pointer;
    font-family: inherit;
}
.clean-lang-select option { background: #0f1015; color: #fff; }

.header-icon-circle-btn {
    background: rgba(18, 18, 24, 0.82);
    border: 1px solid rgba(255, 107, 0, 0.4);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(14px);
    text-decoration: none;
    box-shadow: 0 0 12px rgba(255, 107, 0, 0.2);
    transition: transform 0.2s;
}
.header-icon-circle-btn svg { stroke: #ff7b00 !important; }
.header-icon-circle-btn:active { transform: scale(0.92); }

/* =========================================================================
   2. БАЗОВЫЕ КАРТОЧКИ И ФОНОВЫЕ ВОЛНЫ (ГЛАВНАЯ СТРАНИЦА)
   ========================================================================= */
.glass-card {
    background: linear-gradient(145deg, rgba(16, 17, 23, 0.82) 0%, rgba(9, 10, 14, 0.92) 100%);
    border: 1px solid rgba(255, 107, 0, 0.38);
    border-radius: 17px; 
    position: relative; 
    display: flex; 
    flex-direction: column;
    justify-content: space-between; 
    backdrop-filter: blur(25px);
    cursor: pointer; 
    overflow: hidden;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.85), 
                inset 0 1px 0 rgba(255, 159, 28, 0.35),
                0 0 18px rgba(255, 107, 0, 0.12);
    padding: 18px 20px 16px 20px;
    margin-bottom: 10px;
}

.glass-card:active { 
    transform: scale(0.985); 
    border-color: rgba(255, 125, 0, 0.75);
    box-shadow: 0 0 26px rgba(255, 107, 0, 0.42);
}

/* Фоновые графики котировок */
.card-chart-bg {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 65%;
    height: 90%;
    pointer-events: none;
    opacity: 0.55;
    z-index: 1;
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120' fill='none'%3E%3Cpath d='M0,105 Q30,110 50,85 T100,70 T150,90 T200,40 T250,55 T300,10' stroke='url(%23orange-line)' stroke-width='2.6' fill='none'/%3E%3Cpath d='M0,105 Q30,110 50,85 T100,70 T150,90 T200,40 T250,55 T300,10 L300,120 L0,120 Z' fill='url(%23orange-fill)' opacity='0.35'/%3E%3Cdefs%3E%3ClinearGradient id='orange-line' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0%25' stop-color='%23ff6b00'/%3E%3Cstop offset='100%25' stop-color='%23ffb703'/%3E%3C/linearGradient%3E%3ClinearGradient id='orange-fill' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%23ff6b00'/%3E%3Cstop offset='100%25' stop-color='%23ff6b00' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E");
}

.alt-chart-1 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120' fill='none'%3E%3Cpath d='M0,95 Q40,60 80,80 T160,40 T230,65 T300,8' stroke='url(%23orange-line2)' stroke-width='2.6' fill='none'/%3E%3Cpath d='M0,95 Q40,60 80,80 T160,40 T230,65 T300,8 L300,120 L0,120 Z' fill='url(%23orange-fill2)' opacity='0.35'/%3E%3Cdefs%3E%3ClinearGradient id='orange-line2' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0%25' stop-color='%23ff5400'/%3E%3Cstop offset='100%25' stop-color='%23ffaa00'/%3E%3C/linearGradient%3E%3ClinearGradient id='orange-fill2' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0%25' stop-color='%23ffaa00'/%3E%3Cstop offset='100%25' stop-color='%23ffaa00' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E") !important;
}

.alt-chart-2 {
    width: 65%;
    height: 95%;
    right: 0;
    bottom: 0;
    opacity: 0.65;
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 140' fill='none'%3E%3Cpath d='M10,122 L35,112 L55,118 L75,98 L95,106 L118,82 L138,90 L160,68 L182,76 L205,48 L225,58 L250,28 L275,38 L298,12 L315,6 L315,140 L10,140 Z' fill='url(%23chart-mesh-fire)' opacity='0.45'/%3E%3Cg stroke='%23ff8500' stroke-width='1.2' opacity='0.4'%3E%3Cline x1='35' y1='106' x2='35' y2='120'/%3E%3Cline x1='75' y1='90' x2='75' y2='110'/%3E%3Cline x1='118' y1='74' x2='118' y2='92'/%3E%3Cline x1='160' y1='60' x2='160' y2='80'/%3E%3Cline x1='205' y1='40' x2='205' y2='60'/%3E%3Cline x1='250' y1='20' x2='250' y2='40'/%3E%3Cline x1='298' y1='6' x2='298' y2='24'/%3E%3C/g%3E%3Cpath d='M10,122 L35,112 L55,118 L75,98 L95,106 L118,82 L138,90 L160,68 L182,76 L205,48 L225,58 L250,28 L275,38 L298,12 L315,6' stroke='url(%23trend-fire)' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round' filter='drop-shadow(0 0 8px rgba(255,107,0,0.9))'/%3E%3Ccircle cx='75' cy='98' r='2' fill='%23ffe5b4' opacity='0.85'/%3E%3Ccircle cx='160' cy='68' r='2' fill='%23ffe5b4' opacity='0.85'/%3E%3Ccircle cx='250' cy='28' r='2.5' fill='%23ffd000' opacity='0.95'/%3E%3Ccircle cx='315' cy='6' r='3.2' fill='%23ffffff' filter='drop-shadow(0 0 7px %23ffaa00)'/%3E%3Cdefs%3E%3ClinearGradient id='trend-fire' x1='0' y1='1' x2='1' y2='0'%3E%3Cstop offset='0%25' stop-color='%23ff5400'/%3E%3Cstop offset='55%25' stop-color='%23ff8500'/%3E%3Cstop offset='100%25' stop-color='%23ffc300'/%3E%3C/linearGradient%3E%3ClinearGradient id='chart-mesh-fire' x1='0' y1='0' x2='1' y2='0'%3E%3Cstop offset='0%25' stop-color='%23ff6b00' stop-opacity='0.85'/%3E%3Cstop offset='60%25' stop-color='%23ff5400' stop-opacity='0.25'/%3E%3Cstop offset='100%25' stop-color='%23000000' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E") !important;
}

/* =========================================================================
   3. ПЕРВАЯ КАРТОЧКА (РУЛЕТКА): 100% ОРИГИНАЛЬНЫЙ БЭКАП
   ========================================================================= */
.roulette-hero-card {
    min-height: 148px;
    padding: 18px 20px 16px 20px;
    border-color: rgba(255, 107, 0, 0.42);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-hero-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 2;
}

.card-title-wrap {
    max-width: 82%;
    position: relative;
    padding-left: 14px;
}

.card-hero-header h2 {
    font-size: 17px !important;
    font-weight: 900 !important;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.clean-subtitle {
    font-size: 11.5px !important;
    color: #fed7aa;
    margin-top: 4px;
    font-weight: 600;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roulette-hero-card::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 18px;
    width: 9px;
    height: 9px;
    background-color: #ef4444;
    border-radius: 50%;
    z-index: 10;
    box-shadow: 0 0 12px #ef4444, 0 0 5px #ff6b00;
    animation: livePulse 1.4s infinite ease-in-out;
}

@keyframes livePulse {
    0% { transform: scale(0.9); opacity: 0.5; box-shadow: 0 0 4px rgba(239, 68, 68, 0.4); }
    50% { transform: scale(1.4); opacity: 1; box-shadow: 0 0 16px rgba(239, 68, 68, 0.9); }
    100% { transform: scale(0.9); opacity: 0.5; box-shadow: 0 0 4px rgba(239, 68, 68, 0.4); }
}

.hero-ticker-wrap {
    width: 100%;
    overflow: hidden;
    position: relative;
    z-index: 2;
    margin-top: 14px;
    mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.hero-ticker-track {
    display: flex;
    gap: 8px;
    width: max-content;
    animation: tickerLoop 24s linear infinite;
}

.ticker-pill {
    background: rgba(255, 23, 30, 0.88);
    border: 1px solid rgba(255, 107, 0, 0.48);
    border-radius: 12px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    color: #ffe5b4;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.ticker-pill.gold {
    background: rgba(35, 28, 15, 0.9);
    border-color: rgba(255, 183, 3, 0.65);
    color: #ffb703;
    box-shadow: 0 2px 8px rgba(255, 183, 3, 0.28);
}

@keyframes tickerLoop {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* =========================================================================
   4. ПЛАШКА СТАТУСА И ID ПОЛЬЗОВАТЕЛЯ
   ========================================================================= */
#user-status-badge-root {
    flex-shrink: 0;
}

.user-badge-container {
    display: flex;
    align-items: center;
    background: linear-gradient(145deg, rgba(16, 17, 23, 0.92) 0%, rgba(9, 10, 14, 0.98) 100%);
    border: 1px solid rgba(255, 107, 0, 0.35);
    border-radius: 14px;
    padding: 11px 16px;
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.user-badge-col {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.user-badge-clickable {
    cursor: pointer;
    transition: opacity 0.2s ease;
}
.user-badge-clickable:active { opacity: 0.7; }

.user-badge-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: rgba(255, 107, 0, 0.14);
    border: 1px solid rgba(255, 107, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-badge-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.user-badge-label {
    font-size: 10.5px;
    color: #9ca3af;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 2px;
}

.user-badge-value-wrapper {
    display: flex;
    align-items: center;
    gap: 4px;
}

.user-badge-value {
    font-size: 13.5px;
    font-weight: 900;
    letter-spacing: 0.3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #ffffff;
}

.user-badge-arrow {
    color: #ff7b00;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

.user-badge-divider {
    width: 1px;
    height: 26px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 10px;
    flex-shrink: 0;
}

/* =========================================================================
   5. КАРТОЧКИ СИГНАЛОВ И ОБУЧЕНИЯ (ГЛАВНАЯ И ВТОРИЧНЫЕ ЭКРАНЫ)
   ========================================================================= */
.neo-market-card, 
.view-section .glass-card:not(.roulette-hero-card) {
    min-height: 175px !important;
    padding: 18px 20px 16px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
}

/* Контейнер контента карточки на полную ширину */
.neo-market-card .card-info,
.view-section .glass-card .card-info,
.view-section .glass-card > div:first-child:not(.card-chart-bg) {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 !important;
    position: relative !important;
    z-index: 2 !important;
    padding-right: 0 !important;
}

/* Ограничение ширины для текста на экранах списков */
.card-text-group,
.view-section .glass-card:not(.roulette-hero-card) > h3,
.view-section .glass-card:not(.roulette-hero-card) > p {
    display: flex;
    flex-direction: column;
    max-width: 78% !important;
}

.neo-market-card .card-info h2,
.view-section .glass-card:not(.roulette-hero-card) h2, 
.view-section .glass-card:not(.roulette-hero-card) h3 { 
    font-size: 16px !important;
    font-weight: 900 !important; 
    margin-bottom: 5px !important; 
    line-height: 1.2 !important; 
    text-transform: uppercase;
    color: #ffffff !important;
    letter-spacing: 0.4px;
}

.clean-desc,
.view-section .glass-card:not(.roulette-hero-card) p { 
    font-size: 11.5px !important;
    color: #e2e8f0 !important; 
    line-height: 1.45 !important;
    font-weight: 500;
    margin-bottom: auto !important;
}

/* =========================================================================
   НИЖНЯЯ ЛИНИЯ: ПЛАШКИ СТАТУСА (СЛЕВА) И КНОПКИ (СПРАВА)
   ========================================================================= */

/* Контейнер строки футера на главной странице */
.card-footer-row,
.view-section .glass-card .card-action {
    display: flex !important; 
    justify-content: space-between !important; 
    align-items: center !important; 
    width: 100% !important;
    margin-top: auto !important; 
    margin-bottom: 0 !important;
    position: relative !important; 
    z-index: 2 !important; 
}

/* Компактные аккуратные плашки статусов */
.tag-pill,
.neo-tag,
.edu-tag, 
.market-tag,
.view-section .glass-card [class*="limit"],
.view-section .glass-card [class*="status"],
.view-section .glass-card div[style*="red"],
.view-section .glass-card span[style*="red"],
.view-section .glass-card font { 
    background: rgba(255, 107, 0, 0.14) !important; 
    border: 1px solid rgba(255, 107, 0, 0.45) !important; 
    padding: 4px 10px !important; 
    border-radius: 12px !important; 
    font-size: 10.5px !important; 
    color: #fed7aa !important; 
    font-weight: 700 !important;
    letter-spacing: 0.2px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
    text-shadow: none !important;
    box-shadow: none !important;
    margin: 0 !important;
}

/* Отрыв плашек от текста на вторичных экранах */
#view-edu .glass-card [class*="limit"],
#view-edu .glass-card .tag-pill,
#view-markets .glass-card [class*="limit"],
#view-markets .glass-card .tag-pill,
.view-section:not(#view-home) .glass-card:not(.roulette-hero-card) [class*="limit"],
.view-section:not(#view-home) .glass-card:not(.roulette-hero-card) [class*="status"] {
    margin-top: auto !important;
    margin-bottom: 0 !important;
    align-self: flex-start !important;
}

/* Кнопка со стрелкой «>» — единый базовый стиль */
.neo-circle-btn, .red-circle-btn {
    width: 36px !important; 
    height: 36px !important; 
    background: linear-gradient(135deg, #ff6b00 0%, #ff8500 50%, #ffaa00 100%) !important; 
    border-radius: 50% !important;
    display: flex !important; 
    align-items: center !important; 
    justify-content: center !important; 
    font-weight: 900 !important; 
    font-size: 14px !important; 
    color: #ffffff !important;
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.8), 0 0 4px #ffffff !important;
    flex-shrink: 0 !important;
    border: none !important;
    cursor: pointer !important;
}
.neo-circle-btn:active, .red-circle-btn:active { transform: scale(0.92); }

/* Кнопка в футере главной страницы */
.card-footer-row .neo-circle-btn,
.card-footer-row .red-circle-btn {
    margin-left: auto !important;
}

/* Кнопка на вторичных экранах: четко в нижнем правом углу */
#view-edu .glass-card .neo-circle-btn,
#view-edu .glass-card .red-circle-btn,
#view-markets .glass-card .neo-circle-btn,
#view-markets .glass-card .red-circle-btn,
.view-section:not(#view-home) .glass-card:not(.roulette-hero-card) .neo-circle-btn,
.view-section:not(#view-home) .glass-card:not(.roulette-hero-card) .red-circle-btn {
    position: absolute !important;
    right: 20px !important;
    bottom: 16px !important;
    margin: 0 !important;
    z-index: 5 !important;
}

/* Заголовки на вторичных экранах */
.view-section h2.section-title,
#view-edu h2, #view-markets h2, #view-brokers h2 {
    font-size: 20px !important;
    font-weight: 900 !important; 
    color: #ffffff !important; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    margin-bottom: 4px !important; 
}

/* =========================================================================
   6. СЕТКА БРОКЕРОВ И ФОРМЫ
   ========================================================================= */
.brokers-trio-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.broker-btn {
    background: linear-gradient(145deg, rgba(16, 17, 23, 0.88) 0%, rgba(9, 10, 14, 0.98) 100%);
    border: 1px solid rgba(255, 107, 0, 0.35);
    border-radius: 16px; 
    padding: 16px 20px; 
    display: flex; 
    flex-direction: row; 
    align-items: center; 
    justify-content: flex-start; 
    gap: 16px;
    backdrop-filter: blur(15px); 
    cursor: pointer; 
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: transform 0.2s, border-color 0.2s;
}
.broker-btn.horizontal-broker {
    flex-direction: row !important;
    justify-content: flex-start !important;
    padding: 15px 25px !important;
    gap: 20px !important;
}
.broker-btn:active { 
    transform: scale(0.97); 
    border-color: #ff7b00;
    box-shadow: 0 0 22px rgba(255, 107, 0, 0.45);
}

.broker-logo-mini {
    width: 40px;
    height: 40px;
    object-fit: contain;
    background: transparent;
    flex-shrink: 0;
}

.broker-btn h3 {
    font-size: 16px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.3px;
}

.setup-form { 
    background: rgba(16, 17, 23, 0.9); 
    border: 1px solid rgba(255, 107, 0, 0.35); 
    padding: 18px; 
    border-radius: 18px; 
    backdrop-filter: blur(15px); 
    margin-bottom: 12px; 
}
.setup-form label { 
    display: block; 
    font-size: 11.5px; 
    color: #fed7aa; 
    margin-bottom: 6px; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
}
.form-select {
    width: 100%; 
    background: #090a0e; 
    border: 1px solid rgba(255, 107, 0, 0.45);
    color: white; 
    padding: 12px 14px; 
    border-radius: 12px; 
    font-size: 14px; 
    margin-bottom: 16px; 
    outline: none; 
    font-family: inherit;
}
.form-select option { background: #090a0e; }

.action-btn {
    width: 100%; 
    background: linear-gradient(135deg, #ff6b00 0%, #ff8500 50%, #ffaa00 100%); 
    color: white; 
    border: none; 
    padding: 16px;
    border-radius: 14px; 
    font-weight: 900; 
    font-size: 15px; 
    cursor: pointer; 
    text-transform: uppercase; 
    box-shadow: 0 4px 22px rgba(255, 107, 0, 0.55); 
    transition: 0.2s;
    letter-spacing: 0.5px;
}
.action-btn:active { transform: scale(0.98); }
.outline-btn { 
    background: transparent; 
    border: 1px solid #ff7b00; 
    color: #ff8500; 
    box-shadow: none; 
    margin-top: 14px;
}

.home-btn {
    background: rgba(25, 20, 16, 0.9) !important;
    border: 1px solid rgba(255, 107, 0, 0.4) !important;
    color: #ffffff !important;
    padding: 14px !important;
    border-radius: 14px !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    width: 100% !important;
    cursor: pointer !important;
    margin-top: 12px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    text-align: center;
}
.home-btn:active {
    transform: scale(0.98);
    border-color: #ff8500 !important;
}

.faq-block {
    background: rgba(255, 107, 0, 0.08); 
    border-left: 3px solid #ff7b00;
    padding: 14px 16px; 
    border-radius: 0 12px 12px 0; 
    margin-bottom: 14px;
}
.faq-block h4 { font-size: 12.5px; margin-bottom: 6px; color: #fed7aa; font-weight: 800; }
.faq-block p { font-size: 11px; color: #e2e8f0; line-height: 1.55; }

/* ЗАГРУЗКА И РЕЗУЛЬТАТ */
.loading-container { align-items: center; justify-content: center; height: 45vh; text-align: center; }
.spinner {
    width: 52px; 
    height: 52px; 
    border: 4px solid rgba(255,255,255,0.08);
    border-top-color: #ff7b00; 
    border-radius: 50%; 
    animation: spin 1s linear infinite; 
    margin: 0 auto 16px auto;
    box-shadow: 0 0 18px rgba(255, 107, 0, 0.45);
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: #fed7aa; font-size: 14px; font-weight: 800; }

.result-card {
    background: rgba(16, 17, 23, 0.95); 
    border: 1px solid rgba(255, 107, 0, 0.45);
    padding: 22px 18px; 
    border-radius: 18px; 
    text-align: center; 
    box-shadow: 0 12px 35px rgba(0,0,0,0.85); 
    margin-bottom: 14px;
}
.res-header { display: flex; justify-content: space-between; border-bottom: 1px solid rgba(255,255,255,0.08); padding-bottom: 12px; margin-bottom: 16px; }
.res-asset { font-weight: 900; font-size: 17px; }
.res-time { background: rgba(255, 107, 0, 0.2); border: 1px solid rgba(255, 107, 0, 0.45); color: #fed7aa; padding: 5px 11px; border-radius: 8px; font-size: 12px; font-weight: 800; }
.res-direction-block h1 { font-size: 30px; font-weight: 900; margin-bottom: 8px; color: #ff7b00; }
.prob-box { display: inline-block; background: rgba(0,0,0,0.55); padding: 6px 14px; border-radius: 10px; font-size: 13.5px; margin-bottom: 18px; border: 1px solid rgba(255, 107, 0, 0.35);}
.res-explanation { text-align: left; background: rgba(0,0,0,0.4); padding: 14px; border-radius: 12px; font-size: 12px; line-height: 1.55; color: #e2e8f0; }

/* =========================================================================
   7. НИЖНЯЯ НАВИГАЦИЯ
   ========================================================================= */
.bottom-nav {
    position: fixed; 
    bottom: 0; 
    left: 0; 
    right: 0; 
    height: 60px;
    background: #000000; 
    padding: 6px 16px; 
    display: flex; 
    justify-content: space-around;
    border-top: none !important;
    z-index: 1000;
}
.nav-btn { 
    background: none; 
    border: none; 
    color: #71717a; 
    font-size: 10px; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    gap: 3px; 
    font-weight: 700; 
    cursor: pointer; 
    transition: color 0.2s;
}
.nav-btn.active { color: #ff7b00; }
.nav-btn .icon { font-size: 16px; }

/* =========================================================================
   8. КАРТОЧКИ УРОКОВ (ВНУТРИ РАЗДЕЛОВ ОБУЧЕНИЯ И БУДУЩИХ МАТЕРИАЛОВ)
   ========================================================================= */
.lesson-card,
#view-lessons .glass-card,
#view-module .glass-card,
#view-modules .glass-card,
#view-course .glass-card,
[id*="lesson"] .glass-card,
[id*="module"] .glass-card,
.view-section:not(#view-home):not(#view-edu):not(#view-markets):not(#view-brokers) .glass-card,
.glass-card:has([class*="min"]),
.glass-card:has([class*="time"]),
.glass-card:has(span[style*="red"]) {
    min-height: 195px !important;
    padding: 18px 20px 18px 20px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Красный бейдж: «УРОК #1», «УРОК #2» */
.lesson-card > span:first-child,
.lesson-card .lesson-tag,
#view-lessons .glass-card span[style*="red"],
.view-section:not(#view-home):not(#view-edu):not(#view-markets):not(#view-brokers) .glass-card span[style*="red"],
.glass-card:has([class*="min"]) > span:first-child,
.glass-card:has(span[style*="red"]) > span:first-child {
    font-size: 11px !important;
    font-weight: 800 !important;
    color: #ef4444 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.8px !important;
    margin-bottom: 6px !important;
    display: block !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* Заголовок урока (аккуратный масштаб, 2–3 строки не давят на карточку) */
.lesson-card h2,
.lesson-card h3,
#view-lessons .glass-card h2,
#view-lessons .glass-card h3,
.view-section:not(#view-home):not(#view-edu):not(#view-markets):not(#view-brokers) .glass-card h2,
.view-section:not(#view-home):not(#view-edu):not(#view-markets):not(#view-brokers) .glass-card h3,
.glass-card:has([class*="min"]) h2,
.glass-card:has([class*="min"]) h3 {
    font-size: 14px !important;
    font-weight: 900 !important;
    line-height: 1.25 !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    letter-spacing: 0.3px !important;
    margin-bottom: 8px !important;
    padding-right: 52px !important; /* Защита от наложения на круглую кнопку */
    max-width: 100% !important;
}

/* Описание превью урока */
.lesson-card p,
#view-lessons .glass-card p,
.view-section:not(#view-home):not(#view-edu):not(#view-markets):not(#view-brokers) .glass-card p,
.glass-card:has([class*="min"]) p,
.glass-card:has(span[style*="red"]) p {
    font-size: 11px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
    color: #94a3b8 !important;
    margin-bottom: 16px !important; /* Четкий отступ: плашки никогда не прилипнут к тексту */
    padding-right: 52px !important; /* Текст не залазит под оранжевую кнопку */
    max-width: 100% !important;
}

/* Контейнер нижних плашек (тайминг и статус) */
.lesson-card .card-footer-row,
.lesson-card .card-action,
#view-lessons .glass-card .card-footer-row,
.view-section:not(#view-home):not(#view-edu):not(#view-markets):not(#view-brokers) .glass-card .card-footer-row,
.glass-card:has([class*="min"]) .card-footer-row,
.glass-card:has([class*="min"]) p + div,
.glass-card:has([class*="min"]) p + span {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: auto !important;
    margin-bottom: 0 !important;
    padding-right: 52px !important;
    width: auto !important;
}

/* Сами компактные плашки времени и статуса */
.lesson-card .tag-pill,
.lesson-card [class*="limit"],
#view-lessons .glass-card .tag-pill,
#view-lessons .glass-card [class*="limit"],
.view-section:not(#view-home):not(#view-edu):not(#view-markets):not(#view-brokers) .glass-card .tag-pill,
.view-section:not(#view-home):not(#view-edu):not(#view-markets):not(#view-brokers) .glass-card [class*="limit"],
.glass-card:has([class*="min"]) [class*="limit"],
.glass-card:has([class*="min"]) [class*="time"],
.glass-card:has([class*="min"]) [class*="tag"] {
    background: rgba(255, 107, 0, 0.14) !important;
    border: 1px solid rgba(255, 107, 0, 0.45) !important;
    padding: 4px 10px !important;
    border-radius: 12px !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #fed7aa !important;
    margin: 0 !important;
    align-self: flex-start !important;
}

/* Круглая кнопка перехода (строго в правом нижнем углу карточки урока) */
.lesson-card .neo-circle-btn,
.lesson-card .red-circle-btn,
#view-lessons .glass-card .neo-circle-btn,
#view-lessons .glass-card .red-circle-btn,
.view-section:not(#view-home):not(#view-edu):not(#view-markets):not(#view-brokers) .glass-card .neo-circle-btn,
.view-section:not(#view-home):not(#view-edu):not(#view-markets):not(#view-brokers) .glass-card .red-circle-btn,
.glass-card:has([class*="min"]) .neo-circle-btn,
.glass-card:has([class*="min"]) .red-circle-btn {
    position: absolute !important;
    right: 20px !important;
    bottom: 18px !important;
    margin: 0 !important;
    z-index: 5 !important;
}