/* 全局重置 + 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Microsoft Yahei", "PingFang SC", sans-serif; /* 适配中文显示 */
}

body {
    background-color: #f8f9fa; /* 柔和背景色，提升阅读体验 */
    color: #333;
    line-height: 1.6;
}

/* 页面容器 - 响应式 */
.page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px; /* 移动端左右留白 */
}

/* 页面头部标题 */
.page-header {
    margin-bottom: 24px;
}

.page-title {
    font-size: clamp(1.5rem, 3vw, 1.8rem); /* 响应式字体 */
    font-weight: 700;
    color: #212529;
    margin-bottom: 0;
    border-bottom: 2px solid #007bff;
    padding-bottom: 8px;
}

/* 问题卡片 */
.question-card {
    border: 1px solid #e9ecef;
    border-radius: 12px; /* 更圆润的边角 */
    padding: 30px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* 轻微阴影提升层次感 */
    margin-bottom: 20px;
}

/* 问题标题 */
.question-title {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    font-weight: 700;
    color: #212529;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

/* 回答内容容器 */
.answer-content {
    line-height: 1.8;
    font-size: 16px;
    color: #495057;
    margin-bottom: 30px;
}

/* 内容层级标题样式 */
.content-main-title {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
    font-weight: 700;
    color: #212529;
    margin: 30px 0 16px;
    position: relative;
    padding-left: 12px;
}

/* 主标题左侧装饰线 */
.content-main-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 1.2em;
    background-color: #007bff;
    border-radius: 2px;
}

.content-sub-title {
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    font-weight: 600;
    color: #343a40;
    margin: 20px 0 10px;
}

/* 段落和列表样式 */
.answer-content p {
    margin-bottom: 14px;
    text-align: justify; /* 文本两端对齐，更整洁 */
}

.answer-content ul {
    margin: 10px 0 20px 24px;
}

.answer-content li {
    margin-bottom: 10px;
    list-style-type: disc; /* 统一列表样式 */
}

/* 来源标注样式 */
.answer-content .source {
    font-weight: 600;
    color: #007bff;
}

/* 重点内容高亮（新增） */
.answer-content strong {
    color: #212529;
    font-weight: 700;
}

.highlight-text {
    color: #dc3545; /* 红色突出核心数据 */
    font-weight: 700;
}

/* 图片容器优化 */
.figure-container {
    margin: 30px auto;
    text-align: center;
    max-width: 100%;
}

.content-image {
    max-width: 100%; /* 图片自适应容器 */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* 图片阴影提升质感 */
    margin-bottom: 10px;
}

.figure-caption {
    font-size: 14px;
    color: #6c757d;
    font-style: italic; /* 图注斜体，更专业 */
    margin-bottom: 0 !important;
}

/* 按钮样式优化 */
.nav-buttons {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    flex-wrap: wrap; /* 移动端按钮换行 */
    width: 100%;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.back-main-btn {
    /* 核心定位 */
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 999; /* 确保按钮在最上层，不被遮挡 */

    /* 按钮美化 */
    background: #007bff;
    color: white;
    padding: 12px 24px; /* 上下8px，左右16px，给文字留出空间 */
    border-radius: 6px; /* 圆角，让边角更柔和 */
    text-decoration: none; /* 去掉链接默认的下划线 */
    font-size: 16px;
    font-weight: 500; /* 字体稍微加粗 */

    /* 过渡动画，让hover效果更丝滑 */
    transition: all 0.3s ease;
}
.back-main-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2); /* hover添加阴影 */
}

/* 移动版：把返回主页按钮移到右上角 */
@media (max-width: 768px) {
    .back-main-btn {
        left: auto !important;   /* 取消原来的左边定位 */
        right: 20px !important; /* 右边20px，和原来top的20px对应 */
        top: 20px !important;   /* 保持顶部20px不变 */
    }
}

.next-btn {
    background: #6c757d;
    color: white;
    margin-left: auto;
    margin-right: 20px;
}

.next-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.2);
}

.back-btn {
    background: #6c757d;
    color: white;
    margin-right:auto ;
    margin-left: 20px;
}

.back-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.2);
}

/* 响应式适配 - 移动端优化 */
@media (max-width: 768px) {
    .page-container {
        padding: 15px 10px;
    }

    .question-card {
        padding: 20px 15px;
    }

    .nav-buttons {
        justify-content: center; /* 移动端按钮居中 */
    }

    .btn {
        padding: 10px 20px;
        width: 100%; /* 移动端按钮占满宽度 */
        text-align: center;
    }

    .content-main-title {
        margin: 24px 0 12px;
    }
}

/*折叠按钮
/* 折叠展开按钮 */
.fold-btn {
    background: transparent;
    border: none;
    color: #2f54eb;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 10px 0;
}
.fold-btn span {
    display: inline-block;
    transition: transform 0.3s ease;
}
/* 折叠内容容器 */
.fold-content {
    margin-top: 10px;
    padding-left: 24px;
}
/* 回到顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 40px;
    height: 40px;
    background: #2f54eb;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    cursor: pointer;
    display: none;
    border: none;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(47,84,235,0.3);
    z-index: 999;
}
.back-to-top:hover {
    background: #2644c5;
}