.topbar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    background-color: var(--surface-800);
    color: var(--text-light);
    font-family: 'Outfit', sans-serif;
    overflow: visible;
}

.sidebar-collapse-btn {
    display: none;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid var(--surface-600);
    background: var(--surface-700, #1a1a1a);
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.sidebar-collapse-btn:hover {
    color: var(--text-light);
    border-color: var(--brand-red);
    background: var(--surface-600, #222);
}

.sidebar-collapse-btn:active {
    transform: scale(0.96);
}

.sidebar-collapse-btn i {
    font-size: 1.15rem;
    line-height: 1;
    transition: transform 0.28s ease;
}

body.sidebar-collapsed .sidebar-collapse-btn {
    border-color: rgba(var(--primary), 0.35);
    color: var(--brand-red);
}

body.sidebar-collapsed .sidebar-collapse-btn i {
    transform: rotate(180deg);
}

@media (min-width: 1025px) {
    body.sidebar-pos-sol .topbar-wrapper {
        left: 0;
        width: 100%;
        z-index: 1200;
        background: transparent;
        pointer-events: none;
    }

    body.sidebar-pos-sol .topbar-main {
        max-width: none;
        width: 100%;
        border-bottom: 1px solid var(--surface-700);
        position: relative;
        z-index: 2;
        pointer-events: auto;
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-sizing: border-box;
    }

    body.sidebar-pos-sol .topbar-nav:not(.topbar-nav--sol-quick) {
        display: none !important;
    }

    /* #pjax-container sol kenarıyla hizalı */
    body.sidebar-pos-sol .topbar-nav--sol-quick {
        position: absolute;
        --sol-quick-left: calc(
            var(--layout-sidebar-offset) +
            max(0px, (100vw - var(--layout-sidebar-offset) - var(--layout-max-width)) / 2)
        );
        left: var(--sol-quick-left);
        top: 50%;
        transform: translateY(-50%);
        align-items: center;
        justify-content: flex-start;
        gap: 4px;
        margin: 0;
        z-index: 3;
        pointer-events: auto;
        /* Sağdaki grup (Puan Marketi + giriş/profil butonları) genişliği main.js'te ölçülüp
           --topbar-actions-w'ye yazılır. Hızlı bağlantılar yalnızca kalan alanı kullanır;
           sığmayanlar kaydırılır (üst üste binmez). 36px = sağ iç boşluk + iki grup arası nefes payı. */
        max-width: max(
            160px,
            min(
                var(--layout-max-width),
                calc(100vw - var(--sol-quick-left) - var(--topbar-actions-w, 430px) - 36px)
            )
        );
        padding: 0;
        background: transparent;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        overscroll-behavior-x: contain;
    }

    body.sidebar-pos-sol .topbar-nav--sol-quick::-webkit-scrollbar {
        display: none;
    }

    /* Sığmayan öğeler varsa (main.js .is-overflowing ekler) sağ kenar solar */
    body.sidebar-pos-sol .topbar-nav--sol-quick.is-overflowing {
        -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
        mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent);
    }

    body.sidebar-pos-sol .topbar-nav--sol-quick .sol-quick-item {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 44px;
        padding: 0 14px;
        border-radius: 8px;
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 13px;
        font-weight: 700;
        line-height: 1;
        white-space: nowrap;
        transition: color 0.18s ease, background 0.18s ease;
        background: transparent;
    }

    body.sidebar-pos-sol .topbar-nav--sol-quick .sol-quick-item i {
        font-size: 17px;
        color: var(--text-gray);
    }

    body.sidebar-pos-sol .topbar-nav--sol-quick .sol-quick-item:hover,
    body.sidebar-pos-sol .topbar-nav--sol-quick .sol-quick-item.active {
        color: var(--text-light);
        background: var(--surface-700);
    }

    body.sidebar-pos-sol .topbar-nav--sol-quick .sol-quick-item.active i {
        color: var(--text-on-dark, #e5e6ea);
    }

    body.sidebar-pos-sol .topbar-nav--sol-quick .sol-quick-item--action {
        min-width: 82px;
        background: var(--surface-700);
        color: var(--text-light);
        margin-left: 2px;
    }

    body.sidebar-pos-sol .topbar-nav--sol-quick .sol-quick-item--action:hover {
        background: var(--surface-600);
    }

    body.sidebar-pos-sol .topbar-nav--sol-quick .sol-quick-item__media {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 25px;
        height: 25px;
        overflow: visible;
        flex-shrink: 0;
    }

    body.sidebar-pos-sol .topbar-nav--sol-quick .sol-quick-item__media > svg,
    body.sidebar-pos-sol .topbar-nav--sol-quick .sol-quick-item__media .wheel-svg,
    body.sidebar-pos-sol .topbar-nav--sol-quick .sol-quick-item__media .gift-box-svg {
        width: 25px;
        height: 25px;
    }

    body.sidebar-pos-sol .topbar-main-left {
        display: flex;
        align-items: center;
        position: relative;
        z-index: 2;
        pointer-events: auto;
        flex-shrink: 0;
    }

    body.sidebar-pos-sol .sidebar-collapse-btn {
        display: inline-flex;
        position: static;
        transform: none;
        flex-shrink: 0;
    }

    body.sidebar-pos-sol .sidebar-collapse-btn:active {
        transform: scale(0.96);
    }

    body.sidebar-collapsed.sidebar-pos-sol .sidebar-collapse-btn i {
        transform: rotate(180deg);
    }

    body.sidebar-pos-sol .topbar-logo {
        display: flex;
        align-items: center;
    }

    body.sidebar-pos-sol .topbar-actions {
        position: relative;
        z-index: 2;
        flex-shrink: 0;
        margin-left: auto;
    }

    body.sidebar-pos-sol .topbar-sub {
        pointer-events: auto;
    }

    body.sidebar-pos-sol .topbar-sub-inner {
        max-width: var(--layout-max-width);
        margin: 0 auto;
        width: 100%;
        justify-content: space-between;
    }
}

.topbar-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem var(--layout-padding-x);
    max-width: var(--layout-max-width);
    margin: 0 auto;
}

/* Logo */
.topbar-logo img {
    height: 50px;
    display: block;
}

/* Nav Links */
.topbar-nav {
    margin-left: 15px;
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.topbar-nav--sol-quick {
    display: none;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.nav-item i {
    font-size: 16px;
    color: var(--text-gray);
}

.nav-item:hover,
.nav-item.active {
    color: var(--text-light);
    background: var(--surface-700);
}

.nav-item.active {
    background: var(--surface-700);
    color: var(--text-light);
}

.nav-item.active i {
    color: var(--brand-red);
}

.nav-divider {
    width: 1px;
    height: 14px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 0.2rem;
}

/* Actions */
.topbar-actions {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    flex-shrink: 0;
}

.btn-puan {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    border: 1px solid rgba(var(--primary), 0.4);
    padding: 0.1rem 0.5rem;
    border-radius: 10px;
    background: transparent;
    white-space: nowrap;
    color: var(--text-light);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    margin-left: 17px;
}

.btn-puan span {
    color: var(--brand-red);
}

.coin-icon {
    width: 32px;
    height: 32px;
    margin-left: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coin-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.btn-login {
    display: inline-flex;
    padding: 0.6rem 0.6rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
    border: 1px solid var(--surface-600);
}

.btn-register {
    display: inline-flex;
    background: var(--brand-red);
    color: var(--text-on-accent, #000);
    padding: 0.6rem 0.6rem;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
    border: 1px solid var(--accent-hover, #d97706);
}

.lang-selector {
    position: relative;
    cursor: pointer;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--surface-700);
    padding: 0.6rem 0.7rem;
    border-radius: 7px;
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid var(--surface-600);
    transition: background 0.2s;
}

.lang-selector.active .lang-current {
    background: var(--surface-600);
}

.lang-selector.active .lang-dropdown {
    display: flex;
}

.lang-switch__flag {
    width: 20px;
    height: 15px;
    border-radius: 2px;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    background: var(--surface-700);
    border-radius: 8px;
    width: 140px;
    padding: 0.5rem;
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Logged-in User Elements */
.topbar-user-puan,
.topbar-user-profile {
    display: flex;
    align-items: center;
    background: var(--surface-700);
    border: 1px solid var(--surface-600);
    border-radius: 8px;
    padding: 0.3rem 0.6rem;
    gap: 0.5rem;
    height: 38px;
    cursor: pointer;
    transition: background 0.2s;
}

.topbar-user-puan:hover,
.topbar-user-profile:hover {
    background: var(--surface-600);
}

.tu-puan-icon {
    width: 24px;
    height: 24px;
}

.tu-puan-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tu-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.1;
}

.tu-puan-title {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 700;
}

.tu-puan-amount {
    font-size: 13px;
    color: var(--brand-red-hover);
    font-weight: 800;
}

.tu-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.tu-username {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 700;
}

.tu-role {
    font-size: 10px;
    color: var(--brand-red);
    font-weight: 600;
}

.tu-caret {
    font-size: 12px;
    color: var(--text-secondary);
    margin-left: 2px;
}

/* User Dropdown Menu */
.user-menu-wrapper {
    position: relative;
    display: inline-block;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 250px;
    background: var(--surface-800);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.user-menu-wrapper:hover .user-dropdown,
.user-menu-wrapper.open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ud-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ud-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--surface-600);
}

.ud-user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ud-username {
    color: var(--text-light);
    font-weight: 700;
    font-size: 14px;
}

.ud-email {
    color: var(--text-secondary);
    font-size: 11px;
}

.ud-role-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: var(--brand-red);
    background: rgba(var(--primary), 0.08);
    border: 1px solid rgba(var(--primary), 0.15);
    padding: 1px 5px;
    border-radius: 3px;
    letter-spacing: 0.02em;
}

.ud-telegram-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--brand-red);
    background: rgba(var(--primary), 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    width: fit-content;
}

.ud-balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 16px;
    background: var(--surface-700);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ud-balance-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ud-coin-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.ud-balance-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
}

.ud-balance-amount {
    color: var(--brand-red);
    font-weight: 800;
    font-size: 14px;
}

.ud-menu {
    padding: 8px 0;
    display: flex;
    flex-direction: column;
}

.ud-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 5px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: background 0.2s, color 0.2s;
}

.ud-menu-item i {
    font-size: 18px;
    color: var(--text-gray);
    transition: color 0.2s;
}

.ud-menu-item:hover {
    background: var(--surface-700);
    color: var(--text-light);
}

.ud-menu-item:hover i {
    color: var(--text-light);
}

.ud-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 8px 0;
}

.ud-logout-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--brand-red);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
}

.ud-logout-btn i {
    font-size: 18px;
}

.ud-logout-btn:hover {
    background: rgba(var(--primary), 0.05);
}


.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.lang-dropdown a:hover {
    background: var(--surface-600);
}

.lang-dropdown a.is-active {
    background: var(--surface-600);
    color: var(--accent, #f59e0b);
}

/* Language / PJAX veil — full-screen, uniform (no piecemeal hide) */
.gt-lang-veil {
    position: fixed;
    inset: 0;
    z-index: 99980;
    background: var(--surface-800, #111111);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

html.gt-switching .gt-lang-veil,
html.gt-pjax-pending .gt-lang-veil {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gt-lang-veil__bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    border-radius: 0 1px 1px 0;
    background: rgb(var(--primary));
    box-shadow: 0 0 10px rgba(var(--primary), 0.4);
}

html.gt-switching .gt-lang-veil__bar,
html.gt-pjax-pending .gt-lang-veil__bar {
    animation: gt-veil-progress 0.8s linear forwards;
}

@keyframes gt-veil-progress {
    0% { width: 0%; }
    100% { width: 100%; }
}

/* Google Translate — UI gizle; widget/combo canlı kalsın (display:none yapma) */
#google_translate_element {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0.01 !important;
    z-index: -1 !important;
    pointer-events: none !important;
}

#google_translate_element select.goog-te-combo {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    width: 1px !important;
    height: 1px !important;
}

body > .skiptranslate:not(#google_translate_element),
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
iframe.skiptranslate,
.goog-te-balloon-frame,
.goog-te-menu-frame,
.goog-te-gadget-icon,
.goog-te-spinner-pos,
.goog-logo-link,
#goog-gt-tt,
.goog-tooltip,
.goog-tooltip:hover,
[class*="VIpgJd-"],
div[id^="goog-gt-"],
.skiptranslate > iframe,
.gt-ui-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    height: 0 !important;
    width: 0 !important;
    max-height: 0 !important;
    border: none !important;
    box-shadow: none !important;
    position: fixed !important;
    left: -9999px !important;
    top: -9999px !important;
    z-index: -1 !important;
}

.goog-text-highlight {
    background: none !important;
    box-shadow: none !important;
}

html,
body {
    top: 0 !important;
}

body.gt-ready {
    top: 0 !important;
    position: static !important;
}

body font {
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Subbar — iç sarmalayıcı #pjax-container ile aynı max-width / ortalama */
.topbar-sub {
    background-color: var(--surface-800);
    width: 100%;
    max-width: none;
    margin: 0;
    border-top: 1px solid var(--surface-700);
    border-bottom: 1px solid var(--surface-700);
    padding: 0.4rem 0;
    display: block;
    box-sizing: border-box;
}

.topbar-sub-inner {
    width: 100%;
    max-width: var(--layout-max-width);
    margin: 0 auto;
    padding: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.telegram-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--brand-red);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    flex-shrink: 0;
}

.telegram-link i {
    font-size: 16px;
    line-height: 1;
}

.sub-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    flex-wrap: nowrap;
}

.sub-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--surface-700);
    padding: 0.3rem 0.6rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.sub-btn i {
    font-size: 0.95rem;
    opacity: 0.9;
}

.sub-btn.is-active,
.sub-btn.active {
    background: rgba(138, 49, 242, 0.22);
    color: var(--text-light, #fff);
}

.sub-btn img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.topbar-sub-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    overflow: visible;
    vertical-align: middle;
}

.topbar-sub-icon.qa__lottie--gift,
.topbar-sub-icon.qa__lottie--wheel {
    animation: none;
}

.topbar-sub-icon .gift-box-svg,
.topbar-sub-icon .wheel-svg,
.topbar-sub-icon>svg {
    display: block;
    width: 100%;
    height: 100%;
}

.topbar-sub-icon .gift-sparkle {
    animation: none;
}

.topbar-sub-icon .wheel-disc-spin {
    animation: wheel-spin 7s linear infinite;
}

.badge {
    background: var(--brand-red);
    padding: 0.3rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 900;
    line-height: 1;
}

.search-btn {
    background: var(--surface-700);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--text-secondary);
    text-decoration: none;
    flex-shrink: 0;
}

.search-btn i {
    font-size: 14px;
    line-height: 1;
}

.sub-actions-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar-mobile-only {
    display: none !important;
}

/* Mobil topbar — menü | logo | giriş / kayıt */
.topbar-menu-btn {
    display: none;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--surface-600);
    border-radius: 10px;
    background: var(--surface-700);
    color: var(--text-light);
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.topbar-menu-btn__icon {
    font-size: 22px;
}

.topbar-menu-btn__icon--close {
    display: none;
}

.topbar-menu-btn[aria-expanded="true"] .topbar-menu-btn__icon--open {
    display: none;
}

.topbar-menu-btn[aria-expanded="true"] .topbar-menu-btn__icon--close {
    display: block;
}

.topbar-menu-btn:hover {
    background: var(--surface-600);
    border-color: var(--surface-600);
}

.topbar-menu-btn[aria-expanded="true"] {
    background: var(--surface-600);
    border-color: var(--brand-red);
    color: var(--text-light);
}

.topbar-main-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

@media (max-width: 1024px) {
    .topbar-main {
        max-width: none;
        padding: 0.65rem 1rem;
        gap: 0.75rem;
        background-color: var(--surface-800);
    }

    .topbar-menu-btn {
        display: inline-flex;
    }

    .topbar-desktop-only,
    .topbar-nav {
        display: none !important;
    }

    .topbar-mobile-only {
        display: block !important;
    }

    .topbar-sub {
        width: 100%;
        max-width: 430px;
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        margin-left: auto;
        margin-right: auto;
        padding: 0 0.75rem;
        display: block;
        border-top: 1px solid rgba(var(--primary), 0.12);
        box-sizing: border-box;
        background-color: var(--surface-800);
    }

    .topbar-sub-inner {
        max-width: none;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.35rem;
    }

    .topbar-sub .telegram-link {
        font-size: 0.62rem;
        letter-spacing: 0.05em;
        min-width: 0;
        height: 28px;
        align-items: center;
    }

    .topbar-sub .telegram-link i {
        font-size: 14px;
    }

    .topbar-sub .sub-actions {
        flex: 1;
        min-width: 0;
        justify-content: flex-end;
        align-items: center;
        gap: 0.35rem;
    }

    .topbar-sub .sub-actions-group {
        display: flex;
        align-items: center;
        gap: 0.25rem;
        flex-shrink: 0;
    }

    .topbar-sub .search-btn {
        width: 35px;
        height: 28px;
        min-width: 35px;
        min-height: 28px;
        padding: 0;
        border-radius: 7px;
        box-sizing: border-box;
        background: var(--surface-700);
        border: 1px solid var(--surface-600);
    }

    .topbar-sub .search-btn i {
        font-size: 13px;
    }

    .topbar-sub .sub-btn--wheel,
    .topbar-sub .sub-btn--gift {
        width: 40px;
        height: 28px;
        min-width: 40px;
        min-height: 28px;
        padding: 0;
        justify-content: center;
        border-radius: 7px;
        border: 1px solid var(--surface-600);
        box-sizing: border-box;
    }

    .topbar-sub .sub-btn--wheel .topbar-sub-icon,
    .topbar-sub .sub-btn--gift .topbar-sub-icon {
        width: 18px;
        height: 18px;
    }

    .topbar-sub .lang-selector--sub {
        display: flex !important;
        align-items: center;
        flex-shrink: 0;
        width: 63px;
        height: 28px;
        margin-left: 0;
        padding: 0;
    }

    .topbar-sub .lang-selector--sub .lang-current {
        width: 63px;
        height: 28px;
        min-height: 28px;
        padding: 0;
        gap: 0.2rem;
        box-sizing: border-box;
        border-radius: 7px;
        font-size: 0.62rem;
        justify-content: center;
    }

    .topbar-sub .lang-selector--sub .lang-switch__flag {
        width: 16px;
        height: 12px;
    }

    .topbar-sub .lang-selector--sub .lang-current .ph {
        font-size: 0.55rem;
    }

    .topbar-sub .lang-selector--sub .lang-dropdown {
        top: calc(100% + 4px);
    }

    .topbar-logo img {
        height: 38px;
    }

    .topbar-actions {
        flex-shrink: 0;
        gap: 0.4rem;
        margin-left: auto;
    }

    .btn-login,
    .btn-register {
        min-width: auto;
        padding: 0.5rem 0.65rem;
        font-size: 0.72rem;
        border-radius: 8px;
    }

    .btn-puan {
        margin-left: 0;
    }
}

@media (min-width: 1025px) {
    .topbar-main-left {
        gap: 0;
        flex-shrink: 0;
    }

    .topbar-nav {
        margin-left: 15px;
        flex: 0 1 auto;
    }

    .topbar-actions {
        margin-left: auto;
        flex-shrink: 0;
    }

    .topbar-menu-btn {
        display: none;
    }

    /* Mobildeki grup sarmalayıcı masaüstünde düz flex sırası */
    .sub-actions-group {
        display: contents;
    }

    .topbar-sub {
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        padding: 0.4rem 0;
        box-sizing: border-box;
    }

    .topbar-sub-inner {
        max-width: var(--layout-max-width);
        margin: 0 auto;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    body.sidebar-pos-sol .topbar-sub {
        margin-left: var(--layout-sidebar-offset);
        width: calc(100% - var(--layout-sidebar-offset));
    }

    .topbar-sub .sub-btn--wheel,
    .topbar-sub .sub-btn--gift {
        width: auto;
        height: auto;
        min-width: 0;
        min-height: 0;
        border: none;
    }

    .topbar-sub .search-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        min-height: 32px;
        border: none;
    }
}

/* Mega Dropdown */
.nav-item-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    height: 100%;
}

.mega-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: max-content;
    min-width: 330px;
    background-color: var(--surface-800);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.nav-item-dropdown:hover .mega-dropdown,
.nav-item-dropdown.force-hover .mega-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-dropdown-header {
    font-size: 10px;
    font-weight: 800;
    color: var(--text-muted, #677680);
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mega-dropdown-content {
    display: flex;
    gap: 5px;
}

.mega-col {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mega-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-muted, #8b99a3);
    text-decoration: none;
    font-size: 10px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mega-item i {
    font-size: 16px;
    color: var(--text-muted, #677680);
    transition: all 0.2s ease;
}

.mega-item:hover {
    background-color: var(--surface-700);
    color: var(--text-light);
}

.mega-item:hover i {
    color: var(--text-light);
}

.mega-item.active {
    background-color: rgba(var(--primary), 0.08);
    color: var(--brand-red);
}

.mega-item.active i {
    color: var(--brand-red);
}

/* =====================================================================
   Header iskeleti  — yalnızca masaüstü, sol menülü düzen
   Renkler tema değişkenlerinden gelir; burada sadece ölçü / dizilim var.
   ===================================================================== */
@media (min-width: 1025px) {
    body.sidebar-pos-sol .topbar-wrapper {
        --hd-stroke: rgba(var(--stroke-rgb, 140, 200, 255), 0.09);
    }

    /* Tema kökten buzlu cam arka plan verse bile sarmalayıcı şeffaf kalmalı: aksi halde
       alt şeridin altındaki sidebar kartlarını örter (cam zemin .topbar-main / .topbar-sub'da) */
    :root[data-theme] body.sidebar-pos-sol .topbar-wrapper {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        box-shadow: none !important;
    }

    /* Ana bar: 80px, tek satır — logo solda, işlemler sağda (ortadaki hızlı bağlantılar yok) */
    body.sidebar-pos-sol .topbar-nav--sol-quick {
        display: none !important;
    }

    body.sidebar-pos-sol .topbar-main {
        height: 80px;
        min-height: 80px;
        padding: 0 24px;
        background: linear-gradient(rgba(var(--surface-rgb, 17, 17, 17), 0.82), rgba(var(--surface-rgb, 17, 17, 17), 0.72));
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        border-bottom-color: rgba(var(--stroke-rgb, 140, 200, 255), 0.09);
        box-shadow: 0 12px 30px -16px rgba(0, 0, 0, 0.75);
    }

    body.sidebar-pos-sol .topbar-main-left {
        gap: 10px;
    }

    body.sidebar-pos-sol .sidebar-collapse-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        border-radius: 8px;
        border-color: var(--hd-stroke);
    }

    body.sidebar-pos-sol .topbar-logo img {
        height: 64px;
        max-width: 150px;
        width: auto;
        object-fit: contain;
    }

    body.sidebar-pos-sol .topbar-actions {
        gap: 8px;
    }

    /* Puan Marketi: ikon karosu | metin | ok */
    body.sidebar-pos-sol .btn-puan {
        height: 44px;
        margin-left: 0;
        padding: 0 14px 0 6px;
        gap: 10px;
        border-radius: 13px;
        border: 1px solid rgba(var(--primary), 0.28);
        background: linear-gradient(var(--surface-700), var(--surface-800));
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 6px 16px -10px rgba(0, 0, 0, 0.8);
        font-size: 14px;
        font-weight: 700;
        transition: border-color 0.2s ease, transform 0.2s ease;
    }

    body.sidebar-pos-sol .btn-puan:hover {
        border-color: rgba(var(--primary), 0.55);
    }

    body.sidebar-pos-sol .btn-puan .btn-puan__text {
        color: var(--text-light);
    }

    body.sidebar-pos-sol .btn-puan .btn-puan__text b {
        color: var(--brand-red);
        font-weight: 800;
    }

    body.sidebar-pos-sol .btn-puan .coin-icon {
        width: 34px;
        height: 34px;
        margin: 0;
        border-radius: 10px;
        background: linear-gradient(rgba(var(--primary), 0.28), rgba(var(--primary), 0.1));
        box-shadow: inset 0 0 0 1px rgba(var(--primary), 0.3);
    }

    body.sidebar-pos-sol .btn-puan .coin-icon img {
        width: 26px;
        height: 26px;
    }

    body.sidebar-pos-sol .btn-puan__chevron {
        font-size: 14px;
        color: var(--text-secondary);
        transition: transform 0.2s ease;
    }

    body.sidebar-pos-sol .btn-puan:hover .btn-puan__chevron {
        transform: translateX(2px);
        color: var(--text-light);
    }

    /* Arama: 40×40 kare */
    body.sidebar-pos-sol .topbar-actions .search-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        border-radius: 8px;
        border: 1px solid var(--hd-stroke);
        transition: color 0.2s ease, border-color 0.2s ease;
    }

    body.sidebar-pos-sol .topbar-actions .search-btn:hover {
        color: var(--text-light);
        border-color: rgba(var(--primary), 0.45);
    }

    body.sidebar-pos-sol .topbar-actions .search-btn i {
        font-size: 17px;
    }

    /* Giriş / Kayıt: 40px */
    body.sidebar-pos-sol .btn-login,
    body.sidebar-pos-sol .btn-register {
        height: 40px;
        min-width: 0;
        padding: 0 18px;
        border-radius: 10px;
        font-size: 14px;
        font-weight: 500;
    }

    /* Dil: 76×40 düğme */
    body.sidebar-pos-sol .topbar-actions .lang-current {
        height: 40px;
        min-width: 76px;
        padding: 0 11px;
        gap: 6px;
        justify-content: center;
        border-radius: 8px;
        font-size: 11px;
        font-weight: 700;
        border-color: var(--hd-stroke);
    }

    body.sidebar-pos-sol .topbar-actions .lang-switch__flag {
        width: 18px;
        height: 14px;
    }

    body.sidebar-pos-sol .topbar-user-puan,
    body.sidebar-pos-sol .topbar-user-profile {
        height: 40px;
        border-radius: 10px;
    }

    /* Alt şerit: 43px, içerik alanıyla hizalı */
    body.sidebar-pos-sol .topbar-sub {
        height: 43px;
        min-height: 43px;
        padding: 0;
        border-top: 0;
        border-bottom: 1px solid var(--surface-700);
        background:
            linear-gradient(90deg, rgba(var(--primary), 0.1) 0%, transparent 40%, rgba(var(--secondary), 0.06) 100%),
            linear-gradient(180deg, rgba(var(--surface-rgb, 17, 17, 17), 0.85), rgba(var(--bg-rgb, 10, 10, 10), 0.85));
        -webkit-backdrop-filter: blur(14px);
        backdrop-filter: blur(14px);
        border-bottom-color: rgba(var(--stroke-rgb, 140, 200, 255), 0.09);
    }

    body.sidebar-pos-sol .topbar-sub-inner {
        height: 43px;
        padding: 0 var(--content-gutter, 20px);
        box-sizing: border-box;
    }

    body.sidebar-pos-sol .topbar-sub .telegram-link {
        gap: 8px;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: 0;
        text-transform: none;
    }

    body.sidebar-pos-sol .topbar-sub .telegram-link i {
        font-size: 20px;
    }

    body.sidebar-pos-sol .topbar-sub .sub-actions {
        gap: 6px;
    }

    body.sidebar-pos-sol .topbar-sub .sub-btn {
        height: 28px;
        padding: 0 10px;
        gap: 6px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        transition: background 0.2s ease, color 0.2s ease;
    }

    body.sidebar-pos-sol .topbar-sub .sub-btn:hover {
        background: var(--surface-600);
    }

    body.sidebar-pos-sol .topbar-sub .sub-btn .topbar-sub-icon {
        width: 22px;
        height: 22px;
    }

    body.sidebar-pos-sol .topbar-sub .sub-btn .badge {
        padding: 3px 6px;
        border-radius: 4px;
        font-size: 11px;
        font-weight: 800;
    }

    body.sidebar-pos-sol .topbar-sub .search-btn {
        width: 35px;
        height: 28px;
        min-width: 35px;
        min-height: 28px;
        border-radius: 6px;
        border: 1px solid rgba(255, 255, 255, 0.06);
        background: rgba(255, 255, 255, 0.04);
    }

    body.sidebar-pos-sol .topbar-sub .search-btn i {
        font-size: 13px;
    }

    /* Canlı TV hapı (yayın açıkken) */
    body.sidebar-pos-sol .topbar-sub .sub-btn--live {
        background: linear-gradient(135deg, rgba(255, 0, 0, 0.14), rgba(255, 0, 0, 0.06));
        border: 1px solid rgba(255, 0, 0, 0.2);
        color: #ff4444;
        font-weight: 800;
    }

    body.sidebar-pos-sol .topbar-sub .sub-btn--live:hover {
        background: linear-gradient(135deg, rgba(255, 0, 0, 0.22), rgba(255, 0, 0, 0.1));
    }

    body.sidebar-pos-sol .topbar-sub .sub-btn--live i {
        font-size: 16px;
        opacity: 1;
    }
}

.sub-btn__live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ff0000;
    flex-shrink: 0;
    animation: sub-live-pulse 1.6s ease-in-out infinite;
}

@keyframes sub-live-pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.5); }
    50% { opacity: 0.55; box-shadow: 0 0 0 4px rgba(255, 0, 0, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .sub-btn__live-dot { animation: none; }
}


/* Renk dengesi: Giriş Yap = ikincil renk, Kayıt Ol = ana renk. Her temada --secondary tanımlı. */
.btn-login {
    background: rgb(var(--secondary));
    color: var(--secondary-on);
    border-color: transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 8px 20px -12px rgba(var(--secondary), 0.8);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
}

.btn-login:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.btn-register {
    background-image: linear-gradient(180deg, color-mix(in srgb, var(--brand-red) 78%, #fff), color-mix(in srgb, var(--brand-red) 90%, #000));
    border-color: transparent;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 8px 20px -10px rgba(var(--primary), 0.85);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.25s ease;
}

.btn-register:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

/* Çark / Kod Gir: 3D ikon (wheel + key) */
.topbar-sub-icon--3d img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.4));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sub-btn:hover .topbar-sub-icon--3d img {
    transform: scale(1.12) rotate(-8deg);
}

/* Alt şerit düğmeleri (Etkinlikler / Biletler): aktif durum artık temanın ana renginden —
   eskiden sabit mor (rgba(138,49,242)) olduğu için her temada yanlış tonda kalıyordu. */
.topbar-sub .sub-btn.is-active,
.topbar-sub .sub-btn.active {
    background: rgba(var(--primary), 0.16);
    box-shadow: inset 0 0 0 1px rgba(var(--primary), 0.38);
    color: var(--text-light, #fff);
}

.topbar-sub .sub-btn.is-active .badge,
.topbar-sub .sub-btn.active .badge {
    background: rgb(var(--primary));
    color: var(--text-on-accent, #fff);
}

@media (hover: hover) and (pointer: fine) {
    .topbar-sub .sub-btn.is-active:hover,
    .topbar-sub .sub-btn.active:hover {
        background: rgba(var(--primary), 0.24);
    }
}

/* Alt şerit linkleri: birden fazla link yan yana (yönetimden eklenir) */
.topbar-links {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

@media (max-width: 1024px) {
    .topbar-links {
        flex: 0 1 auto;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .topbar-links::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 1024px) {
    /* dar ekranda ilk link yazılı, diğerleri yalnızca simge (aria-label'lı) */
    .topbar-links .telegram-link:not(:first-child) span {
        display: none;
    }

    .topbar-links .telegram-link:not(:first-child) {
        width: 26px;
        justify-content: center;
    }

    .topbar-links {
        gap: 8px;
        max-width: 46%;
    }
}
