/* =========================================================
   KENO UPGRADER
========================================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(112, 65, 255, .14),
            transparent 38%
        ),
        #09070f;

    color: #fff;

    font-family:
        Inter,
        Arial,
        Helvetica,
        sans-serif;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;

    height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 35px;

    background: rgba(9, 7, 15, .82);

    border-bottom: 1px solid rgba(255,255,255,.055);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 42px;
}

.logo {
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 2px;

    color: #fff;

    text-shadow:
        0 0 25px rgba(145, 90, 255, .55);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    position: relative;

    padding: 9px 13px;

    color: #898398;

    text-decoration: none;

    font-size: 14px;
    font-weight: 600;

    border-radius: 9px;

    transition:
        color .2s ease,
        background .2s ease;
}

.nav-links a:hover {
    color: #fff;

    background: rgba(255,255,255,.045);
}

.nav-links a.active {
    color: #fff;

    background: rgba(130, 80, 255, .12);
}

.nav-links a.active::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: -1px;

    width: 22px;
    height: 2px;

    transform: translateX(-50%);

    background: #8d5cff;

    border-radius: 10px;

    box-shadow:
        0 0 12px rgba(141,92,255,.7);
}


/* =========================================================
   BALANCE
========================================================= */

.balance {
    display: flex;
    align-items: center;
    gap: 10px;

    padding: 8px 13px;

    background: rgba(255,255,255,.035);

    border: 1px solid rgba(255,255,255,.06);

    border-radius: 11px;
}

.balance span {
    color: #777185;

    font-size: 12px;
}

.balance strong {
    color: #fff;

    font-size: 14px;
}


/* =========================================================
   PAGE
========================================================= */

.page {
    width: min(1450px, calc(100% - 50px));

    margin: 0 auto;

    padding: 35px 0 70px;
}


/* =========================================================
   BACK
========================================================= */

.back {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 25px;

    color: #80798f;

    text-decoration: none;

    font-size: 13px;
    font-weight: 600;

    transition: color .2s ease;
}

.back:hover {
    color: #fff;
}


/* =========================================================
   TITLE
========================================================= */

.title {
    margin-bottom: 32px;
}

.title small {
    display: block;

    margin-bottom: 9px;

    color: #8f6cff;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 2px;
}

.title h1 {
    margin: 0;

    font-size: clamp(34px, 4vw, 48px);

    line-height: 1.05;

    letter-spacing: -.8px;
}

.title p {
    margin: 12px 0 0;

    color: #817b8e;

    font-size: 14px;
}


/* =========================================================
   MAIN UPGRADER
========================================================= */

.upgrader {
    display: grid;

    grid-template-columns:
        minmax(300px, 1fr)
        minmax(360px, 470px)
        minmax(300px, 1fr);

    gap: 20px;

    align-items: stretch;
}


/* =========================================================
   PANELS
========================================================= */

.panel {
    min-height: 560px;

    padding: 20px;

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            rgba(24,19,37,.95),
            rgba(15,12,24,.96)
        );

    border: 1px solid rgba(255,255,255,.055);

    box-shadow:
        0 18px 50px rgba(0,0,0,.18);

    overflow: hidden;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;

    margin-bottom: 18px;

    color: #ddd8e7;

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1.3px;
}

.panel-title small {
    color: #706a7c;

    font-size: 11px;
    font-weight: 600;

    letter-spacing: 0;
}


/* =========================================================
   INVENTORY
========================================================= */

.inventory,
.targets {
    display: flex;
    flex-direction: column;

    gap: 9px;

    max-height: 495px;

    overflow-y: auto;

    padding-right: 4px;
}

.inventory::-webkit-scrollbar,
.targets::-webkit-scrollbar {
    width: 5px;
}

.inventory::-webkit-scrollbar-track,
.targets::-webkit-scrollbar-track {
    background: transparent;
}

.inventory::-webkit-scrollbar-thumb,
.targets::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.09);

    border-radius: 10px;
}


/* =========================================================
   INVENTORY ITEM
========================================================= */

.inventory-item,
.target-item {
    position: relative;

    display: flex;
    align-items: center;

    gap: 12px;

    min-height: 68px;

    padding: 10px 12px;

    border-radius: 13px;

    background: rgba(255,255,255,.025);

    border: 1px solid rgba(255,255,255,.045);

    cursor: pointer;

    transition:
        transform .16s ease,
        background .16s ease,
        border-color .16s ease,
        box-shadow .16s ease;
}

.inventory-item:hover,
.target-item:hover {
    transform: translateY(-2px);

    background: rgba(255,255,255,.045);

    border-color: rgba(145,95,255,.25);
}

.inventory-item.selected,
.target-item.selected {
    background:
        linear-gradient(
            135deg,
            rgba(130,80,255,.16),
            rgba(80,45,170,.07)
        );

    border-color: rgba(145,95,255,.55);

    box-shadow:
        0 0 20px rgba(110,70,255,.09),
        inset 0 0 20px rgba(110,70,255,.04);
}


/* =========================================================
   ITEM ICONS
========================================================= */

.item-icon,
.target-item-icon {
    flex: 0 0 46px;

    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background:
        radial-gradient(
            circle at 50% 30%,
            rgba(150,100,255,.13),
            rgba(255,255,255,.025)
        );

    border: 1px solid rgba(255,255,255,.05);

    font-size: 24px;
}

.item-info,
.target-item-info {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 5px;
}

.item-info strong,
.target-item-info strong {
    overflow: hidden;

    color: #eeeaf4;

    font-size: 13px;
    font-weight: 700;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.item-info span,
.target-item-info span {
    color: #8c8599;

    font-size: 12px;
}


/* =========================================================
   CENTER
========================================================= */

.center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 560px;

    padding: 20px;

    position: relative;
}

.arrow {
    position: absolute;

    left: -25px;
    top: 50%;

    transform: translateY(-50%);

    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: rgba(120,75,255,.08);

    border: 1px solid rgba(140,90,255,.15);

    color: #9b75ff;

    font-size: 23px;

    box-shadow:
        0 0 25px rgba(120,75,255,.08);
}


/* =========================================================
   RESULT BOX
========================================================= */

.result-box {
    width: 100%;
    max-width: 330px;

    padding: 27px 20px 24px;

    text-align: center;

    border-radius: 21px;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(130,80,255,.13),
            transparent 65%
        ),
        rgba(18,14,29,.92);

    border: 1px solid rgba(255,255,255,.065);

    box-shadow:
        0 20px 50px rgba(0,0,0,.22),
        inset 0 1px 0 rgba(255,255,255,.035);
}

.result-label {
    display: block;

    margin-bottom: 14px;

    color: #756e80;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 2px;
}

.target-icon {
    width: 82px;
    height: 82px;

    margin: 0 auto 15px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 20px;

    background:
        radial-gradient(
            circle,
            rgba(145,95,255,.16),
            rgba(255,255,255,.025)
        );

    border: 1px solid rgba(150,100,255,.15);

    font-size: 43px;

    box-shadow:
        0 0 35px rgba(120,75,255,.08);
}

.result-box h2 {
    margin: 0;

    color: #fff;

    font-size: 17px;
}

.target-value {
    margin-top: 7px;

    color: #a987ff;

    font-size: 14px;
    font-weight: 700;
}


/* =========================================================
   MULTIPLIER
========================================================= */

.multiplier {
    margin-top: 22px;

    color: #fff;

    font-size: 34px;
    font-weight: 900;

    letter-spacing: -.8px;

    text-shadow:
        0 0 25px rgba(145,90,255,.35);
}

.multiplier-scale {
    width: 100%;
    max-width: 350px;

    margin-top: 16px;
}

.scale-line {
    position: relative;

    width: 100%;
    height: 7px;

    overflow: hidden;

    border-radius: 20px;

    background: rgba(255,255,255,.06);
}

.scale-progress {
    width: 0;
    height: 100%;

    border-radius: inherit;

    background:
        linear-gradient(
            90deg,
            #6540d8,
            #a16cff
        );

    box-shadow:
        0 0 15px rgba(135,80,255,.45);

    transition: width .3s ease;
}

.scale-points {
    display: flex;
    justify-content: space-between;

    margin-top: 7px;

    color: #56505f;

    font-size: 9px;
}

.scale-points span.active {
    color: #9b7cff;
}


/* =========================================================
   DIFFICULTY
========================================================= */

.difficulty {
    min-height: 18px;

    margin-top: 13px;

    color: #91899e;

    font-size: 12px;
    font-weight: 600;

    text-align: center;
}

.difficulty.bad {
    color: #ff6372;
}


/* =========================================================
   UPGRADE BUTTON
========================================================= */

.upgrade-button {
    width: 100%;
    max-width: 350px;

    height: 52px;

    margin-top: 18px;

    border: 0;
    border-radius: 13px;

    background:
        linear-gradient(
            135deg,
            #7650ed,
            #9b62ff
        );

    color: #fff;

    font-size: 12px;
    font-weight: 900;

    letter-spacing: .7px;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(115,70,230,.22);

    transition:
        transform .16s ease,
        box-shadow .16s ease,
        opacity .16s ease;
}

.upgrade-button:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow:
        0 14px 35px rgba(115,70,230,.32);
}

.upgrade-button:active:not(:disabled) {
    transform: translateY(0);
}

.upgrade-button:disabled {
    opacity: .35;

    cursor: not-allowed;

    box-shadow: none;
}


/* =========================================================
   EMPTY
========================================================= */

.empty {
    min-height: 260px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: #686272;

    text-align: center;
}

.empty span {
    margin-bottom: 10px;

    font-size: 38px;

    opacity: .55;
}

.empty p {
    margin: 0;

    font-size: 12px;
}


/* =========================================================
   UPGRADE CHALLENGE
========================================================= */

.challenge {
    position: relative;

    margin-top: 35px;

    padding: 34px;

    overflow: hidden;

    border-radius: 26px;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(125,70,255,.18),
            transparent 52%
        ),
        linear-gradient(
            145deg,
            rgba(25,18,45,.98),
            rgba(11,9,21,.98)
        );

    border: 1px solid rgba(150,100,255,.22);

    box-shadow:
        0 25px 70px rgba(0,0,0,.38),
        inset 0 1px 0 rgba(255,255,255,.05);
}

.challenge.hidden {
    display: none;
}

.challenge::before {
    content: "";

    position: absolute;

    width: 500px;
    height: 500px;

    top: -320px;
    left: 50%;

    transform: translateX(-50%);

    background: rgba(130,70,255,.12);

    filter: blur(100px);

    pointer-events: none;
}

.challenge-header {
    position: relative;
    z-index: 1;

    text-align: center;
}

.challenge-header small {
    display: inline-block;

    padding: 7px 13px;

    border-radius: 999px;

    background: rgba(130,80,255,.10);

    border: 1px solid rgba(150,100,255,.18);

    color: #a98cff;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 2px;
}

.challenge-header h2 {
    margin: 14px 0 7px;

    color: #fff;

    font-size: 30px;
    font-weight: 850;

    letter-spacing: -.5px;
}

.challenge-header p {
    max-width: 650px;

    margin: 0 auto;

    color: #8f899e;

    font-size: 13px;

    line-height: 1.5;
}


/* =========================================================
   CHALLENGE GAME
========================================================= */

.challenge-game {
    position: relative;
    z-index: 1;

    max-width: 650px;

    margin: 28px auto 0;

    padding: 32px 25px 28px;

    border-radius: 23px;

    background:
        radial-gradient(
            circle at 50% 45%,
            rgba(255,255,255,.025),
            transparent 55%
        ),
        rgba(7,6,14,.72);

    border: 1px solid rgba(255,255,255,.055);

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.025);
}


/* =========================================================
   REACTION LIGHT
========================================================= */

.reaction-light {
    position: relative;

    width: 145px;
    height: 145px;

    margin: 8px auto 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    border: 5px solid rgba(255,255,255,.065);

    font-size: 56px;

    background: #1a080c;

    transition:
        background .08s ease,
        box-shadow .08s ease,
        transform .08s ease;

    user-select: none;
}

.reaction-light::before {
    content: "";

    position: absolute;

    inset: -13px;

    border-radius: 50%;

    border: 1px solid rgba(255,255,255,.035);
}

.reaction-light::after {
    content: "";

    position: absolute;

    inset: 7px;

    border-radius: 50%;

    border: 1px solid rgba(255,255,255,.035);

    pointer-events: none;
}


/* RED */

.reaction-light.red {
    background:
        radial-gradient(
            circle,
            rgba(255,45,65,.16),
            rgba(35,5,10,.98) 65%
        );

    box-shadow:
        0 0 25px rgba(255,40,60,.22),
        0 0 70px rgba(255,30,50,.08),
        inset 0 0 30px rgba(255,40,60,.13);

    transform: scale(1);
}


/* GREEN */

.reaction-light.green {
    background:
        radial-gradient(
            circle,
            rgba(45,255,125,.30),
            rgba(5,35,18,.98) 68%
        ) !important;

    border-color:
        rgba(80,255,145,.28);

    box-shadow:
        0 0 30px rgba(40,255,120,.65),
        0 0 80px rgba(40,255,120,.30),
        0 0 150px rgba(40,255,120,.12),
        inset 0 0 35px rgba(40,255,120,.22);

    transform: scale(1.06);

    animation:
        greenPulse .18s ease-out;
}

@keyframes greenPulse {

    0% {
        transform: scale(.94);
    }

    100% {
        transform: scale(1.06);
    }
}


/* =========================================================
   CHALLENGE TEXT
========================================================= */

.challenge-text {
    min-height: 30px;

    margin-bottom: 17px;

    color: #ddd8e7;

    font-size: 17px;
    font-weight: 800;

    letter-spacing: .2px;
}


/* =========================================================
   CHALLENGE BUTTON
========================================================= */

.challenge-button {
    width: min(100%, 350px);

    height: 55px;

    border: 1px solid rgba(150,100,255,.2);

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            rgba(120,75,235,.92),
            rgba(155,90,255,.92)
        );

    color: #fff;

    font-size: 12px;
    font-weight: 900;

    letter-spacing: 1px;

    cursor: pointer;

    box-shadow:
        0 12px 35px rgba(100,60,220,.2);

    transition:
        transform .14s ease,
        box-shadow .14s ease,
        background .14s ease;
}

.challenge-button:hover:not(:disabled) {
    transform: translateY(-2px);

    box-shadow:
        0 16px 42px rgba(100,60,220,.32);
}

.challenge-button:active:not(:disabled) {
    transform: scale(.98);
}

.challenge-button:disabled {
    opacity: .45;

    cursor: not-allowed;

    box-shadow: none;
}


/* =========================================================
   WAITING STATE
========================================================= */

.reaction-light.red + .challenge-text {
    color: #aaa3b4;
}


/* =========================================================
   NOTIFICATION
========================================================= */

.notification {
    position: fixed;

    left: 50%;
    bottom: 25px;

    z-index: 200;

    min-width: 250px;
    max-width: calc(100% - 30px);

    padding: 13px 18px;

    transform:
        translate(-50%, 20px);

    opacity: 0;

    pointer-events: none;

    border-radius: 12px;

    background:
        rgba(24,19,35,.96);

    border: 1px solid rgba(150,100,255,.2);

    color: #eeeaf5;

    font-size: 12px;
    font-weight: 600;

    text-align: center;

    box-shadow:
        0 15px 45px rgba(0,0,0,.4);

    backdrop-filter: blur(15px);

    transition:
        opacity .22s ease,
        transform .22s ease;
}

.notification.show {
    opacity: 1;

    transform:
        translate(-50%, 0);
}


/* =========================================================
   RARITY DETAILS
========================================================= */

.inventory-item.mythic,
.target-item.mythic {
    border-color: rgba(255,80,180,.08);
}

.inventory-item.legendary,
.target-item.legendary {
    border-color: rgba(150,90,255,.08);
}

.inventory-item.elite,
.target-item.elite {
    border-color: rgba(255,190,70,.07);
}

.inventory-item.premium,
.target-item.premium {
    border-color: rgba(80,170,255,.07);
}


/* =========================================================
   CHALLENGE CENTER FIX
========================================================= */

.challenge-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.reaction-light {
    margin-left: auto;
    margin-right: auto;
}

.challenge-text {
    width: 100%;
    text-align: center;
}

.challenge-button {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================================
   LOCKED TARGETS
========================================================= */

.target-item.disabled {
    opacity: 0.28;
    filter: grayscale(1);
    cursor: not-allowed;
    pointer-events: none;
    transform: none !important;
    box-shadow: none !important;
}

.target-item.disabled:hover {
    transform: none;
    border-color: inherit;
}

.target-item.disabled .target-item-icon {
    filter: grayscale(1);
}

.target-item.disabled .target-multiplier {
    color: #777;
}

/* multiplier inside target */
.target-multiplier {
    margin-left: auto;
    padding-left: 8px;
    font-size: 11px;
    font-weight: 800;
    color: #a970ff;
    white-space: nowrap;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 1100px) {

    .upgrader {
        grid-template-columns:
            1fr 1fr;
    }

    .center {
        grid-column: 1 / -1;

        order: -1;

        min-height: auto;

        padding: 30px 20px;
    }

    .panel {
        min-height: 500px;
    }

    .arrow {
        display: none;
    }
}


@media (max-width: 720px) {

    .navbar {
        height: auto;

        min-height: 68px;

        padding: 12px 17px;

        gap: 12px;
    }

    .nav-left {
        gap: 10px;
    }

    .logo {
        font-size: 18px;
    }

    .nav-links {
        gap: 2px;
    }

    .nav-links a {
        padding: 8px 7px;

        font-size: 11px;
    }

    .balance {
        padding: 7px 9px;
    }

    .balance span {
        display: none;
    }

    .page {
        width: min(
            100% - 25px,
            650px
        );

        padding-top: 25px;
    }

    .title h1 {
        font-size: 34px;
    }

    .upgrader {
        grid-template-columns: 1fr;
    }

    .center {
        grid-column: auto;

        order: -1;
    }

    .panel {
        min-height: 430px;
    }

    .inventory,
    .targets {
        max-height: 390px;
    }

    .challenge {
        padding: 23px 14px;
    }

    .challenge-header h2 {
        font-size: 25px;
    }

    .challenge-game {
        padding: 25px 15px 22px;
    }

    .reaction-light {
        width: 125px;
        height: 125px;

        font-size: 48px;
    }

    .result-box {
        max-width: 100%;
    }

    .multiplier {
        font-size: 30px;
    }
}


@media (max-width: 430px) {

    .nav-links a {
        font-size: 10px;

        padding-left: 5px;
        padding-right: 5px;
    }

    .logo {
        font-size: 16px;
    }

    .title h1 {
        font-size: 30px;
    }

    .challenge-header small {
        font-size: 9px;
    }

    .challenge-header h2 {
        font-size: 22px;
    }

    .reaction-light {
        width: 110px;
        height: 110px;

        font-size: 42px;
    }

    .challenge-button,
    .upgrade-button {
        height: 50px;
    }
}