body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #1a1a1a;
    color: #fff;
}

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

h1 {
    text-align: center;
    color: #00B8D4;
}

.orderbook {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 20px 0;
    width: 100%;
    height: calc(100vh - 300px);
    min-height: 400px;
    max-width: 100%;
}

.asks-section, .bids-section {
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0; /* Prevents flex items from overflowing */
}

.asks, .bids {
    background-color: #262626;
    padding: 15px;
    border-radius: 8px;
    width: 100%;
    height: 100%;
    overflow: hidden;
    max-width: 100%;
}

.price-info {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: #00B8D4;
}

.orders {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.orders-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 5px;
    font-size: 12px;
    color: #888;
    border-bottom: 1px solid #333;
    margin-bottom: 5px;
    width: 100%;
}

.orders-header div {
    text-align: left;
}

.order-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 5px;
    font-size: 14px;
    width: 100%;
}

.order-row div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 5px;
}

.ask {
    color: #FF5252;
}

.bid {
    color: #69F0AE;
}

.depth-bar {
    position: absolute;
    height: 100%;
    top: 0;
    z-index: 0;
    opacity: 0.1;
}

.ask .depth-bar {
    right: 0;
    background-color: #FF5252;
}

.bid .depth-bar {
    left: 0;
    background-color: #69F0AE;
}

.order-row {
    position: relative;
    z-index: 1;
}

.search-container {
    position: relative;
    max-width: 400px;
    margin: 20px auto;
}

#crypto-search {
    width: 100%;
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background-color: #262626;
    color: #fff;
    font-size: 16px;
}

#crypto-search:focus {
    outline: none;
    box-shadow: 0 0 0 2px #00B8D4;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #262626;
    border-radius: 8px;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.search-result-item {
    padding: 10px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #333;
}

.market-info {
    text-align: center;
    margin: 0 auto 20px;
    padding: 20px;
    background-color: #262626;
    border-radius: 8px;
    max-width: 800px;
}

#current-price {
    font-size: 28px;
    font-weight: bold;
    color: #00B8D4;
    margin-bottom: 15px;
}

.market-sentiment {
    margin-top: 0;
    text-align: center;
}

.market-sentiment h3 {
    font-size: 16px;
    margin-bottom: 10px;
    color: #888;
}

.sentiment-meter {
    width: 300px;
    height: 10px;
    background: #333;
    border-radius: 5px;
    position: relative;
    margin: 10px auto;
    overflow: hidden;
}

.sentiment-bar {
    height: 100%;
    width: 50%;
    background: linear-gradient(to right, #FF5252, #69F0AE);
    transition: width 0.3s ease;
}

#sentiment-text {
    font-size: 14px;
    color: #888;
    margin-top: 5px;
}

@media screen and (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    .orderbook {
        grid-template-columns: 1fr;
        height: auto;
    }

    .asks-section, .bids-section {
        height: 400px;
    }

    .market-info {
        padding: 10px;
    }

    #current-price {
        font-size: 24px;
    }

    .sentiment-meter {
        width: 200px;
    }

    .orders-header div, .order-row div {
        font-size: 12px;
    }
}