/* =========================================================
   ELITSLOTS UPGRADER
========================================================= */


/* =========================================================
   PAGE
========================================================= */

.upgrader-page {

    min-height: calc(100vh - 150px);

    padding: 35px 24px 55px;

    box-sizing: border-box;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(117, 66, 255, 0.12),
            transparent 52%
        ),

        #090b10;
}


/* =========================================================
   HEADING
========================================================= */

.upgrader-heading {

    width: min(1200px, 100%);

    margin: 0 auto 25px;
}


.upgrader-heading h1 {

    margin: 7px 0;

    font-size: clamp(34px, 5vw, 56px);
}


.upgrader-heading p {

    margin: 0;

    color: #8d929d;
}


/* =========================================================
   MAIN PANEL
========================================================= */

.upgrader-panel {

    width: min(1200px, 100%);

    margin: 0 auto;

    padding: 28px;

    box-sizing: border-box;

    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        280px
        minmax(0, 1fr);

    gap: 28px;

    align-items: start;

    background: #11151c;

    border: 1px solid
        rgba(255, 255, 255, 0.08);

    border-radius: 16px;

    box-shadow:
        0 25px 70px
        rgba(0, 0, 0, 0.45);

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}


/* =========================================================
   ITEM COLUMNS
========================================================= */

.upgrade-item {

    width: 100%;

    min-width: 0;

    display: block;
}


.item-label {

    display: block;

    margin-bottom: 10px;

    color: #777d88;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 2px;
}


/* =========================================================
   ITEM CARD
========================================================= */

.item-card {

    width: 100%;

    min-height: 300px;

    padding: 25px;

    box-sizing: border-box;

    display: flex;

    flex-direction: column;

    justify-content: flex-end;

    border-radius: 13px;

    border: 1px solid
        rgba(255, 255, 255, 0.08);

    background:

        radial-gradient(
            circle at 50% 25%,
            rgba(117, 66, 255, 0.18),
            transparent 45%
        ),

        linear-gradient(
            145deg,
            #1a1f29,
            #0b0e13
        );

    transition:
        border-color 0.3s ease,
        box-shadow 0.3s ease,
        transform 0.3s ease;
}


.item-card:hover {

    transform: translateY(-2px);

    border-color:
        rgba(117, 66, 255, 0.35);
}


.item-card.target {

    background:

        radial-gradient(
            circle at 50% 25%,
            rgba(117, 66, 255, 0.16),
            transparent 45%
        ),

        linear-gradient(
            145deg,
            #1a1f29,
            #0b0e13
        );
}


/* =========================================================
   ITEM ICON
========================================================= */

.item-icon {

    width: 110px;

    height: 110px;

    margin: auto auto 20px;

    display: grid;

    place-items: center;

    border-radius: 14px;

    color: #ffffff;

    font-size: 25px;

    font-weight: 1000;

    background:

        linear-gradient(
            145deg,
            #303744,
            #11151b
        );

    box-shadow:

        inset 0 0 0 1px
        rgba(255, 255, 255, 0.08),

        0 15px 35px
        rgba(0, 0, 0, 0.35);
}


.item-card h2 {

    margin: 0;

    font-size: 18px;
}


.item-card p {

    margin: 5px 0 12px;

    color: #858b96;
}


.item-card strong {

    font-size: 22px;
}


/* =========================================================
   CENTER
========================================================= */

.upgrade-center {

    width: 100%;

    min-width: 0;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 14px;
}


/* =========================================================
   WHEEL WRAPPER
========================================================= */

.upgrade-wheel-wrapper {

    position: relative;

    width: 220px;

    height: 220px;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: center;
}


/* =========================================================
   POINTER
========================================================= */

.upgrade-wheel-pointer {

    position: absolute;

    top: -10px;

    left: 50%;

    transform: translateX(-50%);

    z-index: 50;

    width: 0;

    height: 0;

    color: #ffffff;

    font-size: 30px;

    line-height: 1;

    filter:
        drop-shadow(
            0 0 8px
            rgba(117, 66, 255, 0.95)
        );
}


.upgrade-wheel-pointer i {

    display: block;
}


/* =========================================================
   ELITSLOTS UPGRADE WHEEL
========================================================= */

.upgrade-wheel-wrapper {

    position: relative;

    width: 250px;
    height: 250px;

    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: center;

    --chance: 50;
}


/* =========================================================
   OUTER WHEEL
========================================================= */

.upgrade-wheel {

    position: relative;

    width: 225px;
    height: 225px;

    flex-shrink: 0;

    border-radius: 50%;

    /*
       FIOLET = SZANSA WYGRANEJ
       CIEMNE = SZANSA PRZEGRANEJ

       Fiolet zawsze znajduje się
       symetrycznie względem dołu.
    */

    background:

        conic-gradient(

            from calc(180deg - (var(--chance) * 1.8deg)),

            #8b5cff 0deg,

            #8b5cff
            calc(var(--chance) * 3.6deg),

            #151821
            calc(var(--chance) * 3.6deg),

            #151821 360deg
        );

    border: 5px solid #272b35;

    box-shadow:

        0 0 0 2px
        rgba(255,255,255,.025),

        0 0 20px
        rgba(139,92,255,.18);

    transform: rotate(0deg);

    transition:

        background .45s ease,

        box-shadow .35s ease,

        transform 5s
        cubic-bezier(
            .12,
            .72,
            .12,
            1
        );

    overflow: visible;
}


/* =========================================================
   GLOW NA FIOLETOWYM FRAGMENCIE
========================================================= */

.upgrade-wheel::before {

    content: "";

    position: absolute;

    inset: -3px;

    border-radius: 50%;

    background:

        conic-gradient(

            from calc(180deg - (var(--chance) * 1.8deg)),

            rgba(151,103,255,.95) 0deg,

            rgba(151,103,255,.95)
            calc(var(--chance) * 3.6deg),

            transparent
            calc(var(--chance) * 3.6deg),

            transparent 360deg
        );

    filter:
        blur(7px);

    opacity: .65;

    z-index: -1;

    pointer-events: none;
}


/* =========================================================
   WEWNĘTRZNY OTWÓR
========================================================= */

.upgrade-wheel::after {

    content: "";

    position: absolute;

    inset: 20px;

    border-radius: 50%;

    background:

        radial-gradient(
            circle at center,
            #191c24 0%,
            #11141b 65%,
            #0b0e14 100%
        );

    border:
        1px solid
        rgba(255,255,255,.06);

    box-shadow:

        inset 0 0 25px
        rgba(0,0,0,.75),

        0 0 0 1px
        rgba(139,92,255,.08);

    z-index: 5;

    pointer-events: none;
}


/* =========================================================
   USUWAMY STARE SEGMENTY
========================================================= */

.upgrade-wheel .wheel-segment {

    display: none !important;
}


/* =========================================================
   CENTER
========================================================= */

.wheel-center {

    position: absolute;

    left: 50%;
    top: 50%;

    width: 82px;
    height: 82px;

    transform:
        translate(-50%, -50%);

    z-index: 20;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:

        radial-gradient(
            circle,
            #20242d 0%,
            #11141a 70%,
            #0b0e13 100%
        );

    border:
        3px solid
        #353a46;

    box-shadow:

        0 0 0 5px
        rgba(0,0,0,.35),

        inset 0 0 20px
        rgba(0,0,0,.75),

        0 0 18px
        rgba(139,92,255,.18);
}


/* =========================================================
   BOLT
========================================================= */

.wheel-center i {

    color:
        #a875ff;

    font-size:
        25px;

    filter:

        drop-shadow(
            0 0 8px
            rgba(139,92,255,.85)
        );
}


/* =========================================================
   PROCENT
========================================================= */

.wheel-center::before {

    content: attr(data-chance);

    position: absolute;

    left: 50%;

    top: -72px;

    transform:
        translateX(-50%);

    white-space: nowrap;

    color:
        #a875ff;

    font-size:
        38px;

    line-height:
        1;

    font-weight:
        900;

    letter-spacing:
        -1px;

    text-shadow:

        0 0 10px
        rgba(139,92,255,.45),

        0 0 25px
        rgba(139,92,255,.18);
}


/* =========================================================
   MEDIUM CHANCE
========================================================= */

.wheel-center::after {

    content:
        "medium chance";

    position: absolute;

    left: 50%;

    top: -32px;

    transform:
        translateX(-50%);

    white-space:
        nowrap;

    color:
        #898e99;

    font-size:
        11px;

    font-weight:
        600;

    letter-spacing:
        .2px;
}


/* =========================================================
   POINTER
========================================================= */

.upgrade-wheel-pointer {

    position: absolute;

    left: 50%;

    bottom: -13px;

    transform:
        translateX(-50%);

    z-index: 50;

    width: 0;
    height: 0;

    color:
        #ffffff;

    font-size:
        34px;

    line-height:
        1;

    filter:

        drop-shadow(
            0 0 7px
            rgba(139,92,255,.95)
        );
}


/* =========================================================
   SPINNING
========================================================= */

.upgrade-wheel.spinning {

    box-shadow:

        0 0 0 2px
        rgba(139,92,255,.18),

        0 0 25px
        rgba(139,92,255,.35),

        0 0 65px
        rgba(139,92,255,.25);
}


/* =========================================================
   WIN
========================================================= */

.upgrade-wheel.win {

    box-shadow:

        0 0 0 2px
        rgba(139,92,255,.35),

        0 0 25px
        rgba(139,92,255,.55),

        0 0 70px
        rgba(139,92,255,.35);
}


/* =========================================================
   LOSE
========================================================= */

.upgrade-wheel.lose {

    box-shadow:

        0 0 0 2px
        rgba(255,255,255,.04),

        0 0 20px
        rgba(0,0,0,.5);
}



/* =========================================================
   SPINNING
========================================================= */

.upgrade-wheel.spinning {

    box-shadow:

        0 0 0 2px
        rgba(255,255,255,.05),

        0 12px 40px
        rgba(0,0,0,.7),

        0 0 70px
        rgba(117,66,255,.55);
}


.upgrade-wheel.spinning .wheel-center {

    box-shadow:

        0 0 0 4px
        rgba(0,0,0,.35),

        0 0 35px
        rgba(117,66,255,.75),

        inset 0 0 20px
        rgba(0,0,0,.55);
}


/* =========================================================
   WIN
========================================================= */

.upgrade-wheel.win {

    box-shadow:

        0 0 0 2px
        rgba(117,66,255,.35),

        0 0 25px
        rgba(117,66,255,.5),

        0 0 70px
        rgba(117,66,255,.35);
}


.upgrade-wheel.win .wheel-center {

    border-color:
        #a982ff;

    box-shadow:

        0 0 0 4px
        rgba(0,0,0,.35),

        0 0 35px
        rgba(117,66,255,.7);
}


/* =========================================================
   LOSE
========================================================= */

.upgrade-wheel.lose {

    box-shadow:

        0 0 0 2px
        rgba(255,70,85,.35),

        0 0 25px
        rgba(255,70,85,.45),

        0 0 60px
        rgba(255,70,85,.25);
}


.upgrade-wheel.lose .wheel-center {

    border-color:
        #ff4655;

    color:
        #ff6572;

    box-shadow:

        0 0 0 4px
        rgba(0,0,0,.35),

        0 0 35px
        rgba(255,70,85,.65);
}


/* =========================================================
   CHANCE
========================================================= */

.chance-box {

    width: 100%;

    max-width: 240px;

    text-align: center;
}


.chance-box span {

    display: block;

    color: #777d88;

    font-size: 10px;

    font-weight: 900;

    letter-spacing: 2px;
}


.chance-box strong {

    display: block;

    margin: 5px 0 9px;

    font-size: 30px;

    color: #a982ff;

    text-shadow:
        0 0 15px
        rgba(117,66,255,.3);
}


.chance-bar {

    height: 7px;

    overflow: hidden;

    border-radius: 10px;

    background: #242a34;
}


#chanceFill {

    width: 0%;

    height: 100%;

    border-radius: inherit;

    background:

        linear-gradient(
            90deg,
            #5c2fe0,
            #a982ff
        );

    box-shadow:
        0 0 10px
        rgba(117,66,255,.45);

    transition:
        width 0.35s ease;
}


/* =========================================================
   ARROW
========================================================= */

.upgrade-arrow {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 32px;

    height: 32px;

    color: #9a70ff;

    font-size: 18px;

    opacity: .8;

    filter:
        drop-shadow(
            0 0 7px
            rgba(117,66,255,.5)
        );
}


/* =========================================================
   UPGRADE BUTTON
========================================================= */

.upgrade-button {

    width: 100%;

    max-width: 240px;

    padding: 14px 18px;

    border:
        1px solid #8d63ff;

    border-radius: 9px;

    background:

        linear-gradient(
            180deg,
            #8b5cff,
            #5c2fe0
        );

    color: #ffffff;

    font-size: 14px;

    font-weight: 1000;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}


.upgrade-button:hover {

    transform:
        translateY(-2px);

    box-shadow:

        0 8px 25px
        rgba(117,66,255,.4),

        0 0 20px
        rgba(117,66,255,.18);
}


.upgrade-button:active {

    transform:
        translateY(0);
}


.upgrade-button:disabled {

    opacity: .5;

    cursor: not-allowed;

    transform: none;

    box-shadow: none;
}


/* =========================================================
   STATUS
========================================================= */

.upgrade-status {

    width: 100%;

    max-width: 240px;

    min-height: 17px;

    margin: 0;

    color: #858b96;

    font-size: 11px;

    text-align: center;
}


/* =========================================================
   HISTORY
========================================================= */

.history-heading {

    margin-bottom: 12px;

    display: flex;

    align-items: flex-end;

    justify-content: space-between;
}


.history-heading h2 {

    margin: 5px 0;
}


.history-heading > span {

    color: #727783;

    font-size: 11px;
}


.history-list {

    overflow: hidden;

    border-radius: 11px;

    border:
        1px solid
        rgba(255,255,255,.07);

    background: #11151c;
}


.history-empty {

    padding: 25px;

    color: #666c77;

    text-align: center;
}


.history-row {

    display: grid;

    grid-template-columns:
        1.5fr 1fr 1fr 100px;

    gap: 15px;

    align-items: center;

    padding: 14px 17px;

    border-bottom:
        1px solid
        rgba(255,255,255,.05);
}


.history-row:last-child {

    border-bottom: 0;
}


.history-row span {

    color: #858b96;

    font-size: 12px;
}


.history-row strong {

    font-size: 13px;
}


.history-win {

    color:
        #67e39b !important;
}


.history-loss {

    color:
        #ff6565 !important;
}


/* =========================================================
   WIN PANEL
========================================================= */

.upgrader-panel.upgrade-win {

    border-color:
        rgba(117,66,255,.5);

    box-shadow:

        0 0 45px
        rgba(117,66,255,.15);
}


.upgrader-panel.upgrade-win
.item-card.target {

    box-shadow:

        0 0 35px
        rgba(117,66,255,.3);

    border-color:
        rgba(117,66,255,.5);
}


/* =========================================================
   LOSE PANEL
========================================================= */

.upgrader-panel.upgrade-loss {

    border-color:
        rgba(255,70,70,.35);

    box-shadow:

        0 0 40px
        rgba(255,70,70,.1);
}


.upgrader-panel.upgrade-loss
.item-card {

    box-shadow:

        0 0 30px
        rgba(255,70,70,.15);

    border-color:
        rgba(255,70,70,.3);
}


/* =========================================================
   SKIN SELECTOR
========================================================= */

.skin-selector {

    width: min(1200px, 100%);

    margin: 25px auto 30px;

    display: grid;

    grid-template-columns:
        minmax(300px, .85fr)
        minmax(500px, 1.6fr);

    gap: 16px;

    align-items: stretch;
}


/* =========================================================
   SKIN PANEL
========================================================= */

.skin-panel {

    min-width: 0;

    overflow: hidden;

    border:
        1px solid
        rgba(255,255,255,.07);

    border-radius: 13px;

    background: #11151c;

    box-shadow:
        0 15px 40px
        rgba(0,0,0,.25);
}


/* =========================================================
   SKIN HEADER
========================================================= */

.skin-panel-header {

    min-height: 70px;

    padding: 12px 15px;

    box-sizing: border-box;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    border-bottom:
        1px solid
        rgba(255,255,255,.06);

    background:
        rgba(255,255,255,.015);
}



.skin-panel-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.item-icon.source-items-display {
    width: 100%;
    height: auto;
    min-height: 110px;
    margin: auto auto 20px;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    align-content: center;
    justify-items: center;
    gap: 8px;
    overflow: visible;
    background: transparent;
    box-shadow: none;
}

.source-items-display.is-multiple {
    grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
}

.source-skin-chip {
    position: relative;
    width: 110px;
    height: 110px;
    min-width: 0;
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 12px;
    background: linear-gradient(145deg, #242a35, #11151c);
}

.is-multiple .source-skin-chip {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
}

.source-skin-chip img {
    width: 100%;
    height: 100%;
    padding: 5px;
    object-fit: contain;
}

.source-skin-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    z-index: 2;
    width: 23px;
    height: 23px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255,255,255,.28);
    border-radius: 50%;
    background: #e34c63;
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
}

.skin-sort-controls {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 8px;
    background: #0d1016;
}

.skin-sort-btn {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #777f91;
    cursor: pointer;
    transition: .18s ease;
}

.skin-sort-btn:hover {
    color: #fff;
    background: rgba(139,92,246,.10);
}

.skin-sort-btn.active {
    color: #fff;
    background: rgba(139,92,246,.22);
    box-shadow: inset 0 0 0 1px rgba(139,92,246,.28);
}

.skin-panel-title {

    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 0;
}


.skin-panel-title h2 {

    margin: 2px 0 0;

    font-size: 17px;
}


.skin-panel-title .section-label {

    font-size: 8px;
}


.skin-panel-icon {

    width: 32px;

    height: 32px;

    flex-shrink: 0;

    display: grid;

    place-items: center;

    border-radius: 8px;

    color: #8b63ff;

    background: #1c2029;

    border:
        1px solid
        rgba(255,255,255,.06);
}


.skin-panel-icon.active {

    color: #111;

    background: #8b63ff;

    box-shadow:
        0 0 18px
        rgba(139,99,255,.25);
}


.skin-count {

    flex-shrink: 0;

    color: #707784;

    font-size: 10px;
}


/* =========================================================
   SKINS GRID
========================================================= */

.skins-grid {

    padding: 12px;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0,1fr));

    gap: 8px;

    box-sizing: border-box;
}


.market-grid {

    grid-template-columns:
        repeat(4, minmax(0,1fr));

    max-height: 410px;

    overflow-y: auto;
}


/* =========================================================
   SKIN CARD
========================================================= */

.skin-card {

    position: relative;

    min-width: 0;

    padding: 0;

    overflow: hidden;

    text-align: left;

    border:
        1px solid
        rgba(255,255,255,.07);

    border-radius: 8px;

    background: #171b22;

    color: #fff;

    cursor: pointer;

    transition:
        border-color .18s ease,
        transform .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}


.skin-card:hover {

    transform: translateY(-2px);

    border-color:
        rgba(139,99,255,.55);

    background: #1b2029;

    box-shadow:
        0 8px 20px
        rgba(0,0,0,.3);
}


.skin-card.selected {

    border-color: #8b63ff;

    box-shadow:

        0 0 0 1px
        rgba(139,99,255,.25),

        0 0 18px
        rgba(139,99,255,.12);
}


/* =========================================================
   SKIN IMAGE
========================================================= */

.skin-image {

    height: 82px;

    display: flex;

    align-items: center;

    justify-content: center;

    background:

        radial-gradient(
            circle at 50% 50%,
            rgba(139,99,255,.16),
            transparent 65%
        ),

        #0e1117;
}


.skin-placeholder {

    width: 75%;

    height: 65%;

    display: flex;

    align-items: center;

    justify-content: center;

    color: #b9a6ff;

    font-size: 20px;

    font-weight: 1000;

    border-radius: 8px;

    background:

        linear-gradient(
            135deg,
            #292035,
            #11151c
        );

    border:
        1px solid
        rgba(139,99,255,.22);
}


.skin-placeholder.awp {

    color: #d19aff;
}


.skin-placeholder.knife {

    color: #ffce66;

    background:

        linear-gradient(
            135deg,
            #302817,
            #11151c
        );

    border-color:
        rgba(255,190,70,.2);
}


/* =========================================================
   SKIN INFO
========================================================= */

.skin-card-info {

    min-width: 0;

    padding: 8px;

    background: #151920;
}


.skin-card-info strong {

    display: block;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 10px;
}


.skin-card-info span {

    display: block;

    margin-top: 3px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    color: #727986;

    font-size: 9px;
}


.skin-card-info b {

    display: block;

    margin-top: 6px;

    color: #a984ff;

    font-size: 11px;
}


/* =========================================================
   SEARCH
========================================================= */

.skin-search {

    position: relative;

    width: 190px;

    flex-shrink: 0;
}


.skin-search i {

    position: absolute;

    left: 11px;

    top: 50%;

    transform: translateY(-50%);

    color: #737987;

    font-size: 11px;

    pointer-events: none;
}


.skin-search input {

    width: 100%;

    height: 34px;

    padding: 0 10px 0 31px;

    box-sizing: border-box;

    outline: none;

    border:
        1px solid
        rgba(255,255,255,.08);

    border-radius: 7px;

    background: #0c0f14;

    color: #fff;

    font-size: 11px;
}


.skin-search input:focus {

    border-color:
        rgba(139,99,255,.55);

    box-shadow:
        0 0 0 2px
        rgba(139,99,255,.08);
}


/* =========================================================
   FILTERS
========================================================= */

.skin-filters {

    display: flex;

    gap: 5px;

    padding: 9px 12px 0;
}


.skin-filter {

    padding: 5px 9px;

    border:
        1px solid
        rgba(255,255,255,.07);

    border-radius: 6px;

    background: #171b22;

    color: #777e8a;

    font-size: 9px;

    cursor: pointer;
}


.skin-filter:hover {

    color: #fff;
}


.skin-filter.active {

    color: #fff;

    background: #6940d9;

    border-color: #8059ef;
}


/* =========================================================
   SCROLLBAR
========================================================= */

.market-grid::-webkit-scrollbar {

    width: 5px;
}


.market-grid::-webkit-scrollbar-track {

    background: #0c0f14;
}


.market-grid::-webkit-scrollbar-thumb {

    border-radius: 5px;

    background: #363b47;
}


.market-grid::-webkit-scrollbar-thumb:hover {

    background: #6940d9;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 900px) {

    .upgrader-panel {

        grid-template-columns: 1fr;

        gap: 25px;
    }


    .upgrade-center {

        order: 2;
    }


    .upgrade-item:first-child {

        order: 1;
    }


    .upgrade-item:last-child {

        order: 3;
    }


    .skin-selector {

        grid-template-columns: 1fr;
    }


    .market-grid {

        max-height: none;
    }



}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1000px) and (min-width: 901px) {

    .upgrader-panel {

        grid-template-columns:
            minmax(0,1fr)
            240px
            minmax(0,1fr);

        gap: 18px;
    }


    .upgrade-wheel-wrapper {

        width: 190px;

        height: 190px;
    }


    .upgrade-wheel {

        width: 180px;

        height: 180px;
    }


    


}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 600px) {

    .upgrader-page {

        padding:
            20px
            12px
            40px;
    }


    .upgrader-panel {

        padding: 16px;
    }


    .item-card {

        min-height: 220px;
    }


    .upgrade-wheel-wrapper {

        width: 185px;

        height: 185px;
    }


    .upgrade-wheel {

        width: 175px;

        height: 175px;
    }


    .wheel-center::before {

        top: -52px;

        font-size: 23px;
    }




    .upgrade-wheel-pointer {

        top: -11px;

        font-size: 26px;
    }


    .history-row {

        grid-template-columns:
            1fr 1fr;
    }


    .skin-panel-header {

        align-items: flex-start;

        flex-direction: column;
    }


    .skin-search {

        width: 100%;
    }


    .skins-grid {

        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }


    .market-grid {

        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }

}
/* =========================================================
   LIVE CSFLOAT SKINS
========================================================= */

/* Wheel percentage is shown below the wheel in CHANCE. */
.wheel-center::before,
.wheel-center::after {
    display: none !important;
}

.image-item {
    overflow: hidden;
    padding: 8px;
    box-sizing: border-box;
}

.image-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 10px 20px rgba(0,0,0,.35));
}

.skin-card .skin-image img {
    width: 90%;
    height: 78px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 6px 14px rgba(0,0,0,.35));
}

.skin-loading {
    grid-column: 1 / -1;
    min-height: 150px;
    display: grid;
    place-items: center;
    color: #777d88;
    font-size: 12px;
}

.market-toolbar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px 0;
}

.market-toolbar .skin-search {
    width: auto;
    flex: 1;
}

.price-filter {
    width: 85px;
    height: 34px;
    padding: 0 8px;
    box-sizing: border-box;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 7px;
    background: #0c0f14;
    color: #fff;
    outline: none;
    font-size: 11px;
}

.price-filter:focus {
    border-color: rgba(139,99,255,.55);
}

.market-reload {
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 7px;
    background: #171b22;
    color: #9a70ff;
    cursor: pointer;
}

.market-reload:hover {
    background: #211a35;
}

.skin-card b {
    color: #a984ff;
}

@media (max-width: 900px) {
    .market-toolbar {
        flex-wrap: wrap;
    }

    .market-toolbar .skin-search {
        flex-basis: 100%;
        width: 100%;
    }
}

/* =========================================================
   ELITSLOTS UPGRADER NAVIGATION
========================================================= */

.upgrader-nav {
    width: min(1200px, 100%);
    margin: 0 auto 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 10px;
    flex-wrap: wrap;
}

.upgrader-nav a {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    min-width: 105px;
    padding: 11px 18px;

    box-sizing: border-box;

    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.018)
        );

    color: #858b96;

    text-decoration: none;

    font-size: 12px;
    font-weight: 700;

    transition:
        color .2s ease,
        background .2s ease,
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.upgrader-nav a i {
    font-size: 14px;

    transition:
        color .2s ease,
        filter .2s ease;
}

.upgrader-nav a:hover {
    color: #ffffff;

    background:
        linear-gradient(
            145deg,
            rgba(117,66,255,.12),
            rgba(117,66,255,.035)
        );

    border-color:
        rgba(139,92,255,.35);

    transform:
        translateY(-2px);

    box-shadow:
        0 8px 25px
        rgba(0,0,0,.25),

        0 0 18px
        rgba(117,66,255,.08);
}

.upgrader-nav a:hover i {
    color: #a982ff;

    filter:
        drop-shadow(
            0 0 6px
            rgba(139,92,255,.65)
        );
}

/* =========================================================
   ACTIVE PAGE
========================================================= */

.upgrader-nav a.active {
    color: #ffffff;

    background:
        linear-gradient(
            145deg,
            rgba(117,66,255,.18),
            rgba(117,66,255,.06)
        );

    border-color:
        rgba(139,92,255,.45);

    box-shadow:
        inset 0 0 20px
        rgba(117,66,255,.05),

        0 0 20px
        rgba(117,66,255,.10);
}

.upgrader-nav a.active i {
    color: #a982ff;

    filter:
        drop-shadow(
            0 0 7px
            rgba(139,92,255,.75)
        );
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    .upgrader-nav {
        gap: 7px;
        padding: 0 5px;
    }

    .upgrader-nav a {
        flex:
            1 1 calc(50% - 7px);

        min-width: 0;

        padding:
            10px 12px;

        font-size: 11px;
    }

    .upgrader-nav a i {
        font-size: 13px;
    }
}

/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 420px) {

    .upgrader-nav a {
        padding:
            9px 8px;

        gap: 6px;

        font-size: 10px;
    }

}


/* =========================================================
   V4 — STATIC CHANCE WHEEL + ROTATING POINTER
   The colored chance ring never moves. Only the pointer rotates
   from the exact 12 o'clock position.
========================================================= */
.upgrade-wheel {
    transform: none !important;
    transition: background .45s ease, box-shadow .35s ease !important;
}

.upgrade-wheel-pointer {
    position: absolute !important;
    inset: 0 !important;
    width: 250px !important;
    height: 250px !important;
    left: 0 !important;
    top: 0 !important;
    bottom: auto !important;
    transform: rotate(var(--pointer-angle, 0deg)) !important;
    transform-origin: 50% 50% !important;
    z-index: 60 !important;
    pointer-events: none !important;
    transition: transform 5.2s cubic-bezier(.12,.72,.12,1) !important;
    filter: none !important;
}

.upgrade-wheel-pointer i {
    position: absolute !important;
    left: 50% !important;
    top: -9px !important;
    display: block !important;
    transform: translateX(-50%) !important;
    color: #fff !important;
    font-size: 30px !important;
    line-height: 1 !important;
    filter: drop-shadow(0 0 7px rgba(139,92,255,.98)) !important;
}

.upgrade-wheel.spinning {
    animation: none !important;
}


/* =========================================================
   UPGRADER V7 — LOCK SKIN SELECTION DURING ROLL
========================================================= */
.skin-card.selection-locked,
.skin-card:disabled {
    pointer-events: none;
    cursor: not-allowed;
    opacity: .62;
}


/* ELITSLOTS upgrader price sorting */
.market-sort {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-width: 150px;
    height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(139, 92, 246, 0.32);
    border-radius: 9px;
    background: rgba(139, 92, 246, 0.10);
    color: #d8c7ff;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: .18s ease;
}
.market-sort:hover {
    border-color: rgba(139, 92, 246, 0.65);
    background: rgba(139, 92, 246, 0.18);
    transform: translateY(-1px);
}
.market-sort i {
    font-size: 13px;
}
@media (max-width: 760px) {
    .market-sort {
        min-width: 42px;
        width: 42px;
        padding: 0;
    }
    .market-sort span {
        display: none;
    }
}


/* ELITSLOTS pagination - 20 items per page */
.skins-pager {
    display:flex; align-items:center; justify-content:center; gap:14px;
    padding:18px 0 4px; min-height:48px;
}
.pager-meta { color:#777f95; font-size:12px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; }
.pager-buttons { display:flex; align-items:center; gap:7px; }
.pager-btn {
    min-width:36px; height:36px; padding:0 10px; border-radius:10px;
    border:1px solid rgba(159,91,255,.22); background:#111421; color:#cfd3e4;
    font-weight:800; cursor:pointer; transition:.18s ease;
}
.pager-btn:hover:not(:disabled) { border-color:#9b55ff; color:#fff; transform:translateY(-1px); }
.pager-btn.active { background:linear-gradient(135deg,#6e35ed,#a754ff); border-color:#a35bff; color:#fff; box-shadow:0 8px 25px rgba(147,76,255,.22); }
.pager-btn:disabled { opacity:.35; cursor:default; }
@media (max-width:700px){
  .skins-pager{flex-direction:column; gap:8px;}
}

/* Compact percentage shortcuts under the target item */
.target-suggestions { margin-top:16px; padding:10px; border:1px solid rgba(255,255,255,.08); border-radius:12px; background:rgba(9,11,16,.62); }
.target-suggestion-row { display:flex; align-items:center; gap:8px; }
.target-suggestion-grid { flex:1; min-width:0; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
.target-suggestion { min-width:0; height:48px; padding:0 8px; display:grid; place-items:center; color:#e9e4f4; background:#11151c; border:2px solid #252a33; border-radius:10px; cursor:pointer; transition:border-color .2s,background .2s,transform .2s; }
.target-suggestion:not(:disabled):hover { transform:translateY(-1px); border-color:#9b63ff; background:#191522; }
.target-suggestion:disabled { opacity:.48; cursor:not-allowed; }
.target-suggestion-percent { color:#bd9bff; font-size:19px; font-weight:800; line-height:1; }
.target-settings-toggle { flex:0 0 40px; width:40px; height:48px; display:grid; place-items:center; border:2px solid #252a33; border-radius:10px; background:#11151c; color:#c9b2ff; cursor:pointer; }
.target-settings-toggle:hover { border-color:#9b63ff; color:#fff; }
.target-settings { margin-top:10px; padding-top:10px; border-top:1px solid rgba(255,255,255,.08); }
.target-settings[hidden] { display:none; }
.target-settings label { display:flex; justify-content:space-between; align-items:center; margin:7px 0; color:#aeb3bf; font-size:11px; }
.target-settings label span { display:flex; align-items:center; gap:5px; color:#858b96; }
.target-settings input { width:58px; padding:6px; color:#fff; background:#0d1016; border:1px solid rgba(255,255,255,.12); border-radius:6px; }
.target-settings input[aria-invalid="true"] { border-color:#ff5c70; }
.target-settings-save { width:100%; margin-top:5px; padding:8px; border:0; border-radius:7px; color:#fff; background:linear-gradient(135deg,#6936df,#9a53ed); font-size:10px; font-weight:800; cursor:pointer; }
@media (max-width:480px) { .target-suggestion-grid { gap:5px; } .target-suggestion { height:44px; padding:0 4px; } .target-suggestion-percent { font-size:17px; } .target-settings-toggle { flex-basis:36px; width:36px; height:44px; } }
