.trading-dashboard {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background-color: #121212;
    color: #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #333;
}

.dashboard-title {
    font-size: 24px;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.update-info {
    font-size: 12px;
    color: #999;
}

/* API Status Indicator */
.api-status-indicator {
    background-color: #1e1e1e;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    font-size: 14px;
}

.status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.status-dot.connecting {
    background-color: #ffcc00;
    animation: pulse 1.5s infinite;
}

.status-dot.connected {
    background-color: #4cd964;
}

.status-dot.error {
    background-color: #ff3b30;
}

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

/* Debug Panel */
.debug-panel {
    position: fixed;
    top: 50px;
    right: 50px;
    width: 600px;
    max-width: 90vw;
    max-height: 80vh;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: none;
    overflow: hidden;
}

.debug-header {
    background-color: #333;
    padding: 10px 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.debug-close {
    cursor: pointer;
    font-size: 20px;
}

.debug-content {
    padding: 15px;
    overflow-y: auto;
    max-height: calc(80vh - 40px);
}

.debug-content h3 {
    margin-top: 15px;
    margin-bottom: 10px;
    color: #fff;
}

.debug-content pre {
    background-color: #252525;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    font-size: 12px;
    color: #ddd;
}

.debug-content ul {
    margin-left: 20px;
    padding-left: 0;
}

.debug-content li {
    margin-bottom: 5px;
}

/* SPY Price Display */
.spy-price-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.spy-main-price {
    flex: 1;
    min-width: 300px;
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    position: relative;
}

.spy-price-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.spy-symbol {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.spy-price {
    font-size: 36px;
    font-weight: 700;
    margin: 10px 0;
}

.spy-change {
    font-size: 18px;
    margin-bottom: 15px;
}

.positive {
    color: #4cd964;
}

.negative {
    color: #ff3b30;
}

.spy-details {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 15px;
}

.spy-detail-item {
    flex: 1;
    min-width: 80px;
}

.spy-detail-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

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

.spy-after-hours {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #333;
}

.spy-after-label {
    font-size: 14px;
    color: #999;
}

.spy-after-price {
    font-size: 18px;
    font-weight: 600;
    margin-right: 10px;
}

/* EMA Crossover Visualization */
.ema-container {
    flex: 1;
    min-width: 300px;
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
}

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

.ema-title {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.ema-values {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.ema-value-item {
    flex: 1;
}

.ema-value-label {
    font-size: 12px;
    color: #999;
    margin-bottom: 5px;
}

.ema-value {
    font-size: 16px;
    font-weight: 600;
}

.ema9-value {
    color: #4cd964;
}

.ema21-value {
    color: #ff9500;
}

.current-price-value {
    color: #5ac8fa;
}

.ema-flow-container {
    position: relative;
    height: 60px;
    margin-top: 20px;
}

#ema-flow-viz {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.price-marker {
    position: absolute;
    top: 0;
    width: 2px;
    height: 100%;
    background-color: #fff;
    z-index: 2;
    transition: left 0.5s ease;
}

.price-label {
    position: absolute;
    top: -25px;
    transform: translateX(-50%);
    background-color: #333;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

/* Options Table */
.options-container {
    background-color: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

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

.options-title {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
}

.options-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.options-control-group {
    display: flex;
    gap: 5px;
}

.options-btn {
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.options-btn.active {
    color: #fff;
}

.options-btn.inactive {
    background-color: #333;
    color: #999;
}

.options-btn[data-action="buy"].active {
    background-color: #4cd964;
}

.options-btn[data-action="sell"].active {
    background-color: #ff3b30;
}

.options-btn[data-type="call"].active {
    background-color: #5ac8fa;
}

.options-btn[data-type="put"].active {
    background-color: #ff9500;
}

.expiry-select-container {
    position: relative;
    min-width: 200px;
}

#expiry-select {
    width: 100%;
    padding: 8px 15px;
    border-radius: 5px;
    background-color: #333;
    color: #fff;
    border: none;
    appearance: none;
    cursor: pointer;
    font-size: 14px;
}

.expiry-select-container::after {
    content: '▼';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
}

.options-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.options-table th {
    text-align: left;
    padding: 10px;
    border-bottom: 1px solid #333;
    color: #999;
    font-weight: normal;
    font-size: 14px;
}

.options-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #252525;
    font-size: 14px;
}

.share-price-indicator {
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    text-align: center;
    margin: 10px 0;
    font-size: 14px;
}

.ask-price {
    color: #4cd964;
    font-weight: 600;
}

.add-btn {
    background-color: transparent;
    border: 1px solid #4cd964;
    color: #4cd964;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-btn:hover {
    background-color: rgba(76, 217, 100, 0.1);
}

.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #999;
}

.error-message {
    text-align: center;
    padding: 20px;
    color: #ff3b30;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .spy-price-container {
        flex-direction: column;
    }
    
    .options-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .options-controls {
        flex-direction: column;
        width: 100%;
    }
    
    .options-control-group {
        width: 100%;
    }
    
    .options-btn {
        flex: 1;
        text-align: center;
    }
    
    .expiry-select-container {
        width: 100%;
    }
    
    .options-table {
        font-size: 12px;
    }
    
    .options-table th, .options-table td {
        padding: 8px 5px;
    }
}
