/* =========================================
   1. GLOBAL VARIABLES & BASE STYLES
   ========================================= */
:root {
    --sc-bg-main: #0b0f19;       /* Deepest Dark background */
    --sc-bg-card: #151a23;       /* Slightly lighter card background */
    --sc-border: #2d333b;        /* Subtle Border color */
    --sc-accent: #3b82f6;        /* Electric Blue */
    --sc-text-main: #e6edf3;     /* Bright White/Grey */
    --sc-text-muted: #8b949e;    /* Muted Grey */
    --sc-green: #2ea043;         /* Stock Up Green */
    --sc-red: #da3633;           /* Stock Down Red */
}

body {
    background-color: var(--sc-bg-main);
    color: var(--sc-text-main);
    font-family: 'Inter', sans-serif;
}

/* Custom Scrollbar for Dark Mode */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--sc-bg-main); 
}
::-webkit-scrollbar-thumb {
    background: #2d333b; 
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #444c56; 
}

/* Selection Highlight Color */
::selection {
    background: rgba(59, 130, 246, 0.3);
    color: white;
}

/* Force Muted Text Color */
.text-muted {
    color: var(--sc-text-muted) !important;
}

/* Fix Bootstrap Borders to match our Theme */
.border-secondary-subtle {
    border-color: var(--sc-border) !important;
}

/* =========================================
   2. NAVBAR & HEADER
   ========================================= */
.sc-navbar {
    background-color: var(--sc-bg-main);
    border-bottom: 1px solid var(--sc-border);
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* Navbar Search Input Wrapper */
.sc-search-wrapper {
    background-color: var(--sc-bg-card);
    border: 1px solid var(--sc-border);
    transition: all 0.3s ease;
    border-radius: 8px;
}

.sc-search-wrapper:focus-within {
    border-color: var(--sc-accent);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.2); /* Blue Glow */
}

/* Navbar Input Field */
.sc-search-input {
    background-color: transparent;
    border: none;
    color: var(--sc-text-main);
    font-weight: 500;
}

.sc-search-input::placeholder {
    color: #555;
    font-weight: 400;
}

.sc-search-input:focus {
    background-color: transparent;
    color: var(--sc-text-main);
    outline: none;
    box-shadow: none;
}

.sc-icon-muted {
    color: var(--sc-text-muted);
}

/* Search Results Dropdown */
.search-results-container {
    background-color: var(--sc-bg-card);
    border: 1px solid var(--sc-border);
    color: var(--sc-text-main);
    margin-top: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Ticker Tape (Top of Home) */
.ticker-wrap {
    background-color: #0d1117;
    border-bottom: 1px solid #2d333b;
    color: var(--sc-text-main);
    padding: 8px 0;
    font-size: 0.9rem;
}

/* =========================================
   3. MOBILE MENU
   ========================================= */
.mobile-menu-btn {
    color: var(--sc-text-main);
    border: 1px solid var(--sc-border);
    background-color: var(--sc-bg-card);
    transition: all 0.2s;
}

.mobile-menu-btn:hover {
    border-color: var(--sc-accent);
    color: var(--sc-accent);
}

#mobile-overlay {
    background-color: rgba(11, 15, 25, 0.98) !important;
    backdrop-filter: blur(10px);
}

/* =========================================
   4. HOME PAGE HERO SECTION
   ========================================= */
.hero-title strong span {
    color: var(--sc-green);
    text-shadow: 0 0 20px rgba(46, 160, 67, 0.4);
}

/* Large Hero Search Bar */
.search-container {
    background-color: var(--sc-bg-card);
    border: 1px solid var(--sc-border);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.1);
    transition: all 0.3s ease;
}

.search-container:focus-within {
    border-color: var(--sc-accent);
    box-shadow: 0 0 30px rgba(59, 130, 246, 0.25);
}

.search-input {
    background: transparent;
    color: white;
    font-size: 1.1rem;
}

.search-input::placeholder { color: #555; }

/* =========================================
   5. CARDS & COMPONENTS
   ========================================= */
/* Main Content Card (Borderless) */
.sc-card {
    background-color: var(--sc-bg-card);
    border: none;
    border-radius: 16px; 
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2); 
    /* REMOVED height: 100% to fix stretching issue */
}

/* Custom Table Styling */
.table-custom {
    color: var(--sc-text-main);
}
.table-custom thead th {
    background-color: transparent;
    border-bottom: 1px solid var(--sc-border);
    color: var(--sc-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.table-custom tbody td {
    background-color: transparent;
    border-bottom: 1px solid #1c2128;
    vertical-align: middle;
    padding: 12px 8px;
}
.table-custom tr:last-child td { border-bottom: none; }

.table-hover tbody tr:hover td {
    color: white;
    background-color: rgba(255,255,255,0.03);
}

/* News Item Feed */
.news-item {
    background-color: rgba(255,255,255, 0.03);
    border-radius: 12px;
    padding: 16px;
    border: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.news-item:hover {
    background-color: rgba(255,255,255, 0.05);
    transform: translateY(-2px);
}

.news-link {
    color: var(--sc-text-main);
    transition: color 0.2s;
}
.news-link:hover { color: var(--sc-accent); }

/* Buttons */
.btn-outline-primary {
    border-color: var(--sc-border);
    color: var(--sc-text-muted);
}
.btn-outline-primary:hover, .btn-outline-primary.active {
    background-color: var(--sc-bg-main);
    border-color: var(--sc-accent);
    color: var(--sc-accent);
}

/* Badges (Overriding Bootstrap Colors for Consistency) */
.text-success { color: var(--sc-green) !important; }
.bg-success-subtle { background-color: rgba(46, 160, 67, 0.15) !important; }

.text-danger { color: var(--sc-red) !important; }
.bg-danger-subtle { background-color: rgba(218, 54, 51, 0.15) !important; }

/* =========================================
   6. CHART OVERRIDES (ApexCharts)
   ========================================= */
.apexcharts-tooltip {
    background: var(--sc-bg-card) !important;
    border: none !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4) !important;
    color: var(--sc-text-main) !important;
}
.apexcharts-tooltip-title {
    background: #0d1117 !important;
    border-bottom: 1px solid var(--sc-border) !important;
    font-family: 'Inter', sans-serif !important;
}
.apexcharts-tooltip-text {
    font-family: 'Inter', sans-serif !important;
}

/* =========================================
   7. FOOTER
   ========================================= */
footer a:not(.fw-semibold):hover {
    color: var(--sc-accent) !important;
    transition: color 0.2s ease;
}