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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0c0e14 0%, #1a1d29 100%);
    color: #e0e0e0;
    min-height: 100vh;
}

.container {




    
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

h1 {
    font-size: 24px;
    font-weight: 600;
    color: #ffffff;
}

.balance-info {
    display: flex;
    align-items: center;
    margin-left: 20px;
    font-size: 16px;
    color: #ffffff;
}

.balance-info label {
    font-weight: bold;
    margin-right: 8px;
    color: #b8b8b8;
}

.balance-info span {
    font-weight: bold;
    color: #00ff88;
    font-size: 18px;
}



.asset-selector {
    display: flex;
    align-items: center;
    white-space: nowrap;
    margin-bottom: 8px;
}

.asset-selector label {
    color: #ffffff;
    margin-right: 8px;
    flex-shrink: 0;
}

.asset-selector select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    flex-shrink: 0;
}







.main-content {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 20px;
    height: calc(100vh - 150px);
}

.chart-container {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#chart {
    width: 100%;
    height: 100%;
    min-height: 500px;
}

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

.contract-selection {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contract-selection h3 {
    margin-bottom: 20px;
    color: #ffffff;
    font-size: 18px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #b8b8b8;
}

.input-group select,
.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-size: 14px;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #00ff88;
}

.min-amount {
    font-size: 12px;
    color: #888;
    margin-top: 5px;
    display: block;
}

.direction-buttons {
    display: flex;
    gap: 10px;
    margin-top: 5px;
}

.direction-btn {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.direction-btn.higher {
    background: rgba(0, 255, 136, 0.2);
    color: #00ff88;
}

.direction-btn.higher.active {
    background: #00ff88;
    color: #000;
}

.direction-btn.lower {
    background: rgba(255, 71, 119, 0.2);
    color: #ff4757;
}

.direction-btn.lower.active {
    background: #ff4757;
    color: #fff;
}

.payout-info {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.payout-info p {
    margin: 0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
}

.place-order-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #00ff88 0%, #00cc6a 100%);
    border: none;
    border-radius: 8px;
    color: #000;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.place-order-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 255, 136, 0.3);
}

.order-history {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    flex: 1;
    overflow-y: auto;
}

.technical-indicators {
    margin-top: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.technical-indicators h4 {
    margin: 0 0 10px 0;
    color: #ffffff;
    font-size: 14px;
}

.indicator-signals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.signal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.signal-label {
    color: #b8b8b8;
}

.signal-value {
    color: #ffffff;
    font-weight: 500;
}

.signal-value.bullish {
    color: #00ff88;
}

.signal-value.bearish {
    color: #ff4757;
}

.signal-value.neutral {
    color: #ffa500;
}

.confidence-details {
    grid-column: 1 / -1;
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.confidence-breakdown {
    font-size: 11px;
}

.confidence-title {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 5px;
}

.confidence-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
}

.confidence-reason {
    color: #b8b8b8;
    flex: 1;
}

.confidence-value {
    color: #00ff88;
    font-weight: 500;
    margin-left: 10px;
}

.order-history h4 {
    margin-bottom: 15px;
    color: #ffffff;
}

.orders-list {
    max-height: 300px;
    overflow-y: auto;
}

.order-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 10px;
    border-left: 4px solid;
}

.order-item.win {
    border-left-color: #00ff88;
}

.order-item.loss {
    border-left-color: #ff4757;
}

.order-item.refund {
    border-left-color: #ffa500;
}

.order-item.pending {
    border-left-color: #3498db;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background: #1a1d29;
    margin: 15% auto;
    padding: 30px;
    border-radius: 12px;
    width: 400px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #fff;
}

#modal-title {
    margin-bottom: 20px;
    color: #ffffff;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .chart-container {
        order: -1;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* 重置按钮样式 */
.reset-btn {
    display: block;
    width: 100%;
    padding: 10px;
    margin-top: 15px;
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
    border: 1px solid #ff4757;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.reset-btn:hover {
    background: rgba(255, 71, 87, 0.3);
    transform: translateY(-1px);
}

.reset-btn:active {
    transform: translateY(0);
}

/* Three Step Future-Trend 准确率显示 */
.trend-accuracy {
    margin-top: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    backdrop-filter: blur(10px);
}

.trend-accuracy h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
}

.accuracy-items {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.accuracy-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    min-width: 120px;
}

.trend-period {
    font-size: 14px;
    color: #b0b0b0;
}

.accuracy-value {
    font-size: 14px;
    font-weight: 600;
    color: #4CAF50;
}

.accuracy-change {
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
}