/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 确保aside标签没有默认样式 */
aside {
    border: none;
    background: none;
    box-shadow: none;
    outline: none;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #16213e 100%);
    color: #ffffff;
    overflow-x: hidden;
    position: relative; /* 防止子元素超出边界 */
    width: 100vw; /* 确保宽度固定为视口宽度 */
    max-width: 100vw; /* 防止超出视口 */
    min-width: 320px; /* 设置最小宽度 */
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100vw; /* 防止超出视口 */
    position: relative;
    contain: layout style; /* 启用CSS containment防止布局偏移 */
}

/* 顶部导航栏 */
.header {
    background: linear-gradient(90deg, #1a1a2e 0%, #16213e 100%);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid #ffd700;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.logo {
    display: flex;
    align-items: center;
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 700;
    color: #ffd700;
}

.logo i {
    font-size: 32px;
    margin-right: 15px;
    animation: spin 10s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.user-info {
    display: flex;
    gap: 30px;
    align-items: center;
}

.balance, .profit-loss {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.balance .label, .profit-loss .label {
    font-size: 12px;
    color: #cccccc;
    margin-bottom: 2px;
}

.balance .amount {
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 700;
    color: #ffd700;
}

.profit-loss .amount {
    font-family: 'Orbitron', monospace;
    font-size: 16px;
    font-weight: 700;
}

.profit-loss .amount.positive {
    color: #00C087;
}

.profit-loss .amount.negative {
    color: #F84960;
}

.profit-loss .amount.neutral {
    color: #cccccc;
}

/* 主要内容区域 */
.main-content {
    display: grid;
    grid-template-columns: 300px 1fr 350px;
    gap: 20px;
    padding: 20px;
    flex: 1;
}

/* 左侧面板 */
.left-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.market-overview, .probability-panel {
    background: linear-gradient(145deg, #1e1e2e 0%, #2a2a3e 100%);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid #333;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-height: 200px; /* 设置最小高度防止布局偏移 */
    contain: layout style; /* 启用CSS containment */
}

.market-overview h3, .probability-panel h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-display {
    margin-bottom: 20px;
    min-height: 70px; /* 减少高度适应一行布局 */
}

.current-price {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15) 0%, rgba(255, 215, 0, 0.08) 100%);
    padding: 16px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 0 20px rgba(255, 215, 0, 0.1);
    transition: all 0.3s ease;
    contain: layout style;
}

.current-price:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 215, 0, 0.2);
}

.current-price .price-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.current-price .symbol {
    font-size: 14px;
    color: #ffd700;
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
    letter-spacing: 0.8px;
    padding: 4px 8px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.current-price .price {
    font-family: 'Orbitron', monospace;
    font-size: 24px;
    font-weight: 900;
    color: #ffffff;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.5), 0 0 25px rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    will-change: transform;
}

.current-price .change {
    font-size: 16px;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    letter-spacing: 0.6px;
    padding: 6px 12px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    text-align: center;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
}

.current-price .change.positive {
    color: #00ff88;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.15) 0%, rgba(0, 255, 136, 0.08) 100%);
    border-color: rgba(0, 255, 136, 0.3);
    text-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.current-price .change.negative {
    color: #ff4757;
    background: linear-gradient(135deg, rgba(255, 71, 87, 0.15) 0%, rgba(255, 71, 87, 0.08) 100%);
    border-color: rgba(255, 71, 87, 0.3);
    text-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

/* 投注信息区域的价格显示样式 */
.bet-info {
    margin-bottom: 15px;
}

.current-trading-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1) 0%, rgba(255, 215, 0, 0.05) 100%);
    border-radius: 8px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    font-family: 'Roboto', sans-serif;
    flex-wrap: wrap;
}

.trading-pair-text,
.price-text {
    font-size: 13px;
    color: #ffd700;
    font-weight: 600;
    text-shadow: 0 0 6px rgba(255, 215, 0, 0.5);
}

#current-trading-pair {
    font-size: 13px;
    color: #ffffff;
    font-weight: 700;
    font-family: 'Orbitron', monospace;
    letter-spacing: 0.5px;
    margin-right: 12px;
}

#current-price-display {
    font-size: 16px;
    color: #ffffff;
    font-weight: 900;
    font-family: 'Orbitron', monospace;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.4);
    letter-spacing: 0.8px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .current-price .price-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .current-price .price {
        font-size: 20px;
    }
    
    .current-trading-info {
        flex-direction: column;
        gap: 6px;
    }
    
    .trading-pair-text,
    .price-text {
        font-size: 12px;
    }
    
    #current-price-display {
        font-size: 14px;
    }
}

.market-stats,
.stats {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.stat-item .label {
    color: #cccccc;
}

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

/* 确保aside标签没有默认样式 */
aside {
    border: none;
    background: none;
    box-shadow: none;
    outline: none;
    margin: 0;
    padding: 0;
}

/* 概率分析面板 */
.probability-meters {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.meter {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.meter-label {
    font-size: 12px;
    color: #cccccc;
}

.meter-bar {
    height: 8px;
    background: #333;
    border-radius: 4px;
    overflow: hidden;
}

.meter-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.meter-fill.bull {
    background: linear-gradient(90deg, #00C087, #00A876);
}

.meter-fill.bear {
    background: linear-gradient(90deg, #F84960, #E73C4F);
}

.meter-value {
    font-family: 'Orbitron', monospace;
    font-size: 14px;
    font-weight: 700;
    color: #ffd700;
}

.risk-indicator {
    text-align: center;
}

.risk-level {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.risk-level.low {
    background: rgba(0, 192, 135, 0.2);
    color: #00C087;
    border: 1px solid #00C087;
}

.risk-level.medium {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border: 1px solid #ffd700;
}

.risk-level.high {
    background: rgba(248, 73, 96, 0.2);
    color: #F84960;
    border: 1px solid #F84960;
}

/* 中央交易区域 */
.trading-area {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-container {
    background: linear-gradient(145deg, #1e1e2e 0%, #2a2a3e 100%);
    border-radius: 15px 15px 0 0;
    padding: 20px;
    border: 1px solid #333;
    border-bottom: none;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    flex: 1;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.chart-controls {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-group label {
    font-size: 12px;
    color: #cccccc;
    font-weight: 500;
}

.control-group select {
    padding: 8px 12px;
    background: #333;
    color: #ffffff;
    border: 1px solid #555;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-group select:hover {
    border-color: #ffd700;
    background: #444;
}

.control-group select:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.refresh-btn {
    padding: 8px 16px;
    background: linear-gradient(45deg, #ffd700, #ffed4a);
    color: #000000;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.chart-status {
    text-align: center;
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mode-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(0, 192, 135, 0.1);
    border: 1px solid #00C087;
    border-radius: 20px;
    font-size: 12px;
}

.realtime-badge {
    color: #00C087;
    font-weight: 600;
    text-transform: uppercase;
}

.base-timeframe {
    color: #B0B3B8;
    font-size: 11px;
}

.chart-header h3 {
    color: #ffd700;
    font-size: 18px;
}

.timeframe-selector {
    display: flex;
    gap: 5px;
}

.timeframe-btn {
    padding: 6px 12px;
    background: #333;
    color: #cccccc;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.timeframe-btn:hover {
    background: #444;
    color: #ffffff;
}

.timeframe-btn.active {
    background: #ffd700;
    color: #000000;
}

.chart-placeholder {
    background: #1a1a1a;
    border-radius: 10px;
    border: 1px solid #333;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* 主图样式 */
#priceChart {
    width: 100%;
    height: 700px;
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}



/* 赌场式下注面板 */
.betting-panel {
    background: linear-gradient(145deg, #1e1e2e 0%, #2a2a3e 100%);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid #333;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.betting-panel h3 {
    color: #ffd700;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.betting-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.bet-direction {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.bet-btn {
    padding: 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.bet-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.bet-btn:hover::before {
    left: 100%;
}

.bull-btn {
    background: linear-gradient(135deg, #00ff88, #00cc6a);
    color: #000000;
    box-shadow: 0 4px 20px rgba(0, 255, 136, 0.3);
}

.bull-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 255, 136, 0.4);
}

.bear-btn {
    background: linear-gradient(135deg, #ff4757, #ff3742);
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(255, 71, 87, 0.3);
}

.bear-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 71, 87, 0.4);
}

.bet-btn i {
    font-size: 24px;
}

.bet-btn .odds {
    font-size: 12px;
    opacity: 0.8;
}

.bet-amount {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bet-amount label {
    color: #cccccc;
    font-size: 14px;
}

.amount-input {
    display: flex;
    align-items: center;
    background: #333;
    border-radius: 8px;
    padding: 12px;
    border: 1px solid #555;
}

.amount-input input {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    flex: 1;
    outline: none;
}

.amount-input .currency {
    color: #ffd700;
    font-weight: 700;
    margin-left: 10px;
}

.quick-amounts {
    display: flex;
    gap: 8px;
}

.quick-btn {
    padding: 6px 12px;
    background: #444;
    color: #cccccc;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.quick-btn:hover {
    background: #ffd700;
    color: #000000;
}

.bet-duration label {
    color: #cccccc;
    font-size: 14px;
    margin-bottom: 8px;
    display: block;
}

.bet-duration select {
    width: 100%;
    padding: 12px;
    background: #333;
    color: #ffffff;
    border: 1px solid #555;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.potential-payout {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid #ffd700;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.payout-info .label {
    color: #cccccc;
    font-size: 14px;
}

.payout-info .amount {
    color: #ffd700;
    font-family: 'Orbitron', monospace;
    font-size: 18px;
    font-weight: 700;
    margin-left: 10px;
}

/* 风险管理设置 */
.risk-management {
    margin: 15px 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.risk-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
    align-items: end;
}

.risk-row:last-child {
    margin-bottom: 0;
    grid-template-columns: 1fr;
    justify-items: start;
}

.risk-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.risk-item label {
    font-size: 14px;
    color: #ccc;
    font-weight: 500;
    margin-bottom: 5px;
    white-space: nowrap;
}

.risk-item select {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid #333;
    color: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 40px;
    width: 100%;
}

.risk-item select:hover {
    border-color: #4ecdc4;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.2);
}

.risk-item select:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.3);
}

.percentage-input {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    width: 100%;
    height: 40px;
}

.percentage-input:hover {
    border-color: #4ecdc4;
    box-shadow: 0 0 10px rgba(78, 205, 196, 0.2);
}

.percentage-input:focus-within {
    border-color: #4ecdc4;
    box-shadow: 0 0 15px rgba(78, 205, 196, 0.3);
}

.percentage-input input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 10px 12px;
    font-size: 14px;
    flex: 1;
    outline: none;
    text-align: center;
    width: 100%;
}

.percentage-input span {
    background: rgba(255, 255, 255, 0.1);
    color: #4ecdc4;
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 24px;
    text-align: center;
}

.checkbox-input {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    margin-top: 5px;
}

.checkbox-input input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4ecdc4;
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-input span {
    font-size: 14px;
    color: #ccc;
    cursor: pointer;
    user-select: none;
    line-height: 1.2;
}

.checkbox-input:hover span {
    color: #4ecdc4;
}

/* 右侧面板 - 完全按照左侧面板的模式 */
.right-panel {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.indicators-panel, .ai-suggestions, .positions-panel {
    background: linear-gradient(145deg, #1e1e2e 0%, #2a2a3e 100%);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid #333;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.indicators-panel h3, .ai-suggestions h3, .positions-panel h3 {
    color: #ffd700;
    margin-bottom: 15px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 技术指标面板 - 紧凑布局 */
.indicators-panel .indicator-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.indicator-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid #333;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.indicator-item:hover {
    border-color: #4ecdc4;
    box-shadow: 0 0 8px rgba(78, 205, 196, 0.2);
    transform: translateY(-1px);
}

.indicator-item .name {
    color: #ccc;
    font-size: 13px;
    font-weight: 500;
}

.indicator-item .value {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    min-width: 50px;
    text-align: center;
}

.indicator-item .value.bullish {
    color: #4caf50;
}

.indicator-item .value.bearish {
    color: #f44336;
}

.indicator-item .value.neutral {
    color: #ff9800;
}

.indicator-item .signal {
    color: #4ecdc4;
    font-size: 11px;
    font-weight: 600;
    background: rgba(78, 205, 196, 0.1);
    padding: 2px 6px;
    border-radius: 3px;
    min-width: 40px;
    text-align: center;
}

/* AI建议面板 - 紧凑布局 */
.ai-suggestions .suggestion-card {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 12px;
}

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

.confidence-score .label {
    color: #ccc;
    font-size: 13px;
}

.confidence-score .score {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 15px;
    background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
}

.confidence-score .score.high {
    background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
}

.confidence-score .score.medium {
    background: linear-gradient(135deg, #ff9800 0%, #ffc107 100%);
}

.confidence-score .score.low {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
}

.suggestion-text {
    color: #ccc;
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.suggested-action {
    display: flex;
    justify-content: center;
}

/* 按钮样式 - 紧凑版本 */
.action-btn {
    background: linear-gradient(135deg, #4ecdc4 0%, #44b3a7 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.action-btn:hover {
    background: linear-gradient(135deg, #44b3a7 0%, #4ecdc4 100%);
    box-shadow: 0 3px 12px rgba(78, 205, 196, 0.3);
    transform: translateY(-1px);
}

.action-btn.bull {
    background: linear-gradient(135deg, #4caf50 0%, #8bc34a 100%);
}

.action-btn.bull:hover {
    background: linear-gradient(135deg, #8bc34a 0%, #4caf50 100%);
    box-shadow: 0 3px 12px rgba(76, 175, 80, 0.3);
}

.action-btn.bear {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
}

.action-btn.bear:hover {
    background: linear-gradient(135deg, #e57373 0%, #f44336 100%);
    box-shadow: 0 3px 12px rgba(244, 67, 54, 0.3);
}

.action-btn.neutral {
    background: linear-gradient(135deg, #757575 0%, #9e9e9e 100%);
}

.action-btn.neutral:hover {
    background: linear-gradient(135deg, #9e9e9e 0%, #757575 100%);
    box-shadow: 0 3px 12px rgba(117, 117, 117, 0.3);
}

/* 持仓面板 - 紧凑布局 */
.positions-panel .account-summary {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 12px;
}

.balance-info, .pnl-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.balance-info:last-child, .pnl-info:last-child {
    margin-bottom: 0;
}

.balance-info .label, .pnl-info .label {
    color: #ccc;
    font-size: 13px;
}

.balance-info .amount, .pnl-info .amount {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
}

.amount.positive {
    color: #4caf50;
}

.amount.negative {
    color: #f44336;
}

.position-list {
    margin-bottom: 12px;
}

.position-item {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.position-item:hover {
    border-color: #4ecdc4;
    box-shadow: 0 0 8px rgba(78, 205, 196, 0.2);
    transform: translateY(-1px);
}

.position-item.profit {
    border-left: 3px solid #4caf50;
}

.position-item.loss {
    border-left: 3px solid #f44336;
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.position-header .direction {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.position-header .direction.bull {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.position-header .direction.bear {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.position-header .symbol {
    color: #4ecdc4;
    font-weight: 600;
    font-size: 13px;
}

.position-header .amount {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

.position-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 11px;
}

.position-details .entry-price,
.position-details .leverage {
    color: #ccc;
}

.position-details .current-pnl {
    font-weight: 600;
}

.position-details .current-pnl.profit {
    color: #4caf50;
}

.position-details .current-pnl.loss {
    color: #f44336;
}

.position-actions {
    display: flex;
    justify-content: flex-end;
}

.close-btn {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: linear-gradient(135deg, #e57373 0%, #f44336 100%);
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.3);
}

.no-positions, .loading-positions, .error-message {
    text-align: center;
    font-size: 13px;
    padding: 15px;
}

.no-positions {
    color: #666;
}

.loading-positions {
    color: #4ecdc4;
}

.error-message {
    color: #f44336;
}

.position-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.position-actions .action-btn {
    flex: 1;
    font-size: 11px;
    padding: 6px 10px;
}

/* 加载状态和布局偏移优化 */
.loading-placeholder {
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 2s infinite;
    border-radius: 4px;
    opacity: 0.7;
}

@keyframes loading-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 预加载状态优化 */
.current-price .price:empty::before {
    content: "加载中...";
    opacity: 0.7;
}

.current-price .change:empty::before {
    content: "--";
    opacity: 0.7;
}

/* 减少布局偏移的平滑过渡 */
.current-price * {
    transition: all 0.3s ease;
}

/* 骨架屏样式 */
.skeleton {
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 2s infinite;
    opacity: 0.6;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 250px 1fr 300px;
    }
}

@media (max-width: 992px) {
    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }
    
    .left-panel, .right-panel {
        flex-direction: row;
        gap: 20px;
    }
    
    .left-panel > *, .right-panel > * {
        flex: 1;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 10px 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    .main-content {
        padding: 10px;
        gap: 15px;
    }
    
    .left-panel, .right-panel {
        flex-direction: column;
    }
    
    .bet-direction {
        grid-template-columns: 1fr;
    }
}

/* 动画效果 */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 215, 0, 0.8); }
    100% { box-shadow: 0 0 5px rgba(255, 215, 0, 0.5); }
}

.glow {
    animation: glow 2s infinite;
}

/* 风险管理样式 */
.risk-management {
    margin: 15px 0;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.risk-management h4 {
    color: #ffd700;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 600;
}

.risk-row {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.risk-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
    min-width: 120px;
}

.risk-item label {
    color: #cccccc;
    font-size: 12px;
    font-weight: 500;
}

.risk-item select {
    padding: 8px 12px;
    background: #333;
    color: #ffffff;
    border: 1px solid #555;
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.risk-item select:hover {
    border-color: #ffd700;
    background: #444;
}

.risk-item select:focus {
    outline: none;
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.percentage-input {
    display: flex;
    align-items: center;
    background: #333;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.percentage-input:hover {
    border-color: #ffd700;
    background: #444;
}

.percentage-input:focus-within {
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.percentage-input input {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 12px;
    width: 60px;
    outline: none;
}

.percentage-input span {
    color: #ffd700;
    font-size: 12px;
    font-weight: 600;
    margin-left: 4px;
}

/* WebSocket 实时数据样式 */
.ws-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #00ff00;
    border-radius: 50%;
    margin-left: 5px;
    font-size: 8px;
    line-height: 1;
}

/* 实时数据闪烁动画 */
@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

/* WebSocket连接状态指示器 */
.position-item .ws-indicator {
    background: #00ff41;
    box-shadow: 0 0 6px #00ff41;
}

/* 实时更新时的高亮效果 */
.position-item.realtime-update {
    animation: realtimeGlow 0.5s ease-in-out;
    border-left: 3px solid #00ff41;
}

@keyframes realtimeGlow {
    0% { box-shadow: 0 0 0px rgba(0, 255, 65, 0); }
    50% { box-shadow: 0 0 20px rgba(0, 255, 65, 0.6); }
    100% { box-shadow: 0 0 0px rgba(0, 255, 65, 0); }
}

/* 账户余额实时更新效果 */
.balance .amount.realtime-update {
    animation: balanceUpdate 1s ease-in-out;
}

@keyframes balanceUpdate {
    0% { color: #ffffff; }
    50% { color: #00ff41; text-shadow: 0 0 10px #00ff41; }
    100% { color: #ffffff; }
}

/* API 数据指示器 */
.api-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #ffa500;
    border-radius: 50%;
    margin-left: 5px;
    font-size: 8px;
    line-height: 1;
}

.position-item .api-indicator {
    background: #ffa500;
    box-shadow: 0 0 6px #ffa500;
}

/* 交易对刷新按钮 */
.symbol-refresh-btn {
    background: linear-gradient(45deg, #4CAF50, #45a049);
    color: white;
    border: none;
    padding: 5px 8px;
    margin-left: 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    vertical-align: middle;
}

.symbol-refresh-btn:hover {
    background: linear-gradient(45deg, #45a049, #4CAF50);
    transform: rotate(180deg);
}

.symbol-refresh-btn:active {
    transform: scale(0.95) rotate(180deg);
}

/* 交易对选择器增强 */
#symbolSelect {
    min-width: 200px;
    max-width: 250px;
}

#symbolSelect optgroup {
    font-weight: bold;
    color: #ffd700;
    background: #2a2a3e;
}

#symbolSelect option {
    background: #1a1a2e;
    color: #ffffff;
    padding: 5px;
}

#symbolSelect option:hover {
    background: #3a3a5e;
}

/* 可搜索选择器样式 */
/* === 可搜索选择器组件 === */
.searchable-select-container {
    position: relative;
    width: 100%;
    min-width: 200px;
    max-width: 300px;
    z-index: 100;
}

.select-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    user-select: none;
    min-height: 34px;
    box-sizing: border-box;
}

.select-display:hover {
    background: #2a2a3e;
    border-color: #555;
}

.selected-text {
    color: #ffffff;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 20px);
}

.select-arrow {
    color: #ffd700;
    font-size: 12px;
    transition: transform 0.2s ease;
    margin-left: 8px;
    font-weight: bold;
}

/* 下拉菜单 - 默认隐藏 */
.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a2e;
    border: 1px solid #ffd700;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 300px;
    overflow: hidden;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

/* 打开状态 */
.searchable-select-container.is-open .select-display {
    border-color: #ffd700;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.searchable-select-container.is-open .select-arrow {
    transform: rotate(180deg);
}

.searchable-select-container.is-open .select-dropdown {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.search-container {
    position: relative;
    padding: 8px;
    background: #2a2a3e;
    border-bottom: 1px solid #333;
}

.search-box {
    width: 100%;
    padding: 8px 35px 8px 12px;
    background: #1a1a2e;
    border: 1px solid #333;
    border-radius: 4px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.search-box:focus {
    border-color: #ffd700;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

.search-box::placeholder {
    color: #888;
    transition: color 0.2s;
}

.search-box:focus::placeholder {
    color: #666;
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    pointer-events: none;
    transition: color 0.2s;
}

.search-container:hover .search-icon {
    color: #ffd700;
}

.options-container {
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ffd700 #1a1a2e;
}

.options-container::-webkit-scrollbar {
    width: 6px;
}

.options-container::-webkit-scrollbar-track {
    background: #1a1a2e;
}

.options-container::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 3px;
}

.option-group {
    border-bottom: 1px solid #333;
}

.option-group:last-child {
    border-bottom: none;
}

.group-header {
    padding: 8px 12px;
    background: #2a2a3e;
    color: #ffd700;
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #333;
    position: sticky;
    top: 0;
    z-index: 10;
}

.option-item {
    padding: 10px 12px;
    background: #1a1a2e;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.option-item:hover {
    background: #2a2a3e;
    color: #ffd700;
}

.option-item.selected {
    background: #ffd700;
    color: #000;
    font-weight: bold;
}

.option-item.hidden {
    display: none;
}

.no-results {
    padding: 20px;
    text-align: center;
    color: #888;
    font-style: italic;
}

.option-symbol {
    font-weight: bold;
    color: #ffd700;
}

.option-name {
    font-size: 13px;
    color: #ccc;
    margin-left: 8px;
}

.option-item:hover .option-symbol {
    color: #16213e;
}

/* 无结果状态样式 */
.no-results {
    padding: 20px;
    text-align: center;
    color: #888;
    font-style: italic;
    background: #2a2a3e;
    border-radius: 6px;
    margin: 8px;
}

/* 隐藏选项样式 */
.option-item.hidden {
    display: none !important;
}

.option-item:hover .option-name {
    color: #333;
}

.option-item.selected .option-symbol,
.option-item.selected .option-name {
    color: #000;
}

/* cache buster 1752205834 */

/* BTC市场概览刷新按钮 */
.btc-refresh-btn {
    background: transparent;
    border: 1px solid #4ecdc4;
    color: #4ecdc4;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.btc-refresh-btn:hover {
    background: #4ecdc4;
    color: #1a1a2e;
}

.btc-refresh-btn:active {
    transform: scale(0.95);
}

.btc-refresh-btn i {
    animation: none;
}

.btc-refresh-btn:active i {
    animation: spin 0.5s linear;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 实时价格变化动画效果 */
.price.realtime-up {
    color: #00ff88 !important;
    animation: priceFlashUp 1s ease-out;
    transform: scale(1.05);
}

.price.realtime-down {
    color: #ff4757 !important;
    animation: priceFlashDown 1s ease-out;
    transform: scale(1.05);
}

.price.realtime-stable {
    animation: priceStable 0.5s ease-out;
}

@keyframes priceFlashUp {
    0% { 
        background: rgba(0, 255, 136, 0.3);
        box-shadow: 0 0 20px rgba(0, 255, 136, 0.5);
        transform: scale(1.08);
    }
    100% { 
        background: transparent;
        box-shadow: none;
        transform: scale(1);
    }
}

@keyframes priceFlashDown {
    0% { 
        background: rgba(255, 71, 87, 0.3);
        box-shadow: 0 0 20px rgba(255, 71, 87, 0.5);
        transform: scale(1.08);
    }
    100% { 
        background: transparent;
        box-shadow: none;
        transform: scale(1);
    }
}

@keyframes priceStable {
    0% { 
        background: rgba(255, 255, 255, 0.1);
        transform: scale(1.02);
    }
    100% { 
        background: transparent;
        transform: scale(1);
    }
}

/* 实时数据指示器 */
.market-overview h3::after {
    content: "🔴";
    font-size: 8px;
    margin-left: 8px;
    animation: realtimeBlink 2s infinite;
    opacity: 0.7;
}

@keyframes realtimeBlink {
    0%, 50% { opacity: 0.7; }
    25%, 75% { opacity: 1; color: #ff4757; }
}

/* BTC价格实时更新指示器 */
.current-price {
    position: relative;
}

.current-price::before {
    content: "";
    position: absolute;
    top: -2px;
    right: -2px;
    width: 6px;
    height: 6px;
    background: #00ff88;
    border-radius: 50%;
    animation: livePulse 2s infinite;
}

@keyframes livePulse {
    0% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.5;
        transform: scale(1.3);
    }
    100% { 
        opacity: 1;
        transform: scale(1);
    }
}

/* 价格设置按钮 */
.price-settings-btn {
    background: transparent;
    border: 1px solid #ffc107;
    color: #ffc107;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.price-settings-btn:hover {
    background: #ffc107;
    color: #1a1a2e;
}

.price-settings-btn:active {
    transform: scale(0.95);
}

/* 成交量趋势箭头样式 */
.volume-trend {
    margin-left: 5px;
    font-weight: bold;
    font-size: 14px;
    display: inline-block;
    animation: trendPulse 2s ease-in-out infinite;
}

.volume-trend.up {
    color: #00ff88;
}

.volume-trend.down {
    color: #ff6b6b;
}

.volume-trend.stable {
    color: #ffd700;
}

@keyframes trendPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* 涨跌幅排行榜样式 */
.ranking-section {
    margin: 15px 0;
}

.ranking-title {
    font-size: 14px;
    color: #fff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.up-icon {
    font-size: 16px;
}

.down-icon {
    font-size: 16px;
}

.ranking-list {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 4px 0;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.ranking-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(2px);
}

.ranking-item.gainer {
    border-left-color: #00ff88;
}

.ranking-item.loser {
    border-left-color: #ff6b6b;
}

.ranking-symbol {
    font-weight: bold;
    color: #4ecdc4;
    font-size: 13px;
    cursor: pointer;
}

.ranking-symbol:hover {
    color: #00ff88;
    text-decoration: underline;
}

.ranking-change {
    font-weight: bold;
    font-size: 13px;
}

.ranking-change.positive {
    color: #00ff88;
}

.ranking-change.negative {
    color: #ff6b6b;
}

.ranking-rank {
    font-size: 12px;
    color: #888;
    margin-right: 8px;
    min-width: 20px;
}

.ranking-details {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ranking-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    color: #666;
    text-align: center;
}

.loading-ranking {
    text-align: center;
    color: #888;
    padding: 20px;
    font-size: 12px;
}

/* 排行榜动画效果 */
.ranking-item {
    animation: slideInLeft 0.3s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 订单管理面板样式 */
.orders-panel {
    background: linear-gradient(145deg, #1e1e2e 0%, #2a2a3e 100%);
    border-radius: 15px;
    padding: 20px;
    border: 1px solid #333;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.orders-panel h3 {
    color: #ffd700;
    margin-bottom: 20px;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.orders-panel h3 i {
    font-size: 16px;
}

/* 订单管理组件内部样式 */
.order-management {
    width: 100%;
}

.order-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 6px 12px;
    background: #333;
    color: #ccc;
    border: 1px solid #555;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #444;
    color: #fff;
}

.filter-btn.active {
    background: #ffd700;
    color: #000;
    border-color: #ffd700;
}

.order-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 10px;
    margin-bottom: 15px;
}

.stat-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px;
    text-align: center;
}

.stat-item .label {
    font-size: 11px;
    color: #ccc;
    margin-bottom: 2px;
}

.stat-item .value {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}

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

.order-item {
    background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
    border: 1px solid #333;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.order-item:hover {
    border-color: #4ecdc4;
    box-shadow: 0 0 8px rgba(78, 205, 196, 0.2);
    transform: translateY(-1px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.order-symbol {
    color: #4ecdc4;
    font-weight: 600;
    font-size: 13px;
}

.order-side {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.order-side.BUY {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.order-side.SELL {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.order-status {
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
}

.order-status.NEW {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
}

.order-status.FILLED {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
}

.order-status.CANCELED {
    background: rgba(117, 117, 117, 0.2);
    color: #757575;
}

.order-status.REJECTED {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.order-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 11px;
    margin-bottom: 8px;
}

.order-detail {
    display: flex;
    justify-content: space-between;
}

.order-detail .label {
    color: #ccc;
}

.order-detail .value {
    color: #fff;
    font-weight: 600;
}

.order-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
}

.cancel-btn {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: linear-gradient(135deg, #e57373 0%, #f44336 100%);
    box-shadow: 0 2px 6px rgba(244, 67, 54, 0.3);
}

.cancel-btn:disabled {
    background: #555;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}

.no-orders, .loading-orders, .error-orders {
    text-align: center;
    font-size: 13px;
    padding: 20px;
    color: #666;
}

.loading-orders {
    color: #4ecdc4;
}

.error-orders {
    color: #f44336;
}

.order-management-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.refresh-orders-btn {
    background: linear-gradient(135deg, #4ecdc4 0%, #44b3a7 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.refresh-orders-btn:hover {
    background: linear-gradient(135deg, #44b3a7 0%, #4ecdc4 100%);
    box-shadow: 0 3px 12px rgba(78, 205, 196, 0.3);
    transform: translateY(-1px);
}

.danger-btn {
    background: linear-gradient(135deg, #f44336 0%, #e57373 100%);
}

.danger-btn:hover {
    background: linear-gradient(135deg, #e57373 0%, #f44336 100%);
    box-shadow: 0 3px 12px rgba(244, 67, 54, 0.3);
}

/* ===== 增强排行榜样式 ===== */
.ranking-item.enhanced {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 1px solid #333;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ranking-item.enhanced:hover {
    background: linear-gradient(135deg, #2a2a3e 0%, #26314e 100%);
    border-color: #ffd700;
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.2);
    transform: translateY(-2px);
}

.ranking-item.enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg, #ffd700 0%, #ffed4e 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ranking-item.enhanced:hover::before {
    opacity: 1;
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.ranking-rank {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    color: #ffd700;
    font-size: 14px;
    min-width: 30px;
}

.ranking-symbol-info {
    flex: 1;
    margin-left: 12px;
}

.ranking-symbol {
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 2px;
}

.ranking-price {
    font-family: 'Roboto Mono', monospace;
    font-size: 12px;
    color: #cccccc;
}

.ranking-change {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 4px;
    min-width: 70px;
    text-align: center;
}

.ranking-change.positive {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.ranking-change.negative {
    color: #F44336;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
}

.ranking-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
}

.ranking-metrics {
    display: flex;
    gap: 12px;
}

.ranking-metrics .metric {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #cccccc;
    font-family: 'Roboto Mono', monospace;
}

.ranking-metrics .metric i {
    font-size: 10px;
}

.ranking-indicators {
    display: flex;
    gap: 8px;
    align-items: center;
}

.risk-indicator {
    font-family: 'Orbitron', monospace;
    font-weight: 600;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid currentColor;
}

.grade-indicator {
    font-family: 'Orbitron', monospace;
    font-weight: 700;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid currentColor;
}

.liquidity-score {
    font-family: 'Roboto Mono', monospace;
    font-size: 10px;
    color: #4FC3F7;
    display: flex;
    align-items: center;
    gap: 2px;
}

/* 排行榜容器增强 */
#top-gainers, #top-losers {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

#top-gainers::-webkit-scrollbar, #top-losers::-webkit-scrollbar {
    width: 4px;
}

#top-gainers::-webkit-scrollbar-track, #top-losers::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

#top-gainers::-webkit-scrollbar-thumb, #top-losers::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 2px;
}

#top-gainers::-webkit-scrollbar-thumb:hover, #top-losers::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #ffed4e 0%, #ffd700 100%);
}

/* 加载状态和错误状态样式 */
.loading-ranking, .ranking-error {
    text-align: center;
    padding: 20px;
    color: #cccccc;
    font-style: italic;
}

.ranking-error {
    color: #F44336;
}

/* 加载指示器样式 */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin: 10px 0;
}

.loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* 错误消息样式 */
#market-error-message {
    display: none;
    background: #ff4757;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
    margin: 5px 0;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 排行榜错误状态样式 */
.ranking-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #f8f9fa;
    border: 1px dashed #dee2e6;
    border-radius: 8px;
    text-align: center;
    color: #6c757d;
}

.ranking-error .error-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.ranking-error .error-message {
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 500;
}

.retry-button {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.retry-button:hover {
    background: #0056b3;
}

.retry-button:active {
    transform: translateY(1px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .ranking-item.enhanced {
        padding: 10px;
    }
    
    .ranking-header {
        margin-bottom: 6px;
    }
    
    .ranking-symbol {
        font-size: 14px;
    }
    
    .ranking-change {
        font-size: 12px;
        min-width: 60px;
    }
    
    .ranking-metrics {
        gap: 8px;
    }
    
    .ranking-indicators {
        gap: 6px;
    }
    
    .ranking-metrics .metric {
        font-size: 10px;
    }
    
    .loading-indicator {
        padding: 15px;
    }
    
    .loading-spinner {
        width: 20px;
        height: 20px;
    }
    
    .ranking-error {
        padding: 15px;
    }
}
