/* inventory.css */

* {
    box-sizing: border-box;
}

body {
    margin: 0;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(120,80,255,.14),
            transparent 35%
        ),
        #07070b;

    color: white;
}


/* =========================
   NAVBAR
========================= */

.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: relative;
    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;
}


/* =========================
   INVENTORY PAGE
========================= */

.inventory-page {
    width: min(
        1240px,
        calc(100% - 32px)
    );

    margin: 0 auto;

    padding: 55px 0 100px;
}

.inventory-header {
    display: flex;

    align-items: end;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 28px;
}

.eyebrow {
    color: #8d7cff;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 2px;

    margin-bottom: 8px;
}

.inventory-header h1 {
    margin: 0;

    font-size: clamp(
        38px,
        5vw,
        58px
    );
}

.inventory-header p {
    margin: 10px 0 0;

    color: #888894;

    font-size: 14px;
}

.back-button {
    padding: 12px 16px;

    border-radius: 11px;

    border: 1px solid rgba(
        255,
        255,
        255,
        .08
    );

    background: rgba(
        255,
        255,
        255,
        .03
    );

    color: #ddd;

    text-decoration: none;

    font-size: 11px;
    font-weight: 800;

    transition: .2s;
}

.back-button:hover {
    background: rgba(
        255,
        255,
        255,
        .06
    );
}


/* =========================
   STATS
========================= */

.inventory-stats {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 12px;

    margin-bottom: 35px;
}

.stat-card {
    padding: 20px;

    border-radius: 17px;

    border: 1px solid rgba(
        255,
        255,
        255,
        .07
    );

    background: rgba(
        255,
        255,
        255,
        .025
    );
}

.stat-card span {
    display: block;

    color: #777783;

    font-size: 9px;
    font-weight: 900;

    letter-spacing: 1.4px;
}

.stat-card strong {
    display: block;

    margin-top: 8px;

    font-size: 25px;
}


/* =========================
   TOOLBAR
========================= */

.inventory-toolbar {
    display: flex;

    align-items: end;
    justify-content: space-between;

    margin-bottom: 17px;
}

.inventory-toolbar h2 {
    margin: 0 0 4px;

    font-size: 25px;
}

.inventory-toolbar span {
    color: #777783;

    font-size: 11px;
}

.inventory-toolbar > div:last-child {
    display: flex;

    align-items: center;

    gap: 10px;
}


/* =========================
   UPGRADER BUTTON
========================= */

.upgrader-button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 13px 18px;

    border-radius: 11px;

    border: 1px solid rgba(
        140,
        110,
        255,
        .28
    );

    background:
        linear-gradient(
            135deg,
            rgba(115, 95, 255, .18),
            rgba(89, 70, 232, .10)
        );

    color: #dcd7ff;

    text-decoration: none;

    font-size: 10px;
    font-weight: 900;

    cursor: pointer;

    transition: .2s ease;
}

.upgrader-button:hover {
    transform: translateY(-2px);

    border-color: rgba(
        150,
        125,
        255,
        .55
    );

    background:
        linear-gradient(
            135deg,
            rgba(115, 95, 255, .30),
            rgba(89, 70, 232, .18)
        );

    color: #fff;

    box-shadow:
        0 8px 25px
        rgba(100, 75, 220, .16);
}

.upgrader-button:active {
    transform: translateY(0);
}


/* =========================
   SELL ALL
========================= */

.sell-all {
    border: 0;

    padding: 13px 18px;

    border-radius: 11px;

    color: white;

    background:
        linear-gradient(
            135deg,
            #735fff,
            #5946e8
        );

    font-size: 10px;
    font-weight: 900;

    cursor: pointer;

    transition: .2s;
}

.sell-all:hover {
    transform: translateY(-2px);
}

.sell-all:disabled {
    opacity: .4;

    cursor: not-allowed;

    transform: none;
}


/* =========================
   GRID
========================= */

.inventory-grid {
    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    gap: 12px;
}


/* =========================
   ITEM
========================= */

.item-card {
    position: relative;

    min-height: 230px;

    padding: 18px;

    overflow: hidden;

    border-radius: 17px;

    border: 1px solid rgba(
        255,
        255,
        255,
        .07
    );

    background: rgba(
        255,
        255,
        255,
        .025
    );

    transition: .2s;
}

.item-card:hover {
    transform: translateY(-3px);

    background: rgba(
        255,
        255,
        255,
        .045
    );
}

.item-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 100%;
    height: 2px;

    background: currentColor;
}

.item-top {
    display: flex;

    justify-content: space-between;
    align-items: start;
}

.item-icon {
    width: 70px;
    height: 70px;

    display: grid;

    place-items: center;

    border-radius: 17px;

    background: rgba(
        255,
        255,
        255,
        .04
    );

    font-size: 42px;
}

.item-rarity {
    font-size: 8px;

    font-weight: 900;

    letter-spacing: .8px;

    text-align: right;
}

.item-name {
    margin-top: 18px;

    min-height: 38px;

    font-size: 13px;

    font-weight: 800;
}

.item-value {
    margin-top: 7px;

    color: #9999a6;

    font-size: 11px;
}

.sell-button {
    width: 100%;

    margin-top: 15px;

    padding: 10px;

    border-radius: 9px;

    border: 1px solid rgba(
        255,
        255,
        255,
        .08
    );

    background: rgba(
        255,
        255,
        255,
        .04
    );

    color: #ddd;

    cursor: pointer;

    font-size: 9px;

    font-weight: 900;

    transition: .2s;
}

.sell-button:hover {
    background: rgba(
        255,
        255,
        255,
        .09
    );
}

.sell-button:disabled {
    opacity: .4;

    cursor: not-allowed;
}


/* =========================
   RARITIES
========================= */

.common {
    color: #aaa;
}

.uncommon {
    color: #62d87c;
}

.rare {
    color: #5c9dff;
}

.epic {
    color: #b76cff;
}

.legendary {
    color: #ffb84d;
}


/* =========================
   EMPTY
========================= */

.inventory-empty {
    padding: 80px 20px;

    text-align: center;

    border-radius: 20px;

    border: 1px dashed rgba(
        255,
        255,
        255,
        .1
    );

    background: rgba(
        255,
        255,
        255,
        .02
    );
}

.empty-icon {
    font-size: 55px;
}

.inventory-empty h2 {
    margin: 15px 0 5px;
}

.inventory-empty p {
    margin: 0 0 20px;

    color: #777783;

    font-size: 13px;
}

.inventory-empty a {
    display: inline-block;

    padding: 12px 17px;

    border-radius: 10px;

    color: white;

    background: #6955ef;

    text-decoration: none;

    font-size: 10px;

    font-weight: 900;
}


/* =========================
   NOTIFICATION
========================= */

.notification {
    position: fixed;

    right: 22px;
    bottom: 22px;

    z-index: 100;

    padding: 14px 18px;

    border-radius: 12px;

    background: #17171e;

    border: 1px solid rgba(
        255,
        255,
        255,
        .1
    );

    box-shadow:
        0 15px 50px
        rgba(0,0,0,.45);

    font-size: 12px;
}

.hidden {
    display: none !important;
}


/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1000px) {

    .inventory-grid {
        grid-template-columns:
            repeat(3, 1fr);
    }
}

@media (max-width: 700px) {

    .inventory-page {
        width: calc(100% - 20px);

        padding-top: 30px;
    }

    .inventory-header {
        align-items: stretch;

        flex-direction: column;
    }

    .inventory-stats {
        grid-template-columns: 1fr;
    }

    .inventory-toolbar {
        align-items: stretch;

        flex-direction: column;

        gap: 14px;
    }

    .inventory-toolbar > div:last-child {
        width: 100%;
    }

    .upgrader-button,
    .sell-all {
        flex: 1;
        text-align: center;
    }

    .inventory-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .navbar {
        padding: 0 20px;
    }

    .nav-left {
        gap: 20px;
    }

    .nav-links {
        gap: 16px;
    }
}

@media (max-width: 550px) {

    .nav-links {
        gap: 10px;
    }

    .nav-links a {
        font-size: 11px;
    }

    .logo {
        font-size: 19px;
    }

    .balance span {
        font-size: 9px;
    }

    .balance strong {
        font-size: 13px;
    }
}

@media (max-width: 450px) {

    .inventory-grid {
        grid-template-columns: 1fr;
    }

    .navbar {
        height: auto;

        min-height: 72px;

        padding: 14px 15px;
    }

    .nav-left {
        gap: 14px;
    }

    .nav-links {
        gap: 9px;
    }

    .nav-links a {
        font-size: 10px;
    }
}

/* =========================
   SEARCH / FILTERS
========================= */

.inventory-controls {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 190px 190px;
    gap: 12px;
    margin-bottom: 14px;
}

.search-box,
.inventory-controls select {
    min-width: 0;
    min-height: 46px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 12px;
    background: #101018;
    color: #eee;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
}

.search-box > span {
    color: #9a88ff;
    font-size: 23px;
}

.search-box input {
    width: 100%;
    min-width: 0;
    outline: none;
    border: 0;
    background: transparent;
    color: #fff;
    font: inherit;
    font-size: 13px;
}

.search-box input::placeholder {
    color: #777783;
}

.inventory-controls select {
    padding: 0 12px;
    font: inherit;
    font-size: 12px;
    outline: none;
}

.inventory-controls select:focus,
.search-box:focus-within {
    border-color: rgba(141,124,255,.65);
}

/* =========================
   SELECTION TOOLBAR
========================= */

.selection-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 14px;
    background: rgba(255,255,255,.025);
}

.select-all-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c9c9d5;
    font-size: 12px;
    cursor: pointer;
}

.select-all-label input,
.item-select {
    accent-color: #806bff;
    cursor: pointer;
}

#selectedInfo {
    color: #a69bff;
    font-size: 12px;
    font-weight: 800;
}

.secondary-button,
.sell-selected {
    padding: 11px 13px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 10px;
    background: rgba(255,255,255,.04);
    color: #ddd;
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    transition: .2s;
}

.secondary-button:hover {
    border-color: rgba(141,124,255,.45);
    background: rgba(141,124,255,.10);
}

.sell-selected {
    margin-left: auto;
    border: 0;
    background: linear-gradient(135deg,#735fff,#5946e8);
    color: #fff;
}

.sell-selected:disabled,
.secondary-button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* =========================
   ITEM SELECT CHECKBOX
========================= */

.item-card {
    min-width: 0;
}

.item-select-row {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 12px;
    color: #858594;
    font-size: 10px;
}

.item-card.is-selected {
    border-color: rgba(141,124,255,.75);
    background: rgba(117,94,255,.08);
    box-shadow: 0 0 0 1px rgba(141,124,255,.15);
}

.item-date {
    margin-top: 7px;
    color: #737382;
    font-size: 10px;
}

.item-card .sell-button {
    position: relative;
    z-index: 1;
}

/* =========================
   EMPTY SEARCH
========================= */

.no-search-results {
    padding: 45px 20px;
    margin-top: 10px;
    text-align: center;
    border: 1px dashed rgba(255,255,255,.1);
    border-radius: 18px;
    background: rgba(255,255,255,.02);
}

.no-search-results > div {
    font-size: 35px;
}

.no-search-results h3 {
    margin: 12px 0 5px;
}

.no-search-results p {
    margin: 0 0 16px;
    color: #858594;
    font-size: 12px;
}

/* =========================
   HISTORY
========================= */

.history-section {
    margin-top: 65px;
}

.history-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.history-heading h2 {
    margin: 0;
    font-size: 25px;
}

.history-heading p {
    margin: 7px 0 0;
    color: #858594;
    font-size: 12px;
}

.history-list {
    display: grid;
    gap: 9px;
}

.history-entry {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 15px;
    border: 1px solid rgba(255,255,255,.07);
    border-radius: 13px;
    background: rgba(255,255,255,.025);
}

.history-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,.05);
    font-size: 25px;
}

.history-main {
    flex: 1;
    min-width: 0;
}

.history-name {
    overflow-wrap: anywhere;
    color: #eee;
    font-size: 12px;
    font-weight: 800;
}

.history-meta {
    margin-top: 5px;
    color: #777783;
    font-size: 10px;
}

.history-right {
    flex-shrink: 0;
    text-align: right;
}

.history-event {
    font-size: 10px;
    font-weight: 900;
}

.history-event.obtained {
    color: #69d991;
}

.history-event.sold {
    color: #ff8e9c;
}

.history-price {
    margin-top: 5px;
    color: #ddd;
    font-size: 12px;
    font-weight: 800;
}

.history-status {
    color: #777783;
    font-size: 12px;
    text-align: center;
    padding: 14px;
}

.history-status:empty {
    display: none;
}

@media (max-width: 800px) {
    .inventory-controls {
        grid-template-columns: 1fr 1fr;
    }

    .search-box {
        grid-column: 1 / -1;
    }
}

@media (max-width: 550px) {
    .inventory-controls {
        grid-template-columns: 1fr;
    }

    .search-box {
        grid-column: auto;
    }

    .selection-toolbar {
        align-items: stretch;
    }

    .sell-selected {
        width: 100%;
        margin-left: 0;
    }

    .history-heading {
        align-items: flex-start;
    }

    .history-entry {
        padding: 10px;
        gap: 9px;
    }

    .history-icon {
        width: 36px;
        height: 36px;
        font-size: 21px;
    }
}

/* =========================
   ITEM LOCK
========================= */

.lock-button {
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    border: 1px solid rgba(141, 124, 255, .25);
    border-radius: 9px;
    background: rgba(141, 124, 255, .08);
    color: #c7bcff;
    font-size: 10px;
    font-weight: 900;
    cursor: pointer;
    transition: .2s ease;
}

.lock-button:hover {
    background: rgba(141, 124, 255, .17);
    border-color: rgba(141, 124, 255, .55);
}

.lock-button.locked {
    color: #ffcc7a;
    border-color: rgba(255, 190, 90, .3);
    background: rgba(255, 190, 90, .08);
}

.lock-button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.item-card.is-locked {
    border-color: rgba(255, 190, 90, .35);
}

.locked-badge {
    display: inline-block;
    margin-top: 7px;
    color: #ffcc7a;
    font-size: 9px;
    font-weight: 900;
}
/* KENO CRAFTING BUTTON */
.crafting-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 13px 18px;
    border: 1px solid rgba(168, 85, 247, 0.55);
    border-radius: 12px;
    background: linear-gradient(
        135deg,
        rgba(126, 34, 206, 0.28),
        rgba(88, 28, 135, 0.16)
    );
    color: #e9d5ff;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.7px;
    white-space: nowrap;
    transition: 0.2s ease;
}

.crafting-button:hover {
    transform: translateY(-2px);
    border-color: #c084fc;
    background: linear-gradient(
        135deg,
        rgba(147, 51, 234, 0.45),
        rgba(109, 40, 217, 0.3)
    );
    box-shadow: 0 0 22px rgba(168, 85, 247, 0.2);
}

.crafting-icon {
    font-size: 17px;
}

@media (max-width: 600px) {
    .inventory-actions {
        flex-wrap: wrap;
    }

    .crafting-button {
        flex: 1;
    }
}