/* Shared game shell header (logo, wallet, tickets, user + mobile drawer) */

.rd-topbar-logo-link {
    line-height: 0;
    text-decoration: none;
}

.rd-topbar-brand {
    align-items: center;
    color: #dce7ff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    gap: 8px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rd-event-logo {
    border-radius: 8px;
    height: auto;
    max-height: 52px;
    max-width: min(92vw, 320px);
    object-fit: contain;
    width: auto;
}

.rd-topbar-back {
    align-items: center;
    background: rgba(15, 22, 40, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    color: #dce7ff;
    display: inline-flex;
    font-size: 12px;
    font-weight: 700;
    gap: 6px;
    padding: 6px 10px;
    text-decoration: none;
}

.rd-topbar-back:hover {
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.rd-login-chip {
    background: rgba(255, 211, 79, 0.12);
    border: 1px solid rgba(255, 211, 79, 0.52);
    border-radius: 10px;
    color: #ffe595;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    padding: 8px 12px;
}

/* Mobile: hamburger + slide-out */
.rd-topbar-burger {
    align-items: center;
    background: rgba(15, 22, 40, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    color: #e8edf7;
    cursor: pointer;
    display: none;
    flex-direction: column;
    gap: 5px;
    justify-content: center;
    min-height: 44px;
    min-width: 44px;
    padding: 10px 12px;
}

.rd-topbar-burger span {
    background: #e8edf7;
    border-radius: 1px;
    display: block;
    height: 2px;
    width: 20px;
}

.rd-topbar-desktop-wallet {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.rd-sr-only {
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.rd-wallet-refresh-btn,
.rd-menu-wallet-refresh {
    align-items: center;
    appearance: none;
    -webkit-appearance: none;
    background: rgba(22, 163, 74, 0.18);
    border: 1px solid rgba(74, 222, 128, 0.48);
    border-radius: 10px;
    color: #86efac;
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    height: 40px;
    justify-content: center;
    min-width: 40px;
    padding: 0 10px;
    text-transform: uppercase;
}

.rd-wallet-refresh-btn:hover,
.rd-menu-wallet-refresh:hover {
    background: rgba(22, 163, 74, 0.28);
    border-color: rgba(134, 239, 172, 0.72);
    color: #bbf7d0;
}

.rd-wallet-refresh-btn:disabled,
.rd-menu-wallet-refresh:disabled {
    cursor: wait;
    opacity: 0.68;
}

.rd-topbar-quick-nav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.rd-topbar-home-btn,
button.rd-topbar-home-btn {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: #e8edf7;
    cursor: pointer;
    display: inline-flex;
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    min-height: 40px;
    padding: 8px 12px;
    text-decoration: none;
    text-transform: uppercase;
    appearance: none;
    -webkit-appearance: none;
}

.rd-topbar-home-btn:hover,
button.rd-topbar-home-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.34);
    color: #ffffff;
}

.rd-topbar-home-btn--active {
    background: linear-gradient(165deg, rgba(210, 58, 72, 0.85), rgba(165, 28, 42, 0.92));
    border-color: rgba(255, 160, 168, 0.65);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 2px 10px rgba(120, 20, 35, 0.35);
    color: #fff;
}

.rd-topbar-home-btn--active:hover,
button.rd-topbar-home-btn--active:hover {
    background: linear-gradient(165deg, rgba(225, 72, 86, 0.92), rgba(180, 38, 52, 0.95));
    border-color: rgba(255, 190, 198, 0.8);
    color: #fff;
}

.rd-lang-wrap {
    position: relative;
}

.rd-lang-btn {
    align-items: center;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 10px;
    color: #e8edf7;
    cursor: pointer;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    min-width: 40px;
    padding: 0 10px;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.rd-lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.38);
}

.rd-lang-btn-icon {
    display: inline-flex;
    line-height: 0;
}

.rd-lang-btn-icon svg {
    display: block;
    flex-shrink: 0;
}

.rd-lang-popover {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 1200;
}

.rd-lang-popover-card {
    background: rgba(15, 22, 40, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    min-width: 220px;
    padding: 12px 14px;
}

.rd-lang-popover-title {
    color: #9fb0c8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.rd-lang-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rd-lang-option {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #eef3f8;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.rd-lang-option:hover {
    background: rgba(58, 169, 255, 0.15);
    border-color: rgba(58, 169, 255, 0.45);
}

.rd-topbar-nav-divider {
    align-self: stretch;
    border-left: 1px solid rgba(255, 255, 255, 0.42);
    color: rgba(255, 255, 255, 0.55);
    font-size: 0;
    line-height: 0;
    margin: 4px 4px 4px 8px;
    overflow: hidden;
    padding: 0;
    text-indent: -999px;
    user-select: none;
    width: 0;
}

.rd-topbar-menu-backdrop {
    background: rgba(2, 7, 15, 0.55);
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.25s ease;
    z-index: 1098;
}

.rd-topbar-menu-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
}

.rd-topbar-menu-drawer {
    background: linear-gradient(180deg, #141f35 0%, #0b1324 100%);
    border-left: 1px solid rgba(255, 255, 255, 0.12);
    bottom: 0;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    max-width: min(340px, 92vw);
    overflow: auto;
    pointer-events: none;
    position: fixed;
    right: 0;
    top: 0;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    width: min(340px, 92vw);
    z-index: 1099;
}

.rd-topbar-menu-drawer.is-open {
    pointer-events: auto;
    transform: translateX(0);
}

.rd-topbar-menu-drawer-inner {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px 16px 24px;
}

.rd-topbar-menu-header {
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    padding-bottom: 12px;
}

.rd-topbar-menu-title {
    color: #f2f7ff;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.rd-topbar-menu-close {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    color: #e8edf7;
    cursor: pointer;
    display: inline-flex;
    font-size: 22px;
    font-weight: 700;
    height: 40px;
    justify-content: center;
    line-height: 1;
    width: 40px;
}

.rd-topbar-menu-wallet-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    display: grid;
    gap: 12px;
    padding: 14px 16px;
}

.rd-menu-stat {
    align-items: center;
    color: #d6dced;
    display: flex;
    flex-wrap: wrap;
    font-size: 18px;
    font-weight: 700;
    gap: 8px;
}

.rd-menu-stat .rd-menu-stat-label {
    color: #9ca8c5;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    width: 100%;
}

.rd-menu-stat strong {
    color: #7ec8ff;
    font-size: 22px;
    font-weight: 800;
}

.rd-menu-stat.rd-menu-stat--tickets strong {
    color: #ffd34f;
}

.rd-menu-user-row {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #f2f7ff;
    font-size: 15px;
    font-weight: 700;
    padding-top: 10px;
}

.rd-menu-user-row.rd-menu-user-row--guest {
    border-top: 0;
    padding-top: 0;
}

.rd-topbar-menu-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rd-topbar-menu-links a,
.rd-topbar-menu-links button.rd-menu-link-btn {
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: #e8edf7;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 10px;
    text-align: left;
    text-decoration: none;
}

.rd-topbar-menu-links a:hover,
.rd-topbar-menu-links button.rd-menu-link-btn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.rd-topbar-menu-links a.is-active {
    background: linear-gradient(165deg, rgba(210, 58, 72, 0.45), rgba(145, 28, 42, 0.55));
    border: 1px solid rgba(255, 140, 152, 0.45);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    color: #fff;
}

.rd-topbar-menu-links a.is-active:hover {
    background: linear-gradient(165deg, rgba(225, 72, 86, 0.55), rgba(160, 38, 52, 0.62));
    border-color: rgba(255, 170, 180, 0.55);
    color: #fff;
}

.rd-menu-login-btn {
    background: rgba(255, 211, 79, 0.14) !important;
    border: 1px solid rgba(255, 211, 79, 0.45) !important;
    border-radius: 12px !important;
    color: #ffe595 !important;
    margin-top: 6px;
    text-align: center !important;
}

body.rd-drawer-open {
    overflow: hidden;
}

@media screen and (max-width: 991.98px) {
    .rd-topbar-burger {
        display: inline-flex;
        order: 2;
    }

    .rd-topbar-desktop-wallet {
        align-items: center;
        display: flex !important;
        gap: 8px;
        order: 1;
    }

    .rd-token-chip,
    .rd-ticket-chip,
    .rd-wallet-refresh-btn,
    .rd-login-chip,
    .rd-user {
        display: none !important;
    }

    .rd-topbar-quick-nav {
        display: none !important;
    }

    .rd-topbar-nav-divider {
        display: none !important;
    }
}

/* TC/RP phone login modal (shared across spin / shop / tournament) */
.rd-phone-login-modal {
    align-items: center;
    background: rgba(2, 7, 15, 0.7);
    display: none;
    inset: 0;
    justify-content: center;
    padding: 16px;
    position: fixed;
    z-index: 1000;
}
.rd-phone-login-modal.is-open {
    display: flex;
}
.rd-phone-login-card {
    background: linear-gradient(180deg, #101a2f, #0b1323);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    max-width: 360px;
    padding: 40px 16px 16px;
    position: relative;
    width: 100%;
}
.rd-phone-login-close {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #c5d0e8;
    cursor: pointer;
    display: inline-flex;
    font-size: 22px;
    height: 32px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    position: absolute;
    right: 8px;
    top: 8px;
    width: 32px;
}
.rd-phone-login-close:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f2f7ff;
}
.rd-phone-login-close:focus-visible {
    outline: 2px solid rgba(255, 211, 79, 0.85);
    outline-offset: 2px;
}
.rd-phone-login-card h3 {
    color: #f2f7ff;
    font-size: 18px;
    margin: 0 0 8px;
}
.rd-phone-login-card p {
    color: #a8b7d5;
    font-size: 13px;
    margin: 0 0 12px;
}
.rd-phone-login-input {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 10px;
    color: #f5f8ff;
    outline: none;
    padding: 10px 12px;
    width: 100%;
}
.rd-phone-login-actions {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}
.rd-phone-login-actions .rd-btn {
    flex: 1;
}
.rd-phone-login-error {
    color: #ff9ea6;
    font-size: 12px;
    margin-top: 8px;
    min-height: 16px;
} 

