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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0d1117;
    color: #c9d1d9;
    min-height: 100vh;
}

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

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #30363d;
}

header h1 {
    font-size: 1.5rem;
    color: #58a6ff;
}

.status-bar {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
}

.status {
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
}

.status.connected {
    background: #238636;
    color: #fff;
}

.status.disconnected {
    background: #da3633;
    color: #fff;
}

#update-count {
    color: #8b949e;
}

#data-rate {
    color: #3fb950;
    font-family: monospace;
}

.controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #161b22;
    border-radius: 8px;
    border: 1px solid #30363d;
}

.symbol-input {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.symbol-input label {
    font-weight: 500;
    color: #8b949e;
}

.symbol-input select {
    min-width: 350px;
    max-width: 500px;
    height: 80px;
    padding: 8px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #c9d1d9;
    font-size: 0.85rem;
}

.symbol-input input {
    padding: 8px 12px;
    background: #0d1117;
    border: 1px solid #30363d;
    border-radius: 6px;
    color: #c9d1d9;
    width: 280px;
}

.symbol-input input:focus,
.symbol-input select:focus {
    outline: none;
    border-color: #58a6ff;
}

.actions {
    display: flex;
    gap: 10px;
}

button {
    padding: 8px 16px;
    border: 1px solid #30363d;
    border-radius: 6px;
    background: #21262d;
    color: #c9d1d9;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

button:hover {
    background: #30363d;
}

button.primary {
    background: #238636;
    border-color: #238636;
    color: #fff;
}

button.primary:hover {
    background: #2ea043;
}

.main-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 20px;
}

.chart-container {
    background: #161b22;
    border-radius: 8px;
    border: 1px solid #30363d;
    padding: 10px;
    min-height: 500px;
}

#price-chart {
    width: 100%;
    height: 480px;
}

.data-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.data-panel h3 {
    font-size: 1rem;
    color: #58a6ff;
    margin-bottom: 10px;
}

#quotes-table {
    background: #161b22;
    border-radius: 8px;
    border: 1px solid #30363d;
    padding: 15px;
}

#quotes-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

#quotes-table th {
    text-align: left;
    padding: 8px 6px;
    border-bottom: 1px solid #30363d;
    color: #8b949e;
    font-weight: 500;
}

#quotes-table td {
    padding: 8px 6px;
    border-bottom: 1px solid #21262d;
}

#quotes-table tr:last-child td {
    border-bottom: none;
}

.bid {
    color: #3fb950;
}

.ask {
    color: #f85149;
}

.last {
    color: #58a6ff;
}

.spread {
    color: #8b949e;
}

.ema {
    color: #a371f7;
    font-weight: 500;
}

.trades-container {
    background: #161b22;
    border-radius: 8px;
    border: 1px solid #30363d;
    padding: 15px;
    max-height: 250px;
    overflow-y: auto;
}

.trade-item {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid #21262d;
    font-size: 0.8rem;
}

.trade-item:last-child {
    border-bottom: none;
}

.trade-time {
    color: #8b949e;
}

.trade-price {
    color: #58a6ff;
    font-weight: 500;
}

.trade-size {
    color: #c9d1d9;
}

.flash-green {
    animation: flashGreen 0.3s ease-out;
}

.flash-red {
    animation: flashRed 0.3s ease-out;
}

@keyframes flashGreen {
    0% { background: rgba(63, 185, 80, 0.4); }
    100% { background: transparent; }
}

@keyframes flashRed {
    0% { background: rgba(248, 81, 73, 0.4); }
    100% { background: transparent; }
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #161b22;
}

::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #484f58;
}
