
/* =========================================================
   KENO CASES
========================================================= */

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
}


/* =========================================================
   NAVBAR — SAME AS UPGRADER
========================================================= */

.navbar {
    width: 100%;
    height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 32px;

    box-sizing: border-box;

    border-bottom: 1px solid rgba(255, 255, 255, 0.06);

    background: rgba(10, 10, 18, 0.82);

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    position: sticky;
    top: 0;

    z-index: 100;
}

.nav-left {
    display: flex;
    align-items: center;

    gap: 32px;

    min-width: 0;
}

.logo {
    flex-shrink: 0;

    font-size: 21px;
    font-weight: 900;

    letter-spacing: 1px;

    color: #fff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;

    gap: 26px;

    white-space: nowrap;
}

.nav-links a {
    display: inline-flex;
    align-items: center;

    color: rgba(255, 255, 255, 0.58);

    text-decoration: none;

    font-size: 13px;
    font-weight: 700;

    transition:
        color 0.2s ease,
        opacity 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
}

.nav-right {
    display: flex;
    align-items: center;

    margin-left: auto;
}

.balance {
    display: flex;
    flex-direction: column;

    align-items: flex-end;
    justify-content: center;

    gap: 2px;

    white-space: nowrap;
}

.balance span {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    color: rgba(255, 255, 255, 0.42);
}

.balance strong {
    font-size: 14px;
    font-weight: 800;
    color: #fff;
}


/* =========================================================
   PAGE
========================================================= */

.cases-page {
    width: min(
        1320px,
        calc(100% - 40px)
    );

    margin: 0 auto;

    padding: 55px 0 100px;
}


/* =========================================================
   HEADER
========================================================= */

.cases-header {
    margin-bottom: 30px;
}

.eyebrow {
    color: #8d7cff;

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 2px;

    text-transform: uppercase;
}

.cases-header h1 {
    margin: 7px 0 5px;

    font-size: clamp(
        36px,
        5vw,
        54px
    );

    line-height: 1;

    letter-spacing: -2px;
}

.cases-header p {
    margin: 0;

    color: #858591;

    font-size: 15px;
}


/* =========================================================
   INVENTORY BANNER
========================================================= */

.inventory-banner {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 18px 20px;

    margin-bottom: 25px;

    border: 1px solid rgba(
        255,
        255,
        255,
        .07
    );

    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            rgba(130,105,255,.11),
            rgba(255,255,255,.025)
        );

    box-shadow:
        0 15px 45px rgba(0,0,0,.15);
}

.inventory-banner-left {
    display: flex;

    align-items: center;

    gap: 14px;
}

.inventory-banner-icon {
    width: 46px;
    height: 46px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: rgba(
        130,
        105,
        255,
        .12
    );

    font-size: 22px;
}

.inventory-banner-left strong {
    display: block;

    font-size: 14px;
}

.inventory-banner-left span {
    display: block;

    margin-top: 3px;

    color: #858591;

    font-size: 12px;
}

.inventory-button {
    display: inline-flex;

    align-items: center;

    gap: 10px;

    padding: 11px 15px;

    border-radius: 10px;

    color: #fff;

    text-decoration: none;

    background: rgba(
        255,
        255,
        255,
        .055
    );

    border: 1px solid rgba(
        255,
        255,
        255,
        .08
    );

    font-size: 11px;
    font-weight: 800;

    transition: .2s ease;
}

.inventory-button:hover {
    background: rgba(
        255,
        255,
        255,
        .09
    );

    transform: translateY(-1px);
}


/* =========================================================
   CASE SELECTOR
========================================================= */

.case-selector {
    display: grid;

    grid-template-columns:
        repeat(6, minmax(0, 1fr));

    gap: 10px;

    margin-bottom: 18px;
}

.case-selector-card {
    appearance: none;

    min-width: 0;

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 12px;

    border-radius: 14px;

    border: 1px solid rgba(
        255,
        255,
        255,
        .06
    );

    background: rgba(
        255,
        255,
        255,
        .025
    );

    color: #fff;

    cursor: pointer;

    text-align: left;

    transition:
        background .2s ease,
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}

.case-selector-card:hover {
    transform: translateY(-2px);

    background: rgba(
        255,
        255,
        255,
        .05
    );

    border-color: rgba(
        255,
        255,
        255,
        .12
    );
}

.case-selector-card.active {
    background:
        linear-gradient(
            135deg,
            rgba(130,105,255,.16),
            rgba(130,105,255,.05)
        );

    border-color: rgba(
        140,
        120,
        255,
        .5
    );

    box-shadow:
        0 0 25px rgba(
            110,
            90,
            255,
            .09
        );
}

.case-selector-icon {
    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: rgba(
        255,
        255,
        255,
        .045
    );

    font-size: 20px;
}

.case-selector-info {
    min-width: 0;
}

.case-selector-info strong {
    display: block;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 12px;
}

.case-selector-info span {
    display: block;

    margin-top: 3px;

    color: #8b8b98;

    font-size: 11px;
}


/* =========================================================
   MAIN CASE
========================================================= */

.case-main {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 30px;

    min-height: 180px;

    padding: 28px;

    margin-bottom: 20px;

    border-radius: 20px;

    border: 1px solid rgba(
        255,
        255,
        255,
        .07
    );

    background:
        radial-gradient(
            circle at 15% 50%,
            rgba(120,90,255,.12),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.018)
        );

    box-shadow:
        0 25px 70px rgba(0,0,0,.22);
}

.case-info {
    display: flex;

    align-items: center;

    gap: 20px;
}

.case-icon {
    flex: 0 0 auto;

    width: 92px;
    height: 92px;

    display: flex;

    align-items: center;
    justify-content: center;

    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            rgba(140,115,255,.18),
            rgba(255,255,255,.035)
        );

    border: 1px solid rgba(
        150,
        130,
        255,
        .18
    );

    font-size: 46px;

    box-shadow:
        inset 0 0 30px rgba(
            140,
            115,
            255,
            .05
        ),
        0 15px 40px rgba(0,0,0,.2);
}

.case-label {
    margin-bottom: 6px;

    color: #777783;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.5px;
}

.case-info h2 {
    margin: 0;

    font-size: 27px;

    letter-spacing: -.7px;
}

.case-info p {
    margin: 6px 0 0;

    color: #81818d;

    font-size: 13px;
}

.case-open-area {
    display: flex;

    align-items: center;

    gap: 20px;
}

.case-price {
    text-align: right;
}

.case-price span {
    display: block;

    color: #777783;

    font-size: 11px;
}

.case-price strong {
    display: block;

    margin-top: 4px;

    font-size: 22px;
}


/* =========================================================
   OPEN BUTTON
========================================================= */

.open-button {
    min-width: 185px;

    height: 48px;

    padding: 0 18px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    gap: 10px;

    border: 0;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #806cff,
            #604be8
        );

    color: #fff;

    font-size: 11px;
    font-weight: 900;

    letter-spacing: .5px;

    cursor: pointer;

    box-shadow:
        0 10px 30px rgba(
            100,
            75,
            255,
            .25
        );

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        opacity .2s ease;
}

.open-button b {
    padding-left: 8px;

    border-left: 1px solid rgba(
        255,
        255,
        255,
        .2
    );

    font-size: 10px;

    color: rgba(
        255,
        255,
        255,
        .75
    );
}

.open-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 14px 35px rgba(
            100,
            75,
            255,
            .36
        );
}

.open-button:active {
    transform: translateY(0);
}

.open-button:disabled {
    opacity: .45;

    cursor: not-allowed;

    transform: none;
}


/* =========================================================
   ROULETTE
========================================================= */

.roulette-section {
    margin-bottom: 25px;

    padding: 24px 0 20px;

    border-radius: 20px;

    border: 1px solid rgba(
        255,
        255,
        255,
        .07
    );

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,.035),
            rgba(255,255,255,.015)
        );

    overflow: hidden;
}

.roulette-title {
    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 0 24px 18px;
}

.roulette-title span {
    font-size: 11px;
    font-weight: 900;

    letter-spacing: 1.5px;
}

.roulette-title small {
    color: #777783;

    font-size: 11px;
}

.roulette-wrapper {
    width: 100%;

    overflow: hidden;

    position: relative;
}

.roulette-window {
    position: relative;

    width: 100%;
    height: 174px;

    overflow: hidden;

    background:
        rgba(0,0,0,.18);
}

.case-track {
    position: absolute;

    left: 0;
    top: 15px;

    height: 144px;

    display: flex;

    align-items: stretch;

    gap: 12px;

    width: max-content;

    transform: translate3d(0,0,0);

    will-change: transform;
}

.track-item {
    flex: 0 0 150px;

    width: 150px;
    height: 144px;

    display: flex;

    flex-direction: column;

    align-items: center;
    justify-content: center;

    padding: 12px;

    border-radius: 14px;

    border: 1px solid rgba(
        255,
        255,
        255,
        .07
    );

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.06),
            rgba(255,255,255,.018)
        );

    position: relative;

    overflow: hidden;
}

.track-item::before {
    content: "";

    position: absolute;

    inset: 0;

    background:
        radial-gradient(
            circle at 50% 25%,
            var(--rarity-glow),
            transparent 60%
        );

    opacity: .14;

    pointer-events: none;
}

.track-item-icon {
    position: relative;

    z-index: 1;

    font-size: 43px;

    margin-bottom: 9px;
}

.track-item-name {
    position: relative;

    z-index: 1;

    width: 100%;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    text-align: center;

    color: #dddde5;

    font-size: 10px;
    font-weight: 700;
}

.track-item-value {
    position: relative;

    z-index: 1;

    margin-top: 6px;

    color: #8d8d9a;

    font-size: 10px;
}


/* =========================================================
   RARITY COLORS
========================================================= */

.rarity-common {
    --rarity-color: #a4a4ad;
    --rarity-glow: #aaa;
}

.rarity-uncommon {
    --rarity-color: #61dc82;
    --rarity-glow: #61dc82;
}

.rarity-rare {
    --rarity-color: #5e9cff;
    --rarity-glow: #5e9cff;
}

.rarity-epic {
    --rarity-color: #b96dff;
    --rarity-glow: #b96dff;
}

.rarity-legendary {
    --rarity-color: #ffbd59;
    --rarity-glow: #ffbd59;
}

.track-item {
    border-bottom: 2px solid var(--rarity-color);
}


/* =========================================================
   MARKER
========================================================= */

.roulette-marker {
    position: absolute;

    z-index: 20;

    left: 50%;
    top: 0;

    width: 2px;
    height: 100%;

    transform: translateX(-50%);

    background: #fff;

    box-shadow:
        0 0 12px rgba(255,255,255,.8),
        0 0 30px rgba(130,105,255,.8);

    pointer-events: none;
}

.roulette-marker::before {
    content: "";

    position: absolute;

    left: 50%;
    top: 0;

    transform: translateX(-50%);

    width: 0;
    height: 0;

    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 9px solid #fff;
}

.roulette-marker::after {
    content: "";

    position: absolute;

    left: 50%;
    bottom: 0;

    transform: translateX(-50%);

    width: 0;
    height: 0;

    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 9px solid #fff;
}


/* =========================================================
   SIDE FADE
========================================================= */

.roulette-fade {
    position: absolute;

    top: 0;
    bottom: 0;

    width: 140px;

    z-index: 10;

    pointer-events: none;
}

.roulette-fade.left {
    left: 0;

    background:
        linear-gradient(
            90deg,
            rgba(12,12,17,1),
            rgba(12,12,17,0)
        );
}

.roulette-fade.right {
    right: 0;

    background:
        linear-gradient(
            270deg,
            rgba(12,12,17,1),
            rgba(12,12,17,0)
        );
}

.opening-status {
    text-align: center;

    margin-top: 14px;

    color: #777783;

    font-size: 11px;
}


/* =========================================================
   RESULT
========================================================= */

.result-section {
    margin-bottom: 30px;
}

.result-card {
    position: relative;

    overflow: hidden;

    display: flex;

    flex-direction: column;

    align-items: center;

    padding: 40px 25px;

    border-radius: 22px;

    border: 1px solid rgba(
        255,
        255,
        255,
        .08
    );

    background:
        radial-gradient(
            circle at 50% 30%,
            rgba(125,100,255,.12),
            transparent 35%
        ),
        rgba(255,255,255,.025);

    text-align: center;
}

.result-glow {
    position: absolute;

    width: 280px;
    height: 160px;

    top: -100px;

    border-radius: 50%;

    background: rgba(
        120,
        90,
        255,
        .2
    );

    filter: blur(50px);

    pointer-events: none;
}

.result-label {
    position: relative;

    color: #777783;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 2px;
}

.result-icon {
    position: relative;

    width: 100px;
    height: 100px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin: 18px 0;

    border-radius: 25px;

    background: rgba(
        255,
        255,
        255,
        .045
    );

    border: 1px solid rgba(
        255,
        255,
        255,
        .08
    );

    font-size: 55px;

    box-shadow:
        0 15px 40px rgba(0,0,0,.2);
}

.result-card h2 {
    position: relative;

    margin: 0;

    font-size: 24px;
}

.result-rarity {
    position: relative;

    margin-top: 8px;

    color: var(--rarity-color);

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 1.5px;
}

.result-value {
    position: relative;

    margin-top: 8px;

    color: #8b8b97;

    font-size: 12px;
}

.result-actions {
    position: relative;

    display: flex;

    align-items: center;

    gap: 10px;

    margin-top: 24px;
}

.secondary-button {
    height: 48px;

    padding: 0 18px;

    display: inline-flex;

    align-items: center;
    justify-content: center;

    border-radius: 11px;

    color: #fff;

    text-decoration: none;

    background: rgba(
        255,
        255,
        255,
        .055
    );

    border: 1px solid rgba(
        255,
        255,
        255,
        .08
    );

    font-size: 10px;
    font-weight: 900;

    transition: .2s ease;
}

.secondary-button:hover {
    background: rgba(
        255,
        255,
        255,
        .09
    );
}


/* =========================================================
   REWARDS
========================================================= */

.rewards-section {
    margin-top: 15px;
}

.section-heading {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    margin-bottom: 15px;
}

.section-heading h2 {
    margin: 5px 0 0;

    font-size: 25px;

    letter-spacing: -.7px;
}

.section-heading > span {
    color: #777783;

    font-size: 11px;
}

.rewards-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 12px;
}

.reward-card {
    position: relative;

    min-width: 0;

    min-height: 185px;

    display: flex;

    flex-direction: column;

    padding: 18px;

    border-radius: 16px;

    border: 1px solid rgba(
        255,
        255,
        255,
        .06
    );

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.045),
            rgba(255,255,255,.018)
        );

    overflow: hidden;

    transition:
        transform .2s ease,
        border-color .2s ease,
        background .2s ease;
}

.reward-card:hover {
    transform: translateY(-3px);

    border-color:
        color-mix(
            in srgb,
            var(--rarity-color) 35%,
            transparent
        );

    background:
        linear-gradient(
            145deg,
            rgba(255,255,255,.06),
            rgba(255,255,255,.025)
        );
}

.reward-card::after {
    content: "";

    position: absolute;

    left: 0;
    right: 0;
    bottom: 0;

    height: 2px;

    background: var(--rarity-color);

    opacity: .7;
}

.reward-icon {
    width: 58px;
    height: 58px;

    display: flex;

    align-items: center;
    justify-content: center;

    margin-bottom: 16px;

    border-radius: 15px;

    background:
        radial-gradient(
            circle,
            var(--rarity-glow),
            transparent 70%
        );

    background-color: rgba(
        255,
        255,
        255,
        .035
    );

    font-size: 30px;
}

.reward-info {
    min-width: 0;
}

.reward-info strong {
    display: block;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;

    font-size: 12px;
}

.reward-rarity {
    display: block;

    margin-top: 5px;

    color: var(--rarity-color);

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 1px;
}

.reward-bottom {
    margin-top: auto;

    padding-top: 15px;

    display: flex;

    align-items: center;
    justify-content: space-between;
}

.reward-value {
    font-size: 13px;
    font-weight: 800;
}

.reward-chance {
    color: #70707c;

    font-size: 10px;
}


/* =========================================================
   NOTIFICATION
========================================================= */

.notification {
    position: fixed;

    left: 50%;
    bottom: 25px;

    z-index: 999;

    transform: translateX(-50%);

    padding: 12px 18px;

    border-radius: 11px;

    background: #1d1d25;

    border: 1px solid rgba(
        255,
        255,
        255,
        .09
    );

    box-shadow:
        0 15px 40px rgba(0,0,0,.3);

    color: #eee;

    font-size: 12px;
}


/* =========================================================
   HIDDEN
========================================================= */

.hidden {
    display: none !important;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .case-selector {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .rewards-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

}


@media (max-width: 800px) {

    .case-main {
        flex-direction: column;

        align-items: stretch;
    }

    .case-open-area {
        justify-content: space-between;
    }

    .rewards-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 700px) {

    .navbar {
        padding: 0 18px;
    }

    .nav-left {
        gap: 18px;
    }

    .nav-links {
        gap: 14px;
    }

    .nav-links a {
        font-size: 12px;
    }

}


@media (max-width: 650px) {

    .cases-page {
        width: min(
            100% - 24px,
            600px
        );

        padding-top: 35px;
    }

    .inventory-banner {
        align-items: flex-start;

        flex-direction: column;
    }

    .inventory-button {
        width: 100%;

        justify-content: center;
    }

    .case-selector {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .case-main {
        padding: 20px;
    }

    .case-info {
        align-items: flex-start;
    }

    .case-icon {
        width: 70px;
        height: 70px;

        border-radius: 17px;

        font-size: 35px;
    }

    .case-open-area {
        flex-direction: column;

        align-items: stretch;
    }

    .case-price {
        text-align: left;
    }

    .open-button {
        width: 100%;
    }

    .result-actions {
        width: 100%;

        flex-direction: column;
    }

    .secondary-button,
    .result-actions .open-button {
        width: 100%;
    }

}


@media (max-width: 520px) {

    .nav-links {
        display: none;
    }

}


@media (max-width: 430px) {

    .cases-header h1 {
        font-size: 38px;
    }

    .case-selector-card {
        padding: 9px;
    }

    .case-selector-icon {
        width: 34px;
        height: 34px;

        font-size: 17px;
    }

    .case-selector-info strong {
        font-size: 11px;
    }

    .rewards-grid {
        grid-template-columns:
            1fr 1fr;

        gap: 8px;
    }

    .reward-card {
        min-height: 165px;

        padding: 13px;
    }

    .reward-icon {
        width: 48px;
        height: 48px;

        font-size: 25px;
    }

    .reward-info strong {
        font-size: 10px;
    }

    .roulette-window {
        height: 155px;
    }

    .case-track {
        height: 125px;

        top: 15px;
    }

    .track-item {
        flex-basis: 130px;

        width: 130px;
        height: 125px;
    }

    .track-item-icon {
        font-size: 35px;
    }

}