/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

/* 全局容器：全局已做宽适配，小屏仅调内边距 */
.container {
    width: 100%;
    max-width: 1200px;
    height: 500px;
    margin: 0 auto;
    padding: 20px 0;
}

/* 头部样式 */
header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

header h1 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

header p {
    font-size: 16px;
    color: #666;
    line-height: 1.6;
}

/* 锚点导航栏 */
.anchor-nav {
    margin: 20px 0 0;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.anchor-nav a {
    text-decoration: none;
    color: #333;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background 0.3s;
}

.anchor-nav a:hover {
    background: #e87c25;
    color: #fff;
}

/* 锚点区块样式：核心控制显示/隐藏 */
.chapter {
    display: none; /* 默认隐藏所有章节 */
    margin-bottom: 60px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chapter.active {
    display: block; /* 激活的章节显示 */
    animation: fadeIn 0.5s ease;
}

/* 渐入动画提升流畅性 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 章节标题 */
.chapter h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e87c25;
}

.chapter p {
    font-size: 16px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
    border: none; /* 简化原多边框取消写法 */
}

/* 图表通用样式：【核心防挤压】重写，解决手机端挤压问题 */
.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 30px 0 15px 0;
    text-align: center;
}

/* 单图表容器：核心改固定height为min-height，加overflow隐藏 */
.chart-box {
    width: 100%;
    min-height: 600px; /* 替换固定height，保留最小展示空间 */
    height: auto; /* 自适应子元素高度 */
    margin: 0 auto;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    overflow: hidden; /* 防止图片/图表溢出 */
    display: flex;
    align-items: center;
    justify-content: center; /* 让图表/图片在容器中居中 */
}

.chart-select {
  margin: 10px 0;
  text-align: center;
}
.chart-select select {
  padding: 8px 15px;
  border: 1px solid #eee;
  border-radius: 4px;
  font-size: 14px;
  color: #333;
  background-color: #fff;
  cursor: pointer;
}
.chart-select select:focus {
  outline: none;
  border-color: #40a9ff;
}

/* 多图表容器：【核心合并+防挤压】，解决flex布局下的挤压 */
.chart-container {
    width: 100%;
    max-width: 1200px;
    min-height: 400px; /* 替换固定height，自适应 */
    height: auto;
    margin: 20px auto;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: nowrap;
    overflow: hidden;
}

.chart-item {
    flex: 1;
    min-width: 0; /* 解决flex子元素宽度溢出 */
    min-height: 380px; /* 给子图表容器最小高度 */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center; /* 子容器内图表/图片居中 */
}

/* 图表图片【核心防挤压】：object-fit: contain 保证完整显示，不拉伸不裁剪 */
.chart-box img,
.chart-item img {
    width: 100%;
    height: 100%;
    user-select: none; /* 禁止拖拽 */
    object-fit: contain; /* 关键属性：图片在容器内完整展示，保持宽高比，无挤压 */
}

/* 提示文本 */
.tip {
    font-size: 14px;
    color: #999;
    line-height: 1.5;
    margin: 10px 0 30px 0;
    text-align: center;
}

/* 故事卡片样式 */
.story-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    margin: 20px 0;
}

.story-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e87c25;
    color: #fff;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.story-content {
    flex: 1;
}

.story-name {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}

.story-text {
    font-size: 16px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
}

/* 数据项样式 */
.data-item {
    display: inline-block;
    margin: 0 15px 15px 0;
    padding: 10px 15px;
    background: #f0f8fb;
    border-radius: 6px;
}

.data-number {
    font-size: 22px;
    font-weight: bold;
    color: #e87c25;
    margin-bottom: 5px;
}

.data-desc {
    font-size: 14px;
    color: #666;
}

/* 分支按钮 & 结果 */
.branch-btn-group {
    margin: 15px 0;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.branch-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    background: #3182ce;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s;
}

.branch-btn:hover {
    background: #2b6cb0;
}

.branch-result {
    display: none; /* 默认隐藏 */
    margin: 10px 0;
    padding: 10px;
    background: #fef7fb;
    border-left: 3px solid #9f7aea;
    color: #333;
    border-radius: 0 4px 4px 0;
}

/* 首屏区 */
.hero-section {
    display: flex;
    align-items: center;
    gap: 40px;
    margin: 30px 0;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
}

.hero-left {
    flex: 1;
}

.hero-title {
    font-size: 26px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 15px;
}

.hero-subtitle {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.hero-hook {
    font-size: 16px;
    color: #e87c25;
    font-weight: 500;
}

.hero-right {
    flex: 1;
}

.conflict-data-card {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* 留言墙样式 */
.wall-section {
    padding: 20px 0;
}

.comment-input {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    margin-bottom: 10px;
    font-size: 16px;
}

.submit-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    background: #38a169;
    color: #fff;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #2f855a;
}

.comment-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comment-item {
    padding: 12px 15px;
    background: #f5f5f5;
    border-radius: 6px;
    color: #333;
    line-height: 1.6;
}

/* 结尾样式 */
.end-title {
    font-size: 24px;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

.end-text {
    font-size: 18px;
    color: #555;
    line-height: 1.8;
    text-align: center;
    margin-bottom: 30px;
}

/* 回到顶部按钮 */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
    display: none;
    padding: 12px 18px;
    background-color: #409eff;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

#backToTop:hover {
    background-color: #66b1ff;
}

/* 下载按钮容器 - 居中+间距 */
.download-buttons {
    width: 100%;
    margin: 60px auto 30px;
    text-align: center;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* 下载按钮样式 */
.download-btn {
    display: inline-block;
    padding: 16px 32px;
    background-color: #2f5496;
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.download-btn:hover {
    background-color: #234077;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 方法论折叠区块样式 - 浅灰背景+小字体，与正文区分 */
.methodology-wrap {
    width: 100%;
}

.methodology-toggle {
    width: 100%;
    padding: 10px 15px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-align:center;;
    transition: background 0.3s;
}

.methodology-toggle:hover {
	background: #e8e8e8;
}

.methodology-content {
    margin-top: 8px;
    padding: 15px;
    background: #f8f8f8;
    border-radius: 4px;
    font-size: 12px;
    color: #333;
    line-height: 1.6;
}

.methodology-item {
    margin-bottom: 10px;
}

.methodology-item h4 {
    font-size: 13px;
    font-weight: 600;
    margin: 0 0 5px 0;
    color: #555;
}

.methodology-item p {
    margin: 0;
    color: #666;
}

/* 微信分享悬浮按钮 - 全局唯一，不污染现有样式 */
#wechatShareBtn {
  position: fixed; /* 固定悬浮，不随滚动移动 */
  top: 20px;       /* 距离顶部20px */
  right: 20px;     /* 距离右侧20px */
  z-index: 9999;   /* 最高层级，不被图表/内容遮挡 */
  background-color: #07c160; /* 微信经典绿，贴合品牌 */
  color: #fff;     /* 白色文字 */
  font-family: 'Microsoft YaHei, Arial, sans-serif'; /* 和现有页面统一字体 */
  font-size: 14px; /* PC端字号 */
  padding: 8px 16px; /* 内边距，按钮大小适中 */
  border-radius: 20px; /* 圆角，和现有页面按钮风格一致 */
  cursor: pointer; /* 鼠标悬浮手型 */
  box-shadow: 0 2px 8px rgba(0,0,0,0.2); /* 轻微阴影，突出悬浮感 */
  display: flex;
  align-items: center;
  gap: 6px; /* 图标和文字的间距 */
  border: none;
  outline: none;
}
/* 鼠标悬浮高亮效果 */
#wechatShareBtn:hover {
  background-color: #06b055;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transform: translateY(-2px);
  transition: all 0.3s ease; /* 过渡动画，更丝滑 */
}

/* 响应式适配：双断点，重点优化图表防挤压 */
/* 断点1：平板/手机横屏（≤768px） */
@media (max-width: 768px) {
    /* 全局容器：增加左右内边距，避免内容贴屏 */
    .container {
        padding: 15px 10px;
    }
    /* 头部文字：字号缩小，间距收缩 */
    header {
        margin-bottom: 30px;
        padding-bottom: 15px;
    }
    header h1 {
        font-size: 24px;
    }
    header p {
        font-size: 15px;
    }
    /* 章节样式：减小内边距和底部间距 */
    .chapter {
        margin-bottom: 40px;
        padding: 15px;
    }
    .chapter h2 {
        font-size: 20px;
        margin-bottom: 15px;
        padding-bottom: 8px;
    }
    .chapter p {
        font-size: 15px;
        line-height: 1.7;
        margin-bottom: 15px;
    }
    /* 图表【核心防挤压】：调整最小高度，适配平板/横屏 */
    .chart-box {
        max-width: 768px
		min-height: 300px; /* 比大屏小，适配横屏 */
        padding: 8px;
    }
    .chart-container {
        min-height: auto; /* 多图表容器垂直布局，无需最小高度 */
        padding: 10px;
        flex-direction: column;
        gap: 15px;
    }
    .chart-item {
        min-height: 280px; /* 子图表容器最小高度适配 */
    }
    .chart-title {
        font-size: 17px;
        margin: 20px 0 10px 0;
    }
    /* 故事卡片：列布局+减小内边距和间距 */
    .story-card {
        flex-direction: column;
        padding: 15px;
        gap: 15px;
    }
    .story-name {
        font-size: 17px;
    }
    .story-text {
        font-size: 15px;
        line-height: 1.7;
    }
    /* 数据项：减小内边距和外边距 */
    .data-item {
        padding: 8px 12px;
        margin: 0 10px 10px 0;
    }
    .data-number {
        font-size: 20px;
    }
    /* 首屏区：列布局+减小内边距 */
    .hero-section {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
        margin: 20px 0;
    }
    .hero-title {
        font-size: 22px;
        margin-bottom: 12px;
    }
    .hero-subtitle {
        font-size: 16px;
        margin-bottom: 15px;
    }
    .hero-hook {
        font-size: 15px;
    }
    /* 锚点导航：紧凑化 */
    .anchor-nav {
        padding: 8px;
        gap: 4px;
    }
    .anchor-nav a {
        padding: 6px 10px;
        font-size: 14px;
    }
    /* 分支按钮：紧凑化 */
    .branch-btn-group {
        gap: 8px;
    }
    .branch-btn {
        padding: 7px 14px;
        font-size: 14px;
    }
    /* 留言墙：紧凑化 */
    .wall-section {
        padding: 15px 0;
    }
    .comment-input {
        height: 80px;
        font-size: 15px;
        padding: 8px;
    }
    .submit-btn {
        padding: 8px 16px;
        font-size: 14px;
    }
    .comment-item {
        padding: 10px 12px;
        font-size: 15px;
    }
    /* 结尾样式：紧凑化 */
    .end-title {
        font-size: 22px;
        margin-bottom: 15px;
    }
    .end-text {
        font-size: 16px;
        line-height: 1.7;
        margin-bottom: 20px;
    }
    /* 回到顶部：适配 */
    #backToTop {
        bottom: 20px;
        right: 20px;
        padding: 10px 15px;
        font-size: 13px;
    }
    /* 下载按钮：紧凑化 */
    .download-buttons {
        margin: 30px auto 20px;
        gap: 15px;
    }
    .download-btn {
        padding: 12px 24px;
        font-size: 14px;
    }
    .download-btn:hover {
        transform: scale(1.03); /* 减小放大幅度 */
    }
    /* 冲突数据卡片：紧凑化 */
    .conflict-data-card {
        gap: 15px;
    }
    /* 提示文本：紧凑化 */
    .tip {
        font-size: 13px;
        margin: 8px 0 20px 0;
    }
 #wechatShareBtn {
    top: 15px;
    right: 15px;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 16px;
  }
  #wechatShareBtn span {
    font-size: 14px;
  }
}

/* 手机竖屏（≤375px），图表极致防挤压 */
@media (max-width: 375px) {
    /* 全局容器：进一步紧凑 */
    .container {
        padding: 10px 8px;
    }
    /* 头部文字：进一步缩小 */
    header h1 {
        font-size: 22px;
    }
    /* 章节标题：微调 */
    .chapter h2 {
        font-size: 19px;
    }
    /* 图表【核心防挤压】：手机竖屏最小高度，完美适配 */
    .chart-box {
        min-height: 260px; /* 极致适配手机竖屏 */
    }
    .chart-item {
        min-height: 240px; /* 多图表子容器极致高度 */
    }
    /* 首屏区：进一步紧凑 */
    .hero-section {
        padding: 15px;
    }
    .hero-title {
        font-size: 20px;
    }
    /* 数据项：进一步紧凑 */
    .data-item {
        padding: 6px 10px;
        margin: 0 8px 8px 0;
    }
    .data-number {
        font-size: 18px;
    }
    .data-desc {
        font-size: 13px;
    }
    /* 回到顶部：进一步适配 */
    #backToTop {
        bottom: 15px;
        right: 15px;
        padding: 8px 12px;
        font-size: 12px;
        border-radius: 6px;
    }
    /* 下载按钮：极致紧凑 */
    .download-buttons {
        gap: 10px;
        margin: 20px auto 15px;
    }
    .download-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
    /* 结尾文字：进一步缩小 */
    .end-title {
        font-size: 20px;
    }
    .end-text {
        font-size: 15px;
    }
    /* 留言墙：极致紧凑 */
    .comment-item {
        padding: 8px 10px;
        font-size: 14px;
    }
#wechatShareBtn {
    top: 15px;
    right: 15px;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 16px;
  }
  #wechatShareBtn span {
    font-size: 14px;
  }
}
/* 手机竖屏极致适配 */
@media (max-width: 375px) {
  #wechatShareBtn {
    top: 10px;
    right: 10px;
    padding: 4px 10px;
  }
