/* ===== 大盘行情页面样式 ===== */
[v-cloak] { display: none; }

/* 头部 */
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
}
.header-nav { display: flex; gap: 20px; }
.nav-link {
    color: rgba(255,255,255,0.8); text-decoration: none; font-size: 14px;
    padding: 5px 12px; border-radius: 16px; transition: background .2s;
}
.nav-link:hover, .nav-link.active { background: rgba(255,255,255,.2); color: #fff; }

/* 主内容 */
.main-content { flex: 1; padding: 20px 0 40px; }

/* 通用颜色 */
.up   { color: #E03131; }  /* 涨-红色 */
.down { color: #2F9E44; }  /* 跌-绿色 */
.flat { color: #6B7280; }
.flat-color { color: #333333; }  /* 平盘-黑色 */

/* 小节标题 */
.section-title {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 16px; font-weight: 600; color: #111827;
    margin-bottom: 12px; padding: 0 2px;
}
.update-badge {
    font-size: 12px; font-weight: 400; color: #9CA3AF;
}

/* 指数卡片 */
.indices-grid {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 12px; margin-bottom: 20px;
}
.index-card {
    background: #fff; border-radius: 10px;
    padding: 16px 16px 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    border-top: 3px solid #E5E7EB;
    cursor: default;
}
.index-card.index-up   { border-top-color: #E03131; }
.index-card.index-down { border-top-color: #2F9E44; }

.index-name  { font-size: 13px; color: #6B7280; margin-bottom: 4px; }
.index-price { font-size: 24px; font-weight: 700; color: #111827; }
.index-card.index-up   .index-price { color: #E03131; }
.index-card.index-down .index-price { color: #2F9E44; }
.index-change { display: flex; gap: 10px; font-size: 13px; margin-top: 2px; }
.index-card.index-up   .index-change { color: #E03131; }
.index-card.index-down .index-change { color: #2F9E44; }
.index-pct { font-weight: 600; }

.mini-chart {
    display: block; width: 100%; height: 40px;
    margin-top: 8px;
}

/* 两列布局 */
.two-col-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 16px; margin-bottom: 16px;
}

/* 通用面板 */
.panel {
    background: #fff; border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,.07);
    padding: 16px; margin-bottom: 16px;
}
.panel-title {
    font-size: 15px; font-weight: 600; color: #111827;
    margin-bottom: 14px;
}
.panel-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.panel-header .panel-title { margin-bottom: 0; }

/* Tab */
.tab-group { display: flex; gap: 4px; }
.tab-item {
    padding: 4px 12px; font-size: 13px; border-radius: 16px;
    cursor: pointer; color: #6B7280; transition: all .15s;
    border: 1px solid transparent;
}
.tab-item:hover { background: #F3F4F6; }
.tab-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff; border-color: transparent;
}

/* 涨跌家数 */
.breadth-list { display: flex; flex-direction: column; gap: 12px; }
.breadth-row  { display: flex; align-items: center; gap: 10px; }
.breadth-name { font-size: 13px; color: #374151; min-width: 52px; }
.breadth-bar-wrap {
    flex: 1; height: 8px; border-radius: 4px;
    background: #F3F4F6; overflow: hidden;
    display: flex;
}
.breadth-bar { height: 100%; transition: width .4s; }
.up-bar   { background: #E03131; border-radius: 4px 0 0 4px; }
.down-bar { background: #2F9E44; }
.breadth-nums { display: flex; gap: 8px; font-size: 12px; min-width: 130px; }
.num-up   { color: #E03131; font-weight: 600; }
.num-flat { color: #9CA3AF; }
.num-down { color: #2F9E44; font-weight: 600; }

/* 情绪仪表盘 */
.sentiment-wrap  { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sentiment-gauge { display: flex; justify-content: center; }
.sentiment-score { text-align: center; }
.score-num  { font-size: 36px; font-weight: 700; }
.score-label { font-size: 14px; font-weight: 500; margin-top: 2px; }
.sentiment-detail { width: 100%; }
.sd-row {
    display: flex; justify-content: space-between;
    font-size: 13px; padding: 5px 0;
    border-bottom: 1px solid #F3F4F6;
    color: #374151;
}
.sd-row:last-child { border-bottom: none; }

/* 涨跌幅榜 */
.rank-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.rank-col-title {
    font-size: 14px; font-weight: 600; margin-bottom: 10px;
    padding-bottom: 8px; border-bottom: 2px solid #F3F4F6;
}
.rank-col-title.up   { border-bottom-color: #FFCDD2; }
.rank-col-title.down { border-bottom-color: #C8E6C9; }
.rank-loading { text-align: center; color: #9CA3AF; padding: 20px; font-size: 13px; }

.rank-table { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 13px; 
    background: #ffffff;  /* 白色背景 */
}
.rank-table th {
    padding: 6px 8px; text-align: left; color: #9CA3AF;
    font-weight: 500; font-size: 12px; border-bottom: 1px solid #F3F4F6;
    background: #ffffff;  /* 白色背景 */
}
.rank-table td { 
    padding: 7px 8px; 
    border-bottom: 1px solid #FAFAFA; 
    background: #ffffff;  /* 白色背景 */
    color: #333333;  /* 保持字体颜色不变 */
}
.rank-table tr:hover { background: #F9FAFB; cursor: pointer; }
.rank-num  { color: #9CA3AF; font-size: 12px; width: 24px; }
.rank-name { 
    font-weight: 500; 
    color: #111827; 
    max-width: 80px; 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
}

.pct-badge {
    display: inline-block; padding: 2px 8px;
    border-radius: 4px; font-size: 12px; font-weight: 600;
}
.up-badge   { background: #FFEBEE; color: #C62828; }
.down-badge { background: #E8F5E9; color: #1B5E20; }

/* 更多链接 - 每行末尾 */
.more-link {
    display: inline-block;
    padding: 3px 8px;
    color: #1890ff;
    text-decoration: none;
    font-size: 12px;
    border: 1px solid #1890ff;
    border-radius: 4px;
    transition: all 0.2s;
    cursor: pointer;
}
.more-link:hover {
    background: #1890ff;
    color: #ffffff;
}

.rank-more {
    text-align: right; font-size: 12px; color: #667eea;
    margin-top: 8px; cursor: pointer;
}
.rank-more:hover { text-decoration: underline; }

/* 概念板块 */
.concept-list { display: flex; flex-direction: column; gap: 2px; }
.concept-row {
    display: flex; align-items: center; gap: 8px;
    padding: 7px 4px; border-bottom: 1px solid #F9FAFB;
    font-size: 13px; cursor: pointer;
}
.concept-row:hover { background: #F9FAFB; }
.concept-row:last-child { border-bottom: none; }
.concept-rank  { color: #9CA3AF; font-size: 12px; min-width: 18px; }
.concept-name  { flex: 1; font-weight: 500; color: #111827; }
.concept-leader { font-size: 12px; min-width: 56px; }
.concept-pct { margin-left: auto; }

/* 响应式 */
@media (max-width: 1024px) {
    .indices-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .indices-grid { grid-template-columns: repeat(2, 1fr); }
    .two-col-grid { grid-template-columns: 1fr; }
    .rank-two-col { grid-template-columns: 1fr; }
    .header-nav { display: none; }
}

/* ===== 成交量数据 + 趋势图 ===== */
.volume-wrap {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

.volume-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.volume-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #F9FAFB;
    border-radius: 6px;
    font-size: 14px;
}

.volume-item.total {
    background: #EFF6FF;
    border: 1px solid #BFDBFE;
    font-weight: 600;
}

.vol-name {
    color: #6B7280;
}

.vol-value {
    color: #111827;
    font-weight: 500;
    font-size: 15px;
}

.volume-item.total .vol-value {
    color: #1E3A8A;
    font-size: 16px;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.chart-container {
    background: #F9FAFB;
    border-radius: 8px;
    padding: 15px;
}

.chart-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 10px;
    text-align: center;
}

#volumeChart, #marginChart {
    display: block;
    width: 100% !important;
    height: auto !important;
}

@media (max-width: 1024px) {
    .volume-wrap {
        grid-template-columns: 1fr;
    }
    .charts-grid {
        grid-template-columns: 1fr;
    }
}
