html {
    background: #0b0b0b;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 0, rgba(85, 94, 101, .26), transparent 360px),
        linear-gradient(180deg, #2a2a2a 0, #151515 230px, #0b0b0b 100%);
    color: #c7c7c7;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 0;
}

a {
    color: #b8b8b8;
}

a:hover {
    color: #ffffff;
}

#mt {
    position: relative;
    z-index: 1;
    max-width: 940px;
    height: 35px;
    margin: 18px auto 0;
    background: linear-gradient(180deg, #555 0, #343434 48%, #202020 100%);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 4px 14px rgba(0, 0, 0, .34);
    text-shadow: none;
}

#mt > div {
    width: auto;
    min-width: 118px;
    height: 35px;
    padding: 0 16px;
    background: transparent;
    color: #d5d5d5;
    font-size: .78rem;
    font-weight: normal;
    line-height: 35px;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
}

#mt > div:hover,
#mt > div:first-child {
    background: linear-gradient(180deg, #747474 0, #555 100%);
    color: #ffffff;
}

main,
.fl-lounge-shell {
    max-width: 960px;
    width: calc(100% - 24px);
    margin: 16px auto 36px;
    float: none;
    padding: 0 !important;
    height: auto !important;
}

.fl-lounge-shell::after {
    content: "";
    display: block;
    clear: both;
}

.fl-lounge-shell {
    text-align: center;
}

.fl-lounge-panel {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 12px;
    border: 1px solid #0a0a0a;
    background: linear-gradient(180deg, #292929 0, #1b1b1b 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 8px 18px rgba(0, 0, 0, .28);
    text-align: left;
}

.fl-panel-title {
    padding: 8px 10px;
    border-bottom: 1px solid #0b0b0b;
    background: linear-gradient(180deg, #3d3d3d 0, #282828 100%);
    color: #f0f0f0;
    font-size: 13px;
    line-height: 18px;
    text-transform: uppercase;
}

.fl-tool-body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px;
}

.fl-tool-body h1 {
    margin: 0 0 4px;
    color: #ffffff;
    font-size: 22px;
    font-weight: normal;
    line-height: 28px;
}

.fl-tool-body p {
    margin: 0;
    color: #9d9d9d;
    font-size: 12px;
    line-height: 18px;
}

.fl-green-button,
.fl-green-button:visited {
    display: inline-block;
    min-width: 128px;
    box-sizing: border-box;
    padding: 9px 18px;
    border: 1px solid #2f4b0b;
    background: linear-gradient(180deg, #7ea64b 0, #5c7e10 48%, #405907 100%);
    color: #ffffff;
    font-size: 13px;
    line-height: 16px;
    text-align: center;
    text-decoration: none;
    text-shadow: 1px 1px 0 rgba(0, 0, 0, .55);
    cursor: pointer;
}

.fl-green-button:hover {
    background: linear-gradient(180deg, #9ac35d 0, #6f9415 48%, #4f6d08 100%);
}

.fl-trades-page {
    min-height: 176px;
}

.fl-page-selector {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    clear: both;
    width: auto;
    max-width: 100%;
    margin: 0 auto 12px;
    padding: 7px 8px;
    border: 1px solid #0a0a0a;
    background: linear-gradient(180deg, #2b2b2b 0, #1d1d1d 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 5px 14px rgba(0, 0, 0, .22);
    overflow-x: auto;
    white-space: nowrap;
}

.fl-page-selector a,
.fl-page-selector strong,
.fl-page-selector span {
    display: inline-block;
    flex: 0 0 auto;
    min-width: 26px;
    box-sizing: border-box;
    padding: 5px 8px;
    border: 1px solid #111;
    background: linear-gradient(180deg, #4a4a4a 0, #313131 100%);
    color: #d0d0d0;
    font-size: 12px;
    line-height: 14px;
    text-align: center;
    text-decoration: none;
}

.fl-page-selector a:hover {
    background: linear-gradient(180deg, #686868 0, #454545 100%);
    color: #ffffff;
}

.fl-page-selector strong {
    background: linear-gradient(180deg, #777 0, #555 100%);
    color: #ffffff;
    font-weight: bold;
}

.fl-page-selector span {
    min-width: 18px;
    border-color: transparent;
    background: transparent;
    color: #777;
}

.fl-trade-list {
    padding: 10px;
}

.fl-empty-state,
.fl-loading,
.fl-error {
    padding: 18px;
    color: #8f8f8f;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
}

.fl-error {
    color: #ff9b88;
}

.fl-trade-row {
    margin-bottom: 12px;
    padding: 0;
    border: 1px solid #0d0d0d;
    background: linear-gradient(180deg, #2f2f2f 0, #202020 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 5px 16px rgba(0, 0, 0, .32);
}

.fl-trade-row-head {
    padding: 9px 11px;
    border-bottom: 1px solid #111;
    background: linear-gradient(180deg, #4b4b4b 0, #343434 52%, #292929 100%);
    color: #b8b8b8;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fl-trade-row-head img {
    width: 14px;
    height: 14px;
    margin: 0 6px 0 0;
    vertical-align: -2px;
}

.fl-star-normal {
    opacity: .38;
    filter: grayscale(1);
}

.fl-star-donor {
    opacity: .95;
    filter: sepia(1) saturate(5) hue-rotate(48deg) brightness(1.05);
}

.fl-trade-row-head span {
    color: #ffffff;
    font-weight: bold;
}

.fl-profile-link {
    color: #ffffff;
    text-decoration: none;
}

.fl-profile-link:hover span {
    color: #dcdedf;
    text-decoration: underline;
}

.fl-trade-row-head small {
    color: #969696;
    font-size: 12px;
    font-weight: normal;
}

.fl-trade-description {
    padding: 0 18px 20px;
    color: #e4e4e4;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    line-height: 20px;
    text-shadow: 1px 1px 1px #000;
    word-break: break-word;
}

.fl-trade-description span {
    color: #f0f0f0;
    font-weight: normal;
}

.fl-cancel-ad {
    float: right;
    margin: -7px 0 0 10px;
    padding: 7px 16px;
    border: 2px solid #4b0909;
    border-radius: 4px;
    background: linear-gradient(180deg, #9d2d2d 0%, #7b1818 50%, #551010 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .18);
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    line-height: 14px;
    text-transform: uppercase;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, .55);
    cursor: pointer;
    transition: all .2s;
}

.fl-cancel-ad:hover {
    color: #ffffff;
    background: linear-gradient(180deg, #bd3a3a 0%, #932020 50%, #671313 100%);
    box-shadow: 0 3px 6px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .26);
    transform: translateY(-1px);
}

.fl-cancel-ad:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(0, 0, 0, .2);
}

.fl-cancel-ad:disabled {
    opacity: .55;
    cursor: default;
}

.fl-admin-cancel-ad {
    float: right;
    width: 22px;
    height: 22px;
    margin: -2px 0 0 8px;
    padding: 0;
    border: 1px solid #340606;
    border-radius: 2px;
    background: linear-gradient(180deg, #9b2020 0, #641010 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    line-height: 18px;
    text-align: center;
    text-shadow: 1px 1px 1px #000;
    cursor: pointer;
}

.fl-admin-cancel-ad:hover {
    background: linear-gradient(180deg, #c33131 0, #7d1818 100%);
}

.fl-admin-cancel-ad:disabled {
    opacity: .55;
    cursor: default;
}

.fl-trade-offer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 150px;
    padding: 12px;
}

.fl-offer-box {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
    align-content: start;
    gap: 6px;
    min-height: 132px;
    padding: 6px;
    border: 1px solid #101010;
    border-radius: 0;
    background: linear-gradient(180deg, #3a3a3a 0, #282828 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

.fl-offer-arrow {
    width: 46px;
    height: 38px;
    margin: 0 auto;
    opacity: .55;
    background: #707070;
    clip-path: polygon(0 30%, 56% 30%, 56% 0, 100% 50%, 56% 100%, 56% 70%, 0 70%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}

.fl-offer-item,
.fl-mini-item {
    display: block;
    position: relative;
    width: 100%;
    max-width: 92px;
    height: 60px;
    margin: 0 auto;
    border: 1px solid #111;
    border-bottom: 2px solid #777;
    border-radius: 0;
    background: radial-gradient(circle at 50% 16%, #4b4b4b 0, #303030 64%, #222 100%);
    overflow: hidden;
    text-align: center;
    vertical-align: top;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.fl-offer-item.fl-stattrak-wanted {
    border-color: #ff6a00;
    border-bottom-color: #eb4b4b !important;
}

.fl-offer-item img,
.fl-mini-item img {
    display: block;
    width: 100%;
    height: 42px;
    margin: 1px auto 0;
    object-fit: contain;
}

.fl-offer-item span,
.fl-mini-item span {
    display: block;
    padding: 0 4px;
    color: #d4d4d4;
    font-size: 9px;
    line-height: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fl-any-offers {
    border-bottom: 2px solid #777;
    background: radial-gradient(circle at 50% 16%, #4b4b4b 0, #303030 64%, #222 100%);
}

.fl-any-offers img {
    width: 80px;
    height: 60px;
}

.item-tooltip {
    position: fixed;
    z-index: 10000;
    width: 300px;
    max-height: calc(100vh - 24px);
    padding: 14px;
    border: 1px solid #070707;
    background: linear-gradient(180deg, #2c2c2c 0, #191919 100%);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06);
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s ease, visibility .15s ease;
    overflow-y: auto;
}

.item-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.tooltip-image {
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 12px;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, .04);
}

.tooltip-name {
    margin-bottom: 8px;
    font-size: 19px;
    font-weight: bold;
    line-height: 24px;
}

.tooltip-detail {
    margin-bottom: 4px;
    color: #999;
    font-size: 12px;
    line-height: 1.4;
}

.item-tooltip .stickers-section {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #333;
}

.item-tooltip .sticker-item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    margin: 0 0 8px;
    padding: 4px;
    border: 0;
    border-radius: 3px;
    background: rgba(255, 255, 255, .05);
    color: #c7c7c7;
    font-size: 12px;
    line-height: 15px;
}

.item-tooltip .sticker-item > div {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-tooltip .sticker-image {
    width: 40px !important;
    height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    flex: 0 0 40px !important;
}

#trade_modal_overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(0, 0, 0, .78);
}

#trade_modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    z-index: 9999;
    width: min(820px, calc(100vw - 28px));
    height: min(620px, calc(100vh - 28px));
    transform: translate(-50%, -50%);
    border: 1px solid #050505;
    background: #1b1b1b;
    box-shadow: 0 12px 36px rgba(0, 0, 0, .65);
    overflow: hidden;
}

.trade_modal_header {
    padding: 13px 15px;
    border-bottom: 1px solid #080808;
    background: linear-gradient(180deg, #484848 0, #2d2d2d 100%);
    color: #ffffff;
    font-size: 18px;
    font-weight: normal;
}

.trade_modal_content {
    height: calc(100% - 110px);
    overflow-y: auto;
    padding: 16px;
    background: #171717;
}

.trade_builder_tabs {
    display: flex;
    margin-bottom: 12px;
    border: 1px solid #080808;
    background: #101010;
}

.trade_builder_tab {
    flex: 1;
    height: 32px;
    border: 0;
    border-right: 1px solid #080808;
    background: linear-gradient(180deg, #393939 0, #252525 100%);
    color: #9d9d9d;
    font-size: 12px;
    cursor: pointer;
}

.trade_builder_tab:last-child {
    border-right: 0;
}

.trade_builder_tab.active {
    background: linear-gradient(180deg, #5a5a5a 0, #3a3a3a 100%);
    color: #ffffff;
}

.trade_builder_step {
    display: none;
}

.trade_builder_step.active {
    display: block;
}

.trade_modal_actions {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    padding: 13px 15px;
    border-top: 1px solid #080808;
    background: #202020;
}

.trade_form_row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.trade_form_row_block {
    display: block;
}

.trade_form_row label {
    min-width: 118px;
    color: #c7c7c7;
    font-size: 12px;
}

.trade_form_row_block label {
    display: block;
    margin-bottom: 5px;
}

.trade_text_input {
    flex: 1;
    height: 28px;
    box-sizing: border-box;
    border: 1px solid #080808;
    background: #0f0f0f;
    color: #e5e5e5;
    padding: 5px 8px;
    font-size: 12px;
}

.trade_description_input {
    display: block;
    width: 100%;
    min-height: 58px;
    max-height: 96px;
    height: auto;
    resize: vertical;
    line-height: 17px;
}

.trade_launch_banner {
    margin-bottom: 10px;
    color: #9d9d9d;
    font-size: 12px;
}

.inventory_grid,
.wanted_grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
    gap: 8px;
    min-height: 186px;
    max-height: 360px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #080808;
    background: #111;
}

.inventory_item {
    position: relative;
    height: 110px;
    border: 1px solid #0a0a0a;
    background: linear-gradient(180deg, #303030 0, #1d1d1d 100%);
    cursor: pointer;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}

.inventory_item:hover,
.inventory_item.selected {
    border-color: #8f8f8f;
    background: linear-gradient(180deg, #444 0, #292929 100%);
}

.inventory_item img {
    display: block;
    width: 100%;
    height: 60px;
    object-fit: contain;
}

.inventory_item_rarity {
    height: 3px;
}

.item-text {
    padding: 4px 6px;
}

.item-name,
.item-skin {
    color: #d5d5d5;
    font-size: 11px;
    line-height: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-skin {
    color: #8f8f8f;
}

.inventory_item .item-float {
    color: #c9c9c9;
    font-size: 10px;
    line-height: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trade_form_section {
    margin-top: 12px;
}

.selected_item_card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border: 1px solid #0a0a0a;
    background: #202020;
}

.selected_item_card_compact {
    display: inline-flex;
    width: calc(50% - 7px);
    min-width: 230px;
    margin: 0 6px 6px 0;
    box-sizing: border-box;
    vertical-align: top;
}

.selected_wanted_card {
    position: relative;
    min-height: 58px;
    padding-right: 82px;
}

.selected_item_card img {
    width: 96px;
    height: 60px;
    object-fit: contain;
}

.selected_item_name {
    color: #ffffff;
    font-size: 14px;
    line-height: 18px;
}

.selected_item_meta {
    color: #888;
    font-size: 11px;
    line-height: 16px;
}

.wanted_stattrak_toggle {
    position: absolute;
    right: 10px;
    top: 12px;
    width: 60px;
    color: #8f8f8f;
    font-size: 11px;
    line-height: 15px;
    text-align: center;
    cursor: pointer;
    user-select: none;
}

.wanted_stattrak_toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.wanted_stattrak_toggle i {
    display: block;
    position: relative;
    width: 26px;
    height: 26px;
    margin: 4px auto 0;
    border: 1px solid #050505;
    background: linear-gradient(180deg, #101010 0, #070707 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 1px 0 rgba(255, 255, 255, .04);
}

.wanted_stattrak_toggle input:checked + i {
    border-color: #6a9b18;
    background: linear-gradient(180deg, #86b938 0, #5f8618 52%, #3f5f0b 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 0 7px rgba(108, 170, 30, .35);
}

.wanted_stattrak_toggle input:checked + i::after {
    content: "";
    position: absolute;
    left: 7px;
    top: 4px;
    width: 8px;
    height: 14px;
    border: solid #ffffff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .45));
}

.cancel_button,
.list_button {
    min-width: 104px;
    padding: 8px 14px;
    border: 1px solid #0a0a0a;
    background: linear-gradient(180deg, #454545 0, #2d2d2d 100%);
    color: #d8d8d8;
    font-size: 12px;
    cursor: pointer;
}

.cancel_button:hover {
    color: #ffffff;
}

.list_button {
    opacity: .45;
    cursor: default;
}

.list_button.enabled {
    opacity: 1;
    border-color: #2f4b0b;
    background: linear-gradient(180deg, #7ea64b 0, #5c7e10 48%, #405907 100%);
    color: #ffffff;
    cursor: pointer;
}


@media screen and (max-width: 760px) {
    #mt {
        width: calc(100% - 24px);
        margin-top: 10px;
    }

    #mt > div {
        min-width: 0;
        width: 50%;
        box-sizing: border-box;
        padding: 0;
    }

    .fl-tool-body,
    .trade_form_row {
        display: block;
    }

    .fl-green-button {
        margin-top: 14px;
    }

    .fl-trade-offer {
        grid-template-columns: 1fr;
    }

    .fl-offer-arrow {
        transform: rotate(90deg);
    }

    .trade_form_row label {
        display: block;
        margin-bottom: 5px;
    }

    .trade_text_input {
        width: 100%;
    }
}
