@import url('https://fonts.googleapis.com/css2?family=VT323&family=Press+Start+2P&family=Share+Tech+Mono&display=swap');

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

:root {
    --win-gray: #c0c0c0;
    --win-dark-gray: #808080;
    --win-darker-gray: #404040;
    --win-light-gray: #dfdfdf;
    --win-white: #ffffff;
    --win-black: #000000;
    --win-blue: #000080;
    --win-dark-blue: #000040;
    --win-teal: #008080;
    --positive-green: #00aa00;
    --positive-light: #ccffcc;
    --negative-red: #aa0000;
    --negative-light: #ffcccc;
    --warning-yellow: #aaaa00;
    --warning-light: #ffffcc;
    --crt-green: #00ff00;
    --crt-amber: #ffb000;
    --pixel-size: 1px;
}

body {
    font-family: 'Share Tech Mono', 'VT323', monospace;
    background: #008080;
    min-height: 100vh;
    overflow: hidden;
    user-select: none;
}

.desktop {
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #008080 0%, #006666 100%);
    position: relative;
    overflow: hidden;
}

.desktop::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.03) 2px,
        rgba(0, 0, 0, 0.03) 4px
    );
    pointer-events: none;
    z-index: 10000;
}

.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 28px;
    background: linear-gradient(to bottom, #c0c0c0 0%, #a0a0a0 100%);
    border-top: 2px solid #ffffff;
    display: flex;
    align-items: center;
    padding: 2px 4px;
    z-index: 9999;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.3);
}

.start-button {
    display align-items: center: flex;
   ;
    gap: 4px;
    padding: 2px 8px;
    background: linear-gradient(to bottom, #ffffff 0%, #c0c0c0 100%);
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    cursor: pointer;
    font-weight: bold;
    font-size: 12px;
    height: 22px;
}

.start-button:active {
    border-color: #404040 #ffffff #ffffff #404040;
    background: #a0a0a0;
}

.start-icon {
    font-size: 14px;
}

.taskbar-separator {
    width: 2px;
    height: 20px;
    background: linear-gradient(to right, #808080, #ffffff, #808080);
    margin: 0 4px;
}

.taskbar-items {
    display: flex;
    flex: 1;
    gap: 2px;
    overflow-x: auto;
    align-items: center;
}

.taskbar-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: linear-gradient(to bottom, #dfdfdf 0%, #a0a0a0 100%);
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
    height: 22px;
    min-width: fit-content;
}

.taskbar-item.active {
    background: linear-gradient(to bottom, #e0e0e0 0%, #c0c0c0 100%);
    border-color: #404040 #ffffff #ffffff #404040;
    box-shadow: inset 1px 1px 2px rgba(0,0,0,0.2);
}

.taskbar-icon {
    font-size: 12px;
}

.alert-badge {
    background: #000080;
    color: white;
    padding: 0 4px;
    font-size: 10px;
    border-radius: 2px;
    margin-left: 2px;
}

.system-tray {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    font-size: 11px;
    height: 22px;
}

.window {
    position: absolute;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.4);
    min-width: 320px;
    min-height: 200px;
}

.window.maximize {
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 32px;
    width: calc(100% - 4px) !important;
    height: calc(100% - 34px) !important;
}

.overlay-window {
    position: absolute;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    box-shadow: 4px 4px 8px rgba(0,0,0,0.4);
    min-width: 100%;
    min-height: calc(100vh - 34px);
    width: calc(100vw - 4px);
    height: calc(100vh - 36px);
    top: 2px;
    left: 2px;
    display: none;
    z-index: 100;
}

.overlay-window.minimized {
    display: none;
}

.overlay-window.maximize {
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 32px;
    width: calc(100% - 4px) !important;
    height: calc(100% - 34px) !important;
}

.overlay-window .window-body {
    height: calc(100% - 20px);
    overflow: auto;
}

.window[id="data-stream"],
.window[id="portfolio"],
.window[id="news-window"],
.window[id="us-stocks"],
.window[id="forex-panel"],
.window[id="forex-chart"],
.window[id="crypto-panel"],
.window[id="china-markets"],
.window[id="europe-markets"],
.window[id="commodities-panel"],
.window[id="oil-panel"],
.window[id="reports"],
.window[id="chart-news"],
.window[id="alerts"] {
    position: absolute;
    width: calc(100vw - 4px);
    height: calc(100vh - 36px);
    top: 2px;
    left: 2px;
    display: none;
    z-index: 100;
}

.window[id="portfolio"][style*="display: none"],
.window[id="reports"][style*="display: none"],
.window[id="chart-news"][style*="display: none"],
.window[id="alerts"][style*="display: none"] {
    display: none;
}

@media (max-width: 1200px) {
    .window[id="data-stream"],
    .window[id="portfolio"],
    .window[id="news-window"],
    .window[id="us-stocks"],
    .window[id="forex-panel"],
    .window[id="forex-chart"],
    .window[id="crypto-panel"],
    .window[id="china-markets"],
    .window[id="europe-markets"],
    .window[id="commodities-panel"],
    .window[id="oil-panel"],
    .window[id="reports"],
    .window[id="chart-news"],
    .window[id="alerts"] {
        width: calc(100vw - 4px);
        height: calc(100vh - 36px);
        top: 2px;
        left: 2px;
    }
}

@media (max-width: 768px) {
    .window[id="data-stream"],
    .window[id="portfolio"],
    .window[id="news-window"],
    .window[id="us-stocks"],
    .window[id="forex-panel"],
    .window[id="forex-chart"],
    .window[id="crypto-panel"],
    .window[id="china-markets"],
    .window[id="europe-markets"],
    .window[id="commodities-panel"],
    .window[id="oil-panel"],
    .window[id="reports"],
    .window[id="chart-news"],
    .window[id="alerts"] {
        width: 100vw;
        height: calc(100vh - 32px);
        top: 0;
        left: 0;
        border: none;
    }
    
    .overlay-window .window-body {
        height: calc(100% - 20px);
    }
}

@media (max-width: 480px) {
    .window[id="data-stream"],
    .window[id="portfolio"],
    .window[id="news-window"],
    .window[id="us-stocks"],
    .window[id="forex-panel"],
    .window[id="forex-chart"],
    .window[id="crypto-panel"],
    .window[id="china-markets"],
    .window[id="europe-markets"],
    .window[id="commodities-panel"],
    .window[id="oil-panel"],
    .window[id="reports"],
    .window[id="chart-news"],
    .window[id="alerts"] {
        width: 100vw;
        height: calc(100vh - 32px);
        top: 0;
        left: 0;
    }
}

.window-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 4px;
    background: linear-gradient(to right, #000080, #1084d0);
    color: white;
    font-size: 12px;
    font-weight: bold;
    cursor: move;
}

.window-title {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.window-controls {
    display: flex;
    gap: 2px;
}

.window-controls span {
    width: 16px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #c0c0c0;
    color: black;
    font-size: 10px;
    cursor: pointer;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
}

.window-controls span:active {
    border-color: #404040 #ffffff #ffffff #404040;
}

@media (max-width: 768px) {
    .window-controls {
        gap: 4px;
    }

    .window-controls span {
        width: 36px;
        height: 28px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .window-controls span {
        width: 40px;
        height: 32px;
        font-size: 18px;
    }
}

.window-body {
    padding: 8px;
    height: calc(100% - 20px);
    overflow: auto;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .window-body {
        padding: 4px;
        height: calc(100% - 16px);
    }
}

.ticker-tape {
    background: #000000;
    color: #00ff00;
    padding: 4px 8px;
    font-family: 'VT323', monospace;
    font-size: 14px;
    overflow: hidden;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    margin-bottom: 8px;
}

.ticker-content {
    display: flex;
    gap: 24px;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.ticker-item {
    white-space: nowrap;
}

.ticker-item.positive {
    color: #00ff00;
}

.ticker-item.negative {
    color: #ff4444;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 8px;
    height: calc(100% - 40px);
    overflow: hidden;
    width: 100%;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        gap: 4px;
        height: auto;
        overflow: visible;
    }
}

.overview-panel {
    grid-row: 1;
    grid-column: 1;
}

.stocks-panel {
    grid-row: 1;
    grid-column: 2;
}

.forex-panel-large {
    grid-row: 2;
    grid-column: 1;
}

.crypto-panel {
    grid-row: 2;
    grid-column: 2;
}

.panel {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: 100%;
}
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 8px;
    background: linear-gradient(to bottom, #dfdfdf 0%, #a0a0a0 100%);
    border-bottom: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    font-size: 11px;
    font-weight: bold;
    cursor: move;
}

.panel-actions {
    display: flex;
    gap: 2px;
}

.btn-small {
    padding: 2px 6px;
    font-size: 10px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    cursor: pointer;
    font-family: inherit;
}

.btn-small:active {
    border-color: #404040 #ffffff #ffffff #404040;
}

.btn-small.active {
    background: #a0a0a0;
    border-color: #404040 #ffffff #ffffff #404040;
}

.btn-small:disabled {
    color: #808080;
    cursor: not-allowed;
}

.chart-container {
    flex: 1;
    padding: 8px;
    min-height: 200px;
}

.chart-stats {
    display: flex;
    justify-content: space-around;
    padding: 8px;
    background: #a0a0a0;
    border-top: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
}

.stat-label {
    color: #404040;
    font-weight: bold;
}

.stat-value {
    font-weight: bold;
}

.stat-value.positive {
    color: #00aa00;
}

.stat-value.negative {
    color: #aa0000;
}

.order-book-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.order-book-section {
    flex: 1;
    overflow: auto;
}

.ob-header {
    display: flex;
    padding: 4px 8px;
    background: #a0a0a0;
    font-size: 10px;
    border-bottom: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.ob-header span {
    flex: 1;
    text-align: right;
}

.ob-header span:first-child {
    text-align: left;
}

.ob-asks .price {
    color: #aa0000;
}

.ob-bids .price {
    color: #00aa00;
}

.ob-row {
    display: flex;
    padding: 2px 8px;
    font-size: 10px;
    font-family: 'VT323', monospace;
}

.ob-row span {
    flex: 1;
    text-align: right;
}

.ob-row span:first-child {
    text-align: left;
}

.ob-depth {
    height: 3px;
    background: rgba(170, 0, 0, 0.3);
    margin-top: -3px;
}

.ob-bids .ob-depth {
    background: rgba(0, 170, 0, 0.3);
}

.spread-indicator {
    text-align: center;
    padding: 4px;
    background: #dfdfdf;
    font-size: 10px;
    border-top: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    border-bottom: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.spread-value {
    font-weight: bold;
}

.trades-container {
    flex: 1;
    overflow: auto;
    padding: 4px;
}

.trade-row {
    display: flex;
    justify-content: space-between;
    padding: 2px 4px;
    font-size: 10px;
    font-family: 'VT323', monospace;
    border-bottom: 1px solid #a0a0a0;
}

.trade-row:hover {
    background: #dfdfdf;
}

.trade-time {
    color: #404040;
}

.trade-price {
    font-weight: bold;
}

.trade-price.positive {
    color: #00aa00;
}

.trade-price.negative {
    color: #aa0000;
}

.trade-amount {
    color: #008080;
}

.lab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to right, #000040, #000080);
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    margin-bottom: 12px;
}

.lab-logo {
    display: flex;
    flex-direction: column;
}

.logo-text {
    font-family: 'Press Start 2P', cursive;
    font-size: 20px;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
    letter-spacing: 2px;
}

.logo-subtitle {
    font-size: 10px;
    color: #00b000;
    letter-spacing: 4px;
}

.lab-status {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #000000;
    border: 2px solid;
    border-color: #00ff00 #004000 #004000 #00ff00;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #404040;
}

.status-indicator.active {
    background: #00ff00;
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.lab-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    height: calc(100% - 80px);
}

.lab-panel {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    display: flex;
    flex-direction: column;
}

.lab-panel.ai-prediction.extended {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
}

.lab-panel.main-analysis {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
}

.lab-panel.macro-indicators {
    grid-column: 1 / 2;
    grid-row: 2 / 3;
}

.lab-panel.arbitrage {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
}

.lab-panel.sentiment {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
}

.status-badges {
    display: flex;
    gap: 4px;
}

.badge {
    padding: 2px 6px;
    font-size: 9px;
    background: #000080;
    color: white;
}

.badge.running {
    background: #00aa00;
    animation: pulse 2s ease-in-out infinite;
}

.analysis-content {
    display: flex;
    flex: 1;
    gap: 12px;
    padding: 12px;
}

.signal-panel {
    width: 200px;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 12px;
}

.signal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: bold;
}

.signal-main {
    text-align: center;
    padding: 16px;
    background: #000000;
    border: 2px solid;
    border-color: #00ff00 #004000 #004000 #00ff00;
    margin-bottom: 12px;
}

.signal-value {
    display: block;
    font-family: 'Press Start 2P', cursive;
    font-size: 24px;
    color: #00ff00;
    text-shadow: 0 0 10px #00ff00;
}

.signal-confidence {
    display: block;
    font-size: 10px;
    color: #00aa00;
    margin-top: 8px;
}

.signal-reasons {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.reason {
    font-size: 10px;
    padding: 2px 4px;
    background: #ccffcc;
    color: #00aa00;
}

.reason.warning {
    background: #ffffcc;
    color: #aaaa00;
}

.prediction-chart {
    flex: 1;
    background: #000000;
    border: 2px solid;
    border-color: #00ff00 #004000 #004000 #00ff00;
    padding: 8px;
}

.macro-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px;
    max-height: 300px;
}

.scroll-container {
    overflow-y: auto;
    overflow-x: hidden;
    max-height: inherit;
    min-height: 0;
}

.scroll-sentinel {
    height: 1px;
    flex-shrink: 0;
}

.scroll-sentinel.top {
    margin-bottom: 8px;
}

.scroll-sentinel.bottom {
    margin-top: 8px;
}

.scroll-loader {
    text-align: center;
    padding: 16px;
    color: #808080;
    font-size: 11px;
    font-family: 'VT323', monospace;
}

.scroll-error {
    padding: 16px;
    color: #ff0000;
    text-align: center;
    font-size: 11px;
}

.macro-date-group {
    margin-bottom: 8px;
}

.macro-date-header {
    background: linear-gradient(to right, #000040, #000080);
    color: white;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 4px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.macro-date-events {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.macro-item {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: #ffffff;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.macro-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
}

.macro-impact {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.macro-name {
    font-size: 11px;
    font-weight: bold;
    color: #000040;
    flex: 1;
}

.macro-time {
    font-size: 9px;
    color: #808080;
    font-family: 'VT323', monospace;
}

.macro-values {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid #e0e0e0;
}

.macro-value-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.macro-label {
    font-size: 8px;
    color: #808080;
    text-transform: uppercase;
}

.macro-value {
    font-size: 12px;
    font-family: 'VT323', monospace;
    font-weight: bold;
}

.macro-value.positive {
    color: #00aa00;
}

.macro-value.negative {
    color: #aa0000;
}

.macro-list::-webkit-scrollbar {
    width: 12px;
}

.macro-list::-webkit-scrollbar-track {
    background: #c0c0c0;
}

.macro-list::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.stock-news-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px;
    max-height: 300px;
}

.stock-news-list::-webkit-scrollbar {
    width: 12px;
}

.stock-news-list::-webkit-scrollbar-track {
    background: #c0c0c0;
}

.stock-news-list::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.stock-news-item {
    padding: 8px;
    background: #ffffff;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.stock-news-item:hover {
    background: #f0f0f0;
    border-color: #00a4ef;
}

.stock-news-headline {
    font-size: 11px;
    font-weight: bold;
    color: #000040;
    margin-bottom: 4px;
}

.stock-news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #808080;
}

.stock-news-source {
    color: #000080;
}

.arbitrage-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px;
    max-height: 300px;
}

#arbitrage-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    min-height: 0;
}

.arbitrage-list::-webkit-scrollbar {
    width: 12px;
}

.arbitrage-list::-webkit-scrollbar-track {
    background: #c0c0c0;
}

.arbitrage-list::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.lab-panel.arbitrage .arbitrage-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    min-height: 0;
}

.lab-panel.arbitrage .arb-item {
    padding: 6px 8px;
    margin-bottom: 3px;
}

.lab-panel.arbitrage .arb-header {
    margin-bottom: 4px;
}

.lab-panel.arbitrage .arb-exchanges {
    margin-bottom: 4px;
    font-size: 9px;
}

.lab-panel.arbitrage .arb-details {
    padding: 2px 0;
}

.lab-panel.arbitrage .arb-profit {
    font-size: 12px;
}

#arbitrage-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.lab-panel.arbitrage {
    min-height: 0;
}

.lab-panel.arbitrage {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.lab-panel.arbitrage #arbitrage-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    min-height: 0;
    max-height: none;
}

.lab-panel.arbitrage .panel-header {
    flex-shrink: 0;
}

.lab-panel.macro-indicators {
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.lab-panel.macro-indicators .macro-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: none;
}

.lab-panel.macro-indicators .panel-header {
    flex-shrink: 0;
}

.lab-panel.main-analysis {
    min-height: 0;
}

.lab-panel.main-analysis .stock-news-list {
    max-height: 300px;
}

.analysis-content {
    display: flex;
    flex: 1;
    gap: 12px;
    padding: 12px;
    min-height: 0;
    overflow: hidden;
}

.signal-panel {
    width: 200px;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 12px;
    flex-shrink: 0;
}

.stock-news-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.news-panel-header {
    font-size: 11px;
    font-weight: bold;
    color: #000080;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}
    gap: 6px;
    margin-bottom: 6px;
}

.macro-impact {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.macro-name {
    font-size: 11px;
    font-weight: bold;
    color: #000040;
    flex: 1;
}

.macro-time {
    font-size: 9px;
    color: #808080;
    font-family: 'VT323', monospace;
}

.macro-values {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    padding-top: 4px;
    border-top: 1px solid #e0e0e0;
}

.macro-value-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.macro-label {
    font-size: 8px;
    color: #808080;
    text-transform: uppercase;
}

.macro-value {
    font-size: 12px;
    font-family: 'VT323', monospace;
    font-weight: bold;
}

.macro-value.positive {
    color: #00aa00;
}

.macro-value.negative {
    color: #aa0000;
}

.macro-item .macro-value.negative {
    color: #aa0000;
}

.macro-item .macro-value.positive {
    color: #00aa00;
}

.macro-list::-webkit-scrollbar {
    width: 12px;
}

.macro-list::-webkit-scrollbar-track {
    background: #c0c0c0;
}

.macro-list::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.sentiment-gauge {
    padding: 12px;
}

.gauge-bar {
    height: 20px;
    background: linear-gradient(to right,
        #ff0000 0%,
        #ff6600 25%,
        #ffff00 50%,
        #99cc00 75%,
        #00ff00 100%);
    border: 2px solid #404040;
    position: relative;
}

.gauge-fill {
    height: 100%;
    background: transparent;
}

.gauge-marker {
    position: absolute;
    top: -4px;
    width: 4px;
    height: 28px;
    background: #000000;
    border: 1px solid #ffffff;
    transform: translateX(-50%);
}

.gauge-labels {
    display: flex;
    justify-content: space-between;
    font-size: 8px;
    margin-top: 4px;
    color: #404040;
}

.sentiment-score {
    text-align: center;
    padding: 12px;
    background: #000000;
    border: 2px solid;
    border-color: #00ff00 #004000 #004000 #00ff00;
    margin: 12px;
}

.score-value {
    display: block;
    font-family: 'Press Start 2P', cursive;
    font-size: 32px;
    color: #00ff00;
}

.score-label {
    display: block;
    font-size: 12px;
    color: #00aa00;
}

.social-metrics {
    padding: 8px;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px;
    font-size: 10px;
    border-bottom: 1px solid #a0a0a0;
}

.social-icon {
    width: 16px;
    text-align: center;
}

.social-value {
    margin-left: auto;
    font-weight: bold;
}

.social-value.positive {
    color: #00aa00;
}

.ai-content {
    padding: 12px;
    flex: 1;
}

.prediction-main {
    text-align: center;
    padding: 16px;
    background: #000000;
    border: 2px solid;
    border-color: #00b0ff #004080 #004080 #00b0ff;
    margin-bottom: 12px;
}

.pred-asset {
    font-size: 12px;
    color: #00b0ff;
}

.pred-price {
    display: block;
    font-family: 'Press Start 2P', cursive;
    font-size: 28px;
    color: #00b0ff;
    text-shadow: 0 0 10px #00b0ff;
    margin: 8px 0;
}

.pred-timeframe {
    font-size: 10px;
    color: #0080aa;
}

.prediction-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.pred-factor {
    display: flex;
    justify-content: space-between;
    padding: 8px;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    font-size: 10px;
}

.pred-factor span:first-child {
    color: #404040;
}

.pred-factor span:last-child {
    font-weight: bold;
}

.pred-factor span:last-child.positive {
    color: #00aa00;
}

.pred-factor span:last-child.negative {
    color: #aa0000;
}

.model-stats {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #808080;
    margin-top: 12px;
    padding-top: 8px;
    border-top: 1px solid #a0a0a0;
}

.lab-panel.ai-prediction.extended {
    flex: 1;
    min-height: 0;
    height: 100%;
}

.lab-panel.ai-prediction.extended .ai-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    overflow: hidden;
    padding: 8px;
}

.lab-panel.ai-prediction.extended .prediction-main {
    flex-shrink: 0;
    padding: 8px;
}

.lab-panel.ai-prediction.extended .prediction-breakdown {
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.lab-panel.ai-prediction.extended .prediction-indicators {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    overflow-y: auto;
}

.lab-panel.ai-prediction.extended .pred-indicator {
    padding: 6px 8px;
    font-size: 9px;
}

.lab-panel.ai-prediction.extended .ind-value {
    font-size: 10px;
    min-width: 35px;
}

.lab-panel.ai-prediction.extended .ind-interpretation {
    font-size: 7px;
    min-width: 55px;
}

.market-sentiment-section {
    flex-shrink: 0;
    padding: 8px;
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
}

.sentiment-header {
    font-size: 10px;
    font-weight: bold;
    color: #000080;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid #d0d0d0;
}

.social-metrics-grid {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    overflow-y: auto;
    min-height: 0;
}

.social-metrics-grid .social-item {
    padding: 4px 6px;
    font-size: 8px;
}

.social-metrics-grid .social-icon {
    font-size: 10px;
}

.social-metrics-grid .social-value {
    font-size: 8px;
}

.prediction-indicators {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 12px;
}

.pred-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background: #f5f5f5;
    border: 1px solid #d0d0d0;
    font-size: 9px;
}

.ind-name {
    flex: 1;
    color: #404040;
}

.ind-value {
    font-family: 'VT323', monospace;
    font-size: 12px;
    font-weight: bold;
    color: #000080;
    min-width: 45px;
    text-align: right;
}

.ind-interpretation {
    font-size: 8px;
    color: #808080;
    min-width: 70px;
    text-align: right;
}

.ind-interpretation.positive {
    color: #00aa00;
}

.ind-interpretation.negative {
    color: #aa0000;
}

.ind-interpretation.warning {
    color: #aa8800;
}

.arbitrage-list {
    flex: 1;
    padding: 8px;
    overflow: auto;
}

.arb-item {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: #ffffff;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 4px;
    font-size: 10px;
    transition: all 0.2s;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.arb-item:hover {
    background: #f8f8f8;
    border-color: #00a4ef;
}

.arb-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.arb-type-icon {
    font-size: 14px;
    font-weight: bold;
}

.arb-pair {
    font-weight: bold;
    font-size: 12px;
    color: #000040;
    flex: 1;
}

.arb-spread {
    padding: 3px 8px;
    font-weight: bold;
    font-family: 'VT323', monospace;
    font-size: 13px;
}

.arb-spread.positive {
    background: #ccffcc;
    color: #00aa00;
}

.arb-spread.negative {
    background: #ffcccc;
    color: #aa0000;
}

.arb-exchanges {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    color: #404040;
    margin-bottom: 6px;
}

.arb-arrow {
    color: #808080;
    font-weight: bold;
}

.arb-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.arb-amount {
    font-size: 10px;
    color: #606060;
}

.arb-profit {
    font-weight: bold;
    font-family: 'VT323', monospace;
    font-size: 14px;
}

.arb-profit.positive {
    color: #00aa00;
}

.arb-profit.negative {
    color: #aa0000;
}

.arb-time {
    font-size: 9px;
    color: #808080;
    text-align: right;
    margin-top: 4px;
}

.arbitrage-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px;
    min-height: 0;
    max-height: none;
}

#arbitrage-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px;
    min-height: 0;
    max-height: none;
}

.arbitrage-list::-webkit-scrollbar {
    width: 12px;
}

.arbitrage-list::-webkit-scrollbar-track {
    background: #c0c0c0;
}

.arbitrage-list::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.lab-panel.arbitrage .arbitrage-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    min-height: 0;
}

.lab-panel.arbitrage .arb-item {
    padding: 6px 8px;
    margin-bottom: 3px;
}

.arb-flag {
    font-size: 14px;
    margin-right: 4px;
}

.lab-panel.arbitrage .arb-header {
    margin-bottom: 4px;
}

.lab-panel.arbitrage .arb-exchanges {
    margin-bottom: 4px;
    font-size: 9px;
}

.lab-panel.arbitrage .arb-details {
    padding: 2px 0;
}

.lab-panel.arbitrage .arb-profit {
    font-size: 12px;
}

#arbitrage-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
}

.lab-panel.arbitrage {
    min-height: 0;
}

.lab-panel.arbitrage #arbitrage-list {
    flex: 1;
    overflow-y: auto;
    padding: 6px;
    min-height: 0;
}

.stream-status {
    padding: 8px;
}

.stream-monitor-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.stream-monitor-content .stream-status {
    flex: 1;
    overflow-y: auto;
    border-bottom: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.stream-monitor-content .data-terminal {
    flex: 1;
    margin: 8px;
}

.lab-panel.stream-monitor .stream-status,
.lab-panel.stream-monitor .data-terminal {
    flex: 1;
    overflow: hidden;
}

.lab-panel.stream-monitor .data-terminal {
    margin: 6px;
}

.stream-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    font-size: 10px;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 4px;
}

.stream-item.active {
    background: #ccffcc;
}

.stream-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #808080;
}

.stream-item.active .stream-dot {
    background: #00aa00;
    animation: pulse 1s ease-in-out infinite;
}

.stream-latency {
    margin-left: auto;
    font-family: 'VT323', monospace;
    color: #008080;
}

.data-terminal {
    flex: 1;
    background: #000000;
    border: 2px solid;
    border-color: #00ff00 #004000 #004000 #00ff00;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 8px;
}

.terminal-header {
    padding: 4px 8px;
    background: #004000;
    color: #00ff00;
    font-size: 10px;
    font-weight: bold;
    font-family: 'VT323', monospace;
}

.terminal-content {
    flex: 1;
    padding: 4px 8px;
    overflow: auto;
    font-family: 'VT323', monospace;
    font-size: 11px;
    color: #00ff00;
}

.terminal-line {
    margin-bottom: 2px;
}

.terminal-line .timestamp {
    color: #00aa00;
}

.terminal-line .data {
    color: #00ff00;
}

.terminal-line .positive {
    color: #00ff00;
}

.terminal-line .negative {
    color: #ff4444;
}

.win98-boot {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #008080;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    font-family: 'MS Sans Serif', 'Segoe UI', Tahoma, sans-serif;
}

.win98-boot.hidden {
    display: none;
}

.boot-window {
    width: 700px;
    max-width: 95vw;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
}

.win98-titlebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 2px 4px;
    background: linear-gradient(90deg, #000080, #1084d0);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.win98-title {
    display: flex;
    align-items: center;
    gap: 4px;
}

.win98-controls {
    display: flex;
    gap: 2px;
}

.win98-controls span {
    width: 16px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #c0c0c0;
    color: black;
    font-size: 10px;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    cursor: pointer;
}

.win98-controls span:active {
    border-color: #404040 #ffffff #ffffff #404040;
}

.win98-body {
    padding: 8px;
}

.boot-header {
    background: #dfdfdf;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 12px;
    margin-bottom: 8px;
}

.boot-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.boot-icon {
    font-size: 40px;
}

.boot-title-text h1 {
    font-size: 18px;
    color: #000080;
    margin: 0;
    font-weight: bold;
}

.boot-title-text h2 {
    font-size: 12px;
    color: #404040;
    margin: 0;
    font-weight: normal;
}

.boot-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
    margin-bottom: 8px;
}

.win98-panel-header {
    background: linear-gradient(to bottom, #dfdfdf, #a0a0a0);
    padding: 4px 8px;
    font-size: 11px;
    font-weight: bold;
    border-bottom: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.boot-chart-panel {
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 4px;
}

#boot-chart {
    width: 100%;
    height: 80px;
    background: #000000;
    border: 1px solid #808080;
}

.boot-chart-stats {
    display: flex;
    gap: 12px;
    padding: 4px;
    font-size: 10px;
    font-family: 'VT323', monospace;
}

.stat-item .green {
    color: #00aa00;
}

.stat-item .red {
    color: #aa0000;
}

.boot-ticker-panel {
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.boot-ticker-content {
    padding: 8px;
    font-family: 'VT323', monospace;
    font-size: 12px;
}

.ticker-row {
    padding: 2px 0;
    border-bottom: 1px solid #e0e0e0;
}

.ticker-row .green {
    color: #00aa00;
}

.ticker-row .red {
    color: #aa0000;
}

.boot-orderbook-panel {
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.boot-orderbook-content {
    padding: 4px;
    font-family: 'VT323', monospace;
    font-size: 10px;
}

.ob-row-header {
    display: flex;
    background: #e0e0e0;
    padding: 2px 4px;
    font-weight: bold;
    font-size: 9px;
}

.ob-row-header span {
    flex: 1;
    text-align: right;
}

.ob-row-header span:first-child {
    text-align: left;
}

.boot-orderbook-content .ask {
    color: #aa0000;
}

.boot-orderbook-content .bid {
    color: #00aa00;
}

.boot-orderbook-content .ob-row {
    display: flex;
    padding: 1px 4px;
}

.boot-orderbook-content .ob-row span {
    flex: 1;
    text-align: right;
}

.boot-orderbook-content .ob-row span:first-child {
    text-align: left;
}

.boot-spread {
    text-align: center;
    padding: 4px;
    background: #e0e0e0;
    font-size: 9px;
    border-top: 1px solid #c0c0c0;
    border-bottom: 1px solid #ffffff;
}

.boot-terminal-panel {
    grid-column: 1 / -1;
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.boot-terminal-content {
    padding: 4px;
    font-family: 'VT323', monospace;
    font-size: 11px;
    background: #000000;
    height: 80px;
    overflow-y: auto;
}

.terminal-line {
    color: #00aa00;
    margin-bottom: 2px;
}

.boot-progress-section {
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 8px;
}

.boot-progress-label {
    font-size: 11px;
    margin-bottom: 6px;
}

.win98-progress-bar {
    height: 20px;
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    padding: 2px;
}

.win98-progress-fill {
    height: 100%;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    width: 0%;
    transition: width 0.1s;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.loading-screen.hidden {
    display: none;
}

.boot-content {
    text-align: center;
}

.boot-logo {
    font-family: 'Segoe UI', 'MS Sans Serif', sans-serif;
    font-size: 48px;
    color: #000080;
    font-weight: bold;
    margin-bottom: 8px;
}

.boot-subtitle {
    font-size: 14px;
    color: #666666;
    letter-spacing: 8px;
    margin-bottom: 32px;
}

.boot-progress {
    width: 400px;
    margin: 0 auto 16px;
}

.progress-bar {
    height: 16px;
    background: #ffffff;
    border: 2px solid #808080;
    padding: 2px;
}

.progress-fill {
    height: 100%;
    background: #000080;
    width: 0%;
    transition: width 0.1s;
}

.boot-text {
    font-family: 'Segoe UI', 'MS Sans Serif', sans-serif;
    font-size: 12px;
    color: #000000;
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

.boot-text div {
    margin-bottom: 4px;
    padding-left: 16px;
}

.portfolio-summary {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 12px;
}

.port-item {
    display: flex;
    flex-direction: column;
}

.port-label {
    font-size: 10px;
    color: #404040;
}

.port-value {
    font-size: 18px;
    font-weight: bold;
    font-family: 'VT323', monospace;
}

.port-value.positive {
    color: #00aa00;
}

.port-value.negative {
    color: #aa0000;
}

.portfolio-holdings {
    flex: 1;
    overflow: auto;
}

.holdings-table {
    width: 100%;
    border-collapse: collapse;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.holdings-table th {
    background: linear-gradient(to bottom, #000080, #000040);
    color: white;
    padding: 8px;
    text-align: left;
    font-size: 10px;
    position: sticky;
    top: 0;
}

.holdings-table td {
    padding: 8px;
    font-size: 11px;
    border-bottom: 1px solid #a0a0a0;
}

.holdings-table tr:hover {
    background: #dfdfdf;
}

.holdings-table .positive {
    color: #00aa00;
}

.holdings-table .negative {
    color: #aa0000;
}

.alerts-list {
    flex: 1;
    overflow: auto;
    padding: 8px;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 8px;
}

.alert-item.warning {
    border-color: #ffff00 #aaaa00 #aaaa00 #ffff00;
}

.alert-item.critical {
    border-color: #ff0000 #aa0000 #aa0000 #ff0000;
    background: #ffcccc;
}

.alert-icon {
    font-size: 16px;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: bold;
    font-size: 11px;
    margin-bottom: 4px;
}

.alert-message {
    font-size: 10px;
    color: #404040;
}

.alert-time {
    font-size: 9px;
    color: #808080;
    white-space: nowrap;
}

.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: linear-gradient(to bottom, #000080, #000040);
    color: white;
    margin: -8px -8px 8px -8px;
}

.news-symbol-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-ticker {
    font-size: 24px;
    font-weight: bold;
    font-family: 'VT323', monospace;
}

.news-company {
    font-size: 12px;
    color: #a0a0a0;
}

.news-sentiment {
    padding: 6px 12px;
    background: #000040;
    border: 2px solid;
    border-color: #404080 #000020 #000020 #404080;
    font-size: 11px;
}

.news-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 8px;
}

.news-date-input {
    padding: 4px 8px;
    font-size: 11px;
    font-family: inherit;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    background: white;
}

.news-list {
    flex: 1;
    overflow: auto;
    padding: 8px;
}

.news-loading {
    text-align: center;
    padding: 20px;
    font-size: 12px;
    color: #666;
}

.news-article {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #ffffff;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 8px;
    cursor: pointer;
}

.news-article:hover {
    background: #f0f0f0;
}

.news-image {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border: 1px solid #c0c0c0;
    flex-shrink: 0;
}

.news-content {
    flex: 1;
    min-width: 0;
}

.news-article-headline {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 4px;
    color: #000080;
}

.news-article-summary {
    font-size: 10px;
    color: #404040;
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-article-meta {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #808080;
}

.news-article-source {
    font-weight: bold;
}

.stocks-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 8px;
}

.stocks-search-input {
    padding: 4px 8px;
    font-size: 11px;
    font-family: inherit;
    width: 200px;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.stocks-stats {
    font-size: 11px;
    color: #404040;
}

.stocks-count {
    font-weight: bold;
    color: #00aa00;
    font-family: 'VT323', monospace;
    font-size: 14px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    font-size: 10px;
    padding: 4px 8px;
    background: #ffcccc;
    border: 2px solid;
    border-color: #ff0000 #800000 #800000 #ff0000;
}

.connection-status.connected {
    background: #ccffcc;
    border-color: #00aa00 #004000 #004000 #00aa00;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #aa0000;
}

.status-dot.connected {
    background: #00aa00;
    animation: pulse 1s ease-in-out infinite;
}

.stocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    overflow-y: auto;
    flex: 1;
    width: 100%;
}

@media (max-width: 768px) {
    .stocks-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .stocks-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 2px;
    }
}

.stock-card {
    background: #ffffff;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.stock-card:hover {
    background: #f0f0f0;
}

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

.stock-symbol {
    font-size: 12px;
    font-weight: bold;
    color: #000080;
}

.stock-change {
    font-size: 10px;
    font-family: 'VT323', monospace;
    padding: 2px 6px;
}

.stock-change.positive {
    background: #ccffcc;
    color: #00aa00;
}

.stock-change.negative {
    background: #ffcccc;
    color: #aa0000;
}

.stock-price {
    font-size: 20px;
    font-weight: bold;
    font-family: 'VT323', monospace;
    margin-bottom: 4px;
}

.stock-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    font-size: 9px;
    color: #404040;
}

.stock-detail-label {
    color: #808080;
}

.crypto-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 8px;
}

.crypto-search-input {
    padding: 4px 8px;
    font-size: 11px;
    font-family: inherit;
    width: 200px;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.crypto-stats {
    font-size: 11px;
    color: #404040;
}

.crypto-count {
    font-weight: bold;
    color: #00aa00;
    font-family: 'VT323', monospace;
    font-size: 14px;
}

.crypto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
    overflow-y: auto;
    flex: 1;
    width: 100%;
}

@media (max-width: 768px) {
    .crypto-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .crypto-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 2px;
    }
}

.crypto-card {
    background: #ffffff;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.crypto-card:hover {
    background: #f0f0f0;
}

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

.crypto-symbol {
    display: flex;
    align-items: center;
    gap: 8px;
}

.crypto-icon {
    font-size: 20px;
}

.crypto-name {
    font-size: 11px;
    font-weight: bold;
    color: #000040;
}

.crypto-change {
    font-size: 10px;
    font-family: 'VT323', monospace;
    padding: 2px 6px;
}

.crypto-change {
    font-size: 10px;
    font-family: 'VT323', monospace;
    padding: 2px 6px;
}

.crypto-change.positive {
    background: #ccffcc;
    color: #00aa00;
}

.crypto-change.negative {
    background: #ffcccc;
    color: #aa0000;
}

.crypto-price {
    font-size: 18px;
    font-weight: bold;
    font-family: 'VT323', monospace;
    margin-bottom: 4px;
}

.crypto-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    font-size: 9px;
    color: #404040;
}

.crypto-detail-label {
    color: #808080;
}

.forex-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    flex: 1;
}

.forex-section-header {
    font-size: 10px;
    font-weight: bold;
    color: #404040;
    padding: 6px 8px;
    background: linear-gradient(to bottom, #dfdfdf, #a0a0a0);
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 6px;
}

.forex-list {
    overflow-y: auto;
    max-height: calc(100vh - 200px);
}

.forex-pair {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: #ffffff;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 4px;
    cursor: pointer;
}

.forex-pair:hover {
    background: #f0f0f0;
}

.forex-pair-header {
    display: flex;
    flex-direction: column;
}

.forex-pair-symbol {
    font-size: 12px;
    font-weight: bold;
    color: #000080;
}

.forex-pair-name {
    font-size: 9px;
    color: #808080;
}

.forex-pair-rate {
    font-size: 14px;
    font-weight: bold;
    font-family: 'VT323', monospace;
    margin-right: 12px;
    min-width: 80px;
    text-align: right;
}

.forex-pair-change {
    font-size: 10px;
    font-family: 'VT323', monospace;
    padding: 2px 6px;
    min-width: 60px;
    text-align: center;
}

.forex-pair-change.positive {
    background: #ccffcc;
    color: #00aa00;
}

.forex-pair-change.negative {
    background: #ffcccc;
    color: #aa0000;
}

.forex-timestamp {
    font-size: 9px;
    color: #808080;
    padding: 8px;
    text-align: right;
    border-top: 1px solid #c0c0c0;
    margin-top: 8px;
}

.us-stocks-panel,
.crypto-panel {
    min-height: 150px;
}

.stocks-ticker-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.stock-ticker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
}

.stock-ticker-item:hover {
    background: #f0f0f0;
}

.stock-ticker-symbol {
    font-weight: bold;
    font-size: 11px;
    color: #000080;
}

.stock-ticker-price {
    font-family: 'VT323', monospace;
    font-size: 12px;
}

.stock-ticker-change {
    font-size: 10px;
    font-family: 'VT323', monospace;
    padding: 2px 6px;
}

.stock-ticker-change.positive {
    background: #ccffcc;
    color: #00aa00;
}

.stock-ticker-change.negative {
    background: #ffcccc;
    color: #aa0000;
}

.forex-ticker-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.forex-ticker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
    transition: background 0.2s;
}

.forex-ticker-item:hover {
    background: #f0f0f0;
}

.forex-ticker-symbol {
    font-weight: bold;
    font-size: 11px;
    color: #000040;
    display: flex;
    align-items: center;
    gap: 4px;
}

.forex-ticker-rate {
    font-family: 'VT323', monospace;
    font-size: 12px;
    min-width: 70px;
    text-align: right;
    margin-right: 8px;
}

.forex-ticker-change {
    font-size: 10px;
    font-family: 'VT323', monospace;
    padding: 2px 6px;
    min-width: 55px;
    text-align: center;
}

.forex-ticker-change.positive {
    background: #ccffcc;
    color: #00aa00;
}

.forex-ticker-change.negative {
    background: #ffcccc;
    color: #aa0000;
}

.crypto-ticker-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.crypto-ticker-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
}

.crypto-ticker-item:hover {
    background: #f0f0f0;
}

.crypto-ticker-symbol {
    font-weight: bold;
    font-size: 11px;
}

.crypto-ticker-price {
    font-family: 'VT323', monospace;
    font-size: 12px;
}

.crypto-ticker-change {
    font-size: 10px;
    font-family: 'VT323', monospace;
    padding: 2px 6px;
}

.crypto-ticker-change.positive {
    background: #ccffcc;
    color: #00aa00;
}

.crypto-ticker-change.negative {
    background: #ffcccc;
    color: #aa0000;
}

.stock-news-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    overflow: hidden;
}

.news-panel-header {
    background: linear-gradient(to bottom, #000080, #000040);
    color: white;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
}

.news-ticker-symbol {
    background: #f0f0f0;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: bold;
    color: #000080;
    border-bottom: 1px solid #c0c0c0;
}

.stock-news-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.stock-news-item {
    padding: 8px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
}

.stock-news-item:hover {
    background: #f8f8f8;
}

.stock-news-headline {
    font-size: 10px;
    font-weight: bold;
    color: #000080;
    margin-bottom: 4px;
}

.stock-news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: #808080;
}

.stock-news-source {
    font-weight: bold;
}

.prediction-chart {
    display: none;
}

.china-stats-bar,
.europe-stats-bar {
    display: flex;
    gap: 16px;
    padding: 12px;
    background: linear-gradient(to right, #000040, #000080);
    margin: -8px -8px 8px -8px;
    overflow-x: auto;
}

.china-index,
.europe-index {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 16px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    min-width: 120px;
}

.index-name {
    font-size: 10px;
    color: #a0a0a0;
    margin-bottom: 4px;
}

.index-value {
    font-size: 16px;
    font-weight: bold;
    color: #ffffff;
    font-family: 'VT323', monospace;
}

.index-change {
    font-size: 11px;
    font-family: 'VT323', monospace;
    padding: 2px 6px;
    margin-top: 4px;
}

.index-change.positive {
    background: #ccffcc;
    color: #00aa00;
}

.index-change.negative {
    background: #ffcccc;
    color: #aa0000;
}

.indices-panel {
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.indices-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.indices-list .index-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #ffffff;
}

.indices-list .index-item:hover {
    background: #f5f5f5;
}

.indices-list .index-name {
    font-size: 11px;
    font-weight: bold;
    color: #000040;
    margin-bottom: 0;
}

.indices-list .index-value {
    font-size: 14px;
    font-weight: bold;
    color: #000000;
    font-family: 'VT323', monospace;
}

.indices-list .index-change {
    font-size: 10px;
    font-family: 'VT323', monospace;
    padding: 2px 6px;
    min-width: 60px;
    text-align: center;
}

.indices-list .index-change.positive {
    background: #ccffcc;
    color: #00aa00;
}

.indices-list .index-change.negative {
    background: #ffcccc;
    color: #aa0000;
}

.china-stocks-grid,
.europe-stocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 8px;
    overflow-y: auto;
    flex: 1;
    width: 100%;
}

@media (max-width: 768px) {
    .china-stocks-grid,
    .europe-stocks-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 4px;
    }
}

@media (max-width: 480px) {
    .china-stocks-grid,
    .europe-stocks-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 2px;
    }
}

.china-stats-bar,
.europe-stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    width: 100%;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .china-stats-bar,
    .europe-stats-bar {
        gap: 8px;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .china-stats-bar,
    .europe-stats-bar {
        flex-direction: column;
        gap: 4px;
    }
}

.index-card {
    flex: 1;
    padding: 12px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    min-width: 150px;
}

@media (max-width: 768px) {
    .index-card {
        padding: 8px;
        min-width: 120px;
    }
}

@media (max-width: 480px) {
    .index-card {
        padding: 6px;
        min-width: 100%;
    }
}

.index-name {
    font-size: 12px;
    color: #666;
}

@media (max-width: 480px) {
    .index-name {
        font-size: 10px;
    }
}

.index-value {
    font-size: 20px;
    font-weight: bold;
}

@media (max-width: 480px) {
    .index-value {
        font-size: 16px;
    }
}

.index-change {
    font-size: 14px;
}

@media (max-width: 480px) {
    .index-change {
        font-size: 12px;
    }
}

.index-change.positive {
    color: #00aa00;
}

.index-change.negative {
    color: #aa0000;
}

.commodities-grid,
.oil-prices-grid,
.forex-pairs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    width: 100%;
}

@media (max-width: 768px) {
    .commodities-grid,
    .oil-prices-grid,
    .forex-pairs-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .commodities-grid,
    .oil-prices-grid,
    .forex-pairs-grid {
        gap: 4px;
    }
}

.commodity-card,
.oil-card,
.forex-card,
.crypto-card {
    padding: 16px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
}

@media (max-width: 768px) {
    .commodity-card,
    .oil-card,
    .forex-card,
    .crypto-card {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .commodity-card,
    .oil-card,
    .forex-card,
    .crypto-card {
        padding: 8px;
    }
}

.commodity-name,
.oil-name,
.pair-name,
.crypto-name {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

@media (max-width: 480px) {
    .commodity-name,
    .oil-name,
    .pair-name,
    .crypto-name {
        font-size: 12px;
        margin-bottom: 4px;
    }
}

.commodity-price,
.oil-price,
.pair-rate,
.crypto-price {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 4px;
}

@media (max-width: 768px) {
    .commodity-price,
    .oil-price,
    .pair-rate,
    .crypto-price {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .commodity-price,
    .oil-price,
    .pair-rate,
    .crypto-price {
        font-size: 18px;
    }
}

.commodity-change,
.oil-change,
.pair-change,
.crypto-change {
    font-size: 14px;
}

.commodity-change.positive,
.oil-change.positive,
.pair-change.positive,
.crypto-change.positive {
    color: #00aa00;
}

.commodity-change.negative,
.oil-change.negative,
.pair-change.negative,
.crypto-change.negative {
    color: #aa0000;
}

.data-terminal {
    flex: 1;
    background: #000000;
    border: 2px solid;
    border-color: #00ff00 #004000 #004000 #00ff00;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: 8px;
    width: calc(100% - 16px);
}

@media (max-width: 768px) {
    .data-terminal {
        margin: 4px;
        width: calc(100% - 8px);
    }
}

.portfolio-summary {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 12px;
    width: 100%;
    box-sizing: border-box;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .portfolio-summary {
        gap: 16px;
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .portfolio-summary {
        flex-direction: column;
        gap: 8px;
        padding: 8px;
    }
}

.chart-news-content {
    display: flex;
    gap: 12px;
    height: 100%;
    width: 100%;
}

@media (max-width: 768px) {
    .chart-news-content {
        flex-direction: column;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .chart-news-content {
        gap: 4px;
    }
}

.chart-section,
.news-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

@media (max-width: 768px) {
    .chart-section,
    .news-section {
        min-height: 200px;
    }
}

.holdings-table {
    width: 100%;
    border-collapse: collapse;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

@media (max-width: 768px) {
    .holdings-table {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .holdings-table {
        font-size: 10px;
    }
}

.holdings-table th,
.holdings-table td {
    padding: 8px;
    text-align: left;
    border: 1px solid #808080;
}

@media (max-width: 768px) {
    .holdings-table th,
    .holdings-table td {
        padding: 4px;
    }
}

@media (max-width: 480px) {
    .holdings-table th,
    .holdings-table td {
        padding: 2px 4px;
    }
}

.crypto-toolbar,
.stocks-toolbar {
    display: flex;
    gap: 12px;
    padding: 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 8px;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
}

@media (max-width: 768px) {
    .crypto-toolbar,
    .stocks-toolbar {
        gap: 8px;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .crypto-toolbar,
    .stocks-toolbar {
        flex-direction: column;
        gap: 4px;
    }
}

.commodities-toolbar {
    display: flex;
    gap: 8px;
    padding: 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 8px;
    width: 100%;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .commodities-toolbar {
        gap: 4px;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .commodities-toolbar {
        justify-content: center;
    }
}

.commodity-btn {
    padding: 6px 12px;
    font-size: 11px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    cursor: pointer;
}

@media (max-width: 480px) {
    .commodity-btn {
        padding: 4px 8px;
        font-size: 10px;
    }
}

.commodity-btn:hover {
    background: #dfdfdf;
}

.commodity-btn.active {
    background: #000080;
    color: white;
    border-color: #000040 #000080 #000080 #000040;
}

.commodities-details {
    display: flex;
    gap: 16px;
    padding: 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .commodities-details {
        gap: 8px;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .commodities-details {
        gap: 4px;
        padding: 4px;
    }
}

.detail-label {
    font-size: 10px;
    color: #666;
}

.detail-value {
    font-size: 14px;
    font-weight: bold;
}

@media (max-width: 480px) {
    .detail-value {
        font-size: 12px;
    }
}

.market-indices {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    width: 100%;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .market-indices {
        gap: 8px;
        margin-bottom: 12px;
    }
}

@media (max-width: 480px) {
    .market-indices {
        flex-direction: column;
        gap: 4px;
        margin-bottom: 8px;
    }
}

    background: #ffffff;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    padding: 10px;
    cursor: pointer;
}

.china-stock-card:hover,
.europe-stock-card:hover {
    background: #f0f0f0;
}

.china-stock-header,
.europe-stock-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.china-stock-symbol,
.europe-stock-symbol {
    font-size: 11px;
    font-weight: bold;
    color: #000080;
}

.china-stock-price,
.europe-stock-price {
    font-size: 14px;
    font-weight: bold;
    font-family: 'VT323', monospace;
    margin-bottom: 4px;
}

.china-stock-details,
.europe-stock-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    font-size: 9px;
    color: #404040;
}

.commodities-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: #dfdfdf;
    border-bottom: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    flex-wrap: wrap;
}

.commodity-btn {
    padding: 6px 12px;
    background: linear-gradient(to bottom, #ffffff 0%, #c0c0c0 100%);
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
}

.commodity-btn:hover {
    background: linear-gradient(to bottom, #e0e0e0 0%, #a0a0a0 100%);
}

.commodity-btn.active {
    background: linear-gradient(to bottom, #c0c0c0 0%, #a0a0a0 100%);
    border-color: #404040 #ffffff #ffffff #404040;
}

.commodities-chart-container {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.commodity-price-display {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 8px 12px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
}

.commodity-symbol {
    font-size: 14px;
    font-weight: bold;
    color: #000080;
}

.commodity-price {
    font-size: 24px;
    font-weight: bold;
    color: #000000;
}

.commodity-change {
    font-size: 14px;
    font-weight: bold;
}

.commodity-change.positive {
    color: #008000;
}

.commodity-change.negative {
    color: #800000;
}

#commodities-chart {
    width: 100%;
    height: 200px;
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.commodities-details {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px 12px;
    background: #dfdfdf;
    border-top: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.commodity-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.detail-label {
    font-size: 9px;
    color: #808080;
}

.detail-value {
    font-size: 12px;
    font-weight: bold;
    color: #000000;
}

.oil-toolbar {
    display: flex;
    gap: 4px;
    padding: 8px;
    background: #dfdfdf;
    border-bottom: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    flex-wrap: wrap;
}

.oil-btn {
    padding: 6px 12px;
    background: linear-gradient(to bottom, #ffffff 0%, #c0c0c0 100%);
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    cursor: pointer;
    font-size: 11px;
    font-weight: bold;
}

.oil-btn:hover {
    background: linear-gradient(to bottom, #e0e0e0 0%, #a0a0a0 100%);
}

.oil-btn.active {
    background: linear-gradient(to bottom, #c0c0c0 0%, #a0a0a0 100%);
    border-color: #404040 #ffffff #ffffff #404040;
}

.oil-chart-container {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.oil-price-display {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 8px 12px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
}

.oil-symbol {
    font-size: 14px;
    font-weight: bold;
    color: #000080;
}

.oil-price {
    font-size: 24px;
    font-weight: bold;
    color: #000000;
}

.oil-change {
    font-size: 14px;
    font-weight: bold;
}

.oil-change.positive {
    color: #008000;
}

.oil-change.negative {
    color: #800000;
}

#oil-chart {
    width: 100%;
    height: 200px;
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.oil-details {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    padding: 8px 12px;
    background: #dfdfdf;
    border-top: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.oil-detail {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.oil-markets-container {
    display: flex;
    gap: 16px;
    height: 100%;
    padding: 12px;
}

.oil-prices-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    min-width: 320px;
    overflow: hidden;
    height: 100%;
}

.oil-news-section {
    flex: 0 0 400px;
    display: flex;
    flex-direction: column;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    overflow: hidden;
    height: 100%;
}

.oil-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(to bottom, #e0e0e0 0%, #c0c0c0 100%);
    border-bottom: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    font-weight: bold;
    font-size: 13px;
}

.oil-prices-table-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    overflow-x: hidden;
}

.oil-prices-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 0;
}

.oil-news-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 0;
}

.oil-prices-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.oil-price-item {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #d0d0d0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    transition: background 0.1s;
}

.oil-price-item:hover {
    background: #c0c0c0;
}

.oil-price-item .oil-name-cell {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.oil-price-item .oil-name {
    font-weight: bold;
    color: #000080;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.oil-price-item .oil-flag {
    font-size: 16px;
    flex-shrink: 0;
}

.oil-price-item .oil-price-cell {
    width: 80px;
    text-align: right;
    font-weight: bold;
    font-size: 13px;
    color: #000;
    padding: 0 12px;
}

.oil-price-item .oil-change-cell {
    width: 80px;
    text-align: right;
    font-weight: bold;
    font-size: 12px;
    padding: 0 8px;
}

.oil-price-item .oil-change-cell.positive {
    color: #008000;
}

.oil-price-item .oil-change-cell.negative {
    color: #800000;
}

.oil-price-item .oil-unit-cell {
    width: 60px;
    text-align: left;
    font-size: 11px;
    color: #666;
    padding: 0 8px;
}

.oil-price-item .oil-delay-cell {
    width: 100px;
    text-align: left;
    font-size: 10px;
    color: #888;
    padding: 0 8px;
}

.oil-price-section-header {
    padding: 8px 12px;
    background: linear-gradient(to bottom, #3a5a8c 0%, #2a4a7c 100%);
    color: #ffffff;
    font-weight: bold;
    font-size: 12px;
    border: 2px solid;
    border-color: #1a3a6c #1a3a6c #1a3a6c #1a3a6c;
    margin-top: 8px;
    margin-bottom: 4px;
}

.oil-price-subsection-header {
    padding: 6px 24px;
    background: linear-gradient(to bottom, #4a6a9c 0%, #3a5a8c 100%);
    color: #ffffff;
    font-weight: bold;
    font-size: 11px;
    font-style: italic;
    border: 2px solid;
    border-color: #2a5a8c #2a5a8c #2a5a8c #2a5a8c;
    margin-top: 4px;
    margin-bottom: 2px;
}

.oil-name {
    font-weight: bold;
    color: #000080;
}

.oil-price-cell {
    font-weight: bold;
    font-family: monospace;
    font-size: 14px;
    text-align: right;
}

.oil-change-cell {
    font-family: monospace;
    font-size: 13px;
    text-align: right;
}

.oil-change-cell.positive {
    color: #008000;
}

.oil-change-cell.negative {
    color: #800000;
}

.oil-unit-cell {
    color: #666;
    font-size: 12px;
    text-align: center;
}

.oil-delay-cell {
    color: #666;
    font-size: 11px;
    text-align: center;
    font-style: italic;
}

.oil-last-updated {
    padding: 6px 12px;
    font-size: 11px;
    color: #666;
    text-align: right;
    background: #d0d0d0;
    border-top: 1px solid #a0a0a0;
}

.oil-prices-empty,
.oil-prices-error {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.oil-prices-error {
    color: #800000;
}

.oil-news-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.oil-news-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.oil-news-item {
    padding: 10px;
    margin-bottom: 8px;
    background: #d0d0d0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    cursor: pointer;
    transition: background 0.1s;
}

.oil-news-item:hover {
    background: #c0c0c0;
}

.oil-news-title {
    font-size: 12px;
    font-weight: bold;
    color: #000080;
    margin-bottom: 4px;
    line-height: 1.3;
}

.oil-news-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #666;
}

@media (max-width: 900px) {
    .oil-markets-container {
        flex-direction: column;
    }

    .oil-news-section {
        max-width: 100%;
        min-width: auto;
    }
}

::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-track {
    background: #c0c0c0;
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

::-webkit-scrollbar-thumb:active {
    background: #a0a0a0;
}

::-webkit-scrollbar-corner {
    background: #c0c0c0;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr 1fr 1fr;
    }
    
    .lab-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .lab-grid {
        grid-template-columns: 1fr;
    }
    
    .analysis-content {
        flex-direction: column;
    }
    
    .signal-panel {
        width: 100%;
    }
}

.overview-panel {
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.overview-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.overview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #ffffff;
}

.overview-item:hover {
    background: #f5f5f5;
}

.overview-name {
    font-size: 11px;
    font-weight: bold;
    color: #000040;
    flex: 1;
}

.overview-value {
    font-size: 14px;
    font-weight: bold;
    font-family: 'VT323', monospace;
    min-width: 80px;
    text-align: right;
    margin-right: 12px;
}

.overview-change {
    font-size: 10px;
    font-family: 'VT323', monospace;
    padding: 2px 6px;
    min-width: 55px;
    text-align: center;
}

.overview-change.positive {
    background: #ccffcc;
    color: #00aa00;
}

.overview-change.negative {
    background: #ffcccc;
    color: #aa0000;
}

.forex-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.forex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid #e0e0e0;
    background: #ffffff;
    cursor: pointer;
    transition: background 0.2s;
}

.forex-row:hover {
    background: #f5f5f5;
}

.forex-pair-symbol {
    font-size: 11px;
    font-weight: bold;
    color: #000080;
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.forex-pair-price {
    font-size: 14px;
    font-weight: bold;
    font-family: 'VT323', monospace;
    min-width: 80px;
    text-align: right;
    margin-right: 12px;
}

.forex-pair-change {
    font-size: 10px;
    font-family: 'VT323', monospace;
    padding: 2px 6px;
    min-width: 55px;
    text-align: center;
}

.forex-pair-change.positive {
    background: #ccffcc;
    color: #00aa00;
}

.forex-pair-change.negative {
    background: #ffcccc;
    color: #aa0000;
}

.forex-timestamp {
    font-size: 9px;
    color: #808080;
    padding: 8px;
    text-align: right;
    border-top: 1px solid #c0c0c0;
}

.stocks-panel-content {
    display: flex;
    flex: 1;
    gap: 8px;
    padding: 8px;
    overflow: hidden;
}

.stocks-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    overflow: hidden;
}

.stocks-section-header {
    background: linear-gradient(to bottom, #000080, #000040);
    color: white;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    text-align: center;
    border-bottom: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.china-stocks-mini {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.china-stock-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
}

.china-stock-mini:hover {
    background: #f0f0f0;
}

.china-stock-mini-symbol {
    font-weight: bold;
    font-size: 10px;
    color: #000080;
}

.china-stock-mini-price {
    font-family: 'VT323', monospace;
    font-size: 11px;
}

.china-stock-mini-change {
    font-size: 9px;
    font-family: 'VT323', monospace;
    padding: 1px 4px;
    min-width: 45px;
    text-align: center;
}

.china-stock-mini-change.positive {
    background: #ccffcc;
    color: #00aa00;
}

.china-stock-mini-change.negative {
    background: #ffcccc;
    color: #aa0000;
}

.eu-stock-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
}

.eu-stock-mini:hover {
    background: #f0f0f0;
}

.eu-stock-mini-symbol {
    font-weight: bold;
    font-size: 10px;
    color: #000040;
}

.eu-stock-mini-price {
    font-family: 'VT323', monospace;
    font-size: 11px;
}

.eu-stock-mini-change {
    font-size: 9px;
    font-family: 'VT323', monospace;
    padding: 1px 4px;
    min-width: 45px;
    text-align: center;
}

.eu-stock-mini-change.positive {
    background: #ccffcc;
    color: #00aa00;
}

.eu-stock-mini-change.negative {
    background: #ffcccc;
    color: #aa0000;
}

.eu-stocks-mini {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.forex-panel-large {
    background: #ffffff;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.forex-chart-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    background: #dfdfdf;
    border-bottom: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.forex-chart-select {
    padding: 4px 8px;
    font-size: 11px;
    font-family: inherit;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    background: white;
    min-width: 150px;
}

.chart-timeframes {
    display: flex;
    gap: 4px;
}

.forex-chart-container {
    flex: 1;
    padding: 8px;
    min-height: 200px;
    background: #000000;
    position: relative;
}

#forexChart {
    width: 100%;
    height: 100%;
    display: block;
}

.forex-chart-stats {
    display: flex;
    justify-content: space-around;
    padding: 8px;
    background: #a0a0a0;
    border-top: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.chart-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 10px;
}

.chart-stat .stat-label {
    color: #404040;
    font-weight: bold;
}

.chart-stat .stat-value {
    font-weight: bold;
    font-family: 'VT323', monospace;
    font-size: 12px;
}

.chart-stat .stat-value.positive {
    color: #00aa00;
}

.chart-stat .stat-value.negative {
    color: #aa0000;
}



.chart-news-content {
    display: flex;
    flex: 1;
    gap: 8px;
    padding: 8px;
    min-height: 0;
    overflow: hidden;
}

.chart-section {
    flex: 2;
    display: flex;
    flex-direction: column;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.chart-header {
    background: linear-gradient(to bottom, #000080, #000040);
    color: white;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
}

.chart-container {
    flex: 1;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #808080;
    font-size: 12px;
}

.news-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.news-header {
    background: linear-gradient(to bottom, #000080, #000040);
    color: white;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
}

.news-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
}

.portfolio-content,
.reports-content {
    flex: 1;
    padding: 12px;
    overflow: auto;
}

.arb-flag {
    font-size: 14px;
    margin-right: 4px;
}

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    gap: 10px;
    max-width: 85%;
    animation: fadeIn 0.3s ease-out;
}

.chat-message.user {
    flex-direction: row-reverse;
    align-self: flex-end;
}

.chat-message.bot {
    align-self: flex-start;
}

.chat-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #000080, #000040);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.chat-message.user .chat-avatar {
    background: linear-gradient(135deg, #00a4ef, #0078d4);
}

.chat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chat-sender {
    font-size: 10px;
    font-weight: bold;
    color: #000080;
}

.chat-message.user .chat-sender {
    text-align: right;
}

.chat-text {
    padding: 10px 14px;
    background: #ffffff;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    font-size: 12px;
    line-height: 1.5;
    color: #000040;
}

.chat-message.user .chat-text {
    background: #e8f4fc;
}

.chat-time {
    font-size: 9px;
    color: #808080;
}

.chat-message.user .chat-time {
    text-align: right;
}

.chat-input-area {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #dfdfdf;
    border-top: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    font-size: 12px;
    font-family: inherit;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
    background: #ffffff;
    outline: none;
}

.chat-input:focus {
    border-color: #00a4ef;
}

.chat-send-btn {
    padding: 10px 24px;
    font-size: 12px;
    font-weight: bold;
    background: linear-gradient(to bottom, #000080, #000040);
    color: white;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    cursor: pointer;
}

.chat-send-btn:hover {
    background: linear-gradient(to bottom, #0000a0, #000060);
}

.chat-status {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 10px;
    color: #404040;
    background: #c0c0c0;
    border-top: 1px solid #a0a0a0;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #808080;
}

.status-dot.connected {
    background: #00aa00;
    animation: pulse 2s ease-in-out infinite;
}

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-typing {
    display: flex;
    gap: 10px;
    max-width: 85%;
    align-self: flex-start;
}

.chat-typing .chat-content {
    padding: 10px 14px;
    background: #f0f0f0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.typing-dots {
    display: flex;
    gap: 4px;
    padding: 4px 0;
}

.typing-dots span {
    width: 8px;
    height: 8px;
    background: #808080;
    border-radius: 50%;
    animation: bounce 1.4s ease-in-out infinite;
}

.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
    0%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-6px); }
}

.chat-message.error .chat-text {
    background: #ffe8e8;
    border-color: #ffcccc;
    color: #aa0000;
}

.chat-message {
    position: relative;
}

.chat-message .copy-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    padding: 3px 8px;
    font-size: 9px;
    background: #e0e0e0;
    border: 1px solid #a0a0a0;
    border-radius: 3px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    color: #404040;
}

.chat-message:hover .copy-btn {
    opacity: 1;
}

.copy-btn:hover {
    background: #d0d0d0;
}

.copy-btn.copied {
    background: #d0f0d0;
    border-color: #00aa00;
    color: #00aa00;
}

.chat-text {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.chat-text p {
    margin: 0 0 8px 0;
}

.chat-text p:last-child {
    margin-bottom: 0;
}

.chat-text code {
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

.chat-text pre {
    background: #f0f0f0;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin: 8px 0;
}

.chat-text pre code {
    background: none;
    padding: 0;
}

.chat-text ul, .chat-text ol {
    margin: 8px 0;
    padding-left: 24px;
}

.chat-text blockquote {
    border-left: 3px solid #000080;
    margin: 8px 0;
    padding-left: 12px;
    color: #404040;
}

.chat-text strong {
    font-weight: bold;
}

.chat-text em {
    font-style: italic;
}

.resize-handle {
    position: absolute;
    z-index: 100;
}

.resize-handle-n {
    top: -4px;
    left: 10px;
    right: 10px;
    height: 8px;
    cursor: n-resize;
}

.resize-handle-s {
    bottom: -4px;
    left: 10px;
    right: 10px;
    height: 8px;
    cursor: s-resize;
}

.resize-handle-e {
    right: -4px;
    top: 10px;
    bottom: 10px;
    width: 8px;
    cursor: e-resize;
}

.resize-handle-w {
    left: -4px;
    top: 10px;
    bottom: 10px;
    width: 8px;
    cursor: w-resize;
}

.resize-handle-ne {
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    cursor: ne-resize;
}

.resize-handle-nw {
    top: -4px;
    left: -4px;
    width: 16px;
    height: 16px;
    cursor: nw-resize;
}

.resize-handle-se {
    bottom: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    cursor: se-resize;
}

.resize-handle-sw {
    bottom: -4px;
    left: -4px;
    width: 16px;
    height: 16px;
    cursor: sw-resize;
}

.window {
    position: absolute;
    min-width: 400px;
    min-height: 300px;
    max-width: calc(100vw - 200px);
    max-height: calc(100vh - 50px);
}

.window.maximize {
    width: calc(100% - 220px) !important;
    height: calc(100% - 70px) !important;
    top: 35px !important;
    left: 110px !important;
}

.start-menu {
    position: fixed;
    bottom: 30px;
    left: 4px;
    width: 220px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.3);
    z-index: 10001;
    display: none;
}

.start-menu.open {
    display: block;
}

.start-menu-header {
    background: linear-gradient(to right, #000080, #1084d0);
    padding: 8px 12px;
    color: white;
    font-weight: bold;
    font-size: 14px;
}

.start-menu-items {
    padding: 4px;
}

.start-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    border: 2px solid transparent;
}

.start-menu-item:hover {
    background: #000080;
    color: white;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
}

.start-menu-item:active {
    background: #808080;
}

.menu-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.start-menu-separator {
    height: 2px;
    background: linear-gradient(to right, #808080, #ffffff, #808080);
    margin: 4px 0;
}

.start-menu-item.shutdown:hover {
    background: #800000;
}

.chat-text {
    max-height: 250px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.chat-text::-webkit-scrollbar {
    width: 12px;
}

.chat-text::-webkit-scrollbar-track {
    background: #c0c0c0;
}

.chat-text::-webkit-scrollbar-thumb {
    background: #808080;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.mobile-toggle {
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
}

.mobile-toggle:hover {
    background: rgba(0,0,0,0.1);
    border-radius: 2px;
}

@media (max-width: 768px) {
    .start-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 60px;
        width: 100%;
        height: calc(100% - 60px);
        background: #c0c0c0;
        border: none;
        border-bottom: 2px solid #404040;
        box-shadow: none;
    }

    .start-menu.open {
        display: flex;
        flex-direction: column;
    }

    .start-menu-header {
        padding: 16px 20px;
        font-size: 18px;
    }

    .start-menu-items {
        flex: 1;
        overflow-y: auto;
        padding: 8px;
    }

    .start-menu-item {
        padding: 16px 20px;
        font-size: 16px;
    }

    .menu-icon {
        font-size: 24px;
        width: 32px;
    }

    .start-menu-item.shutdown {
        margin-top: auto;
        background: #a0a0a0;
        border-top: 2px solid #ffffff;
        padding: 20px;
    }

    .window.mobile-fullscreen {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 60px !important;
        width: 100% !important;
        height: calc(100% - 60px) !important;
        max-width: 100% !important;
        max-height: 100% !important;
        z-index: 1000 !important;
        border-radius: 0 !important;
    }

    .window.mobile-fullscreen .window-body {
        height: 100% !important;
    }

    .window.mobile-fullscreen .resize-handle {
        display: none !important;
    }

    .window.mobile-fullscreen .window-controls {
        display: flex !important;
        opacity: 1 !important;
    }

    .chat-container {
        height: 100%;
    }

    .chat-messages {
        flex: 1;
        overflow-y: auto;
    }
}

@media (max-width: 480px) {
    .chat-avatar {
        width: 28px;
        height: 28px;
        font-size: 16px;
    }

    .chat-text {
        font-size: 14px;
        padding: 12px;
        max-height: 200px;
    }

    .chat-input {
        font-size: 16px;
        padding: 12px;
        min-height: 44px;
    }

    .chat-send-btn {
        padding: 12px 16px;
        min-width: 70px;
    }

    .chat-container {
        gap: 8px;
    }

    .chat-messages {
        padding: 8px;
    }

    .chat-input-area {
        padding: 8px;
    }
}

.tankers-container {
    display: flex;
    height: 100%;
    gap: 12px;
    padding: 12px;
    background: #004040;
}

.tankers-map-container {
    flex: 1;
    position: relative;
    border: 2px solid #808080;
    background: #002020;
    overflow: hidden;
}

#tankers-map {
    width: 100%;
    height: 100%;
    background: #001515;
}

.tankers-sidebar {
    width: 280px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #c0c0c0;
    border: 2px solid #808080;
    padding: 8px;
    overflow-y: auto;
}

.tankers-stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tankers-stat-card {
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    padding: 8px;
    text-align: center;
}

.tankers-stat-value {
    font-family: 'VT323', monospace;
    font-size: 28px;
    color: #000080;
    font-weight: bold;
}

.tankers-stat-label {
    font-size: 11px;
    color: #404040;
    text-transform: uppercase;
}

.tankers-ports {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    overflow: hidden;
}

.tankers-section-header {
    background: #000080;
    color: #ffffff;
    padding: 6px 8px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.tankers-ports-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
}

.tankers-port-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 12px;
}

.tankers-port-item:hover {
    background: #000080;
    color: #ffffff;
}

.tankers-port-item.selected {
    background: #000080;
    color: #ffffff;
}

.port-flag {
    font-size: 14px;
}

.port-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.port-count {
    background: #000080;
    color: #ffffff;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: bold;
}

.tankers-vessels {
    display: flex;
    flex-direction: column;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    max-height: 200px;
    overflow: hidden;
}

.tankers-vessels-list {
    flex: 1;
    overflow-y: auto;
    padding: 4px;
}

.tanker-vessel-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
    border: 1px solid transparent;
    font-size: 11px;
}

.tanker-vessel-item:hover {
    background: #000080;
    color: #ffffff;
}

.vessel-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid #404040;
}

.vessel-status.underway {
    background: #00aa00;
}

.vessel-status.anchored {
    background: #ffaa00;
}

.vessel-status.moored {
    background: #aa0000;
}

.vessel-info {
    flex: 1;
    overflow: hidden;
}

.vessel-name {
    font-weight: bold;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vessel-details {
    font-size: 10px;
    color: #404040;
}

.tanker-vessel-item:hover .vessel-details {
    color: #ffffff;
}

.tankers-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
}

.tanker-control-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.tanker-control-label {
    font-size: 11px;
    font-weight: bold;
}

.tanker-control-select {
    font-family: inherit;
    font-size: 11px;
    padding: 2px 4px;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    background: #ffffff;
}

.tanker-search-input {
    font-family: inherit;
    font-size: 11px;
    padding: 2px 6px;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    background: #ffffff;
    width: 120px;
}

.tanker-search-input:focus {
    outline: none;
    border-color: #000080;
}

.tankers-legend {
    display: flex;
    gap: 16px;
    padding: 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #404040 #404040 #ffffff;
    font-size: 11px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.legend-marker {
    width: 12px;
    height: 12px;
    border: 1px solid #ffffff;
}

.legend-marker.underway {
    background: #00aa00;
}

.legend-marker.anchored {
    background: #ffaa00;
}

.legend-marker.moored {
    background: #aa0000;
}

.legend-marker.port {
    background: #0066cc;
    border-radius: 2px;
}

@media (max-width: 768px) {
    .tankers-container {
        flex-direction: column;
    }
    
    .tankers-sidebar {
        width: 100%;
        max-height: 200px;
    }
    
    .tankers-map-container {
        min-height: 300px;
    }
}

@media (prefers-color-scheme: dark) {
    .tankers-sidebar,
    .tankers-ports,
    .tankers-vessels,
    .tankers-controls,
    .tankers-legend {
        background: #303030;
        border-color: #505050 #202020 #202020 #505050;
    }
    
    .tankers-stat-card {
        background: #404040;
        border-color: #505050 #202020 #202020 #505050;
    }
    
    .tankers-stat-label,
    .tanker-control-label {
        color: #aaaaaa;
    }
    
    .tankers-port-item,
    .tanker-vessel-item {
        color: #eeeeee;
    }
    
    .tankers-section-header {
        background: #404060;
    }
    
    .port-count {
        background: #404060;
    }
    
    .vessel-details {
        color: #aaaaaa;
    }
}

.stream-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    font-size: 10px;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 4px;
}

.stream-item.active {
    background: #ccffcc;
}

.stream-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #808080;
}

.stream-item.active .stream-dot {
    background: #00aa00;
    animation: pulse 1s ease-in-out infinite;
}

.stream-latency {
    margin-left: auto;
    font-family: 'VT323', monospace;
    color: #008080;
}

.portfolio-summary {
    display: flex;
    gap: 24px;
    padding: 16px;
    background: #dfdfdf;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 12px;
}

.port-item {
    display: flex;
    flex-direction: column;
}

.port-label {
    font-size: 10px;
    color: #404040;
}

.port-value {
    font-size: 18px;
    font-weight: bold;
    font-family: 'VT323', monospace;
}

.port-value.positive {
    color: #00aa00;
}

.port-value.negative {
    color: #aa0000;
}

.portfolio-holdings {
    flex: 1;
    overflow: auto;
}

.holdings-table {
    width: 100%;
    border-collapse: collapse;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.holdings-table th {
    background: linear-gradient(to bottom, #000080, #000040);
    color: white;
    padding: 8px;
    text-align: left;
    font-size: 10px;
    position: sticky;
    top: 0;
}

.holdings-table td {
    padding: 8px;
    font-size: 11px;
    border-bottom: 1px solid #a0a0a0;
}

.holdings-table tr:hover {
    background: #dfdfdf;
}

.holdings-table .positive {
    color: #00aa00;
}

.holdings-table .negative {
    color: #aa0000;
}

.china-index,
.europe-index {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.china-stats-bar,
.europe-stats-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.commodity-btn {
    padding: 6px 12px;
    font-size: 11px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    cursor: pointer;
}

.commodity-btn:hover {
    background: #dfdfdf;
}

.commodity-btn.active {
    background: #000080;
    color: white;
    border-color: #000040 #000080 #000080 #000040;
}

.commodity-price-display {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 8px;
}

.commodity-symbol {
    font-weight: bold;
}

.commodity-price {
    font-size: 24px;
    font-weight: bold;
    font-family: 'VT323', monospace;
}

.commodity-change {
    font-size: 14px;
}

.commodity-change.positive {
    color: #00aa00;
}

.commodity-change.negative {
    color: #aa0000;
}

.commodities-details {
    display: flex;
    gap: 16px;
    padding: 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.commodity-detail {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 10px;
    color: #666;
}

.detail-value {
    font-size: 14px;
    font-weight: bold;
}

.forex-chart-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 8px;
}

.forex-chart-select {
    padding: 4px 8px;
    font-size: 12px;
}

.chart-timeframes {
    display: flex;
    gap: 4px;
}

.btn-small {
    padding: 4px 8px;
    font-size: 10px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    cursor: pointer;
}

.btn-small:hover {
    background: #dfdfdf;
}

.btn-small.active {
    background: #000080;
    color: white;
}

.forex-chart-container {
    margin-bottom: 8px;
}

.forex-chart-stats {
    display: flex;
    gap: 16px;
    padding: 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
}

.chart-stat {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 10px;
    color: #666;
}

.stat-value {
    font-size: 14px;
    font-weight: bold;
    font-family: 'VT323', monospace;
}

.crypto-search {
    flex: 1;
}

.crypto-search-input {
    width: 100%;
    padding: 4px 8px;
    font-size: 11px;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.crypto-stats {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #aa0000;
}

.status-dot.connected {
    background: #00aa00;
}

.crypto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 8px;
    padding: 8px;
}

.forex-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    min-height: 0;
}

#forex-panel .window-body {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.forex-timestamp {
    flex-shrink: 0;
    font-size: 10px;
    color: #666;
    padding: 4px 8px;
    text-align: right;
}

.resize-handle {
    position: absolute;
    background: transparent;
}

.resize-handle-n {
    top: 0;
    left: 10px;
    right: 10px;
    height: 4px;
    cursor: n-resize;
}

.resize-handle-e {
    top: 10px;
    bottom: 10px;
    right: 0;
    width: 4px;
    cursor: e-resize;
}

.resize-handle-s {
    bottom: 0;
    left: 10px;
    right: 10px;
    height: 4px;
    cursor: s-resize;
}

.resize-handle-w {
    top: 10px;
    bottom: 10px;
    left: 0;
    width: 4px;
    cursor: w-resize;
}

.resize-handle-ne {
    top: 0;
    right: 0;
    width: 10px;
    height: 10px;
    cursor: ne-resize;
}

.resize-handle-nw {
    top: 0;
    left: 0;
    width: 10px;
    height: 10px;
    cursor: nw-resize;
}

.resize-handle-se {
    bottom: 0;
    right: 0;
    width: 10px;
    height: 10px;
    cursor: se-resize;
}

.resize-handle-sw {
    bottom: 0;
    left: 0;
    width: 10px;
    height: 10px;
    cursor: sw-resize;
}

.news-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #ffffff #808080 #808080 #ffffff;
    margin-bottom: 8px;
}

.news-date-input {
    padding: 4px;
    font-size: 11px;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.news-list {
    max-height: 300px;
    overflow-y: auto;
}

.chart-news-content {
    display: flex;
    gap: 12px;
    height: 100%;
}

.chart-section {
    flex: 2;
    display: flex;
    flex-direction: column;
}

.news-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chart-header,
.news-header {
    padding: 8px;
    background: #000080;
    color: white;
    font-weight: bold;
    font-size: 11px;
}

.chart-container {
    flex: 1;
    background: #e0e0e0;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.news-container {
    flex: 1;
    overflow-y: auto;
    background: #e0e0e0;
    border: 2px solid;
    border-color: #808080 #ffffff #ffffff #808080;
}

.alerts-list {
    max-height: 400px;
    overflow-y: auto;
}

.china-stocks-grid,
.europe-stocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    padding: 8px;
}

.polymarket-container {
    padding: 16px;
    height: 100%;
    overflow-y: auto;
}

#tankers-map,
.tankers-map-container,
.leaflet-container {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

#tankers-panel .window-body,
#trading-lab .window-body {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.polymarket-header h2 {
    margin: 0 0 8px 0;
    color: #000080;
}

.polymarket-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}
