<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>资金与行业估值大屏</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <link rel="stylesheet" href="/static/css/bootstrap.min.css">
    <style>
        html, body { 
            height: 100%; 
            padding-left: 5px;
            padding-right: 5px;
            padding-top: 5px;
        }
        body { 
            background: #f7f7fa; 
            color: #222; 
            min-height: 100vh; 
        }
        .container-fluid { 
            min-height: 100vh; 
            padding: 0; 
        }
        .row.d-flex { 
            height: 33vh; 
            margin-left: 0; 
            margin-right: 0; 
        }
        .row.d-flex2 { 
            height: 64vh; 
            margin-left: 0; 
            margin-right: 0; 
        }
        .col-3.d-flex {
            padding-left: 2px; 
            padding-right: 2px;
            border: 1.5px solid #c7c6c6;
            border-radius: 8px;
            box-sizing: border-box;
        }
        .chart-box {
            background: #fff;
            border-radius: 8px;
            padding: 4px 4px 2px 4px;
            box-shadow: 0 2px 8px #e0e0e0;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
        }
        .tight-box { 
            margin: 0; 
            padding: 2px 2px 1px 2px; 
        }
        .chart-title { 
            font-size: 0.95rem; 
            color: #333; 
            margin-bottom: 2px; 
            text-align: center; 
        }
        .small-title { 
            font-size: 0.85rem; 
            margin-bottom: 2px; 
            margin-top: 2px; 
            text-align: center; 
            color: #666;
        }
        .chart-container { 
            width: 100%; 
            flex: 1 1 0; 
            min-height: 0; 
            background: #f9f9fb; 
        }

        /* 平板响应式 */
        @media (max-width: 1200px) {
            .row.d-flex { height: auto; }
            .chart-box { height: auto; min-height: 180px; }
        }

        /* 移动端响应式 */
        @media (max-width: 768px) {
            html, body {
                padding: 2px;
            }
            .container-fluid {
                padding: 0;
            }
            .row.d-flex, .row.d-flex2 {
                flex-direction: column !important;
                height: auto !important;
                margin: 0;
            }
            .col-3.d-flex {
                width: 100% !important;
                max-width: 100% !important;
                min-width: 0 !important;
                margin-bottom: 8px;
                padding: 1px 0;
            }
            .chart-box, .tight-box {
                min-height: 200px;
                height: auto !important;
                padding: 2px;
            }
            .chart-title {
                font-size: 0.9rem;
                margin-bottom: 1px;
            }
            .small-title {
                font-size: 0.8rem;
                margin-bottom: 1px;
                margin-top: 1px;
            }
            .chart-container {
                min-height: 180px;
            }
            /* 调整概念卡片的布局 */
            .tight-box .chart-container {
                min-height: 150px;
                min-width: 0;
                width: 100%;
                box-sizing: border-box;
            }
            /* 优化图表间距 */
            .tight-box .chart-title {
                padding: 1px 0;
            }
        }

        /* 小屏手机响应式 */
        @media (max-width: 480px) {
            .chart-box, .tight-box {
                min-height: 180px;
            }
            .chart-container {
                min-height: 160px;
            }
            .tight-box .chart-container {
                min-height: 130px;
            }
            .chart-title {
                font-size: 0.85rem;
            }
            .small-title {
                font-size: 0.75rem;
            }
        }
    </style>
</head>
<body>
<div class="container-fluid">
    
    <div class="row d-flex">
        <div class="col-3 d-flex">
            <div class="chart-box w-100">
                <button id="fullscreen-btn" style="position:absolute;top:0;left:0;width:100%;height:100%;opacity:0;cursor:pointer;border:none;background:transparent;"></button>
                <div class="chart-title">北向资金流向(实时数据)</div>
                <div id="northChart" class="chart-container"></div>
            </div>
        </div>
        <div class="col-3 d-flex">
            <div class="chart-box w-100">
                <div class="chart-title">南向资金流向(实时数据)</div>
                <div id="southChart" class="chart-container"></div>
            </div>
        </div>
        <div class="col-3 d-flex">
            <div class="chart-box w-100">
                <div class="chart-title">融资融券数据监控</div>
                <div id="rzrqChart" class="chart-container"></div>
            </div>
        </div>
        <div class="col-3 d-flex">
            <div class="chart-box w-100">
                <div class="chart-title">市场恐贪指数</div>
                <div id="fearGreedChart" class="chart-container"></div>
            </div>
        </div>
    </div>
    <div class="row d-flex2">
        <div class="col-3 d-flex">
            <div class="chart-box tight-box w-100">
                <div class="chart-title small-title">先进封装-历史PE分析</div>
                <div id="peChart_xjfz" class="chart-container"></div>
                <div class="chart-title small-title" style="margin-top:2px;">先进封装-拥挤度</div>
                <div id="crowdChart_xjfz" class="chart-container"></div>
            </div>
        </div>
        <div class="col-3 d-flex">
            <div class="chart-box tight-box w-100">
                <div class="chart-title small-title">芯片-历史PE分析</div>
                <div id="peChart_xp" class="chart-container"></div>
                <div class="chart-title small-title" style="margin-top:2px;">芯片-拥挤度</div>
                <div id="crowdChart_xp" class="chart-container"></div>
            </div>
        </div>
        <div class="col-3 d-flex">
            <div class="chart-box tight-box w-100">
                <div class="chart-title small-title">消费电子概念-历史PE分析</div>
                <div id="peChart_xfdz" class="chart-container"></div>
                <div class="chart-title small-title" style="margin-top:2px;">消费电子概念-拥挤度</div>
                <div id="crowdChart_xfdz" class="chart-container"></div>
            </div>
        </div>
        <div class="col-3 d-flex">
            <div class="chart-box tight-box w-100">
                <div class="chart-title small-title">机器人概念-历史PE分析</div>
                <div id="peChart_jqr" class="chart-container"></div>
                <div class="chart-title small-title" style="margin-top:2px;">机器人概念-拥挤度</div>
                <div id="crowdChart_jqr" class="chart-container"></div>
            </div>
        </div>
    </div>
</div>
<script src="/static/js/echarts.min.js"></script>
<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/bigscreen.js"></script>
</body>
</html>
