.main-box {
    width: 100%;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
    height: 650px;
}

.trading-left {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.trading-right {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.trading-chart {
    flex: 1;
    min-height: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.trading-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}

.trading-candlestick {
    flex: 1;
    background: var(--row-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

.trading-buttons {
    display: flex;
    gap: 0.75rem;
}

.trading-button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.trading-button.active:first-child {
    background: var(--gain);
    color: white;
}

.trading-button.active:first-child:hover {
    background: #5a7d5a;
}

.trading-button.active:last-child {
    background: var(--loss);
    color: white;
}

.trading-button.active:last-child:hover {
    background: #b16767;
}

.trading-button:not(.active) {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.trading-button:not(.active):hover {
    border-color: var(--accent);
    color: var(--accent);
}

.trading-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.trading-type {
    display: flex;
    gap: 0.5rem;
}

.trading-limit,
.trading-market,
.trading-stop {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--card-bg);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.trading-limit:hover,
.trading-market:hover,
.trading-stop:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.trading-limit.active,
.trading-market.active,
.trading-stop.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.trading-input {
    display: flex;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.input-textbox {
    flex: 1;
    min-width: 0;
    padding: 0.75rem 1rem;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.9375rem;
    color: var(--text-primary);
    background: transparent;
}

.input-textbox::placeholder {
    color: var(--text-tertiary);
}



.input-text {
    padding: 0.75rem 1rem;
    background: var(--row-hover);
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    font-weight: 500;
    border-left: 1px solid var(--border);
    white-space: nowrap;
}

.trading-texts {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trading-text {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
}

.trading-usdt {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.trading-submit {
    width: 100%;
    padding: 0.875rem;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    letter-spacing: 0.03em;
    transition: background 0.2s ease;
}

.trading-submit:hover {
    background: #2563EB;
}

#tvChart .inner-BfVZxb4b {
    display: none !important;
}

@media (max-width: 900px) {
    .main-box {
        grid-template-columns: 1fr;
    }

    .trading-candlestick {
        height: 300px;
    }
}

@media (max-width: 600px) {
    .trading-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .trading-candlestick {
        height: 250px;
    }

    .orderbook th,
    .orderbook td {
        padding: 0.5rem 0.625rem;
        font-size: 0.75rem;
    }
}
