/* ==========================================================================
   RECKLESS STORE — LAYOUT (Navbar / Footer)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Navbar
   -------------------------------------------------------------------------- */

.navbar {
    position: fixed;
    top: 0;
    inset-inline: 0;
    height: var(--rt-nav-height);
    z-index: var(--rt-z-nav);
    display: flex;
    align-items: center;
    transition:
        background var(--rt-duration-normal) var(--rt-ease),
        border-color var(--rt-duration-normal) var(--rt-ease),
        backdrop-filter var(--rt-duration-normal) var(--rt-ease),
        box-shadow var(--rt-duration-normal) var(--rt-ease);
    border-bottom: 1px solid transparent;
    animation: rt-navbar-reveal var(--rt-duration-slow) var(--rt-ease) both;
}

.navbar.is-scrolled {
    background: rgba(5, 5, 5, 0.86);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--rt-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.navbar-inner {
    width: 100%;
    max-width: var(--rt-container);
    margin-inline: auto;
    padding-inline: var(--rt-space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rt-space-6);
}

/* Brand */
.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--rt-space-3);
    flex-shrink: 0;
    animation: rt-fade-down var(--rt-duration-slow) var(--rt-ease) both;
}

.nav-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: var(--rt-radius);
    background: linear-gradient(135deg, var(--rt-primary), #101a7a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--rt-fw-black);
    font-size: var(--rt-fs-sm);
    color: #fff;
    box-shadow: var(--rt-shadow-primary);
    transition: transform var(--rt-duration-normal) var(--rt-ease-spring);
}

.nav-brand:hover .nav-brand-mark {
    transform: rotate(-8deg) scale(1.06);
}

.nav-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.nav-brand-name {
    font-size: var(--rt-fs-base);
    font-weight: var(--rt-fw-black);
    letter-spacing: 0.04em;
}

.nav-brand-tag {
    font-size: 10px;
    color: var(--rt-text-muted);
    font-weight: var(--rt-fw-medium);
    white-space: nowrap;
}

/* Menu */
.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--rt-space-1);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: var(--rt-space-2);
    padding: var(--rt-space-2) var(--rt-space-4);
    font-size: var(--rt-fs-sm);
    font-weight: var(--rt-fw-medium);
    color: var(--rt-text-soft);
    border-radius: var(--rt-radius);
    position: relative;
    opacity: 0;
    transform: translateY(-12px);
    animation: rt-fade-down var(--rt-duration-slow) var(--rt-ease) both;
    transition:
        color var(--rt-duration-fast) var(--rt-ease),
        background var(--rt-duration-fast) var(--rt-ease);
}

.nav-link .icon {
    width: 17px;
    height: 17px;
}

.nav-link:hover {
    color: var(--rt-text);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link:hover .icon {
    color: var(--rt-icon-hover);
    transform: translateY(-2px);
}

.nav-link.is-active {
    color: var(--rt-primary);
    background: var(--rt-primary-soft);
}

.nav-link.is-active .icon {
    color: var(--rt-icon-hover);
}

/* Staggered reveal for menu items */
.nav-menu .nav-link:nth-child(1) {
    animation-delay: 120ms;
}
.nav-menu .nav-link:nth-child(2) {
    animation-delay: 180ms;
}
.nav-menu .nav-link:nth-child(3) {
    animation-delay: 240ms;
}
.nav-menu .nav-link:nth-child(4) {
    animation-delay: 300ms;
}
.nav-menu .nav-link:nth-child(5) {
    animation-delay: 360ms;
}
.nav-menu .nav-link:nth-child(6) {
    animation-delay: 420ms;
}
.nav-menu .nav-link:nth-child(7) {
    animation-delay: 480ms;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--rt-space-3);
    opacity: 0;
    animation: rt-fade-down var(--rt-duration-slow) var(--rt-ease) 540ms both;
}

/* Mobile toggle */
.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: var(--rt-radius);
    align-items: center;
    justify-content: center;
    color: var(--rt-text);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--rt-border);
    transition: background var(--rt-duration-fast) var(--rt-ease);
}

.nav-toggle:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* --------------------------------------------------------------------------
   User dropdown (logged in)
   -------------------------------------------------------------------------- */

.user-menu {
    position: relative;
}

.user-trigger {
    display: flex;
    align-items: center;
    gap: var(--rt-space-2);
    padding: var(--rt-space-1) var(--rt-space-2) var(--rt-space-1) var(--rt-space-1);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--rt-border);
    border-radius: var(--rt-radius-full);
    cursor: pointer;
    transition:
        border-color var(--rt-duration-fast) var(--rt-ease),
        background var(--rt-duration-fast) var(--rt-ease);
}

.user-trigger:hover {
    border-color: var(--rt-border-primary);
    background: var(--rt-primary-soft);
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--rt-bg-raised);
    border: 2px solid transparent;
    transition: border-color var(--rt-duration-fast) var(--rt-ease);
}

.user-trigger:hover .user-avatar {
    border-color: var(--rt-primary);
}

.user-avatar-fallback {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rt-primary), #101a7a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--rt-fs-xs);
    font-weight: var(--rt-fw-bold);
    color: #fff;
}

.user-trigger .icon {
    width: 15px;
    height: 15px;
    color: var(--rt-text-muted);
    transition: transform var(--rt-duration-fast) var(--rt-ease);
}

.user-menu.is-open .user-trigger .icon {
    transform: rotate(180deg);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-end: 0;
    width: 264px;
    background: var(--rt-bg-soft);
    border: 1px solid var(--rt-border-strong);
    border-radius: var(--rt-radius-md);
    box-shadow: var(--rt-shadow-lg);
    z-index: var(--rt-z-dropdown);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.97);
    transform-origin: top right;
    transition:
        opacity var(--rt-duration-normal) var(--rt-ease),
        transform var(--rt-duration-normal) var(--rt-ease-spring),
        visibility var(--rt-duration-normal) var(--rt-ease);
    overflow: hidden;
}

.user-menu.is-open .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-head {
    padding: var(--rt-space-5);
    border-bottom: 1px solid var(--rt-border);
    display: flex;
    gap: var(--rt-space-3);
    align-items: center;
}

.dropdown-head .user-avatar,
.dropdown-head .user-avatar-fallback {
    width: 44px;
    height: 44px;
}

.dropdown-username {
    font-weight: var(--rt-fw-semibold);
    font-size: var(--rt-fs-sm);
    line-height: 1.2;
}

.dropdown-email {
    font-size: var(--rt-fs-xs);
    color: var(--rt-text-muted);
}

.dropdown-stats {
    display: flex;
    border-bottom: 1px solid var(--rt-border);
}

.dropdown-stat {
    flex: 1;
    padding: var(--rt-space-3);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-stat + .dropdown-stat {
    border-inline-start: 1px solid var(--rt-border);
}

.dropdown-stat-value {
    font-weight: var(--rt-fw-bold);
    font-size: var(--rt-fs-sm);
    color: var(--rt-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* الكوينز دايمًا ذهبي — نفس لون باقي الموقع */
.dropdown-stat-value.is-coins,
.dropdown-stat-value.is-coins .icon {
    color: #FACC15;
}

.dropdown-stat-label {
    font-size: 10px;
    color: var(--rt-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dropdown-list {
    padding: var(--rt-space-2);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: var(--rt-space-3);
    width: 100%;
    padding: var(--rt-space-3);
    border-radius: var(--rt-radius);
    font-size: var(--rt-fs-sm);
    color: var(--rt-text-soft);
    background: transparent;
    text-align: start;
    transition:
        background var(--rt-duration-fast) var(--rt-ease),
        color var(--rt-duration-fast) var(--rt-ease);
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--rt-text);
}

.dropdown-item:hover .icon {
    color: var(--rt-icon-hover);
}

.dropdown-item.is-danger:hover {
    background: var(--rt-danger-soft);
    color: var(--rt-danger);
}

.dropdown-item.is-danger:hover .icon {
    color: var(--rt-danger);
}

.dropdown-sep {
    height: 1px;
    background: var(--rt-border);
    margin: var(--rt-space-2) 0;
}

/* Bell notification button */
.bell-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: var(--rt-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--rt-border);
    color: var(--rt-text-soft);
    transition:
        border-color var(--rt-duration-fast) var(--rt-ease),
        color var(--rt-duration-fast) var(--rt-ease);
}

.bell-btn:hover {
    border-color: var(--rt-border-primary);
    color: var(--rt-primary);
}

.bell-count {
    position: absolute;
    top: -5px;
    inset-inline-end: -5px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    background: var(--rt-danger);
    color: #fff;
    font-size: 10px;
    font-weight: var(--rt-fw-bold);
    border-radius: var(--rt-radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--rt-bg);
    animation: rt-scale-in var(--rt-duration-normal) var(--rt-ease-spring);
}

/* --------------------------------------------------------------------------
   Mobile menu
   -------------------------------------------------------------------------- */

.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: calc(var(--rt-z-nav) - 1);
    background: rgba(5, 5, 5, 0.97);
    backdrop-filter: blur(20px);
    padding: calc(var(--rt-nav-height) + var(--rt-space-8)) var(--rt-space-6) var(--rt-space-8);
    display: flex;
    flex-direction: column;
    gap: var(--rt-space-2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-12px);
    transition:
        opacity var(--rt-duration-normal) var(--rt-ease),
        transform var(--rt-duration-normal) var(--rt-ease),
        visibility var(--rt-duration-normal) var(--rt-ease);
    overflow-y: auto;
}

.mobile-menu.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-link {
    display: flex;
    align-items: center;
    gap: var(--rt-space-4);
    padding: var(--rt-space-4) var(--rt-space-5);
    font-size: var(--rt-fs-md);
    font-weight: var(--rt-fw-semibold);
    color: var(--rt-text-soft);
    border-radius: var(--rt-radius);
    border: 1px solid transparent;
    opacity: 0;
    transform: translateX(-20px);
    transition:
        background var(--rt-duration-fast) var(--rt-ease),
        color var(--rt-duration-fast) var(--rt-ease),
        border-color var(--rt-duration-fast) var(--rt-ease);
}

.mobile-menu.is-open .mobile-link {
    animation: rt-fade-right var(--rt-duration-slow) var(--rt-ease) both;
}

.mobile-menu.is-open .mobile-link:nth-child(1) {
    animation-delay: 60ms;
}
.mobile-menu.is-open .mobile-link:nth-child(2) {
    animation-delay: 110ms;
}
.mobile-menu.is-open .mobile-link:nth-child(3) {
    animation-delay: 160ms;
}
.mobile-menu.is-open .mobile-link:nth-child(4) {
    animation-delay: 210ms;
}
.mobile-menu.is-open .mobile-link:nth-child(5) {
    animation-delay: 260ms;
}
.mobile-menu.is-open .mobile-link:nth-child(6) {
    animation-delay: 310ms;
}
.mobile-menu.is-open .mobile-link:nth-child(7) {
    animation-delay: 360ms;
}
.mobile-menu.is-open .mobile-link:nth-child(8) {
    animation-delay: 410ms;
}

.mobile-link:hover,
.mobile-link.is-active {
    background: var(--rt-primary-soft);
    color: var(--rt-primary);
    border-color: rgba(46, 125, 91, 0.3);
}

.mobile-link:hover .icon {
    color: var(--rt-icon-hover);
}

.mobile-cta {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: var(--rt-space-3);
    padding-top: var(--rt-space-6);
    border-top: 1px solid var(--rt-border);
}

/* --------------------------------------------------------------------------
   Page shell (content offset for fixed navbar)
   -------------------------------------------------------------------------- */

.page {
    padding-top: var(--rt-nav-height);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* الرئيسية: الهيرو فول-بليد تحت النافبار الشفاف (النافبار fixed فوقه) */
.page.page-home {
    padding-top: 0;
}

.page-main {
    flex: 1;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.footer {
    background: var(--rt-bg-soft);
    border-top: 1px solid var(--rt-border);
    padding-block: var(--rt-space-16) var(--rt-space-8);
    margin-top: var(--rt-space-24);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: var(--rt-space-10);
    margin-bottom: var(--rt-space-12);
}

.footer-brand .nav-brand {
    animation: none;
    opacity: 1;
    transform: none;
    margin-bottom: var(--rt-space-4);
}

.footer-desc {
    color: var(--rt-text-muted);
    font-size: var(--rt-fs-sm);
    line-height: var(--rt-lh-normal);
    max-width: 340px;
    margin-bottom: var(--rt-space-5);
}

.footer-title {
    font-size: var(--rt-fs-sm);
    font-weight: var(--rt-fw-bold);
    margin-bottom: var(--rt-space-5);
    color: var(--rt-text);
    display: flex;
    align-items: center;
    gap: var(--rt-space-2);
}

.footer-title .icon {
    color: var(--rt-primary);
    width: 17px;
    height: 17px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--rt-space-3);
}

.footer-link {
    color: var(--rt-text-muted);
    font-size: var(--rt-fs-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--rt-space-2);
    transition:
        color var(--rt-duration-fast) var(--rt-ease),
        transform var(--rt-duration-fast) var(--rt-ease);
    width: fit-content;
}

.footer-link:hover {
    color: var(--rt-primary);
    transform: translateX(-4px);
}

.footer-bottom {
    padding-top: var(--rt-space-8);
    border-top: 1px solid var(--rt-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--rt-space-4);
    flex-wrap: wrap;
    color: var(--rt-text-muted);
    font-size: var(--rt-fs-xs);
}

.footer-socials {
    display: flex;
    gap: var(--rt-space-2);
}

.footer-social {
    width: 38px;
    height: 38px;
    border-radius: var(--rt-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--rt-border);
    color: var(--rt-text-soft);
    transition:
        background var(--rt-duration-fast) var(--rt-ease),
        border-color var(--rt-duration-fast) var(--rt-ease),
        transform var(--rt-duration-fast) var(--rt-ease-spring),
        color var(--rt-duration-fast) var(--rt-ease);
}

.footer-social:hover {
    background: var(--rt-primary);
    border-color: var(--rt-primary);
    color: #fff;
    transform: translateY(-3px);
}

/* ══════════════════════════════════════════════════════════════════════════
   GLASS NAVBAR (rt-*) — calm at the top, living glass capsule on scroll.
   Scoped with rt- prefixes so the previous navbar styles stay untouched.
   overflow:hidden is deliberately NEVER set on .rt-bar: it would clip the glow.
   ══════════════════════════════════════════════════════════════════════════ */

@property --rt-angle { syntax: "<angle>"; initial-value: 0deg; inherits: false }
@keyframes rt-spin { to { --rt-angle: 360deg } }

.rt-bar {
    --rt-bg: #05070c;
    --rt-panel: #0c1119;
    --rt-blue: #1e90ff;
    --rt-blue-deep: #0a4fb0;
    --rt-silver: #c9d3e0;
    --rt-silver-dim: #8b97a8;
    --rt-silver-hi: #f2f6fb;
    --rt-ease: cubic-bezier(.2, .8, .2, 1);

position: fixed;
    inset-inline: 0;
    top: 0;
    /* Must stay above .mobile-menu, which is z-index calc(--rt-z-nav - 1). */
    z-index: var(--rt-z-nav);
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    background: transparent;
    border: 1px solid transparent;
    transition: all .5s var(--rt-ease);
    animation: rt-drop .8s var(--rt-ease) backwards;
}
@keyframes rt-drop {
    from { transform: translateY(-18px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}

/* shine sweep — this layer clips the shine, not the bar */
.rt-sweep {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    overflow: hidden;
    pointer-events: none;
}
.rt-sweep i {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(120%);
    background: linear-gradient(105deg,
        transparent 32%,
        rgba(30, 144, 255, .3) 47%,
        rgba(242, 246, 251, .28) 52%,
        transparent 68%);
}
.rt-bar.scrolled .rt-sweep i { animation: rt-sweep-run 1.1s ease forwards; }
@keyframes rt-sweep-run {
    from { transform: translateX(120%); opacity: 1; }
    to   { transform: translateX(-120%); opacity: 0; }
}

/* brand (kept: this is the site's own logo) */
.rt-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    flex: none;
}
.rt-brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    object-fit: contain;
    flex: none;
    /* لمعة ثابتة حوالين اللوجو */
    filter: drop-shadow(0 0 9px rgba(30, 144, 255, .5));
    transition: filter var(--rt-duration-normal) var(--rt-ease);
}
.rt-brand:hover .rt-brand-mark {
    filter: drop-shadow(0 0 14px rgba(30, 144, 255, .8));
}

/* لمعة متحركة تمسح على اللوجو كل few ثواني */
.rt-mark-gloss {
    position: relative;
    display: inline-flex;
    flex: none;
    border-radius: 10px;
    overflow: hidden;
}
.rt-mark-gloss::after {
    content: "";
    position: absolute;
    inset: -20%;
    background: linear-gradient(115deg,
        transparent 38%,
        rgba(255, 255, 255, .65) 48%,
        rgba(255, 255, 255, .15) 53%,
        transparent 62%);
    transform: translateX(-130%);
    animation: rt-mark-shine 4.2s ease-in-out infinite;
    pointer-events: none;
}
@keyframes rt-mark-shine {
    0%, 58% { transform: translateX(-130%); opacity: 0; }
    62% { opacity: 1; }
    88%, 100% { transform: translateX(130%); opacity: 0; }
}
.rt-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.rt-brand-name { font-size: 15px; font-weight: 700; letter-spacing: .04em; color: var(--rt-silver-hi); }
.rt-brand-tag  { font-size: 11px; color: var(--rt-silver-dim); }

/* centred capsule — no background of its own; ::after is the dark plate */
.rt-links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    isolation: isolate;
    display: flex;
    gap: 2px;
    padding: 5px;
    margin: 0;
    list-style: none;
    border-radius: 16px;
    border: 1px solid rgba(201, 211, 224, .14);
    transition: border-color .5s var(--rt-ease);
    /* High browser zoom: keep the capsule inside the viewport and wrap instead
       of overflowing. No layout hiding, no transform scaling. */
    max-width: calc(100% - 16px);
    flex-wrap: wrap;
    justify-content: center;
}
.rt-links::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border-radius: inherit;
    background: var(--rt-panel);
}
.rt-links::before {
    content: "";
    position: absolute;
    inset: -1px;
    padding: 1px;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: conic-gradient(from var(--rt-angle),
        rgba(201, 211, 224, .08),
        var(--rt-silver) 12%,
        var(--rt-blue) 25%,
        rgba(201, 211, 224, .08) 40%,
        rgba(201, 211, 224, .08) 60%,
        var(--rt-blue) 75%,
        var(--rt-silver) 88%,
        rgba(201, 211, 224, .08));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
            mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    transition: opacity .5s var(--rt-ease);
}
.rt-aura {
    position: absolute;
    inset: -2px;
    z-index: -2;
    border-radius: 18px;
    pointer-events: none;
    filter: blur(11px);
    opacity: 0;
    background: conic-gradient(from var(--rt-angle),
        transparent,
        var(--rt-silver) 12%,
        var(--rt-blue) 25%,
        transparent 40%,
        transparent 60%,
        var(--rt-blue) 75%,
        var(--rt-silver) 88%,
        transparent);
    transition: opacity .6s var(--rt-ease);
}
.rt-links li { position: relative; z-index: 1; }
.rt-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 17px;
    border-radius: 11px;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--rt-silver-dim);
    text-decoration: none;
    white-space: nowrap;
    transition: color .3s var(--rt-ease), transform .3s var(--rt-ease);
}
.rt-link .icon { width: 16px; height: 16px; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1), color .3s var(--rt-ease); }
.rt-link:hover { color: var(--rt-silver-hi); transform: translateY(-1px); }
.rt-link:hover .icon { transform: scale(1.2) rotate(-6deg); color: var(--rt-blue); }
.rt-link.active { color: var(--rt-silver-hi); font-weight: 700; }
.rt-link.active .icon { color: var(--rt-blue); }

.rt-indicator {
    position: absolute;
    top: 5px;
    bottom: 5px;
    left: 0;
    width: 0;
    z-index: 0;
    overflow: hidden;
    border-radius: 11px;
    background: rgba(201, 211, 224, .1);
    box-shadow: inset 0 0 0 1px rgba(201, 211, 224, .08);
    transition:
        left .45s cubic-bezier(.3, 1.2, .4, 1),
        width .45s cubic-bezier(.3, 1.2, .4, 1),
        background .5s var(--rt-ease),
        box-shadow .5s var(--rt-ease);
}
.rt-indicator::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(-120%);
    background: linear-gradient(110deg,
        transparent 35%,
        rgba(255, 255, 255, .35) 50%,
        transparent 65%);
}

/* actions sit on the inline-end (left in RTL) */
.rt-actions {
    margin-inline-start: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    flex: none;
}

/* profile card — no spinning border, no pulsing ring */
.rt-profile {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    padding: 8px 14px;
    border-radius: 16px;
    background: var(--rt-panel);
    border: 1px solid rgba(201, 211, 224, .14);
    color: inherit;
    font-family: inherit;
    cursor: pointer;
    transition: transform .3s var(--rt-ease), border-color .3s var(--rt-ease), box-shadow .3s var(--rt-ease);
}
.rt-avatar {
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    color: #fff;
    background: radial-gradient(circle at 30% 25%, #5db3ff, var(--rt-blue-deep));
}
.rt-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rt-who { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.rt-name { font-size: 13.5px; font-weight: 600; color: var(--rt-silver-hi); }
.rt-balance {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--rt-blue);
}
.rt-balance .icon { width: 13px; height: 13px; }
.rt-chev { margin-inline-start: auto; color: var(--rt-silver-dim); transition: transform .3s var(--rt-ease), color .3s var(--rt-ease); }
.rt-chev .icon { width: 16px; height: 16px; }
.rt-profile:hover { transform: translateY(-2px); border-color: rgba(30, 144, 255, .6); box-shadow: 0 8px 28px -10px rgba(30, 144, 255, .7); }
.rt-profile:hover .rt-chev { transform: translateY(2px); color: var(--rt-blue); }

/* Profile dropdown: the card lives inside .user-menu so the dropdown has a
   real box to anchor to, and it animates open/closed on click. */
.user-menu { position: relative; }

.user-dropdown {
    transform-origin: top left;
}
.user-menu.is-open .user-dropdown {
    animation: rt-dropopen .28s cubic-bezier(.2, .9, .3, 1.1) both;
}
@keyframes rt-dropopen {
    from { opacity: 0; transform: translateY(-10px) scale(.96); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* chevron flips while the menu is open */
.user-menu.is-open .rt-chev { transform: rotate(180deg); color: var(--rt-blue); }
.rt-profile[aria-expanded="true"] { border-color: rgba(30, 144, 255, .45); }

/* Entrance for the dropdown items, so it feels alive rather than popped */
.user-menu.is-open .dropdown-item {
    animation: rt-dropitem .3s cubic-bezier(.2, .8, .2, 1) both;
}
.user-menu.is-open .dropdown-item:nth-child(1) { animation-delay: .04s; }
.user-menu.is-open .dropdown-item:nth-child(2) { animation-delay: .08s; }
.user-menu.is-open .dropdown-item:nth-child(3) { animation-delay: .12s; }
.user-menu.is-open .dropdown-item:nth-child(4) { animation-delay: .16s; }
.user-menu.is-open .dropdown-item:nth-child(5) { animation-delay: .20s; }
@keyframes rt-dropitem {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: translateX(0); }
}

.rt-dropdown {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    max-width: 100%;
    padding: 8px 14px;
    border-radius: 16px;
    background: var(--rt-panel);
    border: 1px solid rgba(201, 211, 224, .14);
    color: inherit;
    font-family: inherit;
    cursor: pointer;
}

.rt-toggle {
    display: none;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 12px;
    background: var(--rt-panel);
    border: 1px solid rgba(201, 211, 224, .14);
    color: var(--rt-silver-hi);
    cursor: pointer;
}

/* ── scrolled: everything wakes up ── */
.rt-bar.scrolled {
    top: 10px;
    margin: 0 24px;
    padding: 9px 16px;
    border-radius: 22px;
    background: rgba(8, 12, 19, .7);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
            backdrop-filter: blur(16px) saturate(150%);
    border-color: rgba(201, 211, 224, .2);
    box-shadow: 0 14px 40px -16px rgba(30, 144, 255, .65);
}
.rt-bar.scrolled .rt-links { border-color: transparent; }
.rt-bar.scrolled .rt-links::before { opacity: 1; animation: rt-spin 6s linear infinite; }
.rt-bar.scrolled .rt-aura { opacity: .75; animation: rt-spin 6s linear infinite; }
.rt-bar.scrolled .rt-indicator {
    background: linear-gradient(135deg, rgba(30, 144, 255, .3), rgba(201, 211, 224, .12));
    box-shadow: 0 0 18px rgba(30, 144, 255, .3);
}
.rt-bar.scrolled .rt-indicator::after { opacity: 1; animation: rt-sheen 3.5s ease-in-out infinite; }
@keyframes rt-sheen {
    0%, 60% { transform: translateX(-120%); }
    100%    { transform: translateX(120%); }
}

@keyframes rt-pop {
    from { transform: scale(.4) translateY(6px); opacity: 0; }
    to   { transform: none; opacity: 1; }
}
.rt-bar.scrolled .rt-links li:nth-of-type(1) { animation: rt-pop .65s cubic-bezier(.3, 1.6, .5, 1) backwards .05s; }
.rt-bar.scrolled .rt-links li:nth-of-type(2) { animation: rt-pop .65s cubic-bezier(.3, 1.6, .5, 1) backwards .12s; }
.rt-bar.scrolled .rt-links li:nth-of-type(3) { animation: rt-pop .65s cubic-bezier(.3, 1.6, .5, 1) backwards .19s; }
.rt-bar.scrolled .rt-links li:nth-of-type(4) { animation: rt-pop .65s cubic-bezier(.3, 1.6, .5, 1) backwards .26s; }
.rt-bar.scrolled .rt-links li:nth-of-type(5) { animation: rt-pop .65s cubic-bezier(.3, 1.6, .5, 1) backwards .33s; }
.rt-bar.scrolled .rt-links li:nth-of-type(6) { animation: rt-pop .65s cubic-bezier(.3, 1.6, .5, 1) backwards .40s; }
.rt-bar.scrolled .rt-links li:nth-of-type(7) { animation: rt-pop .65s cubic-bezier(.3, 1.6, .5, 1) backwards .47s; }

@keyframes rt-metal {
    from { background-position: 0 0; }
    to   { background-position: -200% 0; }
}
.rt-bar.scrolled .rt-name {
    background: linear-gradient(90deg, var(--rt-silver-hi), var(--rt-silver), var(--rt-silver-hi));
    background-size: 200% 100%;
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    animation: rt-metal 5s linear infinite;
}

.rt-bar :focus-visible,
.rt-links :focus-visible { outline: 2px solid var(--rt-blue); outline-offset: 2px; }

/* ── mobile ── */
@media (max-width: 1100px) {
    .rt-brand-tag { display: none; }
}
@media (max-width: 900px) {
    .rt-bar { flex-wrap: wrap; padding: 10px 14px; gap: 10px; }
    .rt-toggle { display: grid; }
    .rt-links {
        position: relative;
        left: auto;
        transform: none;
        width: 100%;
        overflow-x: auto;
        order: 3;
    }
    .rt-link { padding: 8px 12px; font-size: 13px; }
    .rt-bar.scrolled { margin: 0 10px; }
    .rt-profile { min-width: 0; }
    .rt-who { display: none; }
    /* The bar wraps to two rows here, so it is taller than --rt-nav-height.
       Reserve its real height or the fixed bar would cover the page content. */
    .page { padding-top: 124px; }
    .mobile-menu { padding-top: 136px; }
}
@media (max-width: 560px) {
    .rt-brand-name { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .rt-bar, .rt-bar *, .rt-bar::before, .rt-bar::after {
        animation: none !important;
        transition: none !important;
    }
}
