body.ti-topbar-ready {
    --ti-accent-rgb: 255, 151, 63;
    --ti-dropdown-bg: rgba(7, 9, 13, 0.72);
    --ti-dropdown-border: rgba(255, 255, 255, 0.14);
    --ti-dropdown-text: rgba(232, 238, 248, 0.88);
}

/*
 * Keep legacy topbar layout untouched:
 * only refine icon interactions and dropdown visual style.
 */
body.ti-topbar-ready #search-menu,
body.ti-topbar-ready #icon-notifications,
body.ti-topbar-ready #icon-messages,
body.ti-topbar-ready #icon-ecommerce-cart,
body.ti-topbar-ready #topbar-first .topbar-brand a.navbar-brand,
body.ti-topbar-ready #topbar .topbar-brand a.navbar-brand {
    transition:
        transform 150ms cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 160ms cubic-bezier(0.2, 0.8, 0.2, 1),
        color 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}

body.ti-topbar-ready #icon-notifications:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

body.ti-topbar-ready #icon-ecommerce-cart:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
}

body.ti-topbar-ready #icon-notifications:active {
    transform: scale(0.97);
}

body.ti-topbar-ready #icon-ecommerce-cart:active {
    transform: scale(0.97);
}

body.ti-topbar-ready #search-menu i,
body.ti-topbar-ready #icon-notifications i,
body.ti-topbar-ready #icon-messages i,
body.ti-topbar-ready #icon-ecommerce-cart i {
    transition: transform 150ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.ti-topbar-ready #icon-notifications:hover i {
    transform: translateY(-1px) scale(1.06);
}

body.ti-topbar-ready #icon-ecommerce-cart:hover i {
    transform: translateY(-1px) scale(1.06);
}

body.ti-topbar-ready #icon-notifications.ti-has-new i,
body.ti-topbar-ready #icon-notifications.ti-icon-pop i {
    animation: ti-bell-nudge 250ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.ti-topbar-ready #icon-messages.ti-has-unread {
    color: rgba(var(--ti-accent-rgb), 0.95);
    text-shadow: 0 0 10px rgba(var(--ti-accent-rgb), 0.32);
}

body.ti-topbar-ready #icon-ecommerce-cart.ti-has-items {
    color: rgba(var(--ti-accent-rgb), 0.95);
    text-shadow: 0 0 10px rgba(var(--ti-accent-rgb), 0.32);
}

body.ti-topbar-ready #icon-messages.ti-icon-pop i,
body.ti-topbar-ready #search-menu.ti-icon-pop i {
    animation: ti-icon-pop 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.ti-topbar-ready #icon-ecommerce-cart.ti-cart-swing i,
body.ti-topbar-ready #icon-ecommerce-cart.ti-icon-pop i {
    animation: ti-cart-swing 280ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Keep transform interactions disabled for search/messages icons. */
body.ti-topbar-ready #search-menu,
body.ti-topbar-ready #icon-messages {
    transition:
        filter 160ms cubic-bezier(0.2, 0.8, 0.2, 1),
        color 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: auto;
}

body.ti-topbar-ready #search-menu:hover,
body.ti-topbar-ready #icon-messages:hover,
body.ti-topbar-ready #search-menu:active,
body.ti-topbar-ready #icon-messages:active {
    transform: none !important;
}

body.ti-topbar-ready #search-menu:hover i,
body.ti-topbar-ready #icon-messages:hover i {
    transform: none !important;
}

/* Mobile-only top menu icon touch feedback (no transform) */
body.ti-topbar-mobile-only #top-menu-nav > li > a i {
    transition: filter 140ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 140ms cubic-bezier(0.2, 0.8, 0.2, 1), color 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.ti-topbar-mobile-only #top-menu-nav > li > a i.ti-mobile-touch-icon {
    animation: ti-mobile-icon-touch 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Animated 2px active border rail for top menu */
body.ti-topbar-ready:not(.ti-topbar-mobile-only) #top-menu-nav {
    position: relative;
}

body.ti-topbar-ready:not(.ti-topbar-mobile-only) #top-menu-nav .ti-active-border-indicator {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    opacity: 0;
    border-radius: 2px;
    pointer-events: none;
    transform: translate3d(0, 0, 0);
    background: #f7931a;
    transition:
        transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
        width 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 120ms cubic-bezier(0.2, 0.8, 0.2, 1);
    z-index: 6;
}

body.ti-topbar-ready:not(.ti-topbar-mobile-only) #top-menu-nav.ti-active-border-visible .ti-active-border-indicator {
    opacity: 1;
}

body.ti-topbar-ready:not(.ti-topbar-mobile-only) #top-menu-nav > li.active > a,
body.ti-topbar-ready:not(.ti-topbar-mobile-only) #top-menu-nav > li > a.active {
    border-bottom-color: transparent !important;
}

body.ti-topbar-ready:not(.ti-topbar-mobile-only) #top-menu-nav > li > a:hover,
body.ti-topbar-ready:not(.ti-topbar-mobile-only) #top-menu-nav > li > a:focus {
    border-bottom-color: transparent !important;
}

/* Eagle logo interaction */
body.ti-topbar-ready #img-logo {
    transition:
        transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1),
        filter 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-origin: 52% 50%;
    box-shadow: none !important;
}

body.ti-topbar-ready .topbar-brand a.navbar-brand:hover #img-logo,
body.ti-topbar-ready .topbar-brand a.navbar-brand:focus #img-logo,
body.ti-topbar-ready .topbar-brand a.navbar-brand.ti-logo-hover #img-logo {
    animation: ti-eagle-snap 420ms cubic-bezier(0.2, 0.82, 0.24, 1);
    filter: brightness(1.09) saturate(1.08);
    box-shadow: none !important;
}

body.ti-topbar-ready .topbar-brand a.navbar-brand:active #img-logo,
body.ti-topbar-ready .topbar-brand a.navbar-brand.ti-logo-press #img-logo {
    animation: ti-eagle-hit 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: none !important;
}

/* Logo click burst: small orange Bitcoin particles sprayed leftward */
body.ti-topbar-ready .ti-logo-burst-layer {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: visible;
    z-index: 12000;
}

body.ti-topbar-ready .ti-logo-bitcoin-particle {
    position: fixed;
    left: 0;
    top: 0;
    display: block;
    pointer-events: none;
    font-size: 12px;
    line-height: 1;
    font-weight: 700;
    color: #f7931a;
    text-shadow: 0 0 8px rgba(247, 147, 26, 0.42);
    opacity: 0;
    transform: translate3d(0, 0, 0) scale(0.58) rotate(0deg);
    animation: ti-logo-bitcoin-spray 540ms cubic-bezier(0.2, 0.82, 0.24, 1) forwards;
    will-change: transform, opacity;
}

/* Account image: no border or shadow in any interaction state */
body.ti-topbar-ready #user-account-image {
    border: none !important;
    box-shadow: none !important;
    transition: none !important;
}

body.ti-topbar-ready #account-dropdown-link:hover #user-account-image,
body.ti-topbar-ready #account-dropdown-link:focus #user-account-image,
body.ti-topbar-ready #account-dropdown-link:active #user-account-image,
body.ti-topbar-ready .dropdown.account.open > #account-dropdown-link #user-account-image,
body.ti-topbar-ready .dropdown.account.ti-dropdown-open > #account-dropdown-link #user-account-image,
body.ti-topbar-ready #user-account-image:hover,
body.ti-topbar-ready #user-account-image:focus,
body.ti-topbar-ready #user-account-image:active {
    border: none !important;
    box-shadow: none !important;
}

body.ti-topbar-ready #account-dropdown-link .caret {
    transition: transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.ti-topbar-ready .dropdown.account.open > #account-dropdown-link .caret,
body.ti-topbar-ready .dropdown.account.ti-dropdown-open > #account-dropdown-link .caret {
    transform: rotate(180deg);
}

/* Badge feedback only when count increases */
body.ti-topbar-ready #badge-notifications,
body.ti-topbar-ready #badge-messages,
body.ti-topbar-ready #badge-ecommerce-cart {
    transition: transform 140ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 160ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.ti-topbar-ready #badge-notifications.ti-badge-pop,
body.ti-topbar-ready #badge-messages.ti-badge-pop,
body.ti-topbar-ready #badge-ecommerce-cart.ti-badge-pop {
    animation: ti-badge-pop 170ms cubic-bezier(0.18, 1.1, 0.2, 1);
}

body.ti-topbar-ready #badge-notifications.ti-badge-pulse,
body.ti-topbar-ready #badge-messages.ti-badge-pulse,
body.ti-topbar-ready #badge-ecommerce-cart.ti-badge-pulse {
    animation: ti-badge-pulse 520ms ease-out;
}

/* Dropdown style: black, transparent, blurred */
body.ti-topbar-ready #topbar-first .dropdown-menu,
body.ti-topbar-ready #topbar-second .dropdown-menu,
body.ti-topbar-ready #topbar .dropdown-menu {
    border-radius: 12px;
    border: 1px solid var(--ti-dropdown-border);
    background: linear-gradient(160deg, rgba(9, 11, 16, 0.76), rgba(4, 6, 9, 0.72));
    background-color: var(--ti-dropdown-bg);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.07),
        0 14px 36px rgba(0, 0, 0, 0.48);
    backdrop-filter: blur(14px) saturate(125%);
    -webkit-backdrop-filter: blur(14px) saturate(125%);
}

body.ti-topbar-ready #topbar-first .dropdown-menu > li > a,
body.ti-topbar-ready #topbar-second .dropdown-menu > li > a,
body.ti-topbar-ready #topbar .dropdown-menu > li > a {
    color: var(--ti-dropdown-text);
    transition: background-color 140ms cubic-bezier(0.2, 0.8, 0.2, 1), color 140ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.ti-topbar-ready #topbar-first .dropdown-menu > li > a:hover,
body.ti-topbar-ready #topbar-first .dropdown-menu > li > a:focus,
body.ti-topbar-ready #topbar-second .dropdown-menu > li > a:hover,
body.ti-topbar-ready #topbar-second .dropdown-menu > li > a:focus,
body.ti-topbar-ready #topbar .dropdown-menu > li > a:hover,
body.ti-topbar-ready #topbar .dropdown-menu > li > a:focus {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
}

/* Only account/profile dropdown */
body.ti-topbar-ready #topbar .dropdown.account .dropdown-menu,
body.ti-topbar-ready #topbar-first .dropdown.account .dropdown-menu,
body.ti-topbar-ready #topbar-second .dropdown.account .dropdown-menu,
body.ti-topbar-mobile-only #topbar .dropdown.account .dropdown-menu,
body.ti-topbar-mobile-only #topbar-first .dropdown.account .dropdown-menu,
body.ti-topbar-mobile-only #topbar-second .dropdown.account .dropdown-menu {
    border-radius: 0px;
    border: 1px solid var(--ti-dropdown-border);
    border-top: none;
}

/* Force unified topbar dropdown glass background (desktop + mobile). */
body.ti-topbar-ready #topbar-first .dropdown-menu,
body.ti-topbar-ready #topbar-second .dropdown-menu,
body.ti-topbar-ready #topbar .dropdown-menu,
body.ti-topbar-mobile-only #topbar-first .dropdown-menu,
body.ti-topbar-mobile-only #topbar-second .dropdown-menu,
body.ti-topbar-mobile-only #topbar .dropdown-menu,
#dropdown-search.dropdown-menu,
#dropdown-notifications.dropdown-menu,
#dropdown-messages.dropdown-menu {
    background: none !important;
    background-color: rgb(7 7 7 / 60%) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    background-image: none !important;
}

/* Keep blur reliable when dropdown containers are rendered outside #topbar. */
#dropdown-search.dropdown-menu,
#dropdown-notifications.dropdown-menu,
#dropdown-messages.dropdown-menu {
    overflow: hidden;
    isolation: isolate;
}

body.ti-topbar-ready #topbar-first .dropdown-menu.pull-right,
body.ti-topbar-ready #topbar-second .dropdown-menu.pull-right,
body.ti-topbar-ready #topbar .dropdown-menu.pull-right,
body.ti-topbar-mobile-only #topbar-first .dropdown-menu.pull-right,
body.ti-topbar-mobile-only #topbar-second .dropdown-menu.pull-right,
body.ti-topbar-mobile-only #topbar .dropdown-menu.pull-right,
#dropdown-notifications.dropdown-menu,
#dropdown-messages.dropdown-menu {
    background: rgba(7, 7, 7, 0.8) !important;
    background-color: rgba(7, 7, 7, 0.8) !important;
}

body.ti-topbar-ready #dropdown-search .dropdown-search-form {
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.22);
}

body.ti-topbar-ready #dropdown-search .dropdown-search-keyword {
    color: #eef4ff;
    background: transparent;
    border: 0;
}

body.ti-topbar-ready #dropdown-search .dropdown-search-keyword::placeholder {
    color: rgba(224, 234, 248, 0.54);
}

/* Topbar stability against negative translate glitches without breaking backdrop blur */
body.ti-topbar-ready:not(.ti-topbar-mobile-only) #topbar,
body.ti-topbar-ready:not(.ti-topbar-mobile-only) #topbar-first,
body.ti-topbar-ready:not(.ti-topbar-mobile-only) #topbar-second {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Raise topbar only while content-area dropdowns are open (avoid layout overlap). */
body.ti-topbar-ready.ti-content-dropdown-open #topbar,
body.ti-topbar-ready.ti-content-dropdown-open #topbar-first,
body.ti-topbar-ready.ti-content-dropdown-open #topbar-second {
    z-index: 5205 !important;
}

@keyframes ti-badge-pop {
    0% {
        transform: scale(0.85);
    }
    65% {
        transform: scale(1.13);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes ti-badge-pulse {
    0% {
        box-shadow:
            0 0 0 0 rgba(var(--ti-accent-rgb), 0.45),
            0 0 0 0 rgba(var(--ti-accent-rgb), 0.3);
    }
    100% {
        box-shadow:
            0 0 0 8px rgba(var(--ti-accent-rgb), 0),
            0 0 0 14px rgba(var(--ti-accent-rgb), 0);
    }
}

@keyframes ti-icon-pop {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.08);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes ti-bell-nudge {
    0% {
        transform: rotate(0deg);
    }
    33% {
        transform: rotate(10deg);
    }
    66% {
        transform: rotate(-8deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes ti-cart-swing {
    0% {
        transform: rotate(0deg);
    }
    28% {
        transform: rotate(11deg);
    }
    58% {
        transform: rotate(-9deg);
    }
    80% {
        transform: rotate(6deg);
    }
    100% {
        transform: rotate(0deg);
    }
}

@keyframes ti-mobile-icon-touch {
    0% {
        opacity: 0.86;
        filter: brightness(1);
    }
    45% {
        opacity: 1;
        filter: brightness(1.28) saturate(1.2);
    }
    100% {
        opacity: 0.94;
        filter: brightness(1);
    }
}

@keyframes ti-eagle-snap {
    0% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
    30% {
        transform: translateY(-2px) scale(1.06) rotate(-4deg);
    }
    58% {
        transform: translateY(1px) scale(0.99) rotate(2deg);
    }
    82% {
        transform: translateY(-1px) scale(1.02) rotate(-1deg);
    }
    100% {
        transform: translateY(0) scale(1) rotate(0deg);
    }
}

@keyframes ti-eagle-hit {
    0% {
        transform: scale(1) rotate(0deg);
    }
    60% {
        transform: scale(0.96) rotate(0.6deg);
    }
    100% {
        transform: scale(1) rotate(0deg);
    }
}

@keyframes ti-logo-bitcoin-spray {
    0% {
        opacity: 0;
        transform: translate3d(0, 0, 0) scale(0.56) rotate(0deg);
    }
    15% {
        opacity: 1;
    }
    84% {
        opacity: 0.96;
    }
    100% {
        opacity: 0;
        transform: translate3d(var(--ti-burst-x, 44px), var(--ti-burst-y, 28px), 0) scale(var(--ti-burst-scale, 1)) rotate(var(--ti-burst-rot, 0deg));
    }
}

@media (max-width: 991px) {
    body.ti-topbar-ready #icon-notifications:hover,
    body.ti-topbar-ready #icon-ecommerce-cart:hover {
        transform: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.ti-topbar-ready #topbar *,
    body.ti-topbar-ready #topbar-first *,
    body.ti-topbar-ready #topbar-second * {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 1ms !important;
    }

    body.ti-topbar-ready #icon-notifications:hover,
    body.ti-topbar-ready #icon-ecommerce-cart:hover {
        transform: none !important;
    }
}
