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: 15px;
    padding: 5px 10px;
    border-bottom: 1px dotted #eee;
}

/* 为不同的标题设置不同的颜色 */
.text-container h3:nth-of-type(1) {
    color: #3498db; /* 蓝色 */
}

.text-container h3:nth-of-type(2) {
    color: #2c3e50; /* 深蓝色 */
}

.text-container h3:nth-of-type(3) {
    color: #2980b9; /* 另一种蓝色 */
}

.text-container h3:nth-of-type(4) {
    color: #0056b3; /* Xilinx 蓝 */
}

/* 代码样式 */
.text-container code {
    font-family: 'Consolas', 'Monaco', monospace;
    background-color: #f5f7fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.9em;
    color: #e74c3c; /* 红色代码 */
    border: 1px solid #e0e6ed;
}

/* 强调元素样式 */
.text-container li strong {
    color: #2c3e50; /* 深蓝色 */
    font-weight: 600;
}

/* 列表项中的特殊标记样式 */
.text-container li strong[data-type="英文原文"],
.text-container li strong:first-child {
    color: #3498db; /* 蓝色 */
    font-weight: 600;
    display: inline-block;
    margin-bottom: 3px;
}

.text-container li strong[data-type="中文翻译"] {
    color: #27ae60; /* 绿色 */
    font-weight: 600;
    display: inline-block;
    margin-bottom: 3px;
}

.text-container li strong[data-type="解读"] {
    color: #8e44ad; /* 紫色 */
    font-weight: 600;
    display: inline-block;
    margin-bottom: 3px;
}

/* 英文原文样式 */
.eng-original {
    color: #3498db !important; /* 蓝色 */
    font-weight: 600 !important;
    display: inline-block;
    margin-bottom: 3px !important;
}

/* 中文翻译样式 */
.cn-translation {
    color: #27ae60 !important; /* 绿色 */
    font-weight: 600 !important;
    display: inline-block;
    margin-bottom: 3px !important;
}

/* 解读样式 */
.explanation {
    color: #8e44ad !important; /* 紫色 */
    font-weight: 600 !important;
    display: inline-block;
    margin-bottom: 3px !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; /* 左侧蓝色边框 */
}

/* 强调第一个strong */
.text-container dd strong:first-child {
    color: #e74c3c; /* 红色 */
    background-color: #fff8f8; /* 浅红背景 */
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 600;
}

/* 影响标签 */
.impact-label {
    color: #e74c3c !important; /* 红色 */
    font-weight: 600 !important;
    background-color: #fff8f8 !important; /* 浅红背景 */
    padding: 1px 3px !important;
    border-radius: 2px !important;
    display: inline-block !important;
    margin-bottom: 3px !important;
}

/* 建议标签 */
.suggestion-label {
    color: #27ae60 !important; /* 绿色 */
    font-weight: 600 !important;
    background-color: #f0fff4 !important; /* 浅绿背景 */
    padding: 1px 3px !important;
    border-radius: 2px !important;
    display: inline-block !important;
    margin-bottom: 3px !important;
}

/* 推荐样式 */
.text-container .recommendation strong, 
.text-container dd strong:first-child {
    color: #27ae60; /* 绿色 */
    background-color: #f0fff4; /* 浅绿背景 */
    padding: 1px 3px;
    border-radius: 2px;
    font-weight: 600;
}

/* 推荐段落 */
.text-container .recommendation {
    background-color: #f0fff4; /* 浅绿背景 */
    border-left: 3px solid #27ae60; /* 绿色边框 */
    padding: 10px;
    margin: 10px 0;
    border-radius: 0 4px 4px 0;
}

/* 推荐段落中的strong */
.text-container .recommendation strong { 
    color: #27ae60;
}

/* 关键提示 */
.text-container .critical {
    background-color: #fff8f8; /* 浅红背景 */
    border-left: 3px solid #e74c3c; /* 红色边框 */
    padding: 10px;
    margin: 10px 0;
    border-radius: 0 4px 4px 0;
}

/* 关键提示中的strong */
.text-container .critical strong { 
    color: #e74c3c;
}

/* 列表项首个strong */
.text-container li > strong:first-child {
    color: #3498db; /* 蓝色 */
    font-weight: 600;
    display: inline-block;
    margin-bottom: 3px;
    background-color: transparent; /* 移除背景色 */
    padding: 0;
}

/* 列表项中br后的strong */
.text-container li > br + strong {
    color: #2c3e50; /* 深蓝色 */
    font-weight: 600;
    display: inline-block;
    background-color: #f5f7fa; /* 淡蓝背景 */
    padding: 1px 3px;
    border-radius: 2px;
    margin: 2px 0;
}

/* 无序列表样式 */
.text-container ul {
    padding-left: 20px;
    margin: 8px 0;
    list-style-type: square;
}

/* 列表项样式 */
.text-container li {
    margin-bottom: 8px;
}

/* 自定义滚动条 */
.text-container::-webkit-scrollbar {
    width: 8px;
}

.text-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.text-container::-webkit-scrollbar-thumb {
    background: #c1c9d1;
    border-radius: 4px;
}

.text-container::-webkit-scrollbar-thumb:hover {
    background: #a1a9b1;
}

footer {
    text-align: center;
    color: #777;
    padding: 20px;
    font-size: 0.9em;
    width: 100%;
    background-color: #e8f0fe;
    margin-top: 20px;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.05);
}

/* 选项名称样式 */
.option-name {
    font-weight: 700;
    color: #2c3e50;
    display: inline-block;
    position: relative;
}

/* 描述定义 */
.text-container dd {
    margin-left: 15px;
    padding: 5px 10px;
    border-bottom: 1px dotted #eee;
}

/* 代码样式 */
.text-container code {
    font-family: 'Consolas', 'Monaco', monospace;
    background-color: #f5f7fa;
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.9em;
    color: #e74c3c; /* 红色代码 */
    border: 1px solid #e0e6ed;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .section-content {
        max-height: none;
        flex-direction: column;
    }
    .image-container {
        max-width: 100%;
        height: auto;
    }
    .text-container {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 992px) {
    .section-content {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }
    
    .image-container,
    .text-container {
        margin: 5px 0;
        width: 100%;
        max-width: 100%;
    }
    
    .image-container {
        border-right: none;
        margin-bottom: 15px;
        height: auto;
    }
} 