/* ==========================================================================
   UMBRA: SOLAR REQUIEM — Interactive Mini App Design System
   Scoped under .ub-* / #page-tab-umbra / #ub-modal-root to avoid collisions
   ========================================================================== */

:root {
    --ub-bg: #07060e;
    --ub-bg-elev: #110f1d;
    --ub-surface: rgba(22, 19, 38, 0.86);
    --ub-surface-2: rgba(32, 28, 54, 0.92);
    --ub-border: rgba(255, 236, 200, 0.11);
    --ub-border-strong: rgba(245, 184, 65, 0.34);
    --ub-gold: #f5b841;
    --ub-gold-bright: #ffe082;
    --ub-violet: #9d5cff;
    --ub-violet-deep: #5b21b6;
    --ub-crimson: #e11d48;
    --ub-crimson-glow: #fb7185;
    --ub-emerald: #10b981;
    --ub-cyan: #38bdf8;
    --ub-pearl: #f4f2ff;
    --ub-muted: #9e98b8;
    --ub-font-display: 'Unbounded', system-ui, -apple-system, sans-serif;
    --ub-font-body: 'Onest', system-ui, -apple-system, sans-serif;
    --ub-font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --ub-font-script: 'Marck Script', cursive;
}

#page-tab-umbra {
    background:
        radial-gradient(110% 55% at 50% -8%, rgba(157, 92, 255, 0.24) 0%, rgba(245, 184, 65, 0.08) 38%, transparent 72%),
        radial-gradient(80% 50% at 90% 100%, rgba(225, 29, 72, 0.12) 0%, transparent 65%),
        var(--ub-bg);
    color: var(--ub-pearl);
    font-family: var(--ub-font-body);
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    position: relative;
}

#page-tab-umbra.hidden {
    display: none !important;
}

/* === STICKY TOP HUD (Ник, Статус, Баланс монет) === */
.ub-hud {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px 9px;
    background: linear-gradient(180deg, rgba(10, 8, 20, 0.96) 0%, rgba(12, 10, 24, 0.88) 100%);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--ub-border);
    flex-shrink: 0;
}

.ub-hud-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    cursor: pointer;
    padding: 3px 6px 3px 3px;
    border-radius: 14px;
    transition: background 0.18s ease, transform 0.14s ease;
}
.ub-hud-user:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.05);
}

.ub-hud-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
    background: linear-gradient(135deg, #2b2348, #151226);
    border: 1.5px solid rgba(245, 184, 65, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    font-size: 17px;
    box-shadow: 0 0 14px rgba(157, 92, 255, 0.28);
}
.ub-hud-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ub-hud-avatar.ub-av-plus {
    border-color: #38bdf8;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.52);
}
.ub-hud-avatar.ub-av-le {
    border-color: #fb7185;
    box-shadow: 0 0 16px rgba(225, 29, 72, 0.55);
}

.ub-hud-meta {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.ub-hud-nick-row {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.ub-hud-nick {
    font-family: var(--ub-font-display);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ub-pearl);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 135px;
}

.ub-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 2px 8px;
    border-radius: 999px;
    line-height: 1.35;
    border: 1px solid transparent;
}
.ub-status-regular {
    background: rgba(148, 163, 184, 0.14);
    color: #cbd5e1;
    border-color: rgba(148, 163, 184, 0.24);
}
.ub-status-premium {
    background: linear-gradient(90deg, rgba(245, 184, 65, 0.22), rgba(234, 138, 20, 0.26));
    color: #fde68a;
    border-color: rgba(245, 184, 65, 0.52);
    box-shadow: 0 0 12px rgba(245, 184, 65, 0.22);
}
.ub-status-premium_plus {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.26), rgba(157, 92, 255, 0.32), rgba(244, 63, 94, 0.25));
    background-size: 200% 100%;
    animation: ubShimmerBg 4s linear infinite;
    color: #e0f2fe;
    border-color: rgba(56, 189, 248, 0.6);
    box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
}

@keyframes ubShimmerBg {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.ub-hud-coins {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(245, 184, 65, 0.16), rgba(30, 24, 48, 0.92));
    border: 1px solid rgba(245, 184, 65, 0.38);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 4px 14px rgba(0, 0, 0, 0.35);
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: transform 0.15s ease, border-color 0.2s ease;
}
.ub-hud-coins:active {
    transform: scale(0.96);
}
.ub-hud-coins.ub-coins-bump {
    animation: ubCoinsBump 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes ubCoinsBump {
    0% { transform: scale(1); }
    40% { transform: scale(1.09); border-color: #ffe082; box-shadow: 0 0 20px rgba(245, 184, 65, 0.55); }
    100% { transform: scale(1); }
}

.ub-coin-icon {
    font-size: 16px;
    filter: drop-shadow(0 0 6px rgba(245, 184, 65, 0.55));
}
.ub-coin-val {
    font-family: var(--ub-font-mono);
    font-weight: 700;
    font-size: 13.5px;
    color: var(--ub-gold-bright);
    letter-spacing: -0.02em;
}
.ub-coin-delta {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    font-family: var(--ub-font-mono);
    font-weight: 800;
    font-size: 13px;
    padding: 3px 8px;
    border-radius: 999px;
    animation: ubFloatDelta 1.15s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.ub-coin-delta.plus {
    color: #ecfdf5;
    background: rgba(16, 185, 129, 0.92);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.45);
}
.ub-coin-delta.minus {
    color: #fff1f2;
    background: rgba(225, 29, 72, 0.9);
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.4);
}
@keyframes ubFloatDelta {
    0% { opacity: 0; transform: translateY(8px) scale(0.85); }
    18% { opacity: 1; transform: translateY(0) scale(1.04); }
    100% { opacity: 0; transform: translateY(-34px) scale(0.95); }
}

/* === SUB-NAVIGATION RAIL === */
.ub-subnav {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(11, 9, 22, 0.78);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}
.ub-subnav::-webkit-scrollbar { display: none; }

.ub-nav-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(25, 22, 44, 0.72);
    color: var(--ub-muted);
    font-family: var(--ub-font-body);
    font-size: 12.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
}
.ub-nav-pill.active {
    background: linear-gradient(135deg, rgba(157, 92, 255, 0.34), rgba(245, 184, 65, 0.22));
    color: #ffffff;
    border-color: rgba(245, 184, 65, 0.5);
    box-shadow: 0 4px 14px rgba(157, 92, 255, 0.25);
}
.ub-nav-dot {
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: var(--ub-crimson);
    color: #fff;
    font-family: var(--ub-font-mono);
    font-size: 10px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* === SCROLL STAGE === */
.ub-stage {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 14px 14px 105px;
    -webkit-overflow-scrolling: touch;
}

/* === PANELS, BUTTONS & TYPOGRAPHY === */
.ub-panel {
    background: var(--ub-surface);
    border: 1px solid var(--ub-border);
    border-radius: 20px;
    padding: 15px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.07);
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}

.ub-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.ub-sec-title {
    font-family: var(--ub-font-display);
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--ub-pearl);
    margin: 0;
}
.ub-sec-sub {
    font-size: 12px;
    color: var(--ub-muted);
    margin: 2px 0 0;
}

.ub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 16px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--ub-surface-2);
    color: var(--ub-pearl);
    font-family: var(--ub-font-body);
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.12s ease, filter 0.18s ease, box-shadow 0.18s ease;
    user-select: none;
}
.ub-btn:active:not(:disabled) {
    transform: scale(0.96);
}
.ub-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.ub-btn-gold {
    background: linear-gradient(135deg, #f5b841 0%, #d97706 100%);
    color: #160d02;
    border-color: rgba(255, 236, 179, 0.65);
    box-shadow: 0 6px 20px rgba(245, 184, 65, 0.34);
}
.ub-btn-violet {
    background: linear-gradient(135deg, #9d5cff 0%, #6d28d9 100%);
    color: #ffffff;
    border-color: rgba(216, 180, 254, 0.45);
    box-shadow: 0 6px 20px rgba(157, 92, 255, 0.36);
}
.ub-btn-emerald {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    border-color: rgba(110, 231, 183, 0.45);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.34);
}
.ub-btn-crimson {
    background: linear-gradient(135deg, #e11d48 0%, #9f1239 100%);
    color: #ffffff;
    border-color: rgba(253, 164, 175, 0.45);
    box-shadow: 0 6px 18px rgba(225, 29, 72, 0.35);
}
.ub-btn-sm {
    padding: 7px 11px;
    font-size: 12px;
    border-radius: 10px;
}
.ub-btn-block {
    width: 100%;
}

/* === SOLAR ECLIPSE SUMMON PORTAL (Умбра Крутка) === */
.ub-eclipse-hero {
    background:
        radial-gradient(circle at 50% 42%, rgba(157, 92, 255, 0.28) 0%, rgba(245, 184, 65, 0.14) 34%, rgba(12, 10, 24, 0.96) 72%);
    border: 1px solid rgba(245, 184, 65, 0.3);
    border-radius: 24px;
    padding: 18px 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 14px;
}

.ub-eclipse-orb-wrap {
    width: 146px;
    height: 146px;
    margin: 6px auto 14px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.ub-eclipse-corona {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: conic-gradient(
        from 0deg,
        rgba(245, 184, 65, 0.85),
        rgba(157, 92, 255, 0.9),
        rgba(225, 29, 72, 0.75),
        rgba(56, 189, 248, 0.8),
        rgba(245, 184, 65, 0.85)
    );
    filter: blur(10px);
    animation: ubSpinSlow 9s linear infinite;
}
.ub-eclipse-orb-wrap.ub-summoning .ub-eclipse-corona {
    animation: ubSpinSlow 0.55s linear infinite;
    filter: blur(6px) brightness(1.4);
    transform: scale(1.22);
}

.ub-eclipse-disc {
    position: relative;
    z-index: 2;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    background: radial-gradient(circle at 36% 32%, #1b1530 0%, #05040a 78%);
    border: 2px solid rgba(255, 224, 130, 0.78);
    box-shadow: inset 0 0 24px rgba(157, 92, 255, 0.55), 0 0 26px rgba(245, 184, 65, 0.45);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
.ub-eclipse-orb-wrap:active .ub-eclipse-disc {
    transform: scale(0.92);
}
.ub-eclipse-orb-wrap.ub-summoning .ub-eclipse-disc {
    animation: ubOrbPulse 0.45s ease-in-out infinite alternate;
}

@keyframes ubSpinSlow {
    to { transform: rotate(360deg); }
}
@keyframes ubOrbPulse {
    from { transform: scale(0.92); box-shadow: 0 0 18px rgba(157, 92, 255, 0.7); }
    to { transform: scale(1.08); box-shadow: 0 0 42px rgba(245, 184, 65, 0.95); }
}

/* === QUICK COMMAND BENTO ON OVERVIEW === */
.ub-bento-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.ub-bento-card {
    background: var(--ub-surface);
    border: 1px solid var(--ub-border);
    border-radius: 18px;
    padding: 13px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.15s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 98px;
}
.ub-bento-card:active {
    transform: scale(0.97);
}
.ub-bento-card--wide {
    grid-column: span 2;
}
.ub-bento-card--casino {
    background: linear-gradient(135deg, rgba(225, 29, 72, 0.22) 0%, rgba(157, 92, 255, 0.22) 55%, rgba(20, 17, 36, 0.95) 100%);
    border-color: rgba(244, 63, 94, 0.38);
}
.ub-bento-card--bp {
    background: linear-gradient(135deg, rgba(245, 184, 65, 0.2) 0%, rgba(157, 92, 255, 0.18) 65%, rgba(20, 17, 36, 0.95) 100%);
    border-color: rgba(245, 184, 65, 0.36);
}
.ub-bento-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.ub-bento-emoji {
    font-size: 23px;
}
.ub-bento-tag {
    font-family: var(--ub-font-mono);
    font-size: 10.5px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--ub-gold-bright);
}
.ub-bento-title {
    font-family: var(--ub-font-display);
    font-size: 13px;
    font-weight: 700;
    margin-top: 8px;
    color: #fff;
}
.ub-bento-sub {
    font-size: 11.5px;
    color: var(--ub-muted);
    margin-top: 2px;
}

/* === RARITY CARD SYSTEM (Grid Tiles + 3D Holo Modal) === */
.ub-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}
@media (max-width: 350px) {
    .ub-cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.ub-card-tile {
    aspect-ratio: 0.82;
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6px;
    border: 2px solid rgba(205, 212, 224, 0.55);
    background: radial-gradient(circle at 50% 42%, #3e4450 0%, #1a1d24 100%);
    transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s ease;
    user-select: none;
}
.ub-card-tile:active {
    transform: scale(0.95);
}

/* 7 Authentic Rarity Skins */
.ub-rar-обычная {
    border-color: #cbd5e1;
    background: radial-gradient(circle at 50% 42%, #475569 0%, #181b24 100%);
}
.ub-rar-редкая {
    border-color: #3b82f6;
    background: radial-gradient(circle at 50% 42%, #1d4ed8 0%, #0b1634 100%);
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
}
.ub-rar-мифическая {
    border-color: #ef4444;
    background: radial-gradient(circle at 50% 42%, #991b1b 0%, #2e090e 100%);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.28);
}
.ub-rar-легендарная {
    border-color: #eab308;
    background: radial-gradient(circle at 50% 42%, #a16207 0%, #2e1e05 100%);
    box-shadow: 0 4px 16px rgba(234, 179, 8, 0.32);
}
.ub-rar-секретная {
    border-color: #cbd5e1;
    outline: 1px solid #09090d;
    background: radial-gradient(circle at 50% 42%, #7c8599 0%, #171923 85%, #07080c 100%);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.6);
}
.ub-rar-божественная {
    border-color: #ffffff;
    background: radial-gradient(circle at 50% 40%, #ffffff 0%, #cbd5e1 52%, #64748b 100%);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.42);
}
.ub-rar-le {
    border-color: #fb7185;
    background:
        linear-gradient(125deg, rgba(255, 228, 236, 0.22) 0%, transparent 38%, rgba(255, 228, 236, 0.14) 52%, transparent 68%),
        radial-gradient(circle at 50% 42%, #be123c 0%, #3b0414 100%);
    box-shadow: 0 0 22px rgba(225, 29, 72, 0.52);
}

.ub-card-tile-img {
    position: absolute;
    inset: 14% 8% 22% 8%;
    width: 84%;
    height: 64%;
    object-fit: contain;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55));
    pointer-events: none;
    z-index: 1;
}

.ub-card-badges-top {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3px;
}

.ub-pill-idx {
    font-family: var(--ub-font-mono);
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 6px;
    background: rgba(10, 12, 20, 0.78);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.ub-pill-cnt {
    font-family: var(--ub-font-mono);
    font-size: 9.5px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 6px;
    background: rgba(20, 15, 6, 0.88);
    color: #fde047;
    border: 1px solid rgba(250, 204, 21, 0.65);
}

/* Серийный номер LE на плитке в инвентаре */
.ub-le-serial-chip {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-family: var(--ub-font-mono);
    font-size: 9.5px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 7px;
    background: linear-gradient(135deg, #881337, #e11d48);
    color: #fff1f2;
    border: 1px solid #fecdd3;
    box-shadow: 0 2px 10px rgba(225, 29, 72, 0.65);
    width: fit-content;
    margin-bottom: 2px;
}

.ub-card-tile-foot {
    position: relative;
    z-index: 2;
    background: linear-gradient(180deg, rgba(8, 7, 16, 0.55) 0%, rgba(8, 7, 16, 0.92) 100%);
    backdrop-filter: blur(4px);
    margin: -6px;
    padding: 5px 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.ub-card-tile-name {
    font-size: 10.5px;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}
.ub-card-tile-val {
    font-family: var(--ub-font-mono);
    font-size: 9.5px;
    color: var(--ub-gold-bright);
    margin-top: 1px;
}

/* === 3D HOLOGRAPHIC CARD INSPECTOR MODAL === */
.ub-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(4, 3, 10, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    animation: ubFadeIn 0.2s ease;
}
.ub-modal-backdrop.hidden { display: none !important; }

.ub-modal-sheet {
    width: 100%;
    max-width: 480px;
    max-height: 91vh;
    overflow-y: auto;
    background: linear-gradient(180deg, #171429 0%, #0b0915 100%);
    border-top: 1px solid rgba(245, 184, 65, 0.35);
    border-radius: 26px 26px 0 0;
    padding: 16px 16px 28px;
    box-shadow: 0 -14px 44px rgba(0, 0, 0, 0.72);
    animation: ubSlideUp 0.26s cubic-bezier(0.22, 1, 0.36, 1);
    color: var(--ub-pearl);
    font-family: var(--ub-font-body);
}

@keyframes ubFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ubSlideUp { from { transform: translateY(42px); opacity: 0.4; } to { transform: translateY(0); opacity: 1; } }

.ub-holo-stage {
    perspective: 900px;
    display: flex;
    justify-content: center;
    margin: 8px 0 14px;
}

.ub-holo-card {
    width: 226px;
    height: 256px;
    border-radius: 22px;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
    transition: transform 0.08s ease-out;
    border-width: 3px;
    border-style: solid;
    touch-action: none;
}
.ub-holo-glare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
    background: radial-gradient(
        circle at var(--gx, 50%) var(--gy, 35%),
        rgba(255, 255, 255, 0.38) 0%,
        rgba(255, 255, 255, 0.08) 32%,
        transparent 66%
    );
    mix-blend-mode: overlay;
}
.ub-holo-img {
    position: absolute;
    inset: 12% 10% 16% 10%;
    width: 80%;
    height: 72%;
    object-fit: contain;
    z-index: 2;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.6));
    transform: translateZ(26px);
}
.ub-holo-sig {
    position: absolute;
    right: 12px;
    bottom: 10px;
    z-index: 5;
    font-family: var(--ub-font-script);
    font-size: 24px;
    transform: rotate(-4deg);
    pointer-events: none;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.85);
}
.ub-holo-sig.gold {
    color: #ffd738;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 10px rgba(245, 184, 65, 0.65);
}
.ub-holo-sig.white {
    color: #ffffff;
}
.ub-holo-serial-plaque {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 5;
    font-family: var(--ub-font-mono);
    font-size: 12px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 10px;
    background: linear-gradient(135deg, #6e0c2a, #e11d48);
    color: #fff5fa;
    border: 1.5px solid #ffc8dc;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.7);
}

/* === SEARCH & FILTER CHIPS === */
.ub-search-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border-radius: 13px;
    border: 1px solid var(--ub-border);
    background: rgba(10, 8, 20, 0.72);
    color: var(--ub-pearl);
    font-family: var(--ub-font-body);
    font-size: 13.5px;
    outline: none;
    margin-bottom: 9px;
}
.ub-search-input:focus {
    border-color: var(--ub-violet);
}

.ub-chips-row {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
    margin-bottom: 10px;
}
.ub-chips-row::-webkit-scrollbar { display: none; }
.ub-chip {
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(26, 23, 46, 0.78);
    color: var(--ub-muted);
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
}
.ub-chip.active {
    background: rgba(157, 92, 255, 0.3);
    color: #fff;
    border-color: rgba(157, 92, 255, 0.7);
}

/* === BATTLE PASS DUAL-TRACK TIMELINE === */
.ub-bp-rail {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 8px 4px 14px;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
}
.ub-bp-col {
    flex: 0 0 118px;
    scroll-snap-align: start;
    background: rgba(18, 15, 34, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 18px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    cursor: pointer;
    position: relative;
    transition: transform 0.16s ease, border-color 0.2s ease;
}
.ub-bp-col:active { transform: scale(0.96); }
.ub-bp-col.unlocked {
    border-color: rgba(157, 92, 255, 0.42);
}
.ub-bp-col.claimable {
    border-color: var(--ub-gold);
    box-shadow: 0 0 18px rgba(245, 184, 65, 0.28);
}
.ub-bp-col.milestone {
    background: linear-gradient(180deg, rgba(157, 92, 255, 0.2) 0%, rgba(245, 184, 65, 0.12) 100%);
}
.ub-bp-lv-badge {
    text-align: center;
    font-family: var(--ub-font-mono);
    font-size: 11px;
    font-weight: 800;
    padding: 3px 0;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--ub-muted);
}
.ub-bp-col.unlocked .ub-bp-lv-badge {
    background: linear-gradient(90deg, #9d5cff, #f5b841);
    color: #0b0914;
}
.ub-bp-slot {
    border-radius: 12px;
    padding: 7px 6px;
    text-align: center;
    background: rgba(10, 8, 20, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.07);
    min-height: 78px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}
.ub-bp-slot.vip {
    background: linear-gradient(180deg, rgba(245, 184, 65, 0.12), rgba(14, 11, 26, 0.85));
    border-color: rgba(245, 184, 65, 0.28);
}
.ub-bp-slot img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    margin-bottom: 3px;
}
.ub-bp-slot-lbl {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--ub-pearl);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ub-bp-check {
    position: absolute;
    top: 4px;
    right: 4px;
    font-size: 11px;
}

/* ==========================================================================
   CASINO GAMES — BESPOKE STAGES & ANIMATIONS
   ========================================================================== */

.ub-casino-games-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 12px;
}
.ub-cg-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: 13px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(22, 19, 38, 0.78);
    color: var(--ub-muted);
    font-size: 10.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.16s ease;
}
.ub-cg-tab span:first-child { font-size: 18px; }
.ub-cg-tab.active {
    background: linear-gradient(135deg, rgba(245, 184, 65, 0.28), rgba(225, 29, 72, 0.25));
    color: #fff;
    border-color: rgba(245, 184, 65, 0.6);
    transform: translateY(-1px);
}

/* Bet Control Bar */
.ub-bet-bar {
    background: rgba(11, 9, 22, 0.78);
    border: 1px solid var(--ub-border);
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 12px;
}
.ub-bet-row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.ub-bet-input {
    flex: 1;
    min-width: 0;
    background: rgba(25, 22, 44, 0.9);
    border: 1px solid rgba(245, 184, 65, 0.35);
    border-radius: 11px;
    padding: 8px 10px;
    color: var(--ub-gold-bright);
    font-family: var(--ub-font-mono);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    outline: none;
}
.ub-bet-presets {
    display: flex;
    gap: 5px;
    margin-top: 7px;
    flex-wrap: wrap;
}
.ub-bet-pill {
    flex: 1;
    min-width: 44px;
    padding: 5px 6px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(32, 28, 54, 0.85);
    color: #e2e8f0;
    font-family: var(--ub-font-mono);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.ub-bet-pill:active { transform: scale(0.94); }

/* 1. UPGRADER — Arcane Solar Reactor Ring */
.ub-upg-stage {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin: 10px 0 14px;
    position: relative;
}
.ub-upg-conduit {
    height: 3px;
    flex: 0 0 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(157, 92, 255, 0.25), rgba(245, 184, 65, 0.85), rgba(16, 185, 129, 0.35));
    background-size: 200% 100%;
    animation: ubConduitFlow 1.8s linear infinite;
    box-shadow: 0 0 8px rgba(245, 184, 65, 0.35);
}
.ub-upg-stage.charging .ub-upg-conduit {
    animation-duration: 0.35s;
    box-shadow: 0 0 16px rgba(245, 184, 65, 0.95);
    filter: brightness(1.35);
}
@keyframes ubConduitFlow {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
.ub-upg-slot {
    flex: 1;
    min-width: 0;
    aspect-ratio: 0.84;
    max-width: 108px;
    border-radius: 16px;
    border: 2px dashed rgba(255, 255, 255, 0.18);
    background: rgba(12, 10, 24, 0.82);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 6px;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, filter 0.25s ease, box-shadow 0.25s ease;
}
.ub-upg-slot.filled { border-style: solid; }
.ub-upg-slot.ub-burn {
    animation: ubCardBurn 0.82s ease forwards;
}
.ub-upg-slot.ub-ascend {
    animation: ubCardAscend 0.82s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes ubCardBurn {
    0% { filter: brightness(1); transform: scale(1); }
    30% { filter: sepia(1) hue-rotate(-40deg) saturate(5) brightness(1.55); transform: scale(1.06) rotate(-4deg); box-shadow: 0 0 28px #e11d48; }
    65% { filter: sepia(0.8) hue-rotate(-20deg) brightness(0.6) contrast(1.5); transform: scale(0.94) rotate(2deg); }
    100% { filter: grayscale(1) brightness(0.32) contrast(1.4); transform: scale(0.88); opacity: 0.5; }
}
@keyframes ubCardAscend {
    0% { transform: scale(0.55) rotateY(95deg); filter: brightness(2.4); }
    60% { transform: scale(1.12) rotateY(0deg); filter: brightness(1.35); box-shadow: 0 0 36px #f5b841, 0 0 18px #10b981; }
    100% { transform: scale(1) rotateY(0deg); filter: brightness(1); }
}

.ub-upg-dial-wrap {
    width: 138px;
    height: 138px;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: box-shadow 0.18s ease;
}
.ub-upg-dial-wrap.in-win {
    box-shadow: 0 0 28px rgba(16, 185, 129, 0.55), inset 0 0 18px rgba(16, 185, 129, 0.28);
}
.ub-upg-dial-wrap.in-fail {
    box-shadow: 0 0 28px rgba(225, 29, 72, 0.52), inset 0 0 18px rgba(225, 29, 72, 0.24);
}
.ub-upg-runes-ring {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1.5px dashed rgba(245, 184, 65, 0.32);
    animation: ubSpinSlow 16s linear infinite;
    pointer-events: none;
}
.ub-upg-stage.charging .ub-upg-runes-ring {
    animation-duration: 1.8s;
    border-color: rgba(255, 224, 130, 0.75);
}
.ub-upg-pointer-rotor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transform: rotate(0deg);
    will-change: transform;
}
.ub-upg-needle {
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 16px solid #ffe082;
    filter: drop-shadow(0 0 8px #f5b841) drop-shadow(0 0 14px #ffffff);
}

/* Floating FX Particles (shared across Upgrader, Mines, Minecraft, Football, Forge) */
.ub-fx-particle {
    position: absolute;
    pointer-events: none;
    z-index: 20;
    will-change: transform, opacity;
    animation: ubFxBurst var(--dur, 0.7s) cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes ubFxBurst {
    0% { opacity: 1; transform: translate(0, 0) scale(0.6) rotate(0deg); }
    75% { opacity: 0.9; }
    100% { opacity: 0; transform: translate(var(--tx, 0px), var(--ty, -40px)) scale(var(--sc, 1.1)) rotate(var(--rot, 140deg)); }
}

/* 2. CASES — Triple Horizontal Loot Reel */
.ub-reel-viewport {
    position: relative;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(245, 184, 65, 0.35);
    background: radial-gradient(circle at 50% 50%, #161229 0%, #080610 100%);
    height: 88px;
    margin-bottom: 8px;
    box-shadow: inset 0 0 18px rgba(0, 0, 0, 0.75);
}
.ub-reel-viewport::before,
.ub-reel-viewport::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 34px;
    z-index: 5;
    pointer-events: none;
}
.ub-reel-viewport::before {
    left: 0;
    background: linear-gradient(90deg, #080610 0%, transparent 100%);
}
.ub-reel-viewport::after {
    right: 0;
    background: linear-gradient(270deg, #080610 0%, transparent 100%);
}
.ub-reel-Viewport-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    transform: translateX(-50%);
    background: linear-gradient(180deg, #ffe082, #e11d48, #ffe082);
    box-shadow: 0 0 12px #f5b841;
    z-index: 6;
    pointer-events: none;
    transition: box-shadow 0.08s ease, width 0.08s ease;
}
.ub-reel-Viewport-line.tick-flash {
    width: 4px;
    box-shadow: 0 0 22px #ffffff, 0 0 30px #f5b841;
}
.ub-reel-strip {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 100%;
    padding: 0 8px;
    will-change: transform;
}
.ub-reel-item {
    flex: 0 0 72px;
    height: 72px;
    border-radius: 11px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-width: 2px;
    border-style: solid;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease, box-shadow 0.28s ease;
}
.ub-reel-item img {
    width: 82%;
    height: 82%;
    object-fit: contain;
}
.ub-reel-item.ub-reel-winner {
    transform: scale(1.1);
    z-index: 4;
    box-shadow: 0 0 22px rgba(245, 184, 65, 0.9), inset 0 0 12px rgba(255, 255, 255, 0.35);
    border-color: #ffe082 !important;
}
.ub-reel-item.ub-reel-dim {
    opacity: 0.42;
    transform: scale(0.94);
}

.ub-chest-shake {
    display: inline-block;
    font-size: 56px;
    filter: drop-shadow(0 0 20px rgba(245, 184, 65, 0.55));
    animation: ubChestRattle 0.52s ease-in-out infinite;
}
@keyframes ubChestRattle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    20% { transform: rotate(-10deg) scale(1.1); }
    40% { transform: rotate(10deg) scale(1.15); }
    60% { transform: rotate(-8deg) scale(1.12); }
    80% { transform: rotate(8deg) scale(1.07); }
}

/* 3. MINES 5x5 — Tactile 3D Vault Grid & Radar Sweep */
.ub-mines-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 7px;
    max-width: 332px;
    margin: 10px auto;
    perspective: 700px;
    position: relative;
    padding: 4px;
    border-radius: 16px;
}
.ub-mines-grid.active-scan::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(180deg, transparent 0%, rgba(56, 189, 248, 0.09) 48%, rgba(16, 185, 129, 0.18) 50%, transparent 54%);
    background-size: 100% 220%;
    animation: ubMinesRadarSweep 3.4s linear infinite;
    pointer-events: none;
    z-index: 3;
}
@keyframes ubMinesRadarSweep {
    0% { background-position: 0% 120%; }
    100% { background-position: 0% -120%; }
}
.ub-mine-cell {
    aspect-ratio: 1;
    border-radius: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.13);
    background: linear-gradient(145deg, #252042 0%, #141126 100%);
    box-shadow: 0 4px 0 #0b0916, inset 0 1px 0 rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    cursor: pointer;
    position: relative;
    transition: transform 0.14s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    user-select: none;
}
.ub-mine-cell:hover:not(:disabled) {
    border-color: rgba(245, 184, 65, 0.45);
}
.ub-mine-cell:active:not(:disabled) {
    transform: translateY(2px) scale(0.94);
}
.ub-mine-cell.scanning {
    animation: ubRadarPulse 0.3s ease infinite alternate;
    border-color: var(--ub-cyan);
}
@keyframes ubRadarPulse {
    from { box-shadow: 0 0 4px rgba(56, 189, 248, 0.4); }
    to { box-shadow: 0 0 20px rgba(56, 189, 248, 0.98); transform: scale(0.95); }
}
.ub-mine-cell.safe {
    background: radial-gradient(circle at 50% 40%, rgba(16, 185, 129, 0.46), rgba(6, 78, 59, 0.88));
    border-color: #34d399;
    box-shadow: 0 0 16px rgba(16, 185, 129, 0.45), inset 0 0 10px rgba(167, 243, 208, 0.25);
}
.ub-mine-cell.safe.just-opened {
    animation: ubFlipPop 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.ub-mine-cell.boom {
    background: radial-gradient(circle at 50% 45%, #fde047 0%, #fb7185 35%, #be123c 68%, #4c0519 100%);
    border-color: #fda4af;
    box-shadow: 0 0 30px rgba(225, 29, 72, 0.95);
    animation: ubBoomCell 0.52s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 4;
}
.ub-mine-cell.mine-dim {
    background: rgba(127, 29, 29, 0.38);
    border-color: rgba(248, 113, 113, 0.4);
    opacity: 0.78;
    animation: ubFlipPop 0.32s ease;
}
.ub-mine-shockwave {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid #fb7185;
    box-shadow: 0 0 20px #e11d48;
    transform: translate(-50%, -50%) scale(0.3);
    pointer-events: none;
    z-index: 10;
    animation: ubShockwaveExpand 0.62s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes ubShockwaveExpand {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(0.3); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(9.5); }
}
.ub-mine-float-mult {
    position: absolute;
    z-index: 15;
    pointer-events: none;
    font-family: var(--ub-font-mono);
    font-size: 12px;
    font-weight: 800;
    color: #ecfdf5;
    background: rgba(5, 150, 105, 0.92);
    border: 1px solid #6ee7b7;
    padding: 2px 7px;
    border-radius: 999px;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.55);
    transform: translate(-50%, -50%);
    animation: ubMineMultRise 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes ubMineMultRise {
    0% { opacity: 0; transform: translate(-50%, -20%) scale(0.7); }
    22% { opacity: 1; transform: translate(-50%, -65%) scale(1.08); }
    100% { opacity: 0; transform: translate(-50%, -155%) scale(0.96); }
}
@keyframes ubFlipPop {
    0% { transform: rotateY(95deg) scale(0.72); filter: brightness(1.8); }
    68% { transform: rotateY(0deg) scale(1.13); filter: brightness(1.2); }
    100% { transform: rotateY(0deg) scale(1); filter: brightness(1); }
}
@keyframes ubBoomCell {
    0% { transform: scale(0.5); }
    35% { transform: scale(1.3) rotate(-7deg); }
    70% { transform: scale(0.93) rotate(5deg); }
    100% { transform: scale(1) rotate(0); }
}

.ub-shake {
    animation: ubScreenShake 0.45s ease;
}
@keyframes ubScreenShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-8px) translateY(3px); }
    40% { transform: translateX(8px) translateY(-3px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(5px); }
}

/* 4. CRASH — Orbital Rocket Telemetry Canvas */
.ub-crash-box {
    position: relative;
    width: 100%;
    height: 228px;
    border-radius: 18px;
    overflow: hidden;
    border: 1px solid rgba(157, 92, 255, 0.34);
    background: radial-gradient(circle at 20% 85%, #191236 0%, #06050d 80%);
    margin-bottom: 10px;
    box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.65);
}
.ub-crash-canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.ub-crash-hud {
    position: absolute;
    top: 14px;
    left: 16px;
    pointer-events: none;
    z-index: 3;
}
.ub-crash-mult {
    font-family: var(--ub-font-display);
    font-size: 33px;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 0 22px rgba(157, 92, 255, 0.75);
    transition: color 0.2s ease;
}
.ub-crash-mult.won { color: #34d399; text-shadow: 0 0 24px rgba(16, 185, 129, 0.85); }
.ub-crash-mult.boom { color: #fb7185; text-shadow: 0 0 24px rgba(225, 29, 72, 0.9); }

/* 5. MINECRAFT — Voxel Mine Shaft, Torch Glow, Rails & Swinging Pickaxe */
.ub-mc-shaft {
    border-radius: 18px;
    padding: 16px;
    position: relative;
    overflow: hidden;
    min-height: 204px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.14);
    margin-bottom: 10px;
    transition: background 0.3s ease;
}
.ub-mc-shaft::before {
    content: '🕯️';
    position: absolute;
    top: 10px;
    left: 12px;
    font-size: 18px;
    filter: drop-shadow(0 0 12px #f59e0b) drop-shadow(0 0 22px #facc15);
    animation: ubTorchFlicker 1.9s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 2;
}
@keyframes ubTorchFlicker {
    0% { opacity: 0.82; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1.06); filter: drop-shadow(0 0 18px #fbbf24); }
}
.ub-mc-depth-badge {
    position: absolute;
    top: 10px;
    right: 12px;
    z-index: 2;
    font-family: var(--ub-font-mono);
    font-size: 10.5px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 8px;
    background: rgba(6, 5, 14, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
}
.ub-mc-theme-s {
    background: radial-gradient(circle at 50% 35%, #3b4b63 0%, #1e293b 65%, #0f172a 100%);
}
.ub-mc-theme-d {
    background: radial-gradient(circle at 50% 35%, #2d2d44 0%, #141421 70%, #090910 100%);
}
.ub-mc-theme-n {
    background: radial-gradient(circle at 50% 35%, #7c1820 0%, #38090d 68%, #180305 100%);
}

.ub-mc-block-wrap {
    position: relative;
    width: 108px;
    height: 108px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}
.ub-mc-voxel {
    width: 90px;
    height: 90px;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.16) 0%, transparent 45%, rgba(0,0,0,0.42) 100%),
        repeating-conic-gradient(rgba(255,255,255,0.05) 0% 25%, transparent 0% 50%) 50% / 22px 22px,
        #3f3f52;
    border: 3px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.58), inset 0 3px 0 rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    position: relative;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.2s ease;
}
.ub-mc-voxel:active { transform: scale(0.95); }
.ub-mc-theme-n .ub-mc-voxel { background-color: #691b22; border-color: rgba(251, 113, 133, 0.38); }
.ub-mc-voxel.cracking {
    animation: ubVoxelHit 0.17s ease 3;
}
.ub-mc-voxel.ore-pop {
    animation: ubOreFound 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes ubVoxelHit {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(0.88) rotate(-5deg); filter: brightness(1.55); }
}
@keyframes ubOreFound {
    0% { transform: scale(0.72); filter: brightness(2); }
    60% { transform: scale(1.12); box-shadow: 0 0 28px rgba(52, 211, 153, 0.65); }
    100% { transform: scale(1); }
}
.ub-mc-pickaxe {
    position: absolute;
    top: -14px;
    right: -24px;
    font-size: 38px;
    transform-origin: 80% 85%;
    pointer-events: none;
    opacity: 0;
    z-index: 5;
}
.ub-mc-pickaxe.swinging {
    opacity: 1;
    animation: ubPickSwing 0.18s ease-in-out 3;
}
@keyframes ubPickSwing {
    0% { transform: rotate(30deg); }
    60% { transform: rotate(-52deg) scale(1.12); }
    100% { transform: rotate(10deg); }
}
.ub-mc-lava-wave {
    position: absolute;
    inset: auto 0 0 0;
    height: 0%;
    background:
        radial-gradient(circle at 30% 20%, #fef08a 0%, transparent 25%),
        radial-gradient(circle at 72% 30%, #fde047 0%, transparent 28%),
        linear-gradient(180deg, #facc15 0%, #f97316 26%, #dc2626 75%, #7f1d1d 100%);
    opacity: 0.92;
    transition: height 0.5s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
    z-index: 4;
}
.ub-mc-lava-wave.flood {
    height: 100%;
    animation: ubLavaBoil 1.2s ease-in-out infinite alternate;
}
@keyframes ubLavaBoil {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.22) saturate(1.2); }
}
.ub-mc-rails {
    display: flex;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 8px 10px;
    border-radius: 12px;
    background:
        repeating-linear-gradient(90deg, rgba(180, 120, 60, 0.25) 0 6px, transparent 6px 18px),
        linear-gradient(180deg, rgba(16, 14, 28, 0.85), rgba(10, 8, 20, 0.95));
    border-bottom: 2px solid rgba(148, 163, 184, 0.38);
    margin-bottom: 10px;
}
.ub-mc-cart {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 9px;
    background: rgba(245, 184, 65, 0.16);
    border: 1px solid rgba(245, 184, 65, 0.45);
    animation: ubCartRoll 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes ubCartRoll {
    0% { transform: translateX(-14px) rotate(-5deg); }
    65% { transform: translateX(3px) rotate(3deg); }
    100% { transform: translateX(0) rotate(0); }
}

/* 6. DICE — True 3D CSS Preserve-3D Cube with Parabolic Air-Toss & Shadow */
.ub-dice-arena {
    height: 188px;
    border-radius: 18px;
    background:
        radial-gradient(circle at 50% 56%, rgba(16, 185, 129, 0.14) 0%, transparent 52%),
        radial-gradient(circle at 50% 52%, #241942 0%, #0d0a1a 84%);
    border: 1px solid rgba(157, 92, 255, 0.32);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    perspective: 780px;
    margin-bottom: 10px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.ub-dice-arena.won {
    border-color: rgba(52, 211, 153, 0.7);
    box-shadow: inset 0 0 26px rgba(16, 185, 129, 0.22);
}
.ub-dice-arena.lost {
    border-color: rgba(251, 113, 133, 0.65);
    box-shadow: inset 0 0 26px rgba(225, 29, 72, 0.2);
}
.ub-dice-toss-wrap {
    position: relative;
    z-index: 3;
    transform-style: preserve-3d;
}
.ub-dice-toss-wrap.tossing {
    animation: ubDiceParabolicArc 1.26s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes ubDiceParabolicArc {
    0% { transform: translateY(0) scale(1); }
    38% { transform: translateY(-34px) scale(1.34); }
    78% { transform: translateY(4px) scale(0.95); }
    90% { transform: translateY(-6px) scale(1.04); }
    100% { transform: translateY(0) scale(1); }
}
.ub-dice-shadow {
    width: 68px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.72) 0%, transparent 72%);
    margin-top: 10px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.ub-dice-shadow.tossing {
    animation: ubDiceShadowArc 1.26s cubic-bezier(0.22, 0.61, 0.36, 1);
}
@keyframes ubDiceShadowArc {
    0%, 100% { transform: scale(1); opacity: 0.8; filter: blur(2px); }
    38% { transform: scale(0.48); opacity: 0.32; filter: blur(6px); }
    78% { transform: scale(1.15); opacity: 0.95; filter: blur(1px); }
}
.ub-dice-impact-ring {
    position: absolute;
    top: 52%;
    left: 50%;
    width: 30px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #ffe082;
    transform: translate(-50%, -50%) scale(0.4);
    pointer-events: none;
    animation: ubDiceRingOut 0.55s ease-out forwards;
}
@keyframes ubDiceRingOut {
    0% { opacity: 0.95; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(4.2); }
}
.ub-dice-cube {
    width: 74px;
    height: 74px;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateX(-22deg) rotateY(28deg);
    transition: transform 1.26s cubic-bezier(0.16, 0.88, 0.28, 1.08);
    will-change: transform;
}
.ub-dice-face {
    position: absolute;
    width: 74px;
    height: 74px;
    border-radius: 14px;
    background: linear-gradient(145deg, #ffffff 0%, #e2e8f0 100%);
    border: 2px solid #cbd5e1;
    box-shadow: inset 0 0 12px rgba(15, 23, 42, 0.16);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    padding: 9px;
    box-sizing: border-box;
    backface-visibility: hidden;
}
.ub-pip {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #1e1b4b;
    align-self: center;
    justify-self: center;
    box-shadow: inset 0 2px 3px rgba(0,0,0,0.5);
}
.ub-pip.red { background: #e11d48; box-shadow: 0 0 6px rgba(225, 29, 72, 0.45), inset 0 2px 3px rgba(0,0,0,0.35); }
.ub-face-1 { transform: rotateY(0deg) translateZ(37px); }
.ub-face-2 { transform: rotateY(90deg) translateZ(37px); }
.ub-face-3 { transform: rotateX(90deg) translateZ(37px); }
.ub-face-4 { transform: rotateX(-90deg) translateZ(37px); }
.ub-face-5 { transform: rotateY(-90deg) translateZ(37px); }
.ub-face-6 { transform: rotateY(180deg) translateZ(37px); }

/* 7. FOOTBALL — Penalty Shootout Stadium & Floodlights */
.ub-fb-pitch {
    position: relative;
    height: 204px;
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at 22% 0%, rgba(186, 230, 253, 0.28) 0%, transparent 44%),
        radial-gradient(circle at 78% 0%, rgba(186, 230, 253, 0.28) 0%, transparent 44%),
        repeating-linear-gradient(180deg, transparent 0 118px, rgba(16, 185, 129, 0.08) 118px 134px, transparent 134px 150px),
        linear-gradient(180deg, #090f24 0%, #0f291e 55%, #065f46 60%, #047857 100%);
    border: 1px solid rgba(52, 211, 153, 0.38);
    margin-bottom: 10px;
}
.ub-fb-pitch::after {
    content: '';
    position: absolute;
    bottom: 24px;
    left: 50%;
    width: 8px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.65);
    transform: translateX(-50%);
    pointer-events: none;
}
.ub-fb-spotlight {
    position: absolute;
    top: -20px;
    width: 90px;
    height: 150px;
    background: linear-gradient(180deg, rgba(224, 242, 254, 0.22) 0%, transparent 100%);
    pointer-events: none;
    transform-origin: top center;
    animation: ubSpotlightSweep 5s ease-in-out infinite alternate;
}
.ub-fb-spotlight.left { left: 10%; transform: rotate(-18deg); }
.ub-fb-spotlight.right { right: 10%; transform: rotate(18deg); animation-direction: alternate-reverse; }
@keyframes ubSpotlightSweep {
    from { opacity: 0.55; }
    to { opacity: 0.95; }
}
.ub-fb-goal {
    position: absolute;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    width: 182px;
    height: 78px;
    border: 4px solid #f8fafc;
    border-bottom: none;
    border-radius: 5px 5px 0 0;
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.13) 0 2px, transparent 2px 10px),
        repeating-linear-gradient(-45deg, rgba(255,255,255,0.13) 0 2px, transparent 2px 10px);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.26);
}
.ub-fb-goal.net-ripple {
    animation: ubNetRipple 0.5s ease;
}
.ub-fb-goal.post-clank {
    animation: ubPostClank 0.42s ease;
}
@keyframes ubNetRipple {
    0%, 100% { transform: translateX(-50%) scale(1); }
    40% { transform: translateX(-50%) scaleX(1.06) scaleY(1.08); border-color: #fde047; box-shadow: 0 0 32px rgba(250, 204, 21, 0.75); }
}
@keyframes ubPostClank {
    0%, 100% { transform: translateX(-50%); }
    25% { transform: translateX(calc(-50% - 5px)); border-color: #fb7185; }
    50% { transform: translateX(calc(-50% + 5px)); border-color: #fde047; }
    75% { transform: translateX(calc(-50% - 3px)); }
}
.ub-fb-keeper {
    position: absolute;
    top: 52px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 33px;
    transition: all 0.44s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 2;
}
.ub-fb-keeper.idle-sway {
    animation: ubKeeperSway 1.3s ease-in-out infinite alternate;
}
@keyframes ubKeeperSway {
    from { transform: translateX(calc(-50% - 9px)) rotate(-4deg); }
    to { transform: translateX(calc(-50% + 9px)) rotate(4deg); }
}
.ub-fb-ball {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%) scale(1);
    font-size: 28px;
    z-index: 3;
    transition: all 0.54s cubic-bezier(0.2, 0.85, 0.32, 1.08);
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.6));
}
.ub-fb-ball.screamer {
    filter: drop-shadow(0 0 14px #f5b841) drop-shadow(0 0 24px #ef4444);
}
.ub-fb-trail-dot {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.85) 0%, rgba(245, 184, 65, 0.45) 60%, transparent 100%);
    transform: translate(-50%, 50%);
    pointer-events: none;
    z-index: 2;
    animation: ubTrailFade 0.48s ease-out forwards;
}
@keyframes ubTrailFade {
    0% { opacity: 0.9; transform: translate(-50%, 50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, 50%) scale(0.2); }
}
.ub-fb-flashbulb {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 0 12px 4px rgba(255, 255, 255, 0.9);
    pointer-events: none;
    animation: ubFlashPop 0.36s ease-out forwards;
}
@keyframes ubFlashPop {
    0% { opacity: 0; transform: scale(0.3); }
    40% { opacity: 1; transform: scale(1.6); }
    100% { opacity: 0; transform: scale(0.2); }
}

/* 8. FORGE / CRAFT — Molten Crucible & Anvil Strike */
.ub-forge-crucible {
    background: radial-gradient(circle at 50% 50%, rgba(249, 115, 22, 0.28) 0%, rgba(157, 92, 255, 0.18) 45%, rgba(12, 10, 24, 0.95) 80%);
    border: 1px solid rgba(249, 115, 22, 0.4);
    border-radius: 20px;
    padding: 14px;
    margin-bottom: 12px;
    position: relative;
    overflow: hidden;
}
.ub-forge-slots {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin: 10px 0;
    position: relative;
    z-index: 2;
}
.ub-forge-slot {
    aspect-ratio: 0.84;
    border-radius: 11px;
    border: 1.5px dashed rgba(255, 255, 255, 0.2);
    background: rgba(9, 7, 18, 0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.2s ease;
}
.ub-forge-slot:active { transform: scale(0.94); }
.ub-forge-slot img {
    width: 85%;
    height: 85%;
    object-fit: contain;
}
.ub-forge-crucible.forging {
    box-shadow: 0 0 36px rgba(249, 115, 22, 0.65), inset 0 0 30px rgba(245, 184, 65, 0.35);
}
.ub-forge-crucible.forging .ub-forge-slot {
    animation: ubImplodeSlot 0.68s cubic-bezier(0.55, 0.05, 0.67, 0.19) forwards;
}
@keyframes ubImplodeSlot {
    0% { transform: scale(1); filter: brightness(1); }
    55% { transform: scale(0.76) translateY(-10px); filter: sepia(0.8) saturate(3) brightness(2.2); }
    100% { transform: scale(0.08); opacity: 0; }
}
.ub-forge-hammer-fx {
    position: absolute;
    top: 46%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 44px;
    z-index: 10;
    pointer-events: none;
    animation: ubHammerSlam 0.68s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes ubHammerSlam {
    0% { opacity: 0; transform: translate(-50%, -95%) rotate(38deg) scale(0.7); }
    45% { opacity: 1; transform: translate(-50%, -50%) rotate(-18deg) scale(1.28); filter: drop-shadow(0 0 20px #f5b841); }
    100% { opacity: 0; transform: translate(-50%, -45%) rotate(-8deg) scale(1.05); }
}

/* === P2P TRADE TABLE & PREMIUM GROUP CHATS === */
.ub-trade-vs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 10px 0;
}
.ub-trade-side {
    background: rgba(10, 8, 20, 0.78);
    border: 1.5px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.ub-trade-side.ready {
    border-color: #34d399;
    box-shadow: 0 0 18px rgba(16, 185, 129, 0.24), inset 0 0 12px rgba(16, 185, 129, 0.08);
}
.ub-narrator-orb {
    width: 96px;
    height: 96px;
    margin: 6px auto 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 30%, #4c1d95 0%, #1e1b4b 58%, #090714 100%);
    border: 2px solid #f5b841;
    box-shadow: 0 0 28px rgba(157, 92, 255, 0.65), inset 0 0 18px rgba(245, 184, 65, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    animation: ubOrbPulse 0.6s ease-in-out infinite alternate;
}

/* === PROGRESS BARS & BUSINESSES === */
.ub-prog-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    overflow: hidden;
}
.ub-prog-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #9d5cff, #f5b841);
    transition: width 0.35s ease;
}

.ub-gpu-fan {
    display: inline-block;
    animation: ubSpinSlow 1.6s linear infinite;
}

.ub-flight-sky {
    position: relative;
    height: 138px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 10px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background-size: cover;
    background-position: center;
}
.ub-flight-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(6, 10, 24, 0.45) 0%, rgba(6, 10, 24, 0.88) 100%);
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.ub-plane-flyer {
    position: absolute;
    left: 12%;
    bottom: 24%;
    font-size: 28px;
    transition: all 0.95s cubic-bezier(0.22, 1, 0.36, 1);
    pointer-events: none;
}
.ub-plane-flyer.launching {
    left: 86%;
    bottom: 76%;
    transform: scale(1.25) rotate(-14deg);
}

/* Center Featured Umbra Tab Button in Bottom Bar */
.tab-item--umbra .tab-icon svg {
    stroke: #f5b841;
    filter: drop-shadow(0 0 6px rgba(157, 92, 255, 0.65));
}
.tab-item--umbra.active .tab-label {
    color: #ffe082 !important;
}

@media (prefers-reduced-motion: reduce) {
    .ub-eclipse-corona,
    .ub-gpu-fan,
    .ub-status-premium_plus {
        animation: none !important;
    }
}

/* ===== MINECRAFT: пиксельные блоки, трещины, обломки ===== */
.ub-mc-voxel {
    background-color: #555;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    border-radius: 4px;
    border: 3px solid rgba(0, 0, 0, 0.55);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.6), inset 0 0 0 2px rgba(255, 255, 255, 0.1);
    font-size: 0;
    overflow: hidden;
    animation: none;
}
.ub-mc-theme-n .ub-mc-voxel { background-color: #781c22; border-color: rgba(0, 0, 0, 0.55); }
.ub-mc-voxel.ore-pop, .ub-mc-voxel.cracking { animation: none; }
.ub-mc-crack {
    position: absolute;
    inset: 0;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    image-rendering: pixelated;
    pointer-events: none;
}
.ub-mc-pickaxe { transition: opacity 0.1s; }
.ub-mc-pickaxe.swinging { animation: none; }
.ub-mc-ico {
    width: 22px;
    height: 22px;
    image-rendering: pixelated;
    vertical-align: middle;
    border-radius: 3px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
    flex-shrink: 0;
}
.ub-mc-found { position: relative; z-index: 6; min-height: 26px; margin-top: 6px; }
.ub-mc-found-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 11px;
    border-radius: 10px;
    background: rgba(6, 5, 14, 0.82);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    font-weight: 800;
    font-size: 13px;
    animation: ubOreFound 0.44s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Горизонтальные ленты: прокрутка мышью/тачпадом на ПК */
.ub-subnav, .ub-mc-rails { cursor: grab; overscroll-behavior-x: contain; }
.ub-subnav.ub-dragging, .ub-mc-rails.ub-dragging { cursor: grabbing; user-select: none; }
.ub-subnav.ub-dragging *, .ub-mc-rails.ub-dragging * { pointer-events: none; }
.ub-nav-pill { flex-shrink: 0; white-space: nowrap; }
