/* PDF专用样式 - 隐藏导航和footer */
@media print {

    /* 隐藏浏览器默认页眉页脚 */
    @page {
        margin-top: 60px;
        margin-bottom: 20px;
        margin-left: 20px;
        margin-right: 20px;
        size: A4;
    }

    /* 隐藏导航栏 */
    nav,
    .navbar,
    .navigation,
    header,
    .header {
        display: none !important;
    }

    /* 隐藏footer */
    footer,
    .footer {
        display: none !important;
    }

    /* 隐藏其他不需要的元素 */
    .sidebar,
    .menu,
    .btn,
    button,
    .download-btn,
    #downloadPdfBtn {
        display: none !important;
    }

    /* 页面基本设置 */
    body {
        margin: 0;
        padding: 60px 20px 20px 20px !important;
        background: white !important;
        color: black !important;
        font-size: 12pt;
        line-height: 1.4;
    }

    /* 容器设置 */
    .container,
    .main-content {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 10mm !important;
        padding-top: 80px !important;
        box-shadow: none !important;
    }

    /* 首页内容额外上边距 */
    .hero-section,
    .main-hero {
        margin-top: 60px !important;
        padding-top: 40px !important;
    }

    /* 图表容器优化 */
    .chart-container,
    .echarts-container {
        width: 100% !important;
        height: auto !important;
        min-height: 300px !important;
        page-break-inside: avoid;
        margin-bottom: 20px;
    }

    /* 标题样式 - 参考web端设计优化 */
    h1 {
        color: #1e40af !important; /* 蓝色主题 */
        font-size: 28pt !important;
        font-weight: 900 !important; /* font-black */
        line-height: 1.2 !important;
        margin-top: 30px !important;
        margin-bottom: 20px !important;
        page-break-after: avoid;
        text-align: center;
        letter-spacing: 0.02em;
        position: relative;
    }

    /* h1下横线样式 - 缩短至12%宽度 */
    h1:after {
        content: "" !important;
        position: absolute !important;
        bottom: -10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        width: 12% !important;
        height: 2px !important;
        background-color: #3b82f6 !important;
    }

    /* 媒体发稿数据洞察特殊样式 - 比普通h1小且无下横线 */
    h1.media-insight-title {
        font-size: 22pt !important;
        margin-bottom: 15px !important;
    }

    h1.media-insight-title:after {
        display: none !important;
    }

    h2 {
        color: #1f2937 !important; /* 深灰色 */
        font-size: 20pt !important;
        font-weight: 700 !important; /* font-bold */
        line-height: 1.3 !important;
        margin-top: 25px !important;
        margin-bottom: 15px !important;
        page-break-after: avoid;
        border-left: 4px solid #3b82f6;
        padding-left: 15px;
    }

    h3 {
        color: #374151 !important; /* 中灰色 */
        font-size: 16pt !important;
        font-weight: 600 !important; /* font-semibold */
        line-height: 1.4 !important;
        margin-top: 20px !important;
        margin-bottom: 12px !important;
        page-break-after: avoid;
        position: relative;
    }

    h3:before {
        content: "▶" !important;
        color: #3b82f6 !important;
        font-size: 12pt !important;
        margin-right: 8px !important;
    }

    h4,
    h5,
    h6 {
        color: #4b5563 !important;
        font-weight: 600 !important;
        page-break-after: avoid;
        margin-top: 15px !important;
        margin-bottom: 8px !important;
    }

    /* 首页标题特殊样式 */
    .hero-title,
    h1.hero-title {
        font-size: 32pt !important;
        text-align: center !important;
        margin-bottom: 30px !important;
        color: #1e40af !important;
        border-bottom: 3px solid #3b82f6 !important;
        padding-bottom: 15px !important;
    }

    /* 表格样式 */
    table {
        width: 100% !important;
        border-collapse: collapse;
        page-break-inside: avoid;
    }

    table th,
    table td {
        border: 1px solid #ccc !important;
        padding: 8px !important;
        text-align: left;
    }

    table th {
        background-color: #f5f5f5 !important;
        font-weight: bold;
    }

    /* 分页控制 */
    .page-break {
        page-break-before: always;
    }

    .no-break {
        page-break-inside: avoid;
    }

    /* 隐藏背景图片和装饰 */
    * {
        background-image: none !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* 链接样式 */
    a {
        color: black !important;
        text-decoration: underline;
    }

    /* 隐藏网址链接 */
    a[href^="http"],
    a[href^="https"],
    a[href^="www"],
    .url,
    .link-url {
        display: none !important;
    }

    /* PDF专用标题显示 */
    .pdf-title-section {
        display: block !important;
        margin-bottom: 30px !important;
    }

    /* 确保内容可见 */
    .text-white {
        color: black !important;
    }

    .bg-blue-500,
    .bg-blue-600,
    .bg-gray-100,
    .bg-gray-200 {
        background-color: white !important;
        color: black !important;
    }

    /* 数据概览卡片样式 */
    #statsContainer {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 15px;
        margin-bottom: 30px;
        page-break-inside: avoid;
    }

    #statsContainer > div {
        display: block;
        border: 1px solid #d1d5db;
        border-radius: 8px;
        padding: 20px;
        background-color: white;
        text-align: center;
        page-break-inside: avoid;
    }

        /* 文本样式 */
        #statsContainer p {
            color: #374151;
            font-weight: 600;
            margin: 0 0 8px 0;
        }

        #statsContainer .text-2xl,
        #statsContainer .text-lg {
            color: #1e40af;
            font-weight: 700;
            margin: 0;
        }

    /* 子项目发稿分布图表特殊优化 - 由JavaScript动态控制 */
    #projectChart {
        page-break-inside: avoid;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    /* 子项目发稿分布容器优化 */
    #projectChart .echarts-container {
        box-sizing: border-box !important;
    }

    /* 子项目发稿分布图表画布优化 */
    #projectChart canvas {
        max-width: 100% !important;
        object-fit: contain !important;
    }


}