/* ========================= */
/*        GLOBAL STYLES      */
/* ========================= */

.pulse {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.05); }
}

html, body {
    height: 100%;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background-color: #1f1f29;
    color: #ddd;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
}

html {
    background-color: #0f0f17;
    background: linear-gradient(180deg, #0f0f17 0%, #1f1f29 100%);
}

body {
    background-color: #1f1f29;
    padding-top: 24px;
}

/* Убираем белый фон Bootstrap */
.container,
.row,
.col,
.card,
.bg-light {
    background-color: transparent !important;
}

.container,
.row,
.col {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ========================= */
/*        NAVIGATION         */
/* ========================= */

.logo {
    font-size: 24px;
    font-weight: bold;
}

.nav-links {
    display: flex;
    justify-content: end;
    gap: 24px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.nav-links a {
    color: #0dcaf0;
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover {
    color: #00a3c4;
}

/* ========================= */
/*        FORM ELEMENTS      */
/* ========================= */

.form-control {
    background-color: #2a2a38;
    border: 1px solid #444;
    color: #eee;
    border-radius: 8px;
}

.form-control:focus {
    border-color: #0dcaf0;
    box-shadow: 0 0 5px #0dcaf0;
    background-color: #333;
    color: #fff;
}

.btn-primary {
    background: linear-gradient(90deg, #0dcaf0, #00a3c4);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #00a3c4, #0dcaf0);
}

/* ========================= */
/*        RTL SUPPORT        */
/* ========================= */

html[dir="rtl"] {
    direction: rtl !important;
    text-align: right !important;
}

html[dir="rtl"] body {
    text-align: right !important;
    direction: rtl !important;
}

html[dir="rtl"] .container,
html[dir="rtl"] .row {
    direction: rtl !important;
    text-align: right !important;
}

html[dir="rtl"] .col {
    text-align: right !important;
}

html[dir="rtl"] .nav-links {
    justify-content: start !important;
}

html[dir="rtl"] .header-container {
    flex-direction: row-reverse !important;
}

html[dir="rtl"] .header-right {
    order: -1 !important;
}

html[dir="rtl"] .header-left {
    order: 1 !important;
    margin-left: auto !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .footer-container {
    direction: rtl !important;
}

html[dir="rtl"] .footer-links {
    padding-right: 0 !important;
    padding-left: 0 !important;
    text-align: right !important;
}

html[dir="rtl"] .alert {
    text-align: right !important;
}

html[dir="rtl"] .accordion-button::after {
    margin-left: 0 !important;
    margin-right: 1rem !important;
    transform: rotate(180deg) !important;
}

html[dir="rtl"] .accordion-button:not(.collapsed)::after {
    transform: rotate(90deg) !important;
}

html[dir="rtl"] .btn {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .float-end {
    float: left !important;
}

html[dir="rtl"] .float-start {
    float: right !important;
}

html[dir="rtl"] .me-2 {
    margin-left: 0.5rem !important;
    margin-right: 0 !important;
}

html[dir="rtl"] .ms-2 {
    margin-right: 0.5rem !important;
    margin-left: 0 !important;
}

/* ========================= */
/*           FOOTER          */
/* ========================= */

.site-footer {
    background: linear-gradient(135deg, #0f2027, #203a43);
    color: #aaa;
    padding: 50px 0 20px;
    margin-top: 50px;
    border-top: 2px solid #333;
    flex-shrink: 0;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-section h4 {
    color: #4CAF50;
    font-size: 1.2rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: #4CAF50;
}

.footer-section p {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #333;
    margin-top: 30px;
}

.footer-bottom p {
    margin: 5px 0;
    font-size: 0.9rem;
}

.footer-small {
    color: #666;
    font-size: 0.85rem;
}

/* ========================= */
/*           HEADER          */
/* ========================= */

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    gap: 8px;
    position: relative;
    background-color: #1e1e1e;
    box-shadow: 0 2px 6px rgba(0,0,0,0.5);
    flex-wrap: nowrap;
}

.header-left {
    flex-shrink: 0;
}

.header-left .logo {
    height: 80px;
    max-height: 80px;
    width: auto;
}

.header-nav {
    display: none !important;
}

/* ========================= */
/*     ОСНОВНОЕ МЕНЮ (База)  */
/* ========================= */

.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 1 auto;
    margin: 0 10px;
}

.main-nav .nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 6px;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
}

.main-nav .nav-list li {
    display: inline-block;
}

.main-nav .nav-list a {
    color: #ccc;
    text-decoration: none;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.main-nav .nav-list a:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

.main-nav .nav-list a.active {
    color: #0dcaf0;
}

.header-right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.header-right select {
    background: #1e1e2e;
    color: #fff;
    border: 1px solid #444;
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    cursor: pointer;
}

header {
    padding-top: 44px !important;
}

/* ========================= */
/*     ARTICLE IMAGES        */
/* ========================= */

.article-image,
.article-text img {
    width: 100vw !important;
    max-width: 100vw !important;
    height: auto !important;
    object-fit: contain !important;
    margin: 0 auto !important;
    display: block !important;
    padding: 0 10px !important;
}

/* ========================= */
/*     MAIN CONTAINER FIX    */
/* ========================= */

main.container {
    flex: 1 0 auto;
}

/* ========================= */
/*     BONUS BANNER          */
/* ========================= */

.trial-bonus-banner {
    background: linear-gradient(90deg, #4CAF50, #2196F3);
    color: white;
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

.bonus-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.bonus-icon {
    font-size: 1.5rem;
    animation: bounce 2s infinite;
}

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

.bonus-text {
    font-size: 1.1rem;
    font-weight: 500;
}

.bonus-text small {
    display: block;
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 4px;
}

.bonus-button {
    background: white;
    color: #4CAF50;
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.bonus-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255,255,255,0.3);
}

.bonus-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s;
    margin-left: auto;
}

.bonus-close:hover {
    opacity: 1;
}

html[dir="rtl"] .bonus-close {
    margin-left: 0;
    margin-right: auto;
}

html[dir="rtl"] .bonus-content {
    flex-direction: row-reverse;
}

/* ========================= */
/*     DROPDOWN MENU         */
/* ========================= */

.dropdown-menu-custom a:hover {
    background-color: #2a2a38;
    color: #4CAF50 !important;
}

.dropdown-toggle::after {
    content: ' ▼';
    font-size: 10px;
    display: inline-block;
    margin-left: 5px;
}

/* ============================================= */
/* 💥 ТЁМНЫЙ ФОН (Глобальные переопределения)    */
/* ============================================= */

html, body {
    background-color: #121212 !important;
    background: #121212 !important;
    color: #e0e0e0 !important;
}

.container,
.row,
.col,
.card,
.bg-light,
.bg-white,
.card-body,
.card-header,
.card-footer,
.modal-content,
.dropdown-menu,
.navbar,
.footer {
    background-color: transparent !important;
    background: transparent !important;
}

.bg-light,
.bg-white {
    background-color: transparent !important;
}

.section,
.article-content,
.post-content,
.entry-content,
.comment-content,
.trade-container {
    background-color: #1a1a2a !important;
    color: #e0e0e0 !important;
}

.card {
    background-color: #1e1e2e !important;
    border-color: #333 !important;
    color: #e0e0e0 !important;
}

.modal-content {
    background-color: #1a1a2a !important;
    color: #e0e0e0 !important;
}

.dropdown-menu {
    background-color: #1a1a2a !important;
    border-color: #333 !important;
}

.dropdown-menu a {
    color: #e0e0e0 !important;
}

.dropdown-menu a:hover {
    background-color: #2a2a3a !important;
    color: #fff !important;
}

.table {
    background-color: #1a1a2a !important;
    color: #e0e0e0 !important;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #1e1e2e !important;
}

.table-striped tbody tr:nth-of-type(even) {
    background-color: #1a1a2a !important;
}

input,
textarea,
select,
.form-control {
    background-color: #2a2a38 !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

input:focus,
textarea:focus,
select:focus,
.form-control:focus {
    background-color: #333 !important;
    color: #fff !important;
    border-color: #0dcaf0 !important;
}

.btn-light {
    background-color: #2a2a38 !important;
    color: #e0e0e0 !important;
    border-color: #444 !important;
}

.btn-light:hover {
    background-color: #333 !important;
    color: #fff !important;
}

/* ============================================= */
/* 💥 АДАПТИВНОСТЬ И МОБИЛЬНОЕ МЕНЮ              */
/* ============================================= */

/* 1️⃣ МОБИЛЬНАЯ И ПЛАНШЕТНАЯ ВЕРСИЯ (до 1024px) */
@media (max-width: 1024px) {
    header {
        padding-top: 44px !important;
    }

    .header-container {
        flex-wrap: nowrap !important;
        padding: 4px 8px !important;
        gap: 4px !important;
    }

    .header-left .logo {
        max-height: 28px !important;
        height: auto !important;
        width: auto !important;
    }

    .header-right select {
        font-size: 10px !important;
        padding: 2px 4px !important;
        max-width: 60px !important;
    }

    .footer-container {
        grid-template-columns: 1fr !important;
    }

    .header-nav {
        display: none !important;
    }

   
        .main-nav .nav-list a {
            font-size: 11px !important;   /* ← уменьшаем шрифт */
            padding: 4px 6px !important;  /* ← уменьшаем отступы */
            white-space: nowrap !important; /* ← запрещаем перенос */
        }
        
        .main-nav .nav-list {
            gap: 2px !important;          /* ← уменьшаем расстояние между пунктами */
        }
 




    /* ===== КНОПКА МЕНЮ (уменьшенная) ===== */
/* ===== КНОПКА МЕНЮ (компактная) ===== */
.menu-toggle {
    display: flex !important;
    font-size: 16px !important;
    padding: 4px 10px !important;
    background: transparent !important;
    border: none !important;
    border-radius: 6px !important;
    gap: 4px;
    min-width: auto !important;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    cursor: pointer;
    color: #fff !important;
}
.menu-toggle .menu-label {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #fff !important;
}

    /* САМОЕ ГЛАВНОЕ: Меню скрыто по умолчанию на мобильных */
    .main-nav .nav-list {
        display: none !important;
        position: absolute !important;
        top: 100% !important;
        left: 0 !important;
        width: 100% !important;
        background: #1a1a2a !important;
        flex-direction: column !important;
        padding: 12px 16px !important;
        z-index: 9999 !important;
        border-bottom: 2px solid #0dcaf0 !important;
        box-shadow: 0 8px 20px rgba(0,0,0,0.8) !important;
        max-height: 80vh !important;
        overflow-y: auto !important;
        gap: 0 !important;
    }

    .main-nav .nav-list.active {
        display: flex !important;
    }

    .main-nav .nav-list li {
        display: block !important;
        width: 100% !important;
    }

    .main-nav .nav-list a {
        display: block !important;
        padding: 12px 10px !important;
        font-size: 15px !important;
        border-bottom: 1px solid #333 !important;
        white-space: normal !important;
        border-radius: 0 !important;
        color: #ccc !important;
        text-decoration: none !important;
    }

    .main-nav .nav-list a:hover {
        background: rgba(13, 202, 240, 0.1) !important;
        color: #fff !important;
    }

    .main-nav .nav-list li:last-child a {
        border-bottom: none !important;
    }
}

    /* Меню показывается ТОЛЬКО когда JS добавляет класс .active */
    .main-nav .nav-list.active {
        display: flex !important;
    }

    .main-nav .nav-list li {
        display: block !important;
        width: 100% !important;
    }

    .main-nav .nav-list a {
        display: block !important;
        padding: 12px 10px !important;
        font-size: 15px !important;
        border-bottom: 1px solid #333 !important;
        white-space: normal !important;
        border-radius: 0 !important;
        color: #ccc !important;
        text-decoration: none !important;
    }

    .main-nav .nav-list a:hover {
        background: rgba(13, 202, 240, 0.1) !important;
        color: #fff !important;
    }

    .main-nav .nav-list li:last-child a {
        border-bottom: none !important;
    }
}

/* 2️⃣ БОЛЬШИЕ ЭКРАНЫ (1025px и выше) */
@media (min-width: 1025px) {
    .menu-toggle {
        display: none !important;
    }
    
    /* Гарантируем, что на десктопе меню всегда горизонтальное и видимое */
    .main-nav .nav-list {
        display: flex !important;
    }

    header {
        padding-top: 8px !important;
    }

    .header-left .logo {
        max-height: 40px !important;   /* ← было 28px */
        height: auto !important;
        width: auto !important;
    }

    .header-right select {
        font-size: 13px !important;
        padding: 4px 8px !important;
        max-width: 120px !important;
    }
}

/* 3️⃣ ПЛАНШЕТЫ (768px - 1024px) - точечные правки */
@media (min-width: 768px) and (max-width: 1024px) {
    .header-left .logo {
        max-height: 40px !important;
    }

    .header-right select {
        font-size: 12px !important;
        padding: 3px 6px !important;
        max-width: 80px !important;
    }

    .header-container {
        padding: 8px 12px !important;
        gap: 6px !important;
    }

    .main-nav .nav-list a {
        font-size: 13px !important;
        padding: 4px 8px !important;
    }
}

/* ============================================= */
/* 💥 КОМПЬЮТЕР: МЕНЮ В ОДНУ СТРОКУ             */
/* ============================================= */

/* ============================================= */
/* 💥 КОМПЬЮТЕР: МЕНЮ КАК НА F1NEWS             */
/* ============================================= */


/* На телефонах — показываем эмодзи */
@media (min-width: 769px) {
    .main-nav {
        flex: 0 1 auto !important;
        justify-content: center !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .nav-list {
        display: flex !important;
        flex-wrap: nowrap !important;
        justify-content: center !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .nav-list li {
        display: inline-block !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .nav-list a {
        font-size: 14px !important;
        font-weight: 500 !important;
        padding: 8px 14px !important;
        white-space: nowrap !important;
        color: #ccc !important;
        text-decoration: none !important;
        transition: all 0.25s ease !important;
        display: inline-block !important;
    }

    .nav-list a:hover {
        color: #fff !important;
        background: rgba(255,255,255,0.08) !important;
    }

    /* Скрываем эмодзи на компьютере */
    .nav-list a .emoji,
    .nav-list a .icon,
    .nav-list a .fa,
    .nav-list a .fas {
        display: none !important;
    }
}

/* ============================================= */
/* 💥 ГЛАВНАЯ СТРАНИЦА: КОМПАКТНОЕ МЕНЮ          */
/* ============================================= */

body.home .nav-list a {
    font-size: 10px !important;
    padding: 2px 4px !important;
}

body.home .nav-list {
    gap: 1px 2px !important;
}

body.home .main-nav {
    max-width: 85% !important;
}

body.home .nav-list .pulse,
body.home .nav-list .text-warning,
body.home .nav-list .fw-bold {
    display: none !important;
}

body.home .nav-list .user-login {
    display: none !important;
}

/* ============================================= */
/* 💥 КАЛЕНДАРЬ: ГОРИЗОНТАЛЬНАЯ ПРОКРУТКА        */
/* ============================================= */

.calendar-container,
.calendar-wrapper,
.table-responsive {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: thin !important;
    padding-bottom: 4px !important;
}

.calendar-table,
.calendar-grid,
table.calendar {
    min-width: 600px !important;
    width: 100% !important;
    table-layout: fixed !important;
}

.calendar-table td,
.calendar-table th,
.calendar-grid td,
.calendar-grid th {
    min-width: 40px !important;
    max-width: 60px !important;
    text-align: center !important;
    padding: 4px 2px !important;
}

.calendar-container::-webkit-scrollbar,
.calendar-wrapper::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar {
    height: 4px !important;
}

.calendar-container::-webkit-scrollbar-thumb,
.calendar-wrapper::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb {
    background: #0dcaf0 !important;
    border-radius: 4px !important;
}

.calendar-container::-webkit-scrollbar-track,
.calendar-wrapper::-webkit-scrollbar-track,
.table-responsive::-webkit-scrollbar-track {
    background: #2a2a3a !important;
}

/* ===== ПОЛНЫЙ СБРОС ДЛЯ КНОПКИ МЕНЮ ===== */
#menuToggle,
.menu-toggle {
    color: #ffffff !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

#menuToggle .menu-label,
.menu-toggle .menu-label {
    color: #ffffff !important;
    font-weight: 500 !important;
}