.mp-games {
    --mp-bg: #070b16;
    --mp-accent: #ffcb03;
    --mp-blue: #4d74ff;
    background:
        radial-gradient(ellipse 80% 60% at 50% -10%, rgba(77, 116, 255, 0.22), transparent 55%),
        radial-gradient(ellipse 50% 40% at 85% 80%, rgba(255, 203, 3, 0.06), transparent 50%),
        var(--mp-bg);
    /* Clear the floating sticky header (same idea as homepage hero) */
    padding: 108px 0 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.mp-games__bar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.mp-games__bar--solo {
    justify-content: flex-end;
    margin-bottom: 4px;
}

.mp-games__label {
    margin: 0 0 2px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.45);
}

.mp-games__title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    line-height: 1.4;
}

.mp-games__search {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: min(280px, 100%);
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.mp-games__bar--solo .mp-games__search {
    width: min(320px, 100%);
}

.mp-games__search:focus-within {
    border-color: rgba(77, 116, 255, 0.75);
    background: rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 0 3px rgba(77, 116, 255, 0.15);
}

.mp-games__search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 13px;
    color: #fff;
}

.mp-games__search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* —— Coverflow —— */
.mp-cover {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.mp-cover__stage {
    position: relative;
    height: 220px;
    perspective: 1100px;
    perspective-origin: 50% 45%;
    touch-action: pan-y;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
}

.mp-cover__stage.is-dragging {
    cursor: grabbing;
}

.mp-cover__fade {
    position: absolute;
    top: 0;
    bottom: 0;
    width: min(18%, 140px);
    z-index: 5;
    pointer-events: none;
}

.mp-cover__fade--start {
    right: 0;
    background: linear-gradient(270deg, var(--mp-bg) 8%, transparent 100%);
}

.mp-cover__fade--end {
    left: 0;
    background: linear-gradient(90deg, var(--mp-bg) 8%, transparent 100%);
}

.mp-cover__track {
    position: absolute;
    inset: 0;
    transform-style: preserve-3d;
}

.mp-cover__track.is-empty {
    opacity: 0.25;
    pointer-events: none;
}

.mp-cover__nav {
    appearance: none;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    z-index: 6;
}

.mp-cover__nav:hover {
    background: rgba(77, 116, 255, 0.28);
    border-color: rgba(77, 116, 255, 0.7);
    box-shadow: 0 0 24px rgba(77, 116, 255, 0.25);
    transform: scale(1.05);
}

.mp-cover__nav:active {
    transform: scale(0.96);
}

.mp-cover__dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    margin-top: 14px;
    min-height: 12px;
}

.mp-cover__dot {
    appearance: none;
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.28);
    cursor: pointer;
    transition: width 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.mp-cover__dot.is-active {
    width: 22px;
    background: var(--mp-accent);
    box-shadow: 0 0 12px rgba(255, 203, 3, 0.45);
}

.mp-tile {
    position: absolute;
    top: 50%;
    left: 50%;
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    border-radius: 14px;
    text-decoration: none;
    color: #fff;
    background: #121a2e;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.08),
        0 18px 40px rgba(0, 0, 0, 0.45);
    transform-origin: center center;
    transform-style: preserve-3d;
    will-change: transform, opacity, filter;
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease,
        filter 0.35s ease,
        box-shadow 0.35s ease;
    backface-visibility: hidden;
}

.mp-cover__stage.is-dragging .mp-tile {
    transition: none;
}

.mp-tile img,
.mp-tile__fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.55s ease;
}

.mp-tile__fallback {
    background: linear-gradient(145deg, #0d4383, #395dc8 55%, #1b2a4a);
}

.mp-tile__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 12, 24, 0.08) 28%, rgba(8, 12, 24, 0.92) 100%);
    pointer-events: none;
}

.mp-tile__glow {
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    background: linear-gradient(135deg, rgba(255, 203, 3, 0.35), transparent 45%, rgba(77, 116, 255, 0.35));
    mix-blend-mode: screen;
    transition: opacity 0.35s ease;
}

.mp-tile__body {
    position: absolute;
    right: 12px;
    left: 12px;
    bottom: 11px;
    z-index: 1;
    display: grid;
    gap: 2px;
}

.mp-tile__body strong {
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.mp-tile__body em {
    font-style: normal;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.72);
}

.mp-tile.is-center {
    box-shadow:
        0 0 0 2px var(--mp-accent),
        0 0 36px rgba(255, 203, 3, 0.28),
        0 28px 50px rgba(0, 0, 0, 0.55);
}

.mp-tile.is-center .mp-tile__glow {
    opacity: 0.85;
}

.mp-tile.is-center img,
.mp-tile.is-center .mp-tile__fallback {
    transform: scale(1.06);
}

.mp-tile.is-center .mp-tile__body strong {
    font-size: 14px;
}

.mp-tile.is-active:not(.is-center) {
    box-shadow: 0 0 0 1px rgba(255, 203, 3, 0.35), 0 18px 40px rgba(0, 0, 0, 0.45);
}

.mp-tile[hidden] {
    display: none !important;
}

.mp-games__empty {
    margin: 10px 0 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.55);
    text-align: center;
}

[data-mp-shell] {
    display: contents;
}

.marketplace.is-loading [data-mp-page-container] {
    position: relative;
    min-height: 180px;
    opacity: 0.45;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.marketplace.is-loading [data-mp-page-container]::after {
    content: '';
    position: absolute;
    top: 28px;
    left: 50%;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    border: 2px solid rgba(77, 116, 255, 0.25);
    border-top-color: #4d74ff;
    border-radius: 50%;
    animation: mp-shell-spin 0.7s linear infinite;
    z-index: 2;
}

@keyframes mp-shell-spin {
    to { transform: rotate(360deg); }
}

.marketplace:not(.marketplace--empty) .page-container {
    padding-top: 36px;
    padding-bottom: 72px;
}

.marketplace--pick .page-container {
    padding-top: 12px;
    padding-bottom: 48px;
}

.mp-pick-hint {
    text-align: center;
    color: #6B7280;
    font-size: 14px;
}

.mp-pick-hint p,
.mp-no-accounts p {
    margin: 0;
}

.mp-no-accounts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 28px 18px;
    border-radius: 12px;
    background: #fff;
    border: 1px dashed #D1D5DB;
    color: #6B7280;
    font-size: 14px;
}

.marketplace .account img {
    max-width: 100%;
}

.marketplace .page-container .account .fix-grid .item .poster {
    height: 220px;
    background:
        radial-gradient(ellipse 90% 70% at 20% 15%, rgba(68, 108, 229, 0.45), transparent 55%),
        radial-gradient(ellipse 70% 60% at 90% 85%, rgba(63, 24, 103, 0.5), transparent 50%),
        linear-gradient(160deg, #0b1a3a 0%, #10182a 50%, #12081f 100%);
}

.marketplace .page-container .account .fix-grid .item .poster > img {
    display: none;
}

.marketplace .page-container .account .fix-grid .item .poster > .black {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(6, 10, 22, 0.12) 0%,
        rgba(6, 10, 22, 0.28) 45%,
        rgba(6, 10, 22, 0.55) 100%
    );
}

.marketplace .page-container .account .fix-grid .item .poster:before {
    display: none;
}

.marketplace .page-container .account .fix-grid .item .poster .rank {
    top: auto;
    bottom: 72px;
    transform: translateX(-50%);
    z-index: 3;
}

.marketplace .page-container .account .fix-grid .item .poster .rank img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
    object-fit: contain;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 4px;
}

.marketplace .page-container .account .fix-grid .item .poster .specials {
    z-index: 3;
}

.marketplace .page-container .account .fix-grid .item .poster .specials ul {
    gap: 10px !important;
}

.marketplace .page-container .account .fix-grid .item .poster .specials ul li {
    grid-gap: 6px !important;
}

.marketplace .page-container .account .fix-grid .item .poster .specials ul li i {
    color: #fff !important;
    font-size: 14px !important;
    width: 26px !important;
    height: 26px !important;
    line-height: 26px !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.marketplace .page-container .account .fix-grid .item .poster .specials ul li h6 {
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 10px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85), 0 0 12px rgba(0, 0, 0, 0.55);
}

.marketplace .page-container .account .fix-grid .item .poster .specials ul li p {
    color: #ffcb03 !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9);
}

.marketplace .page-container .account .fix-grid .item .poster .top-special {
    z-index: 3;
}

.marketplace .page-container .account .fix-grid .item .poster .top-special .right span,
.marketplace .page-container .account .fix-grid .item .poster .top-special .left span {
    color: #fff !important;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.marketplace .page-container .account .fix-grid .item .hover {
    display: none !important;
}

.marketplace .page-container .account .fix-grid .item:hover {
    transform: none;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
}

.marketplace .page-container .account .fix-grid .item .information .more a {
    text-align: center;
    padding: 10px;
    border-radius: 5px;
    color: #374151;
    display: block;
    font-weight: 500;
    font-size: 12px;
    background: #446ce530;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.marketplace .page-container .account .fix-grid .item .information .more a:hover {
    background: #446ce5;
    color: #fff;
}

@media (min-width: 992px) {
    .mp-games {
        padding: 108px 0 36px;
    }

    .mp-cover__stage {
        height: 280px;
    }

    .mp-tile {
        border-radius: 16px;
    }

    .mp-tile.is-center .mp-tile__body strong {
        font-size: 16px;
    }

    .mp-tile__body em {
        font-size: 12px;
    }

    .mp-cover__nav {
        width: 46px;
        height: 46px;
    }
}

@media (max-width: 767px) {
    .mp-games {
        padding: 96px 0 20px;
    }

    .mp-cover {
        grid-template-columns: 1fr;
    }

    .mp-cover__nav {
        display: none;
    }

    .mp-cover__stage {
        height: 188px;
        margin: 0 -4px;
    }

    .mp-cover__fade {
        width: min(22%, 72px);
    }

    .mp-games__title {
        font-size: 16px;
    }

    .mp-games__bar--solo .mp-games__search {
        width: 100%;
        min-width: 0;
    }

    .mp-tile {
        border-radius: 12px;
    }

    .marketplace .page-container .account .fix-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        grid-gap: 10px;
    }

    .marketplace .page-container .account .fix-grid .item .poster {
        height: 150px;
    }

    .marketplace .page-container .account .fix-grid .item .poster .rank {
        bottom: 54px;
    }

    .marketplace .page-container .account .fix-grid .item .poster .rank img {
        width: 44px;
        height: 44px;
        padding: 2px;
        border-radius: 8px;
    }

    .marketplace .page-container .account .fix-grid .item .poster .specials ul li i {
        font-size: 12px !important;
        width: 22px !important;
        height: 22px !important;
        line-height: 22px !important;
    }

    .marketplace .page-container .account .fix-grid .item .poster .specials ul li h6 {
        font-size: 9px !important;
        max-width: 72px;
        line-height: 1.3;
    }

    .marketplace .page-container .account .fix-grid .item .poster .specials ul li p {
        font-size: 11px !important;
    }

    .marketplace .page-container .account .fix-grid .item .information {
        padding-block: 8px;
        grid-gap: 8px;
    }

    .marketplace .page-container .account .fix-grid .item .information .floating li p {
        font-size: 11px;
    }

    .marketplace .page-container .account .fix-grid .item .information .floating li span {
        font-size: 11px;
        padding: 4px 6px;
        margin-top: 6px;
    }

    .marketplace .page-container .account .fix-grid .item .information .price p,
    .marketplace .page-container .account .fix-grid .item .information .price span {
        font-size: 12px;
    }

    .marketplace .page-container .account .fix-grid .item .information .more a {
        padding: 8px;
        font-size: 11px;
    }
}

@media (max-width: 420px) {
    .marketplace .page-container .account .fix-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .marketplace .page-container .account .fix-grid .item .poster {
        height: 168px;
    }
}

/* Override legacy app.css one-column rule between 421–660px */
@media (max-width: 660px) and (min-width: 421px) {
    .marketplace .page-container .account .fix-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Account information page poster: match marketplace card style */
.account-information .top-bar .poster {
    height: 220px;
    background:
        radial-gradient(ellipse 90% 70% at 20% 15%, rgba(68, 108, 229, 0.45), transparent 55%),
        radial-gradient(ellipse 70% 60% at 90% 85%, rgba(63, 24, 103, 0.5), transparent 50%),
        linear-gradient(160deg, #0b1a3a 0%, #10182a 50%, #12081f 100%);
}

.account-information .top-bar .poster > img {
    display: none;
}

.account-information .top-bar .poster > .black {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        180deg,
        rgba(6, 10, 22, 0.12) 0%,
        rgba(6, 10, 22, 0.28) 45%,
        rgba(6, 10, 22, 0.55) 100%
    ) !important;
}

.account-information .top-bar .poster .rank img {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.28);
    padding: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.account-information .top-bar .poster .specials ul li i {
    font-size: 14px;
    width: 26px;
    height: 26px;
    line-height: 26px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    .mp-tile,
    .mp-cover__dot,
    .mp-cover__nav {
        transition: none !important;
    }
}

.mp-pagination {
    margin-top: 28px;
    display: flex;
    justify-content: center;
}

.mp-pagination .pagination {
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
}

.mp-pagination .page-link {
    min-width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px !important;
    border: 1px solid rgba(77, 116, 255, 0.28) !important;
    background: #0f1628 !important;
    color: #dce6ff !important;
    font-size: 13px;
    font-weight: 600;
}

.mp-pagination .page-item.active .page-link,
.mp-pagination .page-link:hover {
    background: linear-gradient(270.71deg, #0b366a 0.53%, #0d4383 50.99%, #395dc8 99.38%) !important;
    border-color: transparent !important;
    color: #fff !important;
}

.mp-pagination .page-item.disabled .page-link {
    opacity: 0.45;
}
