/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f7fa;
}

/* 布局容器 */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 240px;
    background-color: #2c3e50;
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h1 {
    font-size: 24px;
    margin-bottom: 5px;
    color: #3498db;
}

.sidebar-header p {
    font-size: 14px;
    color: #bdc3c7;
}

.sidebar-nav {
    flex-grow: 1;
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    padding: 0;
    cursor: pointer;
    transition: all 0.3s;
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    width: 100%;
}

.sidebar-nav li:hover {
    background-color: #34495e;
}

.sidebar-nav li.active {
    background-color: #3498db;
    border-left: 4px solid #2980b9;
}

.sidebar-nav li.active a {
    padding-left: 16px;
}

.sidebar-nav li i {
    margin-right: 10px;
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 15px;
    text-align: center;
    font-size: 12px;
    color: #95a5a6;
    border-top: 1px solid #34495e;
}

/* 主内容区样式 */
.main-content {
    flex-grow: 1;
    margin-left: 240px;
    padding: 20px;
    width: calc(100% - 240px);
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.header-title h2 {
    font-size: 24px;
    color: #2c3e50;
}

.user-info {
    color: #7f8c8d;
    font-size: 14px;
}

/* 卡片样式 */
.card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #f9f9f9;
}

.card-header h3 {
    font-size: 18px;
    color: #2c3e50;
}

.card-body {
    padding: 20px;
}

/* 表单元素样式 */
.filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.select-input, .date-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

.select-input:focus, .date-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
    align-self: flex-end;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover {
    background-color: #2980b9;
}

/* 图表容器样式 */
.chart-container {
    width: 100%;
    margin: 15px 0;
}

.chart-placeholder {
    width: 100%;
    height: 400px;
    background-color: #f9f9f9;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.chart-image, .backtest-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.backtest-image-container {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

.backtest-description {
    margin-top: 20px;
}

.backtest-description h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.backtest-description p {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* 使用说明样式 */
.instruction-content {
    line-height: 1.7;
}

.instruction-content p {
    margin-bottom: 15px;
}

.highlight {
    padding: 2px 5px;
    border-radius: 3px;
    font-weight: 500;
}

.highlight.warning {
    background-color: #ffe0e0;
    color: #d35400;
}

.highlight.success {
    background-color: #e0ffe0;
    color: #27ae60;
}

.info-box {
    background-color: #f0f8ff;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin-top: 20px;
    border-radius: 4px;
}

.info-box h4 {
    margin-bottom: 10px;
    color: #2980b9;
}

/* 回测结果样式 */
.results-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.result-item {
    flex: 1;
    min-width: 150px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
    text-align: center;
}

.result-item h4 {
    font-size: 14px;
    color: #7f8c8d;
    margin-bottom: 8px;
}

.result-item .value {
    font-size: 22px;
    font-weight: 600;
}

.positive {
    color: #27ae60;
}

.negative {
    color: #e74c3c;
}

/* 市场状态样式 */
.market-status {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.status-item {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 6px;
}

.status-item h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.status-item .value {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
}

.status-item .change {
    font-size: 14px;
    padding: 2px 5px;
    border-radius: 3px;
}

.status-indicator {
    display: flex;
    align-items: center;
    margin-top: 10px;
}

.indicator-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-indicator.warning .indicator-dot {
    background-color: #e74c3c;
}

.status-indicator.success .indicator-dot {
    background-color: #27ae60;
}

.status-indicator.neutral .indicator-dot {
    background-color: #f39c12;
}

/* 操作建议样式 */
.suggestions-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.suggestion-item {
    border: 1px solid #eee;
    border-radius: 6px;
    overflow: hidden;
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: #f9f9f9;
    border-bottom: 1px solid #eee;
}

.suggestion-header h4 {
    font-size: 16px;
    color: #2c3e50;
}

.suggestion-tag {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.suggestion-tag.warning {
    background-color: #ffe0e0;
    color: #d35400;
}

.suggestion-tag.success {
    background-color: #e0ffe0;
    color: #27ae60;
}

.suggestion-tag.neutral {
    background-color: #f8f9fa;
    color: #7f8c8d;
}

.suggestion-content {
    padding: 15px;
}

.suggestion-content p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.suggestion-content p:last-child {
    margin-bottom: 0;
}

/* 热点分析样式 */
.hot-sectors {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.sector-item {
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 6px;
    background-color: #fff;
}

.sector-item h4 {
    margin-bottom: 10px;
    color: #2c3e50;
}

.sector-stats {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.sector-change {
    margin-right: 10px;
    font-weight: 600;
    font-size: 14px;
    padding: 2px 5px;
    border-radius: 3px;
}

.progress-bar {
    flex-grow: 1;
    height: 6px;
    background-color: #eee;
    border-radius: 3px;
    margin-right: 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background-color: #3498db;
    border-radius: 3px;
}

.strength {
    font-size: 12px;
    color: #7f8c8d;
}

/* 响应式布局 */
@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        width: calc(100% - 200px);
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .sidebar-nav {
        padding: 10px 0;
    }
    
    .sidebar-nav ul {
        display: flex;
        justify-content: space-around;
    }
    
    .sidebar-nav li a {
        flex-direction: column;
        padding: 10px;
        text-align: center;
    }
    
    .sidebar-nav li i {
        margin-right: 0;
        margin-bottom: 5px;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    .filter-container {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .results-summary {
        flex-direction: column;
    }
    
    .result-item {
        width: 100%;
    }
    
    .market-status {
        flex-direction: column;
    }
    
    .hot-sectors {
        grid-template-columns: 1fr;
    }
}

/* 添加到现有的styles.css文件中 */

/* 指标选择器样式 */
.index-selector {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
  }
  
  .index-selector select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ddd;
    min-width: 200px;
  }
  
  .index-selector button {
    padding: 8px 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
  }
  
  .index-selector button:hover {
    background-color: #45a049;
  }
  
  /* 指标部分样式 */
  .indicator-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  
  @media (max-width: 768px) {
    .indicator-sections {
      grid-template-columns: 1fr;
    }
  }
  
  .indicator-chart, .indicator-data {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  .chart-container {
    width: 100%;
    overflow: hidden;
  }
  
  .chart-container img {
    width: 100%;
    height: auto;
    display: block;
  }
  
  .data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }
  
  .data-item {
    background-color: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  }
  
  .data-item h4 {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 0.9em;
  }
  
  .data-item p {
    margin: 0;
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
  }
  