/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", sans-serif;
}

/* 点击文本的样式（增加手型，提示可点击） */
.region-btn {
    cursor: pointer;
    position: relative;
    color: #e87c25; /* 突出可点击文本 */
    text-decoration: underline dotted; /* 点状下划线，提示可交互 */
}

.region-btn:hover {
    color: #d46b15;
}

/* 弹窗基础样式（默认隐藏） */
.region-popup {
    display: none;
    position: absolute;
    background-color: #ffffff;
    border: 1px solid #e87c25;
    border-radius: 8px;
    padding: 12px 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 9999;
    min-width: 180px;
    max-width: 250px;
}

/* 弹窗标题 */
.popup-title {
    font-weight: bold;
    color: #333;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #f5f5f5;
}

/* 弹窗内容 */
.popup-content {
    color: #666;
    line-height: 1.5;
}

/* 关闭按钮 */
.popup-close {
    position: absolute;
    top: 8px;
    right: 10px;
    color: #999;
    font-size: 16px;
    cursor: pointer;
}

.popup-close:hover {
    color: #e87c25;
}

/* 全局容器：全局已做宽适配，小屏仅调内边距 */
.container {
    width: 100%;
    max-width: 1200px;
    height: 450px;
    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;
}

/* 强调文本样式：红色 + 加粗 */
.text-emphasis {
  color: red; /* 设置文本颜色为红色 */
  font-weight: bold; /* 设置字体加粗 */
}

/* 锚点导航栏：合并重复样式，适配8个主章节 */
.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 12px;
    border-radius: 4px;
    transition: background 0.3s;
    background: #f0f0f0;
}

.anchor-nav a:hover {
    background: #e0e0e0;
}

/* 锚点区块样式：核心控制显示/隐藏 */
.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;
}

/* 折叠子章节样式 */
.collapse-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold; 
    margin: 15px 0;
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.collapse-btn:hover {
    background: #eeeeee;
    border-color: #cccccc;
    transition: all 0.2s ease;
}

.collapse-icon {
    transition: transform 0.3s;
}

.collapse-icon.rotate {
    transform: rotate(180deg);
}

.collapse-content {
    display: none;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* 渐入动画提升流畅性 */
@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: 450px; /* 替换固定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;
}

/* 饼图子容器：核心保证1:1宽高比（圆形不拉伸） */
.pie-chart-item {
    flex: 1;
    min-width: 0; /* 解决flex子元素宽度溢出 */
    aspect-ratio: 1/1; /* 关键：保证宽高1:1，饼图不变形 */
    min-height: 280px; /* 最小高度兜底，适配小屏 */
    max-height: 400px; /* 最大高度限制，避免过大 */
    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; /* 饼图在容器中居中 */
}

.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;
    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;
}

/* 分享按钮组：【核心】垂直分行+固定悬浮，统一品牌配色 */
.share-btn-group {
  position: fixed; /* 固定悬浮右上角 */
  top: 20px;
  right: 20px;
  z-index: 9999; /* 最高层级不被遮挡 */
  display: flex;
  flex-direction: column; /* 垂直分行 */
  gap: 10px; /* 按钮之间的间距 */
}

/* 分享按钮基础样式 */
.share-btn {
  width: 100px; /* 固定宽度，保证按钮对齐 */
  padding: 8px 0;
  border: none;
  outline: none;
  border-radius: 20px; /* 圆角 */
  color: #fff;
  font-family: "Microsoft Yahei", sans-serif; /* 统一字体 */
  font-size: 14px; /* PC端字号 */
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center; /* 文字居中 */
  transition: all 0.3s ease; /* 过渡动画 */
  box-shadow: 0 2px 8px rgba(0,0,0,0.2); /* 阴影 */
}

/* 各平台品牌色 */
#wechatShareBtn {
  background-color: #07c160;
}

#weiboShareBtn {
  background-color: #e6162d;
}

#zhihuShareBtn {
  background-color: #0084ff;
}

/* 按钮悬浮效果 */
.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

#wechatShareBtn:hover {
  background-color: #06b055; /* 微信hover加深 */
}

#weiboShareBtn:hover {
  background-color: #c91228; /* 微博hover加深 */
}

#zhihuShareBtn:hover {
  background-color: #0077e6; /* 知乎hover加深 */
}

/* 分享按钮文字样式（保留） */
.ShareBtn {
  font-size: 14px;
  font-weight: 500;
}

/* 响应式适配：双断点，重点优化图表防挤压 */
/* 断点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;
    }
    /* 分享按钮适配 */
    .share-btn-group {
        top: 15px;
        right: 15px;
        gap: 8px; /* 减小按钮间距 */
    }
    .share-btn {
        width: 90px; /* 缩小按钮宽度 */
        padding: 6px 0; /* 减小内边距 */
        font-size: 12px; /* 缩小字号 */
        border-radius: 16px; /* 适配小屏圆角 */
    }
    .ShareBtn {
        font-size: 12px;
    }
}

/* 手机竖屏（≤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;
    }
    /* 分享按钮极致适配 */
    .share-btn-group {
        top: 10px;
        right: 10px;
        gap: 6px; /* 极致减小间距 */
    }
    .share-btn {
        width: 80px; /* 极致缩小宽度 */
        padding: 4px 0; /* 极致减小内边距 */
    }
	
	.tip { font-size: 11px; } /* 稍微缩小但保持可读 */
   
    .text-emphasis { font-size: 1.1em; } /* 关键数据放大 */
}a {
	color: #03F;
}
