
/* --- NEW FLAT UI COLOR SCHEME --- */
:root {
    --bg: #121212; /* Main background */
    --card-bg: #1A1A1A; /* Background for cards and sections */
    --border: #2A2A2E; /* Subtle border/divider color */
    --text: #EAEAEA; /* Primary text color */
    --muted: #8A8F98; /* Muted text and icon color */
    --blue: #4A90E2; /* Accent blue from target UI */
    --green: #23c78a;
    --red: #ff5f5f;
    --gold: #d4af37;
    --pumping-green: #00e676;
    --font: 'Inter', sans-serif;
    --btn-bg: #2A2A2E; /* Button background */
    --btn-bg-hover: #3C3C3E; /* Button hover background */
    --slider-track: #2A2A2E; /* Slider track color */
    --value-display-bg: #35373B; /* Slider value display background */
    --table-row-hover: #222224;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    padding-bottom: 80px;
}

a {
    color: inherit;
    text-decoration: none;
}

header {
    background: var(--bg); /* Use main background */
    border-bottom: none; /* Removed border */
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.nav-title {
    font-size: 21px;
    font-weight: 600;
    display: flex;
    align-items: center;
    letter-spacing: -0.5px;
    gap: 12px;
}

.nav-title img {
    height: 60px;
}

/* --- NEW COUNTDOWN BADGE --- */
.countdown-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 5px;
    margin-left: 12px;
    position: relative;
    top: -2px;
    color: var(--muted);
    background-color: var(--card-bg);
    border: 1px solid var(--border);
}

.countdown-badge .icon {
    font-size: 12px;
}

.countdown-badge .text {
    display: inline;
}

.countdown-badge .timer {
    font-weight: 600;
    color: var(--text);
}

.countdown-badge.premarket {
    color: var(--gold) !important;
    background-color: rgba(212, 175, 55, 0.1)  !important;
    border-color: rgba(212, 175, 55, 0.3)  !important;


}

.countdown-badge.intraday {
    color: var(--green);
    background-color: rgba(35, 199, 138, 0.1);
    border-color: rgba(35, 199, 138, 0.3);
}

.countdown-badge.afterhours {
    color: var(--blue)  !important;
    background-color: rgba(74, 144, 226, 0.1)  !important;
    border-color: rgba(74, 144, 226, 0.3)  !important;
}

.countdown-badge.closed {
    color: var(--muted);
    background-color: var(--btn-bg);
    border-color: var(--border);
}

.center-nav {
    display: flex;
    gap: 42px;
    font-size: 14px;
    font-weight: 500;
    z-index: 10;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.center-nav a {
    color: var(--text);
    font-size: 18px;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s ease;
}

.nav-right {
    display: flex;
    align-items: center;
    position: relative;
}

/* --- UPDATED BUTTON STYLES --- */
.btn {
    font-size: 14px;
    padding: 10px 14px; /* Adjusted padding */
    background: var(--btn-bg); /* New background color */
    border: none; /* Removed border */
    border-radius: 6px; /* Slightly smaller radius */
    color: var(--text);
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    background: var(--btn-bg-hover); /* New hover background */
    color: var(--text);
}

.btn:active {
    transform: scale(0.97);
    opacity: 0.9;
}

.btn.active {
    background: var(--blue); /* Use accent blue for active state */
    color: #fff;
}

.btn .filter-dot {
    display: none;
}


.theme-toggle {
    font-size: 18px;
    margin-left: 14px;
    cursor: pointer;
}

.strip {
    background: var(--card-bg); /* Use card background */
    border-bottom: none; /* Removed border */
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.ticker-strip {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    background: var(--card-bg); /* Use card background */
    padding: 10px 0;
    border-bottom: none; /* Removed border */
    position: relative;
    cursor: grab;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.ticker-strip::-webkit-scrollbar {
    display: none;
}

.ticker-strip.active {
    cursor: grabbing;
}

.ticker-content-container {
    display: flex;
    animation: tickerScroll var(--ticker-speed) linear infinite;
}

.ticker-strip:hover .ticker-content-container,
.ticker-strip.active .ticker-content-container {
    animation-play-state: paused;
}

.ticker-wrapper {
    display: inline-flex;
    white-space: nowrap;
}

.ticker-item {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
    padding: 0 18px;
    cursor: pointer;
    transition: color 0.3s ease;
    position: relative;
}

.ticker-item.gold { color: var(--gold) !important; }
.ticker-item.red-tick { color: var(--red); }
.ticker-item.blue { color: var(--blue); }
.ticker-item.green-volume { color: var(--pumping-green) !important; }
.ticker-item.blue-volume { color: var(--blue) !important; }

.ticker-item i {
    margin-right: 6px;
    font-size: 11px;
    color: var(--muted);
    opacity: 0.6;
}

.copy-icon-container {
    position: relative;
    display: inline-flex;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    align-items: center;
    justify-content: center;
    color: var(--muted);
}

.copy-icon-container .fas.fa-copy {
    position: absolute;
    top: 5px;
    left: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.copy-icon-container .fas.fa-check-circle {
    position: absolute;
    top: 5px;
    left: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 0;
    transform: scale(0);
    color: var(--green);
    display: none;
}

.copy-icon-container.copied .fas.fa-copy {
    opacity: 0;
    transform: scale(0);
    display: none;
}

.copy-icon-container.copied .fas.fa-check-circle {
    opacity: 1;
    transform: scale(1);
    display: inline-block;
}

.toolbar {
    max-height: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    padding: 0 40px;
    text-align: left;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.toolbar.show {
    padding-top: 40px;
    padding-bottom: 40px;
    max-height: 650px;
}

#toolbar .section.container {
            color: #888;

            font-size: 12px;
    border: none; /* Removed all borders */
    border-radius: 5px; /* Kept rounded corners */
    padding: 30px; /* Adjusted padding */
    margin-top: 0;
    text-align: left;
    position: relative;
}

#toolbarTitle {
            color: #888;
    font-size: 22px !important;
    font-weight: 800;
    margin-bottom: 15px;
    display: block;
}

#toolbarContent p {
    font-size: 12px;
    color: #888;

    margin-bottom: 20px;
    max-width: 100%;
}

#toolbarContent strong {
    color: #888;
    font-weight: 600;
}

#toolbarContent ul, #toolbarContent ol {
    margin-left: 20px;
    margin-bottom: 20px;


            color: #888;

    max-width: 100%;
    text-align: left;
}

#toolbarContent li {
    margin-bottom: 13px;
}

.container {
    max-width: 95%;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 48px 0;
}

.section h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 16px;
}

.grid-two {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
}

.list {
    padding: 0;
}

.stock-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border); /* Use subtle border */
}

.stock-row:last-child {
    border-bottom: none;
}

.stock-left {
    display: flex;
    flex-direction: column;
}

.stock-name {
    font-size: 14px;
    font-weight: 500;
}

.stock-symbol {
    font-size: 12px;
    background: #222;
    padding: 2px 6px;
    color: #ccc;
    margin-top: 4px;
    width: fit-content;
    border-radius: 3px;
}

.stock-right {
    text-align: right;
}

.stock-price {
    font-size: 14px;
    font-weight: 500;
}

.stock-pill {
    font-size: 12px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    margin-top: 4px;
    display: inline-block;
}

.green {
    background: var(--green);
    color: #000;
}

.red {
    background: var(--red);
    color: #000;
}

.earnings {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.earn-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px 14px 40px;
    border: none; /* Removed border */
    background-color: var(--card-bg); /* Added background */
    border-radius: 8px; /* Rounded corners */
    min-height: 110px;
    cursor: move;
    position: relative;
}

.earn-card .remove-btn {
    position: absolute;
    top: 20px;
    left: 5px;
    transform: translateY(-50%);
    font-size: 13px;
    color: #666;
    cursor: pointer;
    padding: 12px;
    line-height: 1;
    transition: color 0.2s ease, transform 0.2s ease;
}

.earn-card .remove-btn:hover {
    opacity: 0.7;
}
.earn-card .remove-btn:active {
    transform: translateY(-50%) scale(0.9);
}


.earn-card.dragging {
    opacity: 0.4;
    border: 1px dashed var(--muted);
}

.earn-card.newly-pinned {
    animation: flash-bg 1.5s ease-out;
}

@keyframes flash-bg {
    0% { background-color: var(--card-bg); }
    50% { background-color: #2a2a2e; }
    100% { background-color: var(--card-bg); }
}

.earn-logo {
    width: 32px;
    height: 32px;
    border-radius: 3px !important;
    margin-right: 16px;
    object-fit: contain !important;
    background: #111;
}

.earn-name {
    font-weight: 500;
    font-size: 14px;
}

.earn-company {
    font-size: 12px;
    color: var(--muted);
}

.earn-timestamp {
    font-size: 10px;
    color: var(--muted);
    margin-top: 2px;
}

.earn-metric {
    margin-left: auto;
    text-align: right;
}

.earn-label {
    font-size: 12px;
    color: var(--muted);
}

.earn-value {
    font-size: 14px;
}

footer {
    text-align: center;
    padding: 30px 16px;
    font-size: 0.85rem;
    color: #888;
    max-width: 100%;
    border-top: none; /* Removed border */
}

footer a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    margin: 0 6px;
}

footer a:hover {
    text-decoration: underline;
}

.fullscreen-nav {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    padding: 100px 40px 40px;
}

.fullscreen-nav.show {
    display: block;
}

.fullscreen-nav .nav-content {
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: flex-start;
    justify-content: flex-start;
    height: 100%;
}

.fullscreen-nav a {
    color: white;
    font-size: 22px;
    font-weight: 500;
    text-decoration: none;
    padding-bottom: 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    width: 100%;
}

.close-btn {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 32px;
    color: white;
    cursor: pointer;
    z-index: 10000;
}

.news-logo {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 50%;
    background: #111;
}

.ticker-tag {
    margin-top: 6px;
    margin-right: 8px;
    margin-bottom: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    padding: 6px 10px;
    border: none; /* Removed border */
    background-color: #2A2A2E; /* Added background */
    border-radius: 6px; /* Matched button radius */
    cursor: pointer;
    position: relative;
    width: fit-content;
    color: var(--blue);
    transition: opacity 0.2s ease;
}

.ticker-tag:hover {
    opacity: 0.9;
}

.ticker-tag .fas.fa-copy {
    font-size: 11px;
}

.ticker-tag img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 3px;
}

.ticker-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.loader {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #333;
    border-top: 3px solid var(--blue); /* Use new blue */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 20px auto;
}

.loader-row {
    text-align: center;
    height: 120px;
}

.logo-fallback {
    font-size: 7px;
    font-weight: 600;
    text-transform: uppercase;
    display: flex;
    padding-left: 2px;
    padding-right: 2px;
    align-items: center;
    justify-content: center;
    background: #222;
    color: #999;
    border-radius: 5px;
    overflow: hidden;
}

.news-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 10px;
    padding: 20px;
    border: none; /* Removed border */
    border-radius: 8px; /* Rounded corners */
    background: var(--card-bg);
    width: 100%;
    transition: background-color 0.3s ease;
}

.news-card:hover {
    background-color: #222224;
}

.news-card.brx-strong-bg { background-color: rgba(255, 95, 95, 0.05); }
.news-card.brx-watch-bg { background-color: rgba(212, 175, 55, 0.05); }
.news-card.brx-weak-bg { background-color: rgba(100, 100, 100, 0.05); }


.news-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.news-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}

.news-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.4;
}

.interpretive-tags-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 4px;
    flex-wrap: wrap;
}

.interpretive-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 3px;
    text-transform: uppercase;
}

.interpretive-tag.ai-crypto { background-color: #8e44ad; color: #fff; }
.interpretive-tag.filing,
.interpretive-tag.registration { background-color: #2980b9; color: #fff; }
.interpretive-tag.biotech { background-color: #27ae60; color: #fff; }
.interpretive-tag.offering { background-color: #c0392b; color: #fff; }
.interpretive-tag.compliance { background-color: #f39c12; color: #000; }
.interpretive-tag.setup { background-color: var(--gold); color: #000; }
.interpretive-tag.earnings { background-color: var(--blue); color: #000; }
.interpretive-tag.insider { background-color: #34495e; color: #fff; }

.impact-block {
    min-width: 160px;
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    flex-shrink: 0;
    padding-top: 6px;
}

.impact-title {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.impact-score {
    font-size: 26px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.impact-gauge {
    width: 100px;
    height: 4px;
    border-radius: 2px;
    position: relative;
    margin-bottom: 10px;
    background-color: #222;
    overflow: hidden;
}

.impact-gauge::before {
    content: '';
    height: 100%;
    border-radius: 2px;
    position: absolute;
    left: 0;
    top: 0;
    transition: width 0.4s ease-out, background-color 0.4s ease;
    width: var(--gauge-width, 0%);
    background-color: var(--gauge-color, var(--blue));
}


.impact-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.impact-tag {
    font-size: 11px;
    padding: 3px 6px;
    background: #1a1a1a;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: #bbb;
    text-transform: uppercase;
}

.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

.footer-note {
    margin-top: 24px;
    font-size: 0.9rem;
    color: #aaa;
}

.footer-note a {
    color: var(--accent-color);
    text-decoration: none;
    margin: 0 8px;
}

.footer-note a:hover {
    text-decoration: underline;
}

.chart-preview-icon {
    display: inline-block;
    position: relative;
    margin-left: 8px;
    font-size: 11px;
    color: var(--blue) !important;
    z-index: 1;
    width: 70px;
    height: 28px;
    overflow: hidden;
    border-radius: 3px;
    vertical-align: middle;
}

.chart-preview-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.ticker-data-badge {
    font-size: 10px;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: #222;
    color: #bbb;
    margin-right: 4px;
    transition: color 0.3s ease, background-color 0.3s ease;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    max-width: 640px;
    width: 100%;
    background: var(--card-bg); /* Use card background */
    padding: 40px;
    border-radius: 8px; /* Rounded corners */
    color: #eee;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
}

.modal-content h2 {
    margin-top: 0;
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #aaa;
    font-size: 1.2rem;
    cursor: pointer;
}

.modal-content p {
    color: #bbb;
    margin-bottom: 14px;
}

.modal-content ul {
    margin-left: 20px;
    margin-bottom: 14px;
}

.modal-content li {
    margin-bottom: 8px;
}

.fa-sync-alt.spinning {
    animation: spin 0.8s linear infinite;
}

/* --- UPDATED SECTION STYLES --- */
.section.container {
    background: transparent; /* Sections blend into main background */
    padding: 16px 0; /* Adjusted padding */
    margin-top:35px;
    margin-bottom:15px;
    border-radius: 0; /* Removed radius */
    transition: background 0.3s ease;
}

.hidden {
    display: none !important;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
    position: relative;
}

.section-title-container {
    flex-grow: 1;
}

.section-description {
    font-size: 14px;
    color: var(--muted);
    margin-top: 6px;
    margin-bottom: 10px;
    max-width: 500px;
}


#clearPinsBtn {
    margin-top: 20px;
    background: none;
    border: none;
    padding: 8px 16px;
    color: var(--muted);
    border-radius: 5px;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
}

#clearPinsBtn:hover {
    color: #ff5f5f;
}

.table-pin-button, .pin-action, .share-action, .copy-action, .delete-action, .summary-view-action {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.7;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 4px;
    min-width: 20px;
    text-align: center;
}

.table-pin-button:hover, .pin-action:hover, .share-action:hover, .copy-action:hover, .delete-action:hover, .summary-view-action:hover {
    opacity: 1;
}
.delete-action:hover {
    color: var(--red);
}

.table-pin-button.pinned, .pin-action.pinned {
    color: var(--blue) !important; /* Use new blue for pinned */
    opacity: 1;
}

.ticker-tag .pin-action.pinned i.fas.fa-thumbtack {
    color: var(--blue) !important;
}

#pinnedStocksSection {
    background: transparent; /* Pinned section has a transparent background */
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 35px;
    margin-top: 35px;
}

#pinnedStocksSection h2 {
    font-size: 20px;
    font-weight: 600;
}

#pinnedStocksSection.hidden {
    display: none !important;
}

#pinnedGrid {
    display: grid;
    grid-template-columns: repeat(minmax(280px, 1fr));
    gap: 20px;
    margin-top: 28px;
}

.yahoo-table-container {
    border-top: none;
    overflow: hidden;
    min-height: 300px;
    position: relative;
    opacity: 0;
    visibility: hidden;
    animation: showTable 0s ease 7s forwards;
}

.yahoo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border-spacing: 0;
}

.yahoo-table th,
.yahoo-table td {
    padding: 12px 16px;
    font-size: 13px;
    text-align: left;
}

.yahoo-table tr {
    border-bottom: 1px solid var(--border); /* Use subtle border */
}

.yahoo-table th {
    color: #aaa;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.4px;
    cursor: pointer;
    height: 50px;
    position: relative;
}

.yahoo-table th:hover {
    color: var(--text);
}

.yahoo-table th .sort-arrow {
    opacity: 0.5;
    margin-left: 5px;
    display: inline-block;
    width: 1em;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.yahoo-table th .sort-indicator {
    display: inline-block;
    font-size: 12px;
    color: var(--muted);
    opacity: 0.4;
    transition: opacity 0.2s;
    margin-left: 8px;
}

.yahoo-table th:hover .sort-indicator {
    opacity: 0.8;
}

.yahoo-table th.sorted .sort-indicator {
    opacity: 1;
}

.yahoo-table th.asc .sort-indicator {
    transform: rotate(180deg);
}

.yahoo-table th.desc .sort-indicator {
    transform: rotate(0deg);
}

.yahoo-table td {
    color: #eee;
    height: 68px;
    vertical-align: middle;
}

.yahoo-table tbody tr:hover {
    background: var(--table-row-hover);
}

.symbol-cell {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    color: #fff;
}

.symbol-cell .yahoo-logo-small {
    width: 28px;
    height: 28px;
}

.symbol-cell .yahoo-logo-fallback-small {
    width: 28px;
    height: 28px;
    font-size: 9px;
}

.symbol-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.symbol-ticker {
    font-size: 14px;
    font-weight: 600;
}

.company-name {
    font-size: 12px;
    color: #aaa;
    margin-top: 2px;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.price-cell {
    color: #fff;
    font-weight: 500;
}

.price-cell .gap-percent {
    font-size: 12px;
    margin-left: 4px;
}

.gap-percent.positive {
    color: #23c78a;
}

.gap-percent.negative {
    color: #ff5f5f;
}

.volume-cell,
.float-cell {
    color: #bbb;
    font-size: 13px;
}

.grade-cell {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.grade-value {
    font-size: 16px;
    cursor: help;
}

.brx-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    cursor: help;
}

.brx-badge.strong { background-color: var(--red); color: #fff; }
.brx-badge.watch { background-color: var(--gold); color: #000; }
.brx-badge.weak { background-color: #444; color: #aaa; }

.pin-cell {
    text-align: center;
    width: 50px;
}

.ticker-strip .pin-action.pinned i.fas.fa-thumbtack {
    color: var(--blue) !important;
}

.section-header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.toggle-icon {
    cursor: pointer;
    font-size: 20px;
    color: var(--muted);
    transition: transform 0.2s ease, color 0.2s ease;
    padding: 4px;
}
.toggle-icon:hover {
    color: var(--text);
}
.toggle-icon:active {
    transform: scale(0.9) rotate(0deg) !important;
}

.section.collapsed .toggle-icon {
    transform: rotate(-90deg);
}

.section-content {
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    overflow-x: hidden;
}

.section.collapsed .section-content {
    max-height: 0 !important;
}

.paywall-overlay {
    position: absolute;
    inset: 0;
    top: 118px;
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 20;
    color: #fff;
    padding: 20px;
    text-align: center;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.paywall-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.paywall-overlay h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
}

.paywall-overlay p {
    color: var(--muted);
    margin-bottom: 16px;
}

.paywall-overlay .btn {
    font-size: 14px;
    background: var(--blue);
    color: #000;
    font-weight: 600;
    border-color: var(--blue);
}

.paywall-overlay .btn:hover {
    opacity: 0.9;
}

.reason-cell .reason-tag {
    display: inline-block;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 3px;
    font-style: normal;
    font-weight: 500;
}

.reason-tag {
    font-size: 12px;
}

.reason-tag.volatility { background-color: #8e44ad; color: #fff; }
.reason-tag.volume { background-color: #2980b9; color: #fff; }
.reason-tag.low-float { background-color: #f39c12; color: #000; }
.reason-tag.activity { background-color: #7f8c8d; color: #fff; }

/* --- UPDATED CONTROLS CONTAINER --- */
.controls-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    margin-bottom: 10px;
    border: none; /* Removed border */
    border-radius: 8px;
    background-color: var(--card-bg); /* Use card background */
    position: relative;
}

.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: space-between;
}

.filter-controls-left, .filter-controls-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
}


#newsControls .control-row {
    flex-wrap: nowrap;
    justify-content: space-between;
}

#newsControls .control-row .button-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

#newsControls .control-row .slider-group {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
}

.controls-container .last-updated {
    font-size: 12px;
    color: var(--muted);
    margin-right: 10px;
}

.load-more-container {
    text-align: center;
    padding: 20px 0;
}
.load-more-container .btn {
    width: 100%;
    justify-content: center;
}

.notification-box {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    background-color: var(--card-bg);
    border-top: 1px solid var(--border);
    z-index: 1001;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease-in-out;
    display: none;
    padding: 10px 20px;
}

.notification-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 20px;
}

.notification-header {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 13px;
    font-weight: 600;
    flex-shrink: 0;
}

.notification-header span i {
    margin-right: 8px;
    color: var(--gold);
}

.notification-body {
    display: flex;
    align-items: center;
    gap: 15px;
    overflow: hidden;
    flex-grow: 1;
}

.notification-article-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.notification-article-title:hover {
    opacity: 0.8;
}

.notification-ticker-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.notification-controls i {
    cursor: pointer;
    color: var(--muted);
    transition: color 0.2s ease;
}

.notification-controls i:hover {
    color: var(--text);
}

.pin-action.pinned i,
.table-pin-button.pinned i {
    color: var(--blue) !important; /* Use new blue */
}

.share-action {
    margin-left: 8px;
    font-size: 12px;
}

.revalidate-link {
    font-size: 13px;
    color: var(--muted);
    text-decoration: underline;
    cursor: pointer;
    margin-top: 15px;
}

.revalidate-link:hover {
    color: var(--text);
}

.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: var(--muted);
}

.form-group input {
    width: 100%;
    padding: 10px;
    background-color: #222;
    border: 1px solid var(--border);
    border-radius: 3px;
    color: var(--text);
    font-size: 14px;
}

#revalidateStatus {
    margin-top: 15px;
    font-size: 13px;
    min-height: 20px;
}

.status-error { color: var(--red); }
.status-success { color: var(--green); }
.status-loading { color: var(--blue); }

.section-loader {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 250px;
    width: 100%;
    text-align: center;
    background: var(--card-bg);
    border: none; /* Removed border */
    border-radius: 8px;
    margin-top: 15px;
}

.section-loader .loader {
    border: 4px solid #333;
    border-top: 4px solid var(--blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.section-loader p {
    color: var(--muted);
    font-size: 14px;
}

.spinning {
    animation: spin 1s linear infinite;
}

#momentumBoxPaywall {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    top: 100px;
    background: linear-gradient(to top, var(--bg) 0%, rgba(18, 18, 18, 0.85) 50%, rgba(18, 18, 18, 0) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 10;
    border-radius: 0;
    padding: 20px;
    pointer-events: auto;
}

.mobile-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    min-width: 180px;
    overflow: hidden;
}

.mobile-dropdown.active {
    display: block;
}

.mobile-dropdown a {
    color: var(--text);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

.mobile-dropdown a:hover {
    background-color: #2a2a2a;
}

#menuToggle {
    display: none;
}

.impact-block-desktop {
    text-align: right;
    padding-left: 20px;
    border-left: 1px solid var(--border);
    min-width: 100px;
}

.impact-block-mobile {
    display: none;
}

.last-updated {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}

#pull-to-refresh {
    position: fixed;
    top: -50px;
    left: 0;
    width: 100%;
    height: 50px;
    background: #1a1a1a;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--muted);
    font-size: 14px;
    z-index: 999;
    transition: top 0.3s ease;
}

.momentum-mobile-container {
    display: none;
    flex-direction: column;
    gap: 1px;
    background-color: var(--border);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin-top: 15px;
}

.momentum-card-mobile {
    background-color: var(--card-bg); /* Use card background */
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.momentum-card-mobile .reason-tag {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    text-transform: capitalize;
    background-color: #333;
    color: #eee;
    white-space: nowrap;
    border: 1px solid #444;
}

.momentum-card-mobile .reason-tag.volatility {
    background-color: #4a3862;
    color: #d9cfff;
    border-color: #6a508f;
}

.momentum-card-mobile .reason-tag.volume {
    background-color: #2e5a88;
    color: #d4e5ff;
    border-color: #4a7ab3;
}

.momentum-card-mobile .reason-tag.low-float {
    background-color: #8c4d39;
    color: #ffdec8;
    border-color: #ab6a54;
}

.momentum-card-mobile .reason-tag.activity {
    background-color: #444;
    color: #ccc;
    border-color: #555;
}

.card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-row.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 16px 12px;
}

.info-block {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
    min-width: 0;
}

.info-block .text-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.info-block .symbol-ticker {
    font-size: 16px;
    font-weight: 600;
}

.info-block .company-name {
    font-size: 12px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-point {
    display: flex;
    flex-direction: column;
}

.data-label {
    font-size: 11px;
    color: var(--muted);
    margin-bottom: 3px;
    text-transform: uppercase;
}

.data-value {
    font-size: 14px;
    font-weight: 500;
}

.actions-block {
    display: flex;
    align-items: center;
    gap: 4px;
}
.actions-block .table-pin-button, .actions-block .share-action, .actions-block .copy-action {
    padding: 8px;
}


#pinnedNewsContainer,
#pinnedMomentumContainer {
    margin-bottom: 20px;
}

.pinned-news-card {
    border: 1px solid var(--gold) !important;
    background-color: #2a261e;
    position: relative;
}

.shared-momentum-card {
    border: 1px solid var(--gold);
    background-color: #1A1F28;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.shared-momentum-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 15px;
}

.shared-momentum-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.shared-momentum-text .symbol-ticker {
    font-size: 24px;
    font-weight: 600;
}
.shared-momentum-text .company-name {
    font-size: 14px;
    color: var(--muted);
}

.shared-momentum-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: flex-start;
}
.shared-momentum-details {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.shared-momentum-data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 18px;
}

.shared-momentum-chart {
    min-height: 120px;
    width: 100%;
}

.shared-momentum-chart .sparkline-svg {
    width: 100%;
    height: 100%;
}

.shared-momentum-overview p {
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
}


.pinned-news-card .pin-action,
.pinned-news-card .share-action,
.shared-momentum-card .table-pin-button,
.shared-momentum-card .share-action {
    display: none;
}

.shared-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--gold);
    background-color: rgba(212, 175, 55, 0.1);
    padding: 3px 7px;
    border-radius: 3px;
    margin-left: 12px;
    white-space: nowrap;
}

.summary-close-btn {
    color: var(--muted);
    cursor: pointer;
    font-size: 20px;
    font-weight: 400;
    line-height: 1;
    transition: color 0.2s ease;
}
.summary-close-btn:hover {
    color: var(--text);
}

.switch-container {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
}
.switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
}
.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #333;
    transition: .4s;
    border-radius: 20px;
}
.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}
input:checked + .slider {
    background-color: var(--blue);
}
input:checked + .slider:before {
    transform: translateX(14px);
}

.suggestion-container {
    padding-bottom: 35px;
    margin-top: -15px;
    position: relative;
}
.suggestion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.suggestion-card {
    background: var(--card-bg); /* Use card background */
    border: none; /* Removed border */
    border-radius: 8px; /* Rounded corners */
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-height: 140px;
}
.suggestion-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transform: translateY(-2px); /* Add subtle hover effect */
}
.suggestion-header {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: space-between;
}
.suggestion-logo {
    width: 40px;
    height: 40px;
    min-height:40px;
    min-width:40px;
    border-radius: 3px;
    object-fit: contain;
    background: #1a1a1a;
    flex-shrink: 0;
}
.suggestion-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.suggestion-ticker {
    font-size: 18px;
    font-weight: 600;
    color: var(--text);
}
.suggestion-ticker span {
    font-size: 14px;
    font-weight: 500;
    color: var(--gold);
    margin-left: 6px;
}
.suggestion-conclusion {
    font-size: 13px;
    color: var(--muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}
.suggestion-body {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
}
.suggestion-price {
    font-size: 22px;
    font-weight: 500;
    color: var(--text);
}
.suggestion-price span {
    font-size: 14px;
    color: var(--muted);
    font-weight: 400;
    margin-left: 4px;
}
.suggestion-change {
    font-size: 16px;
    font-weight: 600;
}
.sparkline-container {
    flex-shrink: 0;
}

.swipe-indicator {
    display: none;
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--muted);
    z-index: 1;
}
.suggestion-header .earn-logo.logo-fallback {     width: 40px;
    height: 40px;
    min-height:40px;
     object-fit: contain; 
    border-radius:3px;
    min-width:40px;  }

    .suggestion-header .earn-logo img {     width: 40px;
    height: 40px;
    min-height:40px;
     object-fit: contain; 
    border-radius:3px;
    min-width:40px;  }


    .suggestion-logo {
 object-fit: contain; 
 border-radius:3px !important;
    }
.swipe-indicator i {
    font-size: 24px;
    animation: point-and-swipe 2s infinite ease-in-out;
}

/* --- UPDATED SLIDER STYLES --- */
.slider-container {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0; /* Remove padding from container */
    background-color: transparent; /* Make container transparent */
    border: none; /* Remove border */
    flex-grow: 1;
}
.slider-container label {
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.slider-container input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px; /* Slightly thicker track */
    background: var(--slider-track);
    border-radius: 3px;
    outline: none;
    cursor: pointer;
}
.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px; /* Larger thumb */
    height: 18px; /* Larger thumb */
    background: var(--blue);
    border-radius: 50%;
    cursor: pointer;
    border: none; /* Removed border */
}
.slider-container input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: var(--blue);
    border-radius: 50%;
    cursor: pointer;
    border: none; /* Removed border */
}
.slider-container .value-display {
    font-size: 12px;
    font-weight: 600;
    color: var(--text);
    background-color: var(--value-display-bg);
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 70px;
    text-align: center;
}

.add-ticker-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--btn-bg); /* Use button background */
    border: none; /* Removed border */
    border-radius: 6px; /* Matched button radius */
    padding: 4px 4px 4px 12px;
}
.add-ticker-container input {
    background: transparent;
    border: none;
    color: var(--text);
    outline: none;
    font-size: 14px;
    width: 100px;
    text-transform: uppercase;
}
.add-ticker-container input::placeholder {
    color: var(--muted);
    text-transform: none;
}
.add-ticker-container button {
    background: var(--btn-bg-hover); /* Use hover color for contrast */
    border: none;
    color: var(--text);
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s ease;
}
.add-ticker-container button:hover {
    background: var(--blue);
}
.add-ticker-container button:disabled {
    background: #222;
    color: #555;
    cursor: not-allowed;
}

#filterAddedLink {
    font-size: 18px;
    font-weight: 500;
    color: var(--muted);
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
    line-height: 1;
}
#filterAddedLink.active, #filterAddedLink:hover {
    background-color: var(--card-bg);
    color: var(--text);
}

#resetMomentumViewBtn {
    font-size: 16px;
    color: var(--muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}
#resetMomentumViewBtn:hover {
    color: var(--text);
    background-color: var(--card-bg);
}
#resetMomentumViewBtn:active {
    transform: rotate(90deg);
}

.sort-toggle-icon {
    margin-left: 8px;
    opacity: 0.7;
    display: inline-block;
    width: 1em;
    transition: opacity 0.2s ease;
}

#sortBrxBtn.active .sort-toggle-icon,
#sortGapBtn.active .sort-toggle-icon {
    opacity: 1;
}

.tooltip-icon {
    color: var(--muted);
    cursor: help;
    font-size: 12px;
}
.btn.active .tooltip-icon {
    color: #fff;
    opacity: 0.8;
}
.tooltip-bubble {
    position: fixed;
    background: #111;
    color: #eee;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 12px;
    font-family: var(--font);
    font-weight: 500;
    white-space: pre-wrap;
    max-width: 250px;
    z-index: 99999;
    text-align: left;
    line-height: 1.5;
    border: 1px solid #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    will-change: transform, opacity;
}

.newly-shared {
    animation: flash-highlight 1.5s ease-out;
}

@keyframes point-and-swipe {
    0% { transform: translateX(-8px); opacity: 0; }
    20% { transform: translateX(-8px); opacity: 1; }
    80% { transform: translateX(8px); opacity: 1; }
    100% { transform: translateX(8px); opacity: 0; }
}


@keyframes flash-border {
    0% { box-shadow: 0 0 0 0px rgba(74, 144, 226, 0.7); } /* Use new blue */
    50% { box-shadow: 0 0 0 4px rgba(74, 144, 226, 0.3); }
    100% { box-shadow: 0 0 0 0px rgba(74, 144, 226, 0); }
}

@keyframes flash-highlight {
    0% { box-shadow: 0 0 0 0px rgba(212, 175, 55, 0.7); }
    50% { box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.3); }
    100% { box-shadow: 0 0 0 0px rgba(212, 175, 55, 0); }
}

@keyframes showTable {
    to {
        opacity: 1;
        visibility: visible;
    }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}


@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

    .center-nav {
        display: none;
        flex-direction: column;
        background: #000;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        padding: 80px 24px 24px;
        z-index: 999999;
        align-items: flex-start;
    }

    .center-nav.show {
        display: flex;
    }

    .center-nav a {
        color: white;
        font-size: 20px;
        padding: 12px 0;
        border-bottom: 1px solid var(--border);
        width: 100%;
        cursor: pointer;
    }

    .nav-title-text {
        display: none !important;
    }
    
    .countdown-badge .text {
        display: none;
    }
    
    .section-header {
        align-items: center;
        padding-right: 30px;
    }

    .section-title-container {
        width: 100%;
    }

    .section-header-controls {
        justify-content: flex-start;
        width: 100%;
        margin-top: 10px;
        margin-left: 0;
    }

    .toggle-icon {
        position: absolute;
        top: 0px;
        right: -5px;
        font-size: 22px;
        padding: 8px;
    }

    .footer {
        text-align: center;
        margin-top:35px;
        padding: 40px 20px 60px;
        font-size: 0.8rem !important;
        color: #777;
    }

    .footer a {
        color: #fff;
        text-decoration: none;
        font-weight: 500;
        font-size: 0.8rem !important;
    }

    .hamburger {
        display: inline-block !important;
        font-size: 28px;
        margin-left: 18px;
        cursor: pointer;
        color: white;
        z-index: 1001;
        position: relative;
    }

    .hamburger:hover {
        opacity: 0.8;
    }

    .close-nav {
        position: absolute;
        top: 20px;
        right: 24px;
        font-size: 28px;
        cursor: pointer;
        color: white;
        z-index: 1001;
    }

    .close-nav:hover {
        opacity: 0.8;
    }

    .section.container {
        padding: 20px 10px;
        background-color: transparent !important;
        border-radius: 0 !important;
    }
    
    .container {
        max-width: 100%;
        margin: 0 auto;
        padding: 0px;
    }

    .news-card {
        flex-direction: column;
        align-items: flex-start;
        width: 100% !important;
        max-width: 100% !important;
        overflow: hidden;
        box-sizing: border-box;
    }

    .news-card .impact-block {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        margin-top: 12px;
    }

    .news-card .impact-score {
        font-size: 14px;
        font-weight: 600;
        color: var(--text);
    }

    .news-card .impact-title {
        font-size: 13px;
        font-weight: 500;
        color: var(--muted);
    }

    .news-card .impact-gauge {
        width: 100% !important;
        height: 5px;
        border-radius: 2.5px;
    }
    
    .news-content-wrapper {
        width: 100% !important;
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .impact-block {
        width: 100%;
        align-items: flex-start;
        text-align: left;
        padding-top: 15px;
    }

    .impact-tags {
        justify-content: flex-start;
    }

    .impact-gauge {
        width: 100%;
    }

    .yahoo-table-container {
        overflow-x: auto;
    }

    .yahoo-table {
        width: 600px;
        min-width: 600px;
        display: none !important;
    }

    .notification-box {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }

    .notification-body {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .notification-ticker-info {
        flex-wrap: wrap;
    }

    #desktopNav {
        display: none;
    }

    #menuToggle {
        display: inline-block;
        cursor: pointer;
        font-size: 24px;
        font-weight: bold;
    }

    .impact-block-desktop {
        display: none;
    }

    .impact-block-mobile {
        display: block;
        width: 100%;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid var(--border);
        text-align: left;
    }

    .momentum-mobile-container {
        display: flex;
    }
    
    .card-header, .card-body, .row {
        flex-wrap: wrap;
        max-width: 100%;
    }

    .metrics-row {
        flex-wrap: wrap;
        gap: 6px;
    }

    .ticker-data-block {
        min-width: unset;
        max-width: 32%;
        flex: 1 1 30%;
    }

    .suggestion-container {
        padding-left: 20px;
        padding-right: 20px;
        padding-top: 15px;
    }
    .suggestion-grid {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding-bottom: 15px;
        gap: 12px;
    }
    .suggestion-card {
        flex: 0 0 80%;
        background-color: var(--card-bg) !important;
        scroll-snap-align: start;
    }
    .suggestion-grid::-webkit-scrollbar {
        display: none;
    }
    .swipe-indicator {
        display: block;
    }

    .controls-container .control-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    #momentumBoxSection .button-group {
        margin-bottom: 15px;
    }
    
    .add-ticker-container {
        width: 100%;
    }
    .add-ticker-container input {
        flex-grow: 1;
    }

    .controls-container .slider-container {
        width: 100%;
    }
    #newsControls .control-row {
        flex-direction: column;
        align-items: stretch;
    }
    #newsControls .slider-group {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .shared-momentum-body {
        grid-template-columns: 1fr;
    }
}

#momentumBoxSection .button-group {
    display: flex;
    gap: 10px;
}
#momentumBoxSection .button-group .btn {
    flex: 1;
    justify-content: center;
}

@media (min-width: 769px) {
    .hamburger,
    .close-nav {
        display: none !important;
    }

#momentumBoxSection .control-row .button-group {
    display: flex;
    gap: 10px;
}
#momentumBoxSection .control-row .button-group .btn {
    flex: 1;
    padding: 10px 5px;
    font-size: 13px;
    justify-content: center;
}}
        .data-status-bar {
            background-color: #1c1f24; /* A subtle, dark blue/grey */
            color: #888;
            padding: 10px 15px; /* Increased padding */
            font-size: 12px;
            text-align: center;
            width: 100%;
            border-top: 1px solid #2a2d34;
            border-bottom: 1px solid #2a2d34;
            display: none; /* Hidden by default */
            font-family: 'Inter', sans-serif;
            line-height: 1.6; /* Increased line-height */
            transition: background-color 0.5s ease;
            white-space: normal; /* Ensure text wraps */
        }
        .data-status-bar.updated {
            background-color: #2a2d34; /* Flash this color on update */
        }

        /* Momentum filter buttons */
        #momentumBoxSection .button-group .btn {
            min-width: 110px;
            white-space: nowrap;
        }

        /* Ticker tags in news feed */
        .ticker-tag {
            display: inline-flex;
            flex-wrap: nowrap;
            align-items: center;
        }
        .ticker-data-badge {
            white-space: nowrap;
        }

        /* Reset link style */
        a#resetMomentumViewBtn {
            color: var(--muted);
            font-size: 14px;
            text-decoration: none;
            transition: color 0.2s;
            white-space: nowrap;
        }
        a#resetMomentumViewBtn:hover {
            color: var(--gold);
        }

        /* Styling for shared/summary cards */
        .pinned-news-card, .shared-momentum-card {
            border: 1px solid #2a2d34;
            border-radius: 8px;
            margin-bottom: 1rem;
            background-color: #1c1f24;
            animation: fadeIn 0.5s ease-out;
            min-height: 150px; /* Provide a minimum height to reduce layout shift */
        }
        .shared-momentum-card {
             padding: 20px 25px;
        }
        .pinned-news-card {
            padding: 20px 25px; /* Ensure news card has same padding */
        }

        /* Mobile responsiveness for controls */
        @media (max-width: 768px) {
            .filter-controls-right {
                display: flex;
                align-items: center;
                width: 100%;
                gap: 15px;
            }
            .add-ticker-container {
                flex-grow: 1;
            }
            #filterAddedLink, a#resetMomentumViewBtn {
                flex-shrink: 0;
            }
        }

              /* Technical Setups - Refined Styles */
        .tabs {
            display: flex;
            border-bottom: 1px solid var(--border-color);
            margin-bottom: 1rem;
            overflow-x: auto;
            -ms-overflow-style: none;
            scrollbar-width: none;
        }
        .tabs::-webkit-scrollbar {
            display: none;
        }
        .tab-button {
            padding: 0.75rem 1.25rem;
            cursor: pointer;
            border: none;
            background: none;
            color: var(--muted);
            font-weight: 500;
            font-size: 14px;
            border-bottom: 2px solid transparent;
            transition: all 0.2s ease-in-out;
            white-space: nowrap;
        }
        .tab-button:hover {
            color: var(--text-primary);
        }
        .tab-button.active {
            color: var(--blue);
            border-bottom-color: var(--blue);
        }
        .tab-content {
            display: none;
        }
        .tab-content.active {
            display: block;
        }

        .suggestion-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 1rem;
        }
        .suggestion-card {
            background-color: var(--card-bg);
            border: 1px solid var(--border-color);
            border-radius: 8px;
            padding: 1rem;
            display: flex;
            flex-direction: column;
            gap: 1rem;
            transition: border-color 0.3s ease, box-shadow 0.3s ease;
        }
        .suggestion-card:hover {
            border-color: var(--blue);
        }

        .suggestion-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .suggestion-logo {
            width: 38px;
            height: 38px;
            border-radius: 6px;
            object-fit: contain;
            background-color: #1a1c20;
            flex-shrink: 0;
            border: 1px solid var(--border-color);
        }
        .suggestion-info {
            display: flex;
            flex-direction: column;
            flex-grow: 1;
            overflow: hidden;
        }
        .suggestion-ticker {
            font-weight: 600;
            font-size: 1rem;
            color: var(--text-primary);
        }
        .suggestion-name {
            font-size: 0.8rem;
            color: var(--muted);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .card-actions {
            display: flex;
            gap: 1rem;
            color: var(--muted);
            font-size: 15px;
        }
        .card-actions i {
            cursor: pointer;
            transition: color 0.2s ease;
        }
        .card-actions i:hover {
            color: var(--text-primary);
        }
        .pin-action.pinned {
            color: var(--gold);
        }

        .suggestion-body {
            display: flex;
            align-items: center;
            gap: 1rem;
        }

        .trendline-svg {
            width: 70px;
            height: 35px;
            flex-shrink: 0;
        }

        .suggestion-price-container {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }
        .suggestion-price {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        .suggestion-price span {
            font-size: 0.8rem;
            color: var(--muted);
            margin-left: 0.25rem;
        }
        .suggestion-change {
            font-size: 0.9rem;
            font-weight: 500;
        }

        .card-reasoning {
            background-color: var(--section-bg);
            border-radius: 6px;
            padding: 0.75rem;
            font-size: 0.85rem;
            line-height: 1.4;
            margin-top: auto;
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        .card-reasoning p {
            margin:0;
            color: var(--muted);
            flex-grow: 1;
        }
        .card-reasoning strong {
            color: var(--text-primary);
            font-weight: 600;
        }
        .volume-indicator {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
            transition: background-color 0.3s ease, box-shadow 0.3s ease;
        }
        .volume-indicator.positive {
            background-color: var(--green);
            box-shadow: 0 0 8px rgba(0, 200, 83, 0.5);
        }
        .volume-indicator.negative {
            background-color: var(--red);
            box-shadow: 0 0 8px rgba(213, 0, 0, 0.5);
        }

        .suggestion-stats {
    background-color: #1c1f24;
    border-radius: 6px;
    display: flex;
    justify-content: space-around;
    padding: 0.75rem;
    margin-top: 0.25rem;
}
.stat-item {
    text-align: center;
}
.stat-label {
    font-size: 0.75rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}
.stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

#pinnedGrid {
    display: grid;
    grid-template-columns: repeat(4, minmax(280px, 1fr)) !important;
    gap: 15px;

}

        @media (min-width: 1400px) {
            #pinnedGrid {
                grid-template-columns: repeat(4, 1fr);
            }
        }

        @media (min-width: 768px) {
    .suggestion-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}




        /* Styles for the full-width, responsive sliders in the Technical Setups section */
        .full-width-sliders .control-row {
            width: 100%;
        }
        .full-width-sliders .slider-group {
            width: 100%;
            display: flex;
            gap: 30px;
            flex-wrap: wrap; /* Allows stacking on smaller screens */
        }
        .full-width-sliders .slider-container {
            flex: 1 1 250px; /* Grow, shrink, and base width for responsiveness */
        }