/* Marketplace Panel - Landscape-Optimized Layout (Minimal Scrolling) */
/* This panel is nested inside economy-hub-body, not a standalone panel */

.marketplace-panel {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    font-family: 'RemiliaMincho', serif;
    overflow: hidden; /* Prevent outer scroll */
    background: transparent; /* Economy hub provides background */
}

.marketplace-panel .panel-header {
    background: linear-gradient(0deg, rgba(30, 41, 59, 0.95), rgba(51, 65, 85, 0.98));
    height: 2.25rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.4);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    margin: 0;
    position: relative;
    z-index: 20;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
    flex-shrink: 0;
}

.marketplace-panel .panel-header h2 {
    font-family: 'RemiliaMincho', serif;
    font-size: 0.9rem;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.8);
    color: rgba(186, 166, 116, 0.7);
    font-weight: 400;
    opacity: 0.8;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Panel Tabs - Compact Horizontal */
.panel-tabs {
    display: flex;
    gap: 4px;
    align-items: center;
}

.panel-tabs .tab {
    padding: 4px 10px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: rgba(186, 166, 116, 0.8);
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.8);
}

.panel-tabs .tab:hover {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    color: rgba(212, 175, 55, 0.9);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.2);
}

.panel-tabs .tab.active {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.9) 0%,
        rgba(30, 41, 59, 0.95) 100%);
    color: rgba(212, 175, 55, 1);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

/* Panel Body - Landscape Split Layout */
.marketplace-panel .panel-body {
    flex: 1;
    display: flex;
    overflow: hidden; /* No scroll on body */
    min-height: 0; /* Critical for flex overflow */
}

/* ===== LANDSCAPE LAYOUT: Sidebar + Main Content ===== */

/* Browse Tab - 2-column Layout */
.market-browse {
    display: flex;
    width: 100%;
    height: 100%;
    gap: 12px;
    padding: 12px;
    overflow: hidden;
}

/* Left Sidebar - Filters & Stats */
.market-sidebar {
    width: 240px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-shrink: 0;
    overflow-y: auto;
}

.market-sidebar::-webkit-scrollbar {
    width: 4px;
}

.market-sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.market-sidebar::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 2px;
}

/* Filters - Vertical Stack */
.market-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
}

.market-filters h3 {
    font-size: 10px;
    color: rgba(212, 175, 55, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
}

.market-search {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: #E5E7EB;
    padding: 6px 10px;
    font-family: 'RemiliaMincho', serif;
    font-size: 10px;
    outline: none;
    transition: all 0.15s ease;
    width: 100%;
}

.market-search::placeholder {
    color: rgba(186, 166, 116, 0.4);
}

.market-search:focus {
    border-color: rgba(212, 175, 55, 0.5);
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.2);
}

.market-filter-source,
.listing-price,
.listing-duration {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: #E5E7EB;
    padding: 6px 10px;
    font-family: 'RemiliaMincho', serif;
    font-size: 10px;
    outline: none;
    transition: all 0.15s ease;
    width: 100%;
}

.price-filter {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.price-filter label {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-filter-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
}

.price-filter-inputs span {
    color: rgba(186, 166, 116, 0.5);
    font-size: 10px;
}

.price-min,
.price-max {
    flex: 1;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: #E5E7EB;
    padding: 6px 8px;
    font-family: 'RemiliaMincho', serif;
    font-size: 10px;
    outline: none;
    transition: all 0.15s ease;
}

.price-min:focus,
.price-max:focus {
    border-color: rgba(212, 175, 55, 0.5);
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.2);
}

.btn-filter-apply,
.btn-refresh {
    padding: 6px 12px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: rgba(186, 166, 116, 0.8);
    font-family: 'RemiliaMincho', serif;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.btn-filter-apply:hover,
.btn-refresh:hover {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    color: rgba(212, 175, 55, 0.9);
}

/* Market Stats - Compact */
.market-stats {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
}

.market-stats .stat {
    font-size: 10px;
    color: rgba(186, 166, 116, 0.7);
    padding: 4px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.market-stats .stat:last-child {
    border-bottom: none;
}

/* Main Content Area - Listings Grid */
.market-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Critical for flex overflow */
    overflow: hidden;
}

/* Market Grid - Fixed Height, No Scroll */
.market-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    grid-auto-rows: min-content;
    gap: 10px;
    padding: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 6px;
}

.market-grid::-webkit-scrollbar {
    width: 6px;
}

.market-grid::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.market-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg,
        rgba(212, 175, 55, 0.4) 0%,
        rgba(186, 166, 116, 0.6) 100%);
    border-radius: 3px;
}

/* Market Item - Compact Card */
.market-item {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.4) 0%,
        rgba(51, 65, 85, 0.6) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    height: fit-content;
}

.market-item:hover {
    border-color: rgba(212, 175, 55, 0.5);
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.6) 0%,
        rgba(30, 41, 59, 0.8) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 8px rgba(212, 175, 55, 0.2);
}

/* Item Image - Aspect Ratio */
.item-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.item-source-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(0, 0, 0, 0.8);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 8px;
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
}

.item-source-badge.internal {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.3), rgba(186, 166, 116, 0.3));
}

.item-source-badge.opensea {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.3));
}

/* Item Details - Compact */
.item-details {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.item-name {
    font-size: 11px;
    font-weight: 600;
    color: #E5E7EB;
    text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.5);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 6px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.price-amount {
    font-size: 12px;
    font-weight: 700;
    color: rgba(212, 175, 55, 0.9);
}

.price-currency {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.6);
}

.item-seller {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.5);
}

.item-actions {
    display: flex;
    gap: 4px;
    margin-top: 4px;
}

.btn-buy-internal,
.btn-view-opensea {
    flex: 1;
    padding: 6px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 3px;
    color: rgba(186, 166, 116, 0.8);
    font-family: 'RemiliaMincho', serif;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    display: block;
}

.btn-buy-internal:hover,
.btn-view-opensea:hover {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    color: rgba(212, 175, 55, 0.9);
}

/* ===== SELL TAB - Horizontal Split ===== */

.market-sell {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    gap: 0;
    padding: 0;
    overflow: hidden;
}

.sell-instructions {
    padding: 10px 16px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.4) 0%,
        rgba(51, 65, 85, 0.6) 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    font-size: 10px;
    color: rgba(186, 166, 116, 0.7);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.btn-refresh-inventory {
    padding: 4px 10px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: rgba(186, 166, 116, 0.8);
    font-family: 'RemiliaMincho', serif;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.sell-container {
    display: flex;
    gap: 12px;
    width: 100%;
    flex: 1;
    padding: 12px;
    overflow: hidden;
    min-height: 0; /* Critical for flex overflow */
}

.inventory-section {
    flex: 1;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.listing-section {
    width: 300px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex-shrink: 0;
}

.inventory-section h3,
.listing-section h3 {
    margin: 0 0 10px 0;
    font-size: 11px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 8px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.inventory-grid::-webkit-scrollbar {
    width: 4px;
}

.inventory-grid::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 2px;
}

.inventory-item {
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.4) 0%,
        rgba(51, 65, 85, 0.6) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    padding: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.inventory-item:hover {
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

.inventory-item.selected {
    border-color: rgba(212, 175, 55, 1);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.inventory-item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.3);
}

.inventory-item .item-info {
    width: 100%;
    text-align: center;
}

.inventory-item .item-info h4 {
    font-size: 9px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #E5E7EB;
}

.inventory-item .item-level {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.6);
}

.inventory-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(186, 166, 116, 0.4);
    padding: 40px 20px;
    font-size: 10px;
}

.listing-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.selected-item {
    padding: 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px dashed rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.selected-item-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.selected-item-card img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
}

.selected-item-card h4 {
    font-size: 11px;
    color: #E5E7EB;
    margin: 0;
}

.selected-item-card p {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.6);
    margin: 0;
}

.no-selection {
    font-size: 10px;
    color: rgba(186, 166, 116, 0.4);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 10px;
    font-weight: 600;
    color: rgba(212, 175, 55, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.marketplace-selector {
    display: flex;
    gap: 6px;
}

.marketplace-option {
    flex: 1;
    padding: 8px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: rgba(186, 166, 116, 0.8);
    font-family: 'RemiliaMincho', serif;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.marketplace-option small {
    font-size: 8px;
    opacity: 0.7;
}

.marketplace-option:hover {
    border-color: rgba(212, 175, 55, 0.5);
}

.marketplace-option.active {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.9) 0%,
        rgba(30, 41, 59, 0.95) 100%);
    border-color: rgba(212, 175, 55, 1);
    color: rgba(212, 175, 55, 1);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.listing-fees {
    padding: 10px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 4px;
    font-size: 9px;
    color: rgba(186, 166, 116, 0.7);
}

.listing-fees p {
    margin: 4px 0;
}

.receive-amount {
    color: rgba(34, 197, 94, 0.9);
    font-weight: 600;
}

.btn-create-listing {
    width: 100%;
    padding: 10px 16px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    color: rgba(186, 166, 116, 0.8);
    font-family: 'RemiliaMincho', serif;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-create-listing:hover:not(:disabled) {
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.8) 0%,
        rgba(30, 41, 59, 0.9) 100%);
    border-color: rgba(212, 175, 55, 0.5);
    color: rgba(212, 175, 55, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), 0 0 8px rgba(212, 175, 55, 0.2);
}

.btn-create-listing:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ===== ORDERS TAB ===== */

.market-orders {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 12px;
    overflow: hidden;
}

.orders-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.orders-header h3 {
    font-size: 11px;
    color: rgba(212, 175, 55, 0.9);
    text-transform: uppercase;
    margin: 0;
}

.btn-refresh-listings {
    padding: 4px 10px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 4px;
    color: rgba(186, 166, 116, 0.8);
    font-family: 'RemiliaMincho', serif;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.orders-list {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.orders-list::-webkit-scrollbar {
    width: 6px;
}

.orders-list::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.3) 0%,
        rgba(51, 65, 85, 0.5) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 6px;
    transition: all 0.15s ease;
}

.order-item:hover {
    border-color: rgba(212, 175, 55, 0.4);
    background: linear-gradient(180deg,
        rgba(51, 65, 85, 0.5) 0%,
        rgba(30, 41, 59, 0.7) 100%);
}

.order-image {
    width: 60px;
    height: 60px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
}

.order-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.order-details {
    flex: 1;
}

.order-details h4 {
    font-size: 11px;
    margin: 0 0 4px 0;
    color: #E5E7EB;
}

.order-details p {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.6);
    margin: 0;
}

.order-price {
    font-size: 13px;
    font-weight: 700;
    color: rgba(212, 175, 55, 0.9);
    margin-right: 12px;
}

.order-actions {
    flex-shrink: 0;
}

.btn-cancel-listing {
    padding: 6px 12px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 4px;
    color: rgba(239, 68, 68, 0.9);
    font-family: 'RemiliaMincho', serif;
    font-size: 9px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-cancel-listing:hover {
    border-color: rgba(239, 68, 68, 0.6);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

.no-orders {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(186, 166, 116, 0.4);
    font-size: 11px;
}

/* ===== HELP TAB ===== */

.market-help {
    padding: 16px;
    overflow-y: auto;
    height: 100%;
}

.market-help::-webkit-scrollbar {
    width: 6px;
}

.market-help::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}

/* ===== PRICE STATISTICS SECTION ===== */

.price-stats-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px;
    background: linear-gradient(135deg,
        rgba(139, 92, 246, 0.08) 0%,
        rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(139, 92, 246, 0.25);
    border-radius: 6px;
}

.price-stats-section h3 {
    font-size: 10px;
    color: rgba(212, 175, 55, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px 0;
}

.price-stats-empty {
    padding: 10px;
    text-align: center;
    color: rgba(186, 166, 116, 0.4);
    font-size: 9px;
}

.price-stat-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 8px;
}

.price-stat-group:not(:last-child) {
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.price-stat-label {
    font-size: 9px;
    color: rgba(186, 166, 116, 0.7);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.price-stat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.price-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    background: linear-gradient(180deg,
        rgba(30, 41, 59, 0.4) 0%,
        rgba(51, 65, 85, 0.6) 100%);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 4px;
}

.price-stat-item.wide {
    grid-column: 1 / -1;
}

.price-stat-item .stat-label {
    font-size: 8px;
    color: rgba(186, 166, 116, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.price-stat-item .stat-value {
    font-size: 12px;
    color: rgba(212, 175, 55, 0.9);
    font-weight: 600;
}

.price-stat-item .stat-value.highlight {
    color: rgba(139, 92, 246, 0.95);
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.3);
}

/* Price Range Visualization Bar */
.price-range-bar {
    position: relative;
    height: 24px;
    background: linear-gradient(90deg,
        rgba(30, 41, 59, 0.6) 0%,
        rgba(51, 65, 85, 0.8) 100%);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 4px;
    overflow: hidden;
}

.price-range-fill {
    position: relative;
    height: 100%;
    background: linear-gradient(90deg,
        rgba(34, 197, 94, 0.3) 0%,
        rgba(139, 92, 246, 0.4) 50%,
        rgba(239, 68, 68, 0.3) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    border-radius: 3px;
}

.price-range-fill.opensea {
    background: linear-gradient(90deg,
        rgba(20, 184, 166, 0.3) 0%,
        rgba(59, 130, 246, 0.4) 50%,
        rgba(6, 182, 212, 0.3) 100%);
}

.price-range-fill span {
    font-size: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    z-index: 1;
}

.price-range-fill .range-avg {
    font-size: 9px;
    color: rgba(139, 92, 246, 0.95);
    text-shadow: 0 0 8px rgba(139, 92, 246, 0.6);
}

/* ===== EMPTY STATES ===== */

.market-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 20px;
    color: rgba(186, 166, 116, 0.4);
}

.market-empty p {
    margin: 8px 0;
    font-size: 11px;
}

/* ===== RESPONSIVE (Landscape Priority) ===== */

@media (max-width: 1200px) {
    .market-sidebar {
        width: 200px;
    }

    .market-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}

@media (max-width: 900px) {
    /* Switch to vertical layout on smaller screens */
    .market-browse,
    .market-sell {
        flex-direction: column;
    }

    .market-sidebar {
        width: 100%;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .market-filters {
        flex: 1;
        min-width: 200px;
    }

    .sell-container {
        flex-direction: column;
    }

    .listing-section {
        width: 100%;
    }
}
