body { background-color: #050505; color: #d4d4d4; font-family: 'Inter', sans-serif; -webkit-tap-highlight-color: transparent; }
        
/* Custom Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #1a1a1a; }
::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }

/* CRT Overlay */
.crt-overlay {
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.05) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.03), rgba(0, 255, 0, 0.01), rgba(0, 0, 255, 0.03));
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
    z-index: 40;
}

.glass-panel { background: rgba(26, 26, 26, 0.95); border: 1px solid #333; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5); }
.status-dot { height: 8px; width: 8px; border-radius: 50%; display: inline-block; }
.loader { border: 2px solid #333; border-top: 2px solid #9a8c7d; border-radius: 50%; width: 14px; height: 14px; animation: spin 1s linear infinite; display: inline-block; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Animation */
.animate-fade-in { animation: fadeIn 0.3s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* Mobile Nav Active State */
.mobile-nav-active { color: #9a8c7d; border-top: 2px solid #9a8c7d; background: linear-gradient(to bottom, rgba(154, 140, 125, 0.1), transparent); }

/* --- Market Monitor Specific Styles --- */
.req-badge { font-size: 0.65rem; padding: 2px 6px; border-radius: 3px; font-weight: bold; letter-spacing: 0.05em; display: inline-flex; align-items: center; gap: 4px; margin-right: 4px; transition: all 0.3s; }

/* Active States */
.req-quest { background: rgba(234, 179, 8, 0.2); color: #fbbf24; border: 1px solid rgba(234, 179, 8, 0.4); }
.req-hideout { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.4); }
.req-barter { background: rgba(192, 132, 252, 0.2); color: #c084fc; border: 1px solid rgba(192, 132, 252, 0.4); }
.req-craft { background: rgba(59, 130, 246, 0.2); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.4); }

/* Phase 3: Inactive/Completed States */
.req-done { background: rgba(60, 60, 60, 0.2); color: #666; border: 1px solid rgba(60, 60, 60, 0.4); opacity: 0.6; }
.req-done-text { text-decoration: line-through; opacity: 0.6; }

.profit-pos { color: #4ade80; }
.profit-neg { color: #ef4444; }

/* Market Accordion */
.detail-section { max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.4s ease-in-out, opacity 0.4s ease-in-out, margin-top 0.3s; }
.market-card.expanded .detail-section { max-height: 2000px; opacity: 1; margin-top: 1rem; padding-top: 1rem; border-top: 1px dashed #444; }
.market-card.expanded { background-color: #1a1a1a; border-color: #4a6fa5; box-shadow: 0 0 15px rgba(74, 111, 165, 0.1); }

.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* Market Tab Navigation */
.market-nav-tab { flex: 1; text-align: center; padding: 8px; cursor: pointer; color: #666; border-bottom: 2px solid transparent; transition: all 0.3s; font-weight: bold; font-size: 0.8rem; background: transparent; }
.market-nav-tab:hover { background: rgba(255,255,255,0.05); }
.market-nav-tab.active { color: #9a8c7d; border-bottom-color: #9a8c7d; background: linear-gradient(to top, rgba(154, 140, 125, 0.1), transparent); }

/* Hideout Specific */
.hideout-level-btn { width: 24px; height: 24px; border-radius: 4px; display: flex; align-items: center; justify-content: center; background: #222; color: #666; transition: all 0.2s; }
.hideout-level-btn:hover:not(:disabled) { background: #333; color: #fff; }
.hideout-level-btn:disabled { opacity: 0.3; cursor: not-allowed; }

/* Filter Checkbox Button Style (Phase 4) */
.filter-toggle-btn {
    font-size: 0.75rem; padding: 4px 10px; border-radius: 4px; border: 1px solid #333; background: #1a1a1a; color: #666; cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px;
}
.filter-toggle-btn.active {
    background: rgba(154, 140, 125, 0.2); border-color: #9a8c7d; color: #9a8c7d;
}
.filter-toggle-btn:hover:not(.active) { background: #252525; color: #aaa; }

/* Safe Area for iPhone */
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }

/* Wishlist Star */
.wishlist-star { cursor: pointer; transition: transform 0.2s; }
.wishlist-star:hover { transform: scale(1.2); }
.wishlist-star.active { color: #fbbf24; text-shadow: 0 0 10px rgba(251, 191, 36, 0.5); }

/* Settings specific */
.trader-avatar-box { position: relative; }
.trader-avatar-box img { filter: grayscale(100%); transition: all 0.3s; }
.trader-avatar-box.active img { filter: grayscale(0%); }
.trader-level-selector select { appearance: none; text-align: center; }

/* Craft Cost Detail */
.cost-source-trader { color: #4ade80; }
.cost-source-flea { color: #f97316; }

/* Injector Specific (Integrated) */
.injector-btn { transition: all 0.3s; border: 1px solid #333; position: relative; overflow: hidden; }
.injector-btn:hover { border-color: #666; background: rgba(255,255,255,0.05); }
.injector-btn.active { border-color: #a855f7; background: rgba(168, 85, 247, 0.1); box-shadow: 0 0 15px rgba(168, 85, 247, 0.1); }
.injector-grid-cell { aspect-ratio: 1/1; background: radial-gradient(circle at center, #2a2a2a 0%, #111 100%); border: 1px solid #333; position: relative; display: flex; align-items: center; justify-content: center; border-radius: 4px; overflow: hidden; }
.injector-grid-cell img { transition: transform 0.2s; }
.injector-grid-cell:hover img { transform: scale(1.1); }
.injector-grid-cell:hover .remove-overlay { opacity: 1; }
.remove-overlay { opacity: 0; background: rgba(0,0,0,0.7); position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transition: opacity 0.2s; cursor: pointer; }

/* Intelligence Unit Specific Styles */
.intel-section { 
    background: rgba(15, 15, 15, 0.6); 
    border: 1px solid rgba(154, 140, 125, 0.1); 
    padding: 1.25rem; 
    border-radius: 4px; 
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.intel-label { 
    font-size: 0.65rem; 
    font-weight: 800; 
    text-transform: uppercase; 
    letter-spacing: 0.15em; 
    color: #666; 
    margin-bottom: 0.75rem; 
    display: flex; 
    align-items: center;
}
.intel-source-link { 
    background: #111; 
    border: 1px solid #333; 
    padding: 0.4rem 0.75rem; 
    border-radius: 4px; 
    font-size: 0.7rem; 
    color: #aaa; 
    transition: all 0.2s; 
    display: inline-flex; 
    align-items: center;
}
.intel-source-link:hover { 
    border-color: #9a8c7d; 
    color: #fff; 
    background: rgba(154, 140, 125, 0.1); 
}
.intel-tag {
    cursor: pointer;
    transition: all 0.2s;
}
.intel-tag:hover {
    color: #9a8c7d;
    background: rgba(154, 140, 125, 0.1);
}
.intel-search-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border: 1px solid;
    border-radius: 4px;
    background: rgba(0,0,0,0.3);
    transition: all 0.2s;
    font-weight: bold;
    font-size: 0.75rem;
    text-align: center;
}