.burger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    background: transparent;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s;
}
.burger:hover { background: rgba(255,255,255,.06); }
.burger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}
.burger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.active span:nth-child(2) { opacity: 0; }
.burger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Navbar must never be wider than the viewport. A single over-wide element
   (e.g. a 3-column table) stretched the document, and the fixed navbar —
   burger included — was pushed outside the visible area. */
.navbar { max-width: 100vw; }
.navbar .container { max-width: 100%; }
.burger { flex-shrink: 0; }
.logo { min-width: 0; flex-shrink: 1; overflow: hidden; }

@media (max-width: 768px) {
    .burger { display: flex; }

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

    /* Wide tables get their own horizontal scroll instead of pushing
       the whole page (and the fixed navbar) past the screen edge. */
    table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .nav-links.open {
        display: flex !important;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 12px 24px 24px;
        background: rgba(10,10,15,.98);
        backdrop-filter: blur(16px);
        border-bottom: 1px solid rgba(255,255,255,.06);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
        z-index: 99;
    }
    .nav-links.open a {
        width: 100%;
        padding: 12px 0;
        border-bottom: 1px solid rgba(255,255,255,.06);
        font-size: 15px;
    }
    .nav-links.open a.desktop-only { display: inline-flex !important; }
    .nav-links.open a:last-child { border-bottom: none; }
    .nav-links.open .auth-section {
        display: flex !important;
        flex-direction: column;
        width: 100%;
        padding-top: 12px;
    }
    .nav-links.open .auth-telegram-btn { width: 100%; justify-content: center; }
}
