body {
    font-family: 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    margin: 0; /* Remove default margin */
    background-color: #f0f4f8; /* 更柔和的背景色 */
    color: #333;
    display: flex;
    flex-direction: column;
    align-items: center; /* 使所有内容水平居中 */
}

h1 {
    color: #0056b3; /* Xilinx blue */
    text-align: center;
    padding: 25px;
    margin: 0 0 10px 0;
    background-color: #e8f0fe;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 添加阴影效果 */
    font-weight: 500;
    width: 100%; /* 标题占据整个宽度 */
}

.intro {
    text-align: center;
    font-size: 0.9em;
    color: #555;
    margin: 0 20px 25px 20px;
    padding: 8px 15px;
    background-color: #f9f9f9;
    border-radius: 5px;
    border-left: 3px solid #0056b3;
}

/* 限制内容区域最大宽度 */
.container {
    max-width: 1400px; /* 设置最大宽度 */
    width: 95%;
    margin: 0 auto;
}

.config-section {
    border-bottom: none; /* 移除底部边框 */
    margin: 0 auto 30px auto; /* 增加底部间距 */
    padding: 0; /* 移除内边距，由内部元素控制 */
    background-color: transparent; /* 透明背景 */
    box-shadow: none; /* 移除阴影 */
    max-width: 100%; /* 相对于container的宽度 */
    transition: transform 0.2s ease; /* 添加过渡效果 */
}

.section-content {
    display: flex;
    gap: 0; /* 移除间隙 */
    align-items: stretch; /* 让元素垂直拉伸 */
    border-radius: 12px; /* 圆角边框 */
    overflow: hidden; /* 确保内容不超出圆角 */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* 增强阴影效果 */
    background-color: #fff; /* 白色背景 */
    border: 1px solid #e0e6ed; /* 微妙的边框 */
    padding: 15px; /* 添加整体内边距 */
    max-height: 600px; /* 限制最大高度 */
}

/* 为每个板块添加不同的左侧边框颜色，增加区分度 */
.config-section:nth-child(1) .section-content {
    border-left: 5px solid #3498db; /* 蓝色 */
}
.config-section:nth-child(2) .section-content {
    border-left: 5px solid #2ecc71; /* 绿色 */
}
.config-section:nth-child(3) .section-content {
    border-left: 5px solid #9b59b6; /* 紫色 */
}
.config-section:nth-child(4) .section-content {
    border-left: 5px solid #e74c3c; /* 红色 */
}
.config-section:nth-child(5) .section-content {
    border-left: 5px solid #f39c12; /* 橙色 */
}
.config-section:nth-child(6) .section-content {
    border-left: 5px solid #1abc9c; /* 青色 */
}
.config-section:nth-child(7) .section-content {
    border-left: 5px solid #d35400; /* 深橙色 */
}
.config-section:nth-child(8) .section-content {
    border-left: 5px solid #8e44ad; /* 深紫色 */
}

/* 鼠标悬停效果 */
.config-section:hover {
    transform: translateY(-5px); /* 轻微上浮效果 */
}

.image-container {
    flex: 0 0 45%; /* 略微增加宽度，原来是40% */
    max-width: 600px; /* 设置图片容器的最大宽度 */
    height: 550px; /* 固定高度 */
    overflow: hidden;
    border: none; /* 移除边框 */
    position: relative;
    background-color: #f5f7fa; /* 调整背景色 */
    cursor: grab;
    border-right: 2px solid #e0e6ed; /* 加粗右侧分隔线 */
    border-radius: 8px; /* 添加圆角 */
    margin: 5px 15px 5px 5px; /* 添加外边距 */
    box-shadow: 0 3px 12px rgba(0,0,0,0.05); /* 增强阴影 */
}

.image-container::after {
    content: '';
    position: absolute;
    top: 0;
    right: -2px;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.1), transparent); /* 添加渐变效果的分隔线 */
    z-index: 1;
}

.image-container img {
    display: block;
    width: 100%;
    height: auto;
    transform-origin: center center;
    transition: transform 0.1s ease-out;
    user-select: none;
    -webkit-user-drag: none;
    border-radius: 6px; /* 图片圆角 */
}

.image-container.panning {
    cursor: grabbing;
}

.text-container {
    flex: 1; /* 占据剩余空间 */
    max-width: 800px; /* 设置文本区域的最大宽度 */
    height: 550px;
    overflow-y: auto;
    padding: 20px 25px; /* 调整内边距 */
    border-left: none; /* 移除左侧边框 */
    margin: 5px 5px 5px 15px; /* 调整左边距 */
    background-color: #fbfdff; /* 调整背景色 */
    border-radius: 8px; /* 添加圆角 */
    box-shadow: 0 3px 12px rgba(0,0,0,0.06); /* 增强阴影 */
    position: relative; /* 为伪元素定位 */
}

.text-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -15px;
    height: 100%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.08), transparent); /* 添加渐变效果的分隔线 */
}

/* 为每个板块的标题配色，与左侧边框颜色匹配 */
.config-section:nth-child(1) .text-container h2 {
    color: #3498db;
}
.config-section:nth-child(2) .text-container h2 {
    color: #2ecc71;
}
.config-section:nth-child(3) .text-container h2 {
    color: #9b59b6;
}
.config-section:nth-child(4) .text-container h2 {
    color: #e74c3c;
}
.config-section:nth-child(5) .text-container h2 {
    color: #f39c12;
}
.config-section:nth-child(6) .text-container h2 {
    color: #1abc9c;
}
.config-section:nth-child(7) .text-container h2 {
    color: #d35400;
}
.config-section:nth-child(8) .text-container h2 {
    color: #8e44ad;
}

/* 改进标题样式 */
.text-container h2 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #eee;
    font-weight: 500;
    font-size: 1.6em;
    position: relative;
    /* 标题颜色由各区块的特定规则控制，不在这里设置 */
}

.text-container h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: currentColor; /* 使用当前文本颜色 */
}

/* 修复无效的CSS选择器，使用标准选择器来设置不同的文本颜色 */

/* 基础文字样式 - 适用于主体文本 */
.text-container p, 
.text-container li, 
.text-container dd {
    color: #444;
    line-height: 1.7;
}

/* 标题样式 - h2标题已经由各区块单独设置颜色 */
.text-container h3 {
    color: #2c3e50;
    font-weight: 500;
    margin-top: 20px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* 页面主要段落标题样式 */
.text-container h3.section-title {
    color: #3498db;
    font-weight: 500;
    border-bottom: 1px solid #e0e6ed;
}

/* 配置选项名称 */
.text-container dl {
    margin-left: 15px;
    margin-top: 10px;
}

.text-container dt {
    font-weight: 600;
    color: #2c3e50; /* 深蓝色，与正文形成对比 */
    margin-top: 15px;
    padding: 8px 10px;
    background-color: #f5f7fa; /* 淡蓝背景 */
    border-radius: 4px;
    border-left: 3px solid #3498db; /* 左侧边框，使用更明显的蓝色 */
}

.text-container dd {
    margin-left: 25px;
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 3px solid #eee;
    color: #444; /* 正文灰色 */
}

/* 专门为h3标题添加不同颜色 */
.text-container h3:nth-of-type(1) {
    color: #3498db; /* 蓝色 - 页面功能 */
}

.text-container h3:nth-of-type(2) {
    color: #16a085; /* 青色 - 英文说明翻译 */
}

.text-container h3:nth-of-type(3) {
    color: #2980b9; /* 深蓝色 - 配置选项 */
}

.text-container h3:nth-of-type(4) {
    color: #27ae60; /* 绿色 - 建议 */
}

/* 添加更多样式以增强文档可读性 */
.text-container code {
    background-color: #f8f9fa;
    padding: 2px 4px;
    color: #e83e8c;
    border-radius: 2px;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
}

/* 强调重要的 "英文原文" "中文翻译" "解读" 标签 */
.text-container li strong {
    color: #34495e;
    font-weight: 600;
    text-shadow: 0 0 1px rgba(0,0,0,0.05);
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: #f5f7fa;
    border-left: 2px solid #ddd;
    margin: 3px 0;
}

/* 使用属性选择器为不同类型的标签添加不同的颜色 */
.text-container li strong[data-type="英文原文"],
.text-container li strong:first-child {
    color: #2980b9;
    border-left-color: #2980b9;
    background-color: #eef7fc;
}

.text-container li strong[data-type="中文翻译"] {
    color: #16a085;
    border-left-color: #16a085;
    background-color: #f0faf8;
}

.text-container li strong[data-type="解读"] {
    color: #8e44ad;
    border-left-color: #8e44ad;
    background-color: #f8f2fc;
}

/* 无法使用属性选择器时，使用JavaScript添加样式 */
.eng-original {
    color: #2980b9 !important;
    border-left-color: #2980b9 !important;
    background-color: #eef7fc !important;
}

.cn-translation {
    color: #16a085 !important;
    border-left-color: #16a085 !important;
    background-color: #f0faf8 !important;
}

.explanation {
    color: #8e44ad !important;
    border-left-color: #8e44ad !important;
    background-color: #f8f2fc !important;
}

/* 在选项名称上应用区分样式 */
.text-container dt {
    font-weight: 600;
    color: #2c3e50; /* 深蓝色，与正文形成对比 */
    margin-top: 15px;
    padding: 8px 10px;
    background-color: #f5f7fa; /* 淡蓝背景 */
    border-radius: 4px;
    border-left: 3px solid #3498db; /* 左侧边框，使用更明显的蓝色 */
}

/* 为dd中的选项名称（如Data Width、ECC等）添加特殊样式 */
.text-container dd strong:first-child {
    color: #2980b9;
    background-color: #f0f9ff;
    padding: 1px 4px;
    border-radius: 3px;
    font-weight: 600;
}

/* 调整影响/建议标签样式 */
.impact-label {
    color: #e67e22 !important;
    background-color: #fff7e6 !important;
    padding: 1px 4px !important;
    border-radius: 3px !important;
    display: inline-block !important;
    margin-top: 5px !important;
    border-left: 2px solid #e67e22 !important;
}

.suggestion-label {
    color: #27ae60 !important;
    background-color: #f0fdf4 !important;
    padding: 1px 4px !important;
    border-radius: 3px !important;
    display: inline-block !important;
    margin-top: 5px !important;
    border-left: 2px solid #27ae60 !important;
}

/* 所有推荐和重要提示段落的强调文本 */
.text-container .recommendation strong, 
.text-container .critical strong {
    color: #2c3e50;
    font-weight: 700;
    font-size: 1.05em;
    text-shadow: 0 0 1px rgba(0,0,0,0.1);
}

/* 推荐样式 */
.text-container .recommendation {
    background-color: #f0f9ff;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    position: relative;
}

/* 推荐的第一个 strong 元素要特别强调 */
.text-container .recommendation strong { 
    color: #2573a7;
}

/* 警告/重要提示样式 */
.text-container .critical {
    background-color: #fff5f5;
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 6px;
    border-left: 4px solid #e74c3c;
    position: relative;
}

/* 重要提示的第一个 strong 元素要特别强调 */
.text-container .critical strong { 
    color: #c0392b;
}

/* 额外增强 li 中的 strong 元素，添加微妙的背景 */
.text-container li > strong:first-child {
    display: inline-block;
    padding: 1px 5px;
    background-color: #f8f9fa;
    border-radius: 3px;
    margin-bottom: 5px;
    border-left: 2px solid #ddd;
}

/* 为 li 中的第二个 strong（通常是翻译或解读）添加不同的样式 */
.text-container li > br + strong {
    display: inline-block;
    padding: 1px 5px;
    background-color: #f8f9fa;
    border-radius: 3px;
    margin-top: 5px;
    margin-bottom: 5px;
}

/* 优化列表样式 */
.text-container ul {
    padding-left: 20px;
    margin-left: 5px;
    list-style-type: square;
    color: #444;
}

/* 列表项间距 */
.text-container li {
    margin-bottom: 10px;
}

/* 美化滚动条 */
.text-container::-webkit-scrollbar {
    width: 8px;
}

.text-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.text-container::-webkit-scrollbar-thumb {
    background: #bbc1ca;
    border-radius: 10px;
}

.text-container::-webkit-scrollbar-thumb:hover {
    background: #99a2b0;
}

footer {
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    background-color: #e8f0fe;
    color: #555;
    font-size: 0.9em;
    border-top: 1px solid #dbe4f0;
    margin-bottom: 0;
}

/* 配置选项名称样式 */
.option-name {
    color: #295f94;
    font-weight: 700;
    text-shadow: 0 0 1px rgba(0,0,0,0.05);
    border-bottom: 1px dashed #acc6e3;
    padding-bottom: 2px;
}

/* 额外增强描述列表中的标题和选项 */
.text-container dd {
    margin-left: 25px;
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 3px solid #eee;
    color: #444; /* 正文灰色 */
}

/* 特殊强调元素的样式 */
.text-container code {
    background-color: #f8f9fa;
    padding: 2px 4px;
    color: #e83e8c;
    border-radius: 2px;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.9em;
    border: 1px solid #f1f1f1;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .section-content {
        max-height: none; /* 小屏幕下不限制高度 */
    }
    
    .image-container {
        max-width: 500px; /* 较小屏幕下减小图片容器宽度 */
    }
    
    .text-container {
        max-width: 650px; /* 较小屏幕下减小文本区域宽度 */
    }
}

/* 窄屏幕下的样式调整（平板等） */
@media (max-width: 992px) {
    .section-content {
        flex-direction: column; /* 垂直排列元素 */
        height: auto;
        max-height: none;
    }
    
    .image-container,
    .text-container {
        max-width: 100%; /* 全宽显示 */
        margin: 10px 0; /* 调整边距 */
    }
    
    .image-container {
        height: 400px; /* 减小高度 */
    }
} 