/* ==========================================================
   Market Module Styles - neo_remastered Design System
   ========================================================== */

.market-page-wrapper {
    width: 100%;
    max-width: 1380px;
    margin: 0 auto;
    padding: 20px 16px 60px;
    color: #f1f5f9;
    font-family: inherit;
    box-sizing: border-box;
}

/* 1. Hero Banner */
.market-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 24px 28px;
    background: linear-gradient(135deg, rgba(22, 27, 44, 0.85) 0%, rgba(15, 20, 35, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
}

.market-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 380px;
    height: 380px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.18) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.market-hero > * {
    position: relative;
    z-index: 1;
}

.market-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.16);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #818cf8;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.market-badge svg {
    width: 14px;
    height: 14px;
}

.market-balance-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px 20px;
    background: rgba(14, 18, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 14px;
    min-width: 280px;
}

.market-credit-badge {
    margin-top: 4px;
}

.market-credit-badge .lbl {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.market-credit-badge .val-box {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.market-credit-badge .val {
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.market-credit-badge .sym {
    font-size: 12px;
    font-weight: 600;
    color: #38bdf8;
    padding: 2px 6px;
    background: rgba(56, 189, 248, 0.14);
    border-radius: 6px;
}

.credit-diamond-icon {
    width: 17px;
    height: 17px;
    color: #38bdf8;
    flex-shrink: 0;
    fill: #38bdf8;
}

.market-user-quick-links {
    display: flex;
    gap: 8px;
}

.market-btn-inventory,
.market-btn-topup {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.market-btn-inventory {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #cbd5e1;
}

.market-btn-inventory:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.market-btn-topup {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.market-btn-topup:hover {
    background: rgba(56, 189, 248, 0.28);
    color: #fff;
}

/* 2. Nav Tabs */
.market-nav-tabs {
    display: flex;
    gap: 10px;
    margin: 22px 0 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 10px;
    overflow-x: auto;
}

.market-nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: #94a3b8;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.market-nav-tab svg {
    width: 16px;
    height: 16px;
}

.market-nav-tab:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #f1f5f9;
}

.market-nav-tab.active {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    color: #818cf8;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.18);
}

.market-tab-count {
    padding: 1px 7px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 11px;
    color: #cbd5e1;
}

.market-nav-tab.active .market-tab-count {
    background: rgba(99, 102, 241, 0.4);
    color: #fff;
}

/* 3. Toolbar: Search & Filters */
.market-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: rgba(22, 27, 44, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
    margin-bottom: 20px;
}

.market-search-wrap {
    position: relative;
    flex: 1 1 240px;
    min-width: 220px;
}

.market-search-wrap svg,
.market-search-wrap .market-search-icon {
    position: absolute !important;
    left: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    width: 16px !important;
    height: 16px !important;
    color: #64748b !important;
    pointer-events: none !important;
    z-index: 5 !important;
}

.market-search-wrap input[type="text"],
.market-search-wrap input,
.market-search-wrap .market-search-input {
    width: 100% !important;
    height: 40px !important;
    padding-left: 48px !important;
    padding-right: 36px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background: rgba(14, 18, 30, 0.8) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 10px !important;
    color: #f1f5f9 !important;
    font-size: 13.5px !important;
    outline: none !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
}

.market-search-input:focus {
    border-color: rgba(99, 102, 241, 0.6);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}

.market-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 13px;
    cursor: pointer;
    padding: 4px;
}

.market-filter-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.market-chip-btn {
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 9px;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.18s ease;
}

.market-chip-btn:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #fff;
}

.market-chip-btn.active {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.55);
    color: #fff;
    font-weight: 600;
}

.market-filter-dropdowns {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-left: auto;
}

.market-select-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.market-select-wrap .market-select-icon {
    position: absolute;
    left: 12px;
    width: 15px;
    height: 15px;
    color: #818cf8;
    stroke: #818cf8;
    pointer-events: none;
    z-index: 1;
}

.market-select {
    height: 40px;
    padding: 0 32px 0 14px;
    background: rgba(14, 18, 30, 0.85) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.6)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 12px center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #e2e8f0;
    font-size: 13px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    transition: all 0.2s ease;
}

.market-select-wrap .market-category-select {
    padding-left: 36px;
    min-width: 200px;
    font-weight: 500;
    color: #fff;
    border-color: rgba(99, 102, 241, 0.35);
    background-color: rgba(20, 25, 45, 0.95);
}

.market-select:focus,
.market-select:hover {
    border-color: rgba(99, 102, 241, 0.65);
    background-color: rgba(26, 32, 58, 0.95);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.18);
}

.market-select option {
    background: #0f1423;
    color: #f1f5f9;
    padding: 8px 12px;
}

/* 4. Market Grid */
.market-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.market-card {
    background: linear-gradient(180deg, rgba(22, 27, 44, 0.75) 0%, rgba(15, 19, 32, 0.9) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    backdrop-filter: blur(8px);
}

.market-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    border-color: rgba(255, 255, 255, 0.18);
}

.market-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--rarity-color, #4b69ff);
    box-shadow: 0 0 12px var(--rarity-color, #4b69ff);
    opacity: 0.85;
}

.market-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
    margin-bottom: 8px;
    min-height: 24px;
}

.market-rarity-pill {
    font-size: 10.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--rarity-color, #4b69ff);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.market-tag-active-sale {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.5);
    color: #fbbf24;
    border-radius: 6px;
}

.market-btn-chart {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.market-btn-chart svg {
    width: 12px;
    height: 12px;
}

.market-btn-chart:hover {
    color: #38bdf8;
    background: rgba(56, 189, 248, 0.12);
}

.market-img-wrap {
    position: relative;
    width: 100%;
    height: 145px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px 0 10px;
}

.market-skin-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.65));
    transition: transform 0.3s ease;
    z-index: 1;
}

.market-card:hover .market-skin-img {
    transform: scale(1.06);
}

.market-glow {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--rarity-color, rgba(99, 102, 241, 0.2)) 0%, transparent 70%);
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

.market-card:hover .market-glow {
    opacity: 0.45;
}

.market-card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.market-weapon-title {
    font-size: 11.5px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.market-skin-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #f8fafc;
    margin: 2px 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.market-chips-row {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.market-chip {
    font-size: 10.5px;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: #cbd5e1;
}

.market-chip strong {
    color: #fff;
}

.market-seller-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 7px 10px;
    background: rgba(10, 14, 25, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 12px;
}

.market-seller-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    text-decoration: none;
    color: #cbd5e1;
    font-size: 11.5px;
    min-width: 0;
    overflow: hidden;
}

.market-seller-link:hover {
    color: #38bdf8;
}

.market-seller-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.market-seller-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.market-listed-time {
    font-size: 10px;
    color: #64748b;
    white-space: nowrap;
}

.market-card-bottom {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.market-price-tag .market-price-label {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
}

.market-price-val {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 1px;
}

.market-price-val .num {
    font-size: 17px;
    font-weight: 800;
}

.market-price-val .curr {
    font-size: 11px;
    font-weight: 600;
    color: #38bdf8;
}

.market-action-box {
    margin-left: auto;
}

.market-btn-buy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 34px;
    padding: 0 16px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25);
}

.market-btn-buy svg {
    width: 14px;
    height: 14px;
}

.market-btn-buy:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.35);
    transform: translateY(-1px);
}

.market-btn-cancel {
    height: 34px;
    padding: 0 12px;
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 8px;
    color: #f87171;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.market-btn-cancel:hover {
    background: rgba(239, 68, 68, 0.28);
    color: #fff;
}

.market-btn-auth {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 12px;
    font-weight: 500;
    text-decoration: none;
}

.market-btn-auth:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* 5. Pane Header & Empty States */
.market-pane-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.market-pane-title {
    font-size: 18px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0 0 4px;
}

.market-pane-desc {
    font-size: 13px;
    color: #94a3b8;
    margin: 0;
}

.market-empty-state {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 60px 20px;
    background: rgba(22, 27, 44, 0.4);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 16px;
}

.market-empty-icon {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: #818cf8;
}

.market-empty-icon svg {
    width: 32px;
    height: 32px;
}

.market-empty-state h3 {
    font-size: 17px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0 0 6px;
}

.market-empty-state p {
    font-size: 13.5px;
    color: #94a3b8;
    max-width: 440px;
    margin: 0;
}

/* 6. Trade History Table */
.market-history-filter-tabs {
    display: flex;
    gap: 8px;
}

.market-subtab {
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    color: #94a3b8;
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.market-subtab:hover {
    color: #fff;
}

.market-subtab.active {
    background: rgba(99, 102, 241, 0.25);
    border-color: rgba(99, 102, 241, 0.5);
    color: #fff;
    font-weight: 600;
}

.market-history-table-wrap {
    width: 100%;
    overflow-x: auto;
    background: rgba(22, 27, 44, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 14px;
}

.market-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
}

.market-history-table th {
    padding: 14px 18px;
    background: rgba(14, 18, 30, 0.85);
    color: #94a3b8;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.market-history-table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    vertical-align: middle;
}

.market-history-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.market-hist-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.market-hist-img {
    width: 44px;
    height: 36px;
    object-fit: contain;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.market-hist-text {
    display: flex;
    flex-direction: column;
}

.market-hist-text .w-name {
    font-size: 11px;
    color: #94a3b8;
}

.market-hist-text .s-name {
    font-size: 13px;
    font-weight: 600;
}

.market-hist-rarity-pill {
    font-size: 10.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--r-color, #4b69ff);
    border: 1px solid rgba(255, 255, 255, 0.07);
    white-space: nowrap;
}

.market-hist-user {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 12.5px;
}

.market-hist-user:hover {
    color: #38bdf8;
}

.market-hist-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.market-hist-price {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #38bdf8;
}

.market-hist-price strong {
    font-size: 14px;
}

.market-hist-date {
    color: #64748b;
    font-size: 12px;
    white-space: nowrap;
}

.market-no-data {
    text-align: center;
    padding: 30px !important;
    color: #64748b;
}

/* 7. Modals */
.market-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: marketFadeIn 0.2s ease-out;
}

@keyframes marketFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.market-modal-box {
    background: #111524;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    animation: marketZoomIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.chart-modal-box {
    max-width: 820px;
}

@keyframes marketZoomIn {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.market-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.market-modal-head h3,
.chart-modal-head-title {
    font-size: 16px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.chart-modal-head-title svg {
    width: 18px;
    height: 18px;
    color: #38bdf8;
}

.market-modal-close {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.market-modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.market-modal-body {
    padding: 24px;
}

.market-buy-item-preview {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 16px;
    background: rgba(14, 18, 30, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 18px;
}

.market-buy-img-wrap {
    position: relative;
    width: 110px;
    height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.market-buy-skin-img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    filter: drop-shadow(0 4px 10px rgba(0,0,0,0.5));
    z-index: 1;
}

.market-buy-glow {
    position: absolute;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.3) 0%, transparent 70%);
}

.market-buy-info {
    min-width: 0;
    flex: 1;
}

.market-buy-title {
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin: 4px 0 0;
}

.market-buy-calc {
    background: rgba(14, 18, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    padding: 14px 18px;
}

.market-calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13.5px;
    color: #94a3b8;
    margin-bottom: 8px;
}

.market-calc-row .val strong,
.market-calc-row .val span {
    color: #f1f5f9;
}

.market-calc-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin: 10px 0;
}

.market-calc-row.total {
    margin-bottom: 0;
    font-size: 14px;
    font-weight: 600;
    color: #e2e8f0;
}

.market-calc-row.total .val strong {
    color: #38bdf8;
    font-size: 16px;
}

.market-buy-alert {
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12.5px;
}

.market-buy-alert.error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
}

.market-modal-foot {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.market-btn-secondary {
    padding: 9px 18px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.market-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.market-btn-confirm-buy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 20px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.market-btn-confirm-buy svg {
    width: 14px;
    height: 14px;
}

.market-btn-confirm-buy:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 6px 18px rgba(16, 185, 129, 0.4);
}

.market-btn-confirm-buy:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* 8. Steam Chart Modal Specifics */
.chart-item-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: rgba(14, 18, 30, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.chart-item-img-wrap {
    width: 70px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chart-item-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.chart-item-details {
    flex: 1 1 200px;
}

.chart-item-wname {
    font-size: 11.5px;
    color: #94a3b8;
    text-transform: uppercase;
}

.chart-item-sname {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    margin: 2px 0 4px;
}

.chart-period-selector {
    display: flex;
    gap: 6px;
    margin-left: auto;
}

.chart-period-btn {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: #94a3b8;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chart-period-btn:hover {
    color: #fff;
}

.chart-period-btn.active {
    background: rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.5);
    color: #38bdf8;
    font-weight: 600;
}

.chart-stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.chart-stat-item {
    background: rgba(14, 18, 30, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
}

.chart-stat-item .stat-lbl {
    font-size: 10.5px;
    color: #94a3b8;
}

.chart-stat-item .stat-val {
    font-size: 13.5px;
    color: #38bdf8;
    margin-top: 2px;
}

.chart-canvas-container {
    position: relative;
    width: 100%;
    height: 280px;
    background: #090c16;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}

#marketPriceCanvas {
    width: 100%;
    height: 100%;
    display: block;
}

.chart-tooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(15, 20, 35, 0.95);
    border: 1px solid rgba(56, 189, 248, 0.5);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 11.5px;
    color: #f1f5f9;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.6);
    z-index: 10;
    transform: translate(-50%, -120%);
    white-space: nowrap;
}

.chart-footnote {
    font-size: 11px;
    color: #64748b;
    margin-right: auto;
}

/* 9. Responsive */
@media (max-width: 900px) {
    .market-hero {
        flex-direction: column;
        align-items: stretch;
    }
    .market-balance-card {
        min-width: 0;
    }
    .chart-stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .market-grid {
        grid-template-columns: 1fr;
    }
    .market-filter-dropdowns {
        width: 100%;
        margin-left: 0;
    }
    .market-select {
        flex: 1;
    }
    .market-modal-box {
        max-height: 90vh;
        overflow-y: auto;
    }
}
