/* ==========================================================================
   MACLEOD SERVICES CASINO — PILLAR IV & PILLAR V RETENTION & UX ENGINE CSS
   Covers #49–#75: Live Big Win Ticker, Coin Rain Banner, Totem HUD,
   Odometer Balance, Theatre Mode, Paytable Drawer, PiP Moonshot Radar,
   Mystery Supply Drop Chest, Command Palette (Ctrl+K), and Mobile Thumb Dock.
   ========================================================================== */

/* 1. Top Live Retention & Social Proof Bar (#51, #52, #53, #58, #60, #68, #71) */
.nv-ret-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.42rem 1.1rem;
    background: linear-gradient(90deg, rgba(8, 13, 28, 0.98) 0%, rgba(16, 26, 52, 0.96) 50%, rgba(8, 13, 28, 0.98) 100%);
    border-bottom: 1px solid rgba(56, 189, 248, 0.24);
    font-size: 0.78rem;
    color: #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 90;
    backdrop-filter: blur(12px);
}

.nv-ret-badges {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
    flex-wrap: wrap;
}

.nv-ret-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.62rem;
    border-radius: 999px;
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(56, 189, 248, 0.32);
    color: #e2e8f0;
    cursor: pointer;
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
    white-space: nowrap;
}
.nv-ret-pill:hover {
    transform: translateY(-1px);
    border-color: #38bdf8;
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.28);
}
.nv-ret-pill.gold {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(217, 119, 6, 0.15));
    border-color: rgba(251, 191, 36, 0.55);
    color: #fde68a;
}
.nv-ret-pill.emerald {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(5, 150, 105, 0.16));
    border-color: rgba(52, 211, 153, 0.55);
    color: #a7f3d0;
}
.nv-ret-pill.purple {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.24), rgba(126, 34, 206, 0.16));
    border-color: rgba(192, 132, 252, 0.55);
    color: #e9d5ff;
}

/* #53 Live Big Win Social Proof Ticker */
.nv-ticker-viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 26px;
    display: flex;
    align-items: center;
    mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 6%, #000 94%, transparent 100%);
}
.nv-ticker-track {
    display: inline-flex;
    align-items: center;
    gap: 1.6rem;
    white-space: nowrap;
    animation: nvTickerScroll 38s linear infinite;
}
.nv-ticker-track:hover {
    animation-play-state: paused;
}
@keyframes nvTickerScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.nv-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.76rem;
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
}
.nv-ticker-item:hover {
    border-color: #fbbf24;
    background: rgba(251, 191, 36, 0.1);
}
.nv-ticker-try {
    color: #38bdf8;
    font-weight: 800;
    font-size: 0.7rem;
    margin-left: 0.2rem;
}

/* 2. #54 & #75 Coin Rain & GM-Macleod Broadcast Banner */
.nv-rain-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.8rem;
    padding: 0.65rem 1.25rem;
    background: linear-gradient(90deg, rgba(6, 95, 70, 0.92), rgba(15, 118, 110, 0.92), rgba(30, 58, 138, 0.92));
    border-bottom: 1px solid #34d399;
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.25);
    color: #ecfdf5;
    font-size: 0.86rem;
    animation: nvPulseBorder 2.4s infinite ease-in-out;
}
@keyframes nvPulseBorder {
    0%, 100% { box-shadow: 0 4px 20px rgba(16, 185, 129, 0.22); }
    50% { box-shadow: 0 6px 30px rgba(52, 211, 153, 0.5); }
}
.nv-rain-claim-btn {
    background: linear-gradient(135deg, #fde047, #f59e0b);
    color: #110d04 !important;
    font-weight: 900;
    font-size: 0.82rem;
    padding: 0.42rem 1rem;
    border-radius: 999px;
    border: 1px solid #fff;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.45);
    transition: transform 0.15s ease;
}
.nv-rain-claim-btn:hover {
    transform: scale(1.05);
}

/* 3. #55, #57, #59 Session Nudge & Zeigarnik Progress Strip */
.nv-nudge-strip {
    max-width: 1220px;
    margin: 0.65rem auto 0.9rem;
    padding: 0.6rem 1.1rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(17, 24, 46, 0.94), rgba(12, 18, 36, 0.96));
    border: 1px solid rgba(56, 189, 248, 0.25);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.81rem;
}
.nv-xp-mini-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex: 1;
    min-width: 240px;
}
.nv-xp-mini-bar {
    width: 120px;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    flex-shrink: 0;
}
.nv-xp-mini-fill {
    height: 100%;
    background: linear-gradient(90deg, #38bdf8, #a855f7, #fbbf24);
    border-radius: 999px;
    transition: width 0.4s ease;
}

/* #57 Zeigarnik Notification Dot on Nav Links */
.nv-zeigarnik-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    margin-left: 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.66rem;
    font-weight: 900;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
    animation: nvBadgePulse 1.6s infinite;
}
@keyframes nvBadgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}

/* 4. #62, #63, #66, #70, #72, #74 In-Game Ergonomic Command Bar */
.nv-game-hud-bar {
    max-width: 1180px;
    margin: 0.75rem auto;
    padding: 0.65rem 1rem;
    border-radius: 14px;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(8, 12, 24, 0.98));
    border: 1px solid rgba(56, 189, 248, 0.28);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.6rem;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
.nv-hud-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-wrap: wrap;
}
.nv-hud-btn {
    background: rgba(30, 41, 59, 0.88);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: #e2e8f0;
    padding: 0.34rem 0.68rem;
    border-radius: 8px;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
    transition: all 0.16s ease;
}
.nv-hud-btn:hover {
    border-color: #38bdf8;
    color: #fff;
    background: rgba(56, 189, 248, 0.16);
}
.nv-hud-btn.active {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(168, 85, 247, 0.3));
    border-color: #38bdf8;
    color: #fff;
}

/* #74 Theatre / Cinema Mode */
body.nv-theatre-mode .site-header,
body.nv-theatre-mode .site-footer,
body.nv-theatre-mode .nv-nudge-strip {
    opacity: 0.18;
    transition: opacity 0.25s ease;
}
body.nv-theatre-mode .site-header:hover,
body.nv-theatre-mode .site-footer:hover {
    opacity: 1;
}
body.nv-theatre-mode main#main {
    max-width: 1440px;
    transform: scale(1.02);
    transform-origin: top center;
    transition: transform 0.25s ease;
}

/* #64 Big Win Screen Shake & Chromatic Glow */
@keyframes nvScreenShake {
    0%, 100% { transform: translate3d(0, 0, 0); }
    20% { transform: translate3d(-5px, 3px, 0); }
    40% { transform: translate3d(5px, -4px, 0); }
    60% { transform: translate3d(-4px, 2px, 0); }
    80% { transform: translate3d(4px, -2px, 0); }
}
body.nv-bigwin-shake main#main {
    animation: nvScreenShake 0.48s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

/* #65 Odometer Flash on Balance Pill */
#balance.nv-bal-up {
    color: #34d399 !important;
    border-color: #34d399 !important;
    box-shadow: 0 0 18px rgba(52, 211, 153, 0.55) !important;
    transform: scale(1.06);
    transition: all 0.22s ease;
}

/* 5. #49 Floating Variable-Ratio Mystery Supply Drop Chest */
.nv-mystery-chest-float {
    position: fixed;
    bottom: 92px;
    left: 24px;
    z-index: 950;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.1rem;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.97), rgba(88, 28, 135, 0.97));
    border: 2px solid #fbbf24;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75), 0 0 28px rgba(251, 191, 36, 0.5);
    color: #fff;
    cursor: pointer;
    animation: nvChestBounce 1.8s infinite ease-in-out;
}
@keyframes nvChestBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-7px); }
}

/* 6. #70 Picture-in-Picture Mini TON Moonshot Radar */
.nv-pip-radar {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 250px;
    border-radius: 16px;
    background: linear-gradient(160deg, rgba(10, 16, 34, 0.97), rgba(5, 8, 18, 0.99));
    border: 1px solid rgba(56, 189, 248, 0.45);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.75), 0 0 22px rgba(56, 189, 248, 0.2);
    z-index: 940;
    overflow: hidden;
    padding: 0.65rem 0.75rem;
}

/* 7. #66 Slide-Out Paytable, RTP & Provably Fair Drawer */
.nv-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 6, 16, 0.76);
    backdrop-filter: blur(6px);
    z-index: 1100;
    display: flex;
    justify-content: flex-end;
}
.nv-drawer-backdrop[hidden] {
    display: none !important;
}
.nv-drawer-panel {
    width: min(480px, 94vw);
    height: 100%;
    background: linear-gradient(165deg, #0f172a 0%, #070b16 100%);
    border-left: 1px solid rgba(56, 189, 248, 0.35);
    padding: 1.5rem;
    overflow-y: auto;
    color: #f8fafc;
    box-shadow: -18px 0 48px rgba(0, 0, 0, 0.75);
}

/* 8. #56 Jump Back In Strip & #71 Tag Filter Bar */
.nv-jumpback-card {
    max-width: 1220px;
    margin: 0 auto 1.2rem;
    padding: 0.9rem 1.2rem;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(15, 23, 45, 0.92), rgba(9, 13, 26, 0.96));
    border: 1px solid rgba(56, 189, 248, 0.24);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* 9. #67 Mobile One-Handed Thumb-Zone Dock */
@media (max-width: 768px) {
    .nv-ret-topbar {
        padding: 0.35rem 0.65rem;
    }
    .nv-ticker-viewport {
        display: none;
    }
    .nv-game-hud-bar {
        position: sticky;
        bottom: 0;
        z-index: 95;
        margin-bottom: 0;
        border-radius: 16px 16px 0 0;
        border-bottom: none;
        background: rgba(8, 13, 27, 0.98);
        padding: 0.6rem 0.75rem;
    }
}
