body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 10px;
    background-color: #f0f0f0;
    font-size: 14px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.order-book-container {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    gap: 20px;
}

.order-book,
.recent-trades {
    background-color: white;
    border-radius: 8px;
    overflow-y: auto;
    max-height: 400px;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.order-book {
    flex: 1;
    /* min-width: 300px; */
}



.order-book-totals {
    text-align: center;
    font-weight: bold;
    margin-bottom: 10px;
}

.buy-side-total {
    color: green;
}

.sell-side-total {
    color: red;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 8px 4px;
    text-align: right;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1;
}

.bids th,
.bids td {
    color: green;
}

.asks th,
.asks td {
    color: red;
}

.buy {
    color: green;
}

.sell {
    color: red;
}

h2 {
    text-align: center;
    color: #333;
    margin-top: 0;
}

.calculator {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    margin-bottom:20px;
}

.calculator h2 {
    margin-top: 0;
}

.calculator input,
.calculator select,
.calculator button {
    margin: 10px 0;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.calculator button {
    background-color: #4CAF50;
    color: white;
    border: none;
    cursor: pointer;
    min-width: 100px;
}

.calculator button:hover {
    background-color: #45a049;
}

#calculatorResult {
    font-weight: bold;
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

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

.error-message {
    color: red;
    text-align: center;
    padding: 10px;
    margin: 10px 0;
    background-color: #ffe6e6;
    border-radius: 4px;
    display: none;
}

.loading {
    text-align: center;
    padding: 20px;
    font-style: italic;
    color: #666;
}

.totals-row {
    font-weight: bold;
    background-color: #f8f9fa;
}

@media (max-width: 768px) {
    body {
        font-size: 12px;
        padding: 5px;
    }

    .order-book {
        /* min-width: 100%; */
        max-height: 400px;
        overflow-y:auto;
        overflow-x:hidden;
    }

    th,
    td {
        padding: 6px 2px;
    }

    .calculator input,
    .calculator select,
    .calculator button {
        width: 100%;
        margin: 5px 0;
    }

    .symbol-input {
        flex-direction: column;
    }
}

.calc-result {
    margin: 10px 0;
    padding: 10px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.calc-result.buy {
    border-left: 4px solid green;
}

.calc-result.sell {
    border-left: 4px solid red;
}

.price-inputs {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.price-inputs input {
    flex: 1;
}

@media (max-width: 768px) {
    .price-inputs {
        flex-direction: column;
    }
}

.market-price-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 4px;
}

.market-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.market-price-item .label {
    font-weight: bold;
    color: #666;
}

.market-price-item .value {
    font-family: monospace;
}

.market-price-item .value.bid {
    color: green;
}

.market-price-item .value.ask {
    color: red;
}

.calc-result {
    margin: 10px 0;
    padding: 15px;
    border-radius: 4px;
    background-color: #f8f9fa;
}

.calc-result .result-header {
    font-weight: bold;
    margin-bottom: 8px;
}

.calc-result .result-details {
    display: flex;
    justify-content: space-between;
    font-family: monospace;
}

.calc-result.buy {
    border-left: 4px solid green;
}

.calc-result.buy .result-header {
    color: green;
}

.calc-result.sell {
    border-left: 4px solid red;
}

.calc-result.sell .result-header {
    color: red;
}

.market-price.error {
    color: red;
    text-align: center;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .market-price-grid {
        grid-template-columns: 1fr;
    }

    .calc-result .result-details {
        flex-direction: column;
        gap: 5px;
    }
}
/* Add these new styles to your existing styles.css file */

.reset-prices {
    text-align: center;
    margin-top: 15px;
}

.reset-prices button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.reset-prices button:hover {
    background-color: #5a6268;
}

.calc-result .result-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.calc-result .result-details div {
    font-family: monospace;
    padding: 4px 0;
}

/* Update existing styles */
.price-inputs input {
    flex: 1;
    font-family: monospace;
}

.price-inputs input::placeholder {
    font-size: 0.85em;
    color: #666;
}