/* Marketplace Blockchain/Dark Theme - Unified Color Palette */
:root {
    --market-bg: #0f1216;
    --market-card-bg: rgba(20, 25, 30, 0.7);
    --market-accent: #f39c12; /* Albion Gold */
    --market-accent-rgb: 243, 156, 18;
    --market-accent-glow: rgba(243, 156, 18, 0.3);
    --market-border: rgba(255, 255, 255, 0.08); /* More subtle border */
    --market-danger: #e74c3c;
    --market-success: #2ecc71;
}

.market-wrapper {
    background-color: var(--market-bg);
    min-height: 100vh;
    color: #e0e0e0;
}



.container-marketplace {
    max-width: 1560px;
}

@media (max-width: 1500px) {
    .container-marketplace {
        max-width: 1260px;
    }
}

@media (max-width: 1199.98px) {
    .container-marketplace {
        max-width: 960px;
    }
}

@media (max-width: 991.98px) {
    .container-marketplace {
        max-width: 720px;
    }
}

@media (max-width: 767.98px) {
    .container-marketplace {
        max-width: 100%;
    }
}

@media only screen and (min-width: 576px) and (max-width: 767px) {
    .container-marketplace {
        max-width: 540px;
    }
}

/* Glass Card */
.glass-panel {
    background: var(--market-card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--market-border);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); /* Unified heavy shadow */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6); /* Don't glow color on large panels */
}

/* Item Cards (Blockchain Style) */
.market-item-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(30,35,40,1) 0%, rgba(20,25,30,1) 100%);
    border: 1px solid var(--market-border);
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.market-item-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--market-accent), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.market-item-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.5);
    border-color: var(--market-accent);
}

.market-item-card:hover::before {
    opacity: 1;
}

.item-thumb-wrapper {
    position: relative;
    background: radial-gradient(circle at center, rgba(50,50,50,0.3) 0%, rgba(0,0,0,0.6) 100%);
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid var(--market-border);
}

.item-thumb-wrapper img {
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.8));
    transition: var(--transition);
}

.market-item-card:hover .item-thumb-wrapper img {
    transform: scale(1.1);
}

.market-tag {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(0,0,0,0.6);
    border: 1px solid var(--market-border);
}

.tag-sell { color: #2ecc71; border-color: #2ecc71; }
.tag-buy { color: #3498db; border-color: #3498db; }

.item-info {
    padding: 15px;
}

.item-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #fff;
}

.item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #aaa;
    margin-bottom: 10px;
}

.item-price {
    font-family: 'Roboto Mono', monospace;
    font-size: 1.1rem;
    color:var(--market-accent);
    font-weight: bold;
    text-align: right;
}

.btn-cyber {
    background: rgba(243, 156, 18, 0.05); /* Slight tint */
    border: 1px solid var(--market-border); /* Subtle border initially */
    color: var(--market-accent);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 8px 16px;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-weight: 600;
}

.btn-cyber:hover {
    color: #1a1a1a;
    border-color: var(--market-accent);
    box-shadow: 0 4px 15px var(--market-accent-glow);
    transform: translateY(-2px);
}

.btn-cyber::before {
    content: '';
    position: absolute;
    top: 0; left: 0; 
    width: 0%; height: 100%;
    background: var(--market-accent);
    z-index: -1;
    transition: width 0.3s ease;
}

.btn-cyber:hover::before {
    width: 100%;
}

/* Sidebar Custom */
.market-sidebar .glass-panel {
    border: none !important;
    background: transparent !important; /* Remove card background entirely */
    box-shadow: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Add padding back to the nav items themselves or container if needed, but the transparent look is cleaner for sidebars */
.market-nav {
    padding-left: 5px; /* Slight indentation */
}

.market-sidebar .item__widget {
    background: var(--market-card-bg);
    border: 1px solid var(--market-border);
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.market-sidebar .item__widget-title {
    border-bottom: 1px solid var(--market-border);
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: var(--market-accent); /* Unified accent title */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Form inputs cyber style */
.form-cyber {
    background: rgba(10, 10, 15, 0.6) !important; /* Darker bg */
    border: 1px solid var(--market-border) !important;
    color: #e0e0e0 !important;
    border-radius: 6px;
    transition: border 0.3s, box-shadow 0.3s;
}
.form-cyber:focus {
    background: rgba(15, 15, 20, 0.8) !important;
    border-color: var(--market-accent) !important;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.15) !important; /* Soft gold glow */
}

/* Search Results Dropdown */
#searchResults {
    background: #15151a;
    border: 1px solid var(--market-border);
    box-shadow: 0 15px 40px rgba(0,0,0,0.8);
}
#searchResults .list-group-item {
    background: transparent;
    color: #ccc;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    cursor: pointer;
    transition: 0.2s;
}
#searchResults .list-group-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--market-accent);
    padding-left: 20px;
}


/* Sidebar Improvements - Deprecated Old Styles Removed */
/* .market-sidebar ul li rules removed to avoid conflict with .market-nav */

/* Toggle Switch for Create Order */
.toggle-switch-container {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 50px;
    padding: 5px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: fit-content;
}

.toggle-option {
    padding: 10px 30px;
    cursor: pointer;
    border-radius: 40px;
    font-weight: 600;
    transition: all 0.3s ease;
    z-index: 2;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-option.active.sell {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.4);
}

.toggle-option.active.buy {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    color: white;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.4);
}

.toggle-input {
    display: none;
}

/* --- Enhanced Toggle Switch --- */
.toggle-switch-container {
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--market-border);
    border-radius: 50px;
    padding: 6px;
    display: inline-flex;
    gap: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.toggle-option {
    padding: 12px 28px;
    border-radius: 40px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

.toggle-option:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.toggle-option.active.sell {
    background: linear-gradient(135deg, #c0392b 0%, #e74c3c 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3); /* Softer red shadow */
    transform: scale(1.02);
}

.toggle-option.active.buy {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3); /* Softer green shadow */
    transform: scale(1.02);
}

.toggle-option i {
    font-size: 1.1em;
}


/* --- Improved Popup Modal Design --- */
#itemSearchModal .modal-content {
    background: #151520 !important;
    backdrop-filter: blur(20px);
    border: 1px solid var(--market-border);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
}

#itemSearchModal .modal-header {
    border-bottom: 1px solid var(--market-border);
    padding: 20px 30px;
    background: rgba(0,0,0,0.2);
}

#itemSearchModal .modal-title {
    font-family: 'Oxanium', sans-serif;
    letter-spacing: 1px;
    color: #fff;
    font-weight: 600;
}

#modalSearchInput {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--market-border);
    border-radius: 8px;
    padding: 15px 20px;
    font-size: 1.1rem;
    color: #e0e0e0;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.3);
    transition: 0.3s;
}

#modalSearchInput:focus {
    border-color: var(--market-accent);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.15); /* Match global focus */
    background: rgba(0, 0, 0, 0.4);
}

#modalSearchResults {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 10px;
}

/* Card Style Results */
#modalSearchResults .list-group-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px !important;
    padding: 15px;
    transition: all 0.2s ease;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

#modalSearchResults .list-group-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--market-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 10;
}

#modalSearchResults .list-group-item img {
    border-radius: 8px;
    background: rgba(0,0,0,0.3);
    padding: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

/* Custom Scrollbar for Results */
#modalSearchResults::-webkit-scrollbar {
    width: 8px;
}
#modalSearchResults::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.2); 
}
#modalSearchResults::-webkit-scrollbar-thumb {
    background: var(--market-accent); 
    border-radius: 4px;
}

/* --- Trading Dashboard Layout --- */
.market-header {
    position: sticky;
    top: 0;
 
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.font-oxanium {
    font-family: 'Oxanium', 'Roboto', sans-serif;
    letter-spacing: 0.5px;
}

.hover-bg-dark:hover {
    background: rgba(255,255,255,0.05);
    color: #fff !important;
    transition: background 0.2s ease;
}

.market-sidebar .nav-link {
    transition: all 0.2s;
    font-size: 0.95rem;
}

.market-sidebar .nav-link i {
    text-align: center;
    opacity: 0.7;
}

/* Make form controls look more like data entry fields */
.form-cyber {
    background: rgba(0,0,0,0.3) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
}
.form-cyber:focus {
    border-color: var(--market-accent) !important;
    box-shadow: 0 0 0 2px rgba(0, 243, 255, 0.1) !important;
}

/* Adjust main layout for the fixed appearance */
.market-wrapper {
    background-color: #0b0b10;
    background-image: 
        radial-gradient(circle at 15% 50%, rgba(76, 29, 149, 0.05), transparent 25%), 
        radial-gradient(circle at 85% 30%, rgba(0, 243, 255, 0.05), transparent 25%);
    max-width: 1560px;
    margin: 0 auto;
    width: 95%;
    border-radius: 20px;
    margin-top: 130px; /* Push down from fixed header */
    margin-bottom: 50px;
    padding-top: 0 !important; /* Reset padding since we use margin now */
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 50px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden; /* Ensure border radius works */
}

/* Ensure Sticky Header handles the new contained layout */
.market-header {
    position: relative; /* No longer sticky to viewport top in the same way, or sticky relative to container */
    top: 0 !important; 
    margin-top: 0;
    border-radius: 20px 20px 0 0; /*  Match wrapper radius */
}

/* Ensure Sticky Header doesn't conflict with Main Header */
.tg-header__area {

    z-index: 1000;
}

@media (min-width: 992px) {
    /* Rules handled in main block now to ensure consistency */
}

/* --- Enhanced Sidebar Navigation --- */
.letter-spacing-1 { letter-spacing: 1px; }
.letter-spacing-2 { letter-spacing: 2px; }

.market-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.6) !important;
    border-radius: 8px;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.market-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff !important;
    transform: translateX(4px);
}

.market-nav .nav-link.active {
    background: linear-gradient(90deg, rgba(243, 156, 18, 0.15) 0%, transparent 100%);
    border-left: 3px solid var(--market-accent);
    color: #fff !important;
}

.market-nav .nav-link .icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    transition: transform 0.3s ease;
}

.market-nav .nav-link:hover .icon-box,
.market-nav .nav-link.active .icon-box {
    transform: scale(1.1);
    color: var(--market-accent);
}

.market-nav .nav-text {
    font-size: 0.95rem;
    font-weight: 500;
}

/* --- Enhanced Search Bar --- */
.search-group {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
    border: 1px solid rgba(255,255,255,0.1);
}

.search-group:focus-within {
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.2);
    border-color: var(--market-accent);
}

.search-group .input-group-text {
    background: transparent !important;
    border: none;
    color: var(--market-accent) !important;
    width: 50px; /* Refined width */
    display: flex; /* Ensure centering works */
    align-items: center;
    justify-content: center; /* Center the icon */
    font-size: 1.2rem; /* Make icon visible */
    z-index: 5; /* Ensure above input if overlap occurs */
}

.search-group input.form-control {
    background: rgba(10, 10, 15, 0.4) !important;
    border: none !important;
    color: #fff !important;
    font-family: 'Roboto Mono', monospace;
    padding-left: 10px; /* Standard padding */
    height: auto; /* Let flex control height or set if needed */
}

/* Sidebar cleanups */
.market-nav .nav-link {
    border: none !important; /* Remove borders */
}
/* Active state without border, use background highlight only or keep left accent */
.market-nav .nav-link.active {
    border: none;
    border-left: 3px solid var(--market-accent); /* Keep accent */
    background: linear-gradient(90deg, rgba(243, 156, 18, 0.1) 0%, transparent 100%);
}

.search-group input.form-control::placeholder {
    color: rgba(255,255,255,0.3);
}

/* Adjust filter button - DEPRECATED / REMOVED to use global .btn-cyber */
/* 
.glass-panel .btn-cyber { ... } 
*/

/* --- Premium Sidebar Refinement --- */
/* Override and refine navigation styles to be cleaner and more modern */
.market-nav {
    padding: 0;
    margin: 0;
}

.market-nav .nav-item {
    margin-bottom: 8px; /* Consistent spacing */
}

.market-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 14px 18px; /* Slightly larger hit area */
    color: rgba(255, 255, 255, 0.55) !important;
    border-radius: 8px; /* Softer corners */
    background: transparent;
    border: 1px solid transparent !important; /* Ensure border is gone */
    transition: all 0.25s ease-out;
    position: relative;
    font-family: 'Inter', 'Roboto', sans-serif; /* Cleaner sans-serif if available, fallback to Roboto */
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* Hover State - Subtle and Classy */
.market-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #fff !important;
    transform: translateX(4px); /* Slight movement */
}

/* Active State - Clear Gold Indicator */
.market-nav .nav-link.active {
    background: linear-gradient(90deg, rgba(243, 156, 18, 0.08) 0%, transparent 100%);
    color: #fff !important;
    border-left: 3px solid var(--market-accent) !important; /* Solid gold line */
    border-radius: 4px 8px 8px 4px; /* Square off left side for the border */
    box-shadow: none; /* Clean look */
}

.market-nav .nav-link .icon-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px; /* Fixed width for alignment */
    height: 32px;
    margin-right: 14px; /* Space between icon and text */
    border-radius: 8px; /* Softer radius */
    background: rgba(255, 255, 255, 0.05); /* Subtle backdrop for icon */
    color: rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
    font-size: 1.1rem; /* Increase icon size */
}

/* Icon Highlight on Hover/Active */
.market-nav .nav-link:hover .icon-box,
.market-nav .nav-link.active .icon-box {
    background: rgba(243, 156, 18, 0.15); /* Gold tint bg */
    color: var(--market-accent);
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(243, 156, 18, 0.2); /* Subtle glow */
}

.market-nav .nav-text {
    font-size: 1rem; /* Slightly larger text */
    font-weight: 500;
}

/* Sidebar Widget Header Clean up */
.market-sidebar .glass-panel h6 {
    font-family: 'Oxanium', sans-serif;
    color: var(--market-accent); /* Gold header */
    margin-bottom: 20px !important;
    padding-bottom: 15px; /* More spacing */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Very subtle divider */
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0.9;
    letter-spacing: 1.5px;
}

/* --- Ultra-Modern Search Card & Table --- */

/* Search Card Container */
.glass-panel.search-card {
    background: linear-gradient(145deg, rgba(15, 18, 22, 0.95) 0%, rgba(10, 12, 16, 0.98) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(243, 156, 18, 0.3); /* Gold Highlight Top */
    border-bottom: 2px solid rgba(0, 0, 0, 0.8);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), inset 0 0 30px rgba(0, 0, 0, 0.5);
    border-radius: 4px; /* Sharper corners for tech feel */
    position: relative;
    /* overflow: visible !important; Allow dropdown to show */
}

/* Add subtle grid pattern to search card */
.glass-panel.search-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: inherit; /* Ensure grid respects corners */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
    pointer-events: none;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,0) 100%);
}

/* --- Global Button Overhaul --- */
.btn {
    font-family: 'Oxanium', sans-serif !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    border-radius: 4px !important; /* Tech shape */
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1) !important;
    position: relative;
    overflow: hidden;
    border: none;
}

/* Primary Cyber Button (Gold) */
.btn-cyber {
    background: rgba(243, 156, 18, 0.15);
    border: 1px solid var(--market-accent) !important;
    color: var(--market-accent);
}

.btn-cyber:hover {
    background: var(--market-accent);
    color: #000;
    box-shadow: 0 0 20px rgba(243, 156, 18, 0.6);
    transform: translateY(-2px);
}

.btn-cyber:active {
    transform: translateY(0);
}

/* Outline Cyber Button */
.btn-outline-cyber {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.7);
}

.btn-outline-cyber:hover {
    border-color: var(--market-accent) !important;
    color: var(--market-accent);
    background: rgba(243, 156, 18, 0.05);
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.2);
}

/* Primary/Success/Danger Overrides to fit theme */
.btn-primary {
    background: rgba(52, 152, 219, 0.2) !important;
    border: 1px solid #3498db !important;
    color: #3498db !important;
}
.btn-primary:hover {
    background: #3498db !important;
    color: #fff !important;
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.5) !important;
}

.btn-success {
    background: rgba(46, 204, 113, 0.2) !important;
    border: 1px solid #2ecc71 !important;
    color: #2ecc71 !important;
}
.btn-success:hover {
    background: #2ecc71 !important;
    color: #fff !important;
    box-shadow: 0 0 15px rgba(46, 204, 113, 0.5) !important;
}

.btn-danger, .btn-outline-danger {
    background: rgba(231, 76, 60, 0.2) !important;
    border: 1px solid #e74c3c !important;
    color: #e74c3c !important;
}
.btn-danger:hover, .btn-outline-danger:hover {
    background: #e74c3c !important;
    color: #fff !important;
    box-shadow: 0 0 15px rgba(231, 76, 60, 0.5) !important;
}

/* Secondary Button (Neutral) */
.btn-secondary {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.6) !important;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

/* Clean up old button styles inside glass panels if any */
.glass-panel .btn-cyber {
    /* Reset specific override to use the global one above */
    font-family: inherit; 
}


.market-grid-container {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Override Bootstrap Table Vars */
.table {
    --bs-table-bg: transparent;
    --bs-table-accent-bg: transparent;
    --bs-table-striped-color: #fff;
    --bs-table-striped-bg: rgba(255, 255, 255, 0.05);
    --bs-table-active-color: #fff;
    --bs-table-active-bg: rgba(255, 255, 255, 0.1);
    --bs-table-hover-color: #fff;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.075);
    background-color: transparent !important;
}

/* Items Table */
.market-table {
    border-collapse: separate; 
    border-spacing: 0 8px; /* Gap between rows */
    margin-top: -8px; /* Adjust for first gap */
    background-color: transparent !important; /* Ensure table itself is transparent */
    color: #fff; /* Default text color */
}

/* Force Transparent Cells so row styling shows */
.market-table tbody tr td, 
.market-table thead tr th {
    background-color: transparent !important;
    border: none !important;
    color: inherit;
}

.market-table thead th {
    border: none;
    font-family: 'Oxanium', sans-serif;
    letter-spacing: 1.5px;
    color: var(--market-accent) !important; /* Make it Gold and Force Override */
    font-weight: 700;
    text-transform: uppercase;
    padding-bottom: 12px;
    font-size: 0.85rem;
    padding-left: 12px; /* Align slightly with rows */
    opacity: 1 !important; /* Ensure visibility */
}

.market-table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(20, 24, 28, 0.6); /* Default row bg */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.market-table tbody tr td {
    border: none;
    padding: 16px 12px;
    vertical-align: middle;
}

/* Rounded Row Ends */
.market-table tbody tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    border-left: 2px solid transparent; /* Prepare for accent */
}
.market-table tbody tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Hover Effects */
.market-table tbody tr:hover {
    transform: translateY(-2px);
    background: rgba(30, 35, 40, 0.9);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.market-table tbody tr:hover td:first-child {
    border-left-color: var(--market-accent); /* Gold accent on hover */
}

/* Typography in Table */
.market-table .item-tier-badge {
    position: absolute;
    bottom: -4px; 
    right: -4px;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    background: var(--market-bg);
    border: 1px solid var(--market-border);
    color: var(--market-accent);
    border-radius: 4px;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.market-table .item-icon-container {
    width: 48px; 
    height: 48px;
    background: radial-gradient(circle at center, rgba(60,65,70,0.3) 0%, rgba(20,25,30,0.8) 100%);
    border: 1px solid rgba(255,255,255,0.08); 
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.3s;
}

.market-table tr:hover .item-icon-container {
    border-color: rgba(243, 156, 18, 0.3);
    background: radial-gradient(circle at center, rgba(243, 156, 18, 0.05) 0%, rgba(20,25,30,0.8) 100%);
}

.market-table .price-display {
    font-family: 'Oxanium', monospace;
    font-size: 1.15rem;
    font-weight: 600;
    color: #e0e0e0; /* Default silver-ish */
    letter-spacing: 0.5px;
}

.market-table .price-display.gold {
    color: var(--market-accent);
    text-shadow: 0 0 10px rgba(243, 156, 18, 0.3);
}

/* Buy/Sell Indicators - Minimal dot style */
.market-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.market-badge.buy {
    background: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}
.market-badge.sell {
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.2);
}

/* Form Controls Update inside Search Card */
.search-card .form-control, 
.search-card .form-select {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 8px;
    color: #fff !important;
    transition: all 0.3s ease;
}

.search-card .form-control:focus, 
.search-card .form-select:focus {
    border-color: var(--market-accent) !important;
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1) !important;
    background: rgba(0, 0, 0, 0.4) !important;
}

.search-card .input-group-text {
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-right: none !important;
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 8px 0 0 8px;
}

.search-card .form-control + .input-group-text { /* If icon is on right */
    border-left: none !important;
    border-radius: 0 8px 8px 0;
}

/* Specific fix for the search group structure in index.php */
.search-card .search-group .input-group-text {
    border-right: none !important;
    background: rgba(0, 0, 0, 0.2) !important; 
}
.search-card .search-group input {
    border-left: none !important;
}

/* --- Premium Scrollbars (Dark Gold) --- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #0b0b10; 
}
::-webkit-scrollbar-thumb {
    background: #333; 
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--market-accent); 
}

/* --- Toggle Switch for Create Order --- */
.toggle-switch-container {
    display: flex;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 4px;
    position: relative;
    width: fit-content;
    margin: 0 auto;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.toggle-option {
    padding: 10px 25px;
    border-radius: 40px;
    cursor: pointer;
    font-family: 'Oxanium', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-option:hover {
    color: #fff;
}

.toggle-option.active {
    color: #fff;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transform: scale(1.05); /* Pop effect */
}

.toggle-option.active.sell {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.4);
}

.toggle-option.active.buy {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

/* --- Form Improvements --- */
.form-label {
    letter-spacing: 1px;
    font-family: 'Oxanium', sans-serif;
    margin-bottom: 8px;
}

.input-group-text.form-cyber {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: var(--market-accent);
}

input.form-cyber, select.form-cyber, textarea.form-cyber {
    background: rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    font-family: 'Roboto Mono', monospace; 
    transition: border-color 0.3s, box-shadow 0.3s;
}

input.form-cyber::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

input.form-cyber:focus, select.form-cyber:focus {
    border-color: var(--market-accent) !important;
    background: rgba(0, 0, 0, 0.5) !important;
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.1) !important;
}

/* --- Interaction Helpers --- */
.scale-hover {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.scale-hover:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px rgba(243, 156, 18, 0.3) !important;
}

/* Modal List Items - Improved Card Like */
.list-group-item {
    transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    background: rgba(255, 255, 255, 0.02) !important; /* Slightly visible card bg */
    border-radius: 8px !important;
    margin-bottom: 8px; /* Spacing between cards */
    backdrop-filter: blur(5px);
}

.list-group-item:hover, .list-group-item:focus {
    transform: translateX(5px);
    background: rgba(243, 156, 18, 0.08) !important; /* Gold Tint */
    border-color: rgba(243, 156, 18, 0.4) !important;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 1;
}

/* Remove default Bootstrap list-group-item bg if it persists via specificity */
.list-group-item-action {
    color: #fff;
    background-color: transparent;
}
.list-group-item-action:hover, .list-group-item-action:focus {
    color: #fff;
    background-color: transparent; 
}


.list-group-item .img-container {
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, rgba(0,0,0,0.2) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Custom Scrollbar for Modal Results */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.3);
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: var(--market-accent);
}

/* Modal tweaks */
.modal-backdrop.show {
    opacity: 0.8;
    backdrop-filter: blur(5px);
}


