/* A股智能交易系统 - 样式 */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #e0e0e0;
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* 头部 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    margin-bottom: 20px;
}

.header h1 {
    font-size: 24px;
    color: #00d9ff;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-refresh {
    background: #00d9ff;
    color: #1a1a2e;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s;
}

.btn-refresh:hover {
    background: #00b8d9;
    transform: scale(1.05);
}

/* 概览卡片 */
.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    border-color: #00d9ff;
}

.card-title {
    font-size: 14px;
    color: #888;
    margin-bottom: 10px;
}

.card-value {
    font-size: 32px;
    font-weight: bold;
    color: #00d9ff;
}

.card:nth-child(2) .card-value { color: #4caf50; }
.card:nth-child(3) .card-value { color: #ff9800; }
.card:nth-child(4) .card-value { color: #e91e63; }

/* 主内容 */
.main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.panel h2 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #fff;
    border-bottom: 2px solid #00d9ff;
    padding-bottom: 10px;
}

/* 分析面板 */
.analyze-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.analyze-form input {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.3);
    color: #fff;
    font-size: 16px;
}

.analyze-form input:focus {
    outline: none;
    border-color: #00d9ff;
}

.btn-primary {
    background: linear-gradient(135deg, #00d9ff, #00b8d9);
    color: #1a1a2e;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 217, 255, 0.3);
}

/* 分析结果 */
.analysis-result {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    min-height: 200px;
}

.signal-buy { color: #4caf50; }
.signal-sell { color: #f44336; }
.signal-hold { color: #ff9800; }

.score-bar {
    height: 10px;
    background: #333;
    border-radius: 5px;
    margin: 15px 0;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: linear-gradient(90deg, #f44336, #ff9800, #4caf50);
    transition: width 0.5s;
}

/* 信号列表 */
.signals-list {
    max-height: 300px;
    overflow-y: auto;
}

.signal-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    margin-bottom: 10px;
    border-left: 4px solid #00d9ff;
}

.signal-item.buy { border-left-color: #4caf50; }
.signal-item.sell { border-left-color: #f44336; }
.signal-item.hold { border-left-color: #ff9800; }

.signal-symbol {
    font-weight: bold;
    font-size: 16px;
}

.signal-info {
    text-align: right;
}

/* 图表行 */
.charts-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

/* 预测列表 */
.predictions-list {
    max-height: 250px;
    overflow-y: auto;
}

.prediction-item {
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 14px;
}

/* 决策路径 */
.decision-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.flow-step {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    border-radius: 10px;
    flex: 1;
    min-width: 180px;
}

.step-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #00d9ff, #00b8d9);
    color: #1a1a2e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
}

.step-content h3 {
    font-size: 14px;
    margin-bottom: 5px;
}

.step-content p {
    font-size: 12px;
    color: #888;
}

.flow-arrow {
    font-size: 24px;
    color: #00d9ff;
}

/* 执行表格 */
.execution-table {
    width: 100%;
    border-collapse: collapse;
}

.execution-table th,
.execution-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.execution-table th {
    color: #00d9ff;
    font-weight: 600;
}

.execution-table tr:hover {
    background: rgba(0, 0, 0, 0.2);
}

.status-success { color: #4caf50; }
.status-fail { color: #f44336; }
.status-pending { color: #ff9800; }

/* 占位符 */
.placeholder {
    color: #666;
    text-align: center;
    padding: 40px;
}

/* 新闻列表 */
.news-list {
    max-height: 250px;
    overflow-y: auto;
}

.news-item {
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 3px solid #00d9ff;
}

.news-item.positive { border-left-color: #4caf50; }
.news-item.negative { border-left-color: #f44336; }

.news-title {
    font-size: 14px;
    margin-bottom: 5px;
    line-height: 1.4;
}

.news-meta {
    font-size: 12px;
    color: #888;
}

.news-source {
    color: #00d9ff;
}

/* 热点题材 */
.hot-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.topic-tag {
    padding: 8px 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.topic-tag.up { background: rgba(76, 175, 80, 0.2); border: 1px solid #4caf50; }
.topic-tag.down { background: rgba(244, 67, 54, 0.2); border: 1px solid #f44336; }

.topic-change {
    font-weight: bold;
}

.topic-change.positive { color: #4caf50; }
.topic-change.negative { color: #f44336; }

/* 新闻情感指示器 */
.sentiment-indicator {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 12px;
    margin-left: 10px;
}

.sentiment-bullish { background: #4caf50; color: #fff; }
.sentiment-bearish { background: #f44336; color: #fff; }
.sentiment-neutral { background: #888; color: #fff; }

/* 响应式 */
@media (max-width: 1000px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .main-content {
        grid-template-columns: 1fr;
    }
    
    .charts-row {
        grid-template-columns: 1fr;
    }
    
    .decision-flow {
        flex-direction: column;
    }
    
    .flow-arrow {
        transform: rotate(90deg);
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #00d9ff;
    animation: spin 1s ease-in-out infinite;
}

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

/* 指标展示 */
.indicators-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.indicator-item {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 6px;
    text-align: center;
}

.indicator-name {
    font-size: 12px;
    color: #888;
}

.indicator-value {
    font-size: 16px;
    font-weight: bold;
    margin-top: 5px;
}
