/**
 * EA Trader 样式�?
 */

* {
    margin: 0;
    padding: 0;
    box-siz/* 交易页面 */
#tradingPage {
    background: #1a1a1a;
}

.header {
    background: #2a2a2a;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
}

.header h1 {
    color: #e0e0e0;
    font-size: 1.8em;
}}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    color: #e0e0e0;
}

.page {
    min-height: 100vh;
}

/* 登录页面 */
.login-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container h1 {
    color: #e0e0e0;
    margin-bottom: 30px;
    font-size: 2.5em;
}

.login-form {
    background: #2a2a2a;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 400px;
}

.login-form input {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 16px;
    background: #1a1a1a;
    color: #e0e0e0;
}

.login-form button {
    width: 100%;
    padding: 12px;
    background: #333;
    color: white;
    border: 1px solid #555;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s;
}

.login-form button:hover {
    background: #444;
}

.error-message {
    color: #e74c3c;
    margin-top: 10px;
    text-align: center;
}

/* 交易页面 */
#tradingPage {
    background: #f5f7fa;
}

.header {
    background: white;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    color: #e0e0e0;
    font-size: 1.8em;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.connection-status span {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 14px;
}

.connected {
    background: #27ae60;
    color: #000;
}

.disconnected {
    background: #c51f1f;
    color: white;
}

.connection-status button {
    padding: 8px 20px;
    background: #c51f1f;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.container {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.section {
    background: #2a2a2a;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    border: 1px solid #333;
}

.section h2 {
    color: #e0e0e0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #444;
}

/* 账户信息卡片 */
.accounts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.account-card {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 20px;
    color: #e0e0e0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    border: 1px solid #333;
}

.account-card h3 {
    margin-bottom: 15px;
    font-size: 1.3em;
    border-bottom: 2px solid #444;
    padding-bottom: 10px;
}

.account-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.account-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.account-row .amount {
    font-weight: bold;
    font-size: 1.1em;
}

/* 手数配置 */
.volume-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.volume-card {
    background: #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #333;
}

.volume-card h4 {
    color: #e0e0e0;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.volume-inputs {
    display: flex;
    gap: 15px;
}

.volume-inputs label {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
    color: #e0e0e0;
    font-weight: 500;
}

.volume-inputs input {
    padding: 8px;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 16px;
    background: #1a1a1a;
    color: #e0e0e0;
}

/* 快速交易面�?*/
.quick-trade-panel {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
}

.button-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 20px 0;
}

.button-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.button-column h4 {
    color: #e0e0e0;
    text-align: center;
    margin-bottom: 5px;
    font-size: 1.2em;
}

.btn-sell {
    background: #27ae60;  /* 做空用绿色 */
    color: #000;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-sell:hover {
    background: #00cc00;
    transform: scale(1.05);
}

.btn-buy {
    background: #c51f1f;  /* 做多用红色 */
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-buy:hover {
    background: #cc0000;
    transform: scale(1.05);
}

/* 快速平仓面�?*/
.quick-close-panel {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
}

.btn-large {
    padding: 20px;
    font-size: 20px;
    font-weight: bold;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-success:hover {
    background: #229954;
}

.no-data {
    text-align: center;
    color: #95a5a6;
    padding: 20px;
}

/* 仓位表格 */
.positions-table {
    width: 100%;
    border-collapse: collapse;
}

.positions-table th,
.positions-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
    color: #e0e0e0;
}

.positions-table th {
    background: #1a1a1a;
    color: #e0e0e0;
    font-weight: 600;
}

.positions-table tr:hover {
    background: #333;
}

.buy {
    color: #c51f1f;  /* 做多用红色 */
    font-weight: bold;
}

.sell {
    color: #27ae60;  /* 做空用绿色 */
    font-weight: bold;
}

.profit-positive {
    color: #c51f1f;  /* 盈利用红�?*/
    font-weight: bold;
}

.profit-negative {
    color: #27ae60;  /* 亏损用绿�?*/
    font-weight: bold;
}

/* 交易面板 */
.trade-panel {
    background: #1a1a1a;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.trade-panel h3 {
    color: #e0e0e0;
    margin-bottom: 15px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #e0e0e0;
    font-weight: 500;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #444;
    border-radius: 5px;
    font-size: 14px;
    background: #1a1a1a;
    color: #e0e0e0;
}

.platforms-container {
    display: flex;
    gap: 20px;
}

.platforms-container label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal !important;
}

button {
    padding: 10px 30px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

.btn-warning {
    background: #f39c12;
    color: white;
}

.btn-warning:hover {
    background: #e67e22;
}

/* 日志容器 */
.log-container {
    max-height: 300px;
    overflow-y: auto;
    background: #2c3e50;
    border-radius: 5px;
    padding: 15px;
}

.log-entry {
    padding: 8px;
    margin-bottom: 5px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

.log-info {
    color: #ecf0f1;
}

.log-success {
    color: #2ecc71;
}

.log-error {
    color: #e74c3c;
}

/* 响应�?*/
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        gap: 15px;
    }
    
    .platforms-container {
        flex-direction: column;
        gap: 10px;
    }
    
    .positions-table {
        font-size: 12px;
    }
    
    .positions-table th,
    .positions-table td {
        padding: 8px;
    }
}
