/* 重置默认样式，消除浏览器差异 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局居中基础设置，确保页面整体居中 */
body {
    font-family: "Microsoft Yahei", "SimSun", "宋体", Arial, sans-serif; /* 适配GBK编码的中文字体 */
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
    min-width: 320px; /* 最小宽度，防止移动端挤压 */
}

/* 全局容器，强化居中效果，适配不同屏幕 */
.container {
    width: 100%;
    max-width: 1200px; /* 最大宽度限制，保证大屏不拉伸 */
    margin: 0 auto; /* 水平居中核心 */
    padding: 0 15px;
}

/* 核心1：匹配所有class包含homeleft的元素，统一作为一个区块并全局居中 */
[class*="homeleft"] {
    width: 100%;
    max-width: 1200px; /* 与全局容器一致，保证居中且不超宽 */
    margin: 0 auto 25px; /* 水平居中 + 底部间距 */
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e8e8e8;
    padding: 25px;
}

/* homeleft区块内的标题样式统一 */
[class*="homeleft"] h1,
[class*="homeleft"] h2,
[class*="homeleft"] h3 {
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
    margin-bottom: 20px;
    color: #333;
}

[class*="homeleft"] h1 {
    font-size: 22px;
}

[class*="homeleft"] h2 {
    font-size: 18px;
    color: #0066cc;
    border-bottom-color: #e0e0e0;
}

[class*="homeleft"] h3 {
    font-size: 16px;
    border-bottom: 2px solid #0066cc;
}

/* homeleft区块内的列表样式统一 */
[class*="homeleft"] ul {
    list-style: none;
}

[class*="homeleft"] li {
    padding: 12px 0;
    border-bottom: 1px dashed #e0e0e0; /* 列表项分割线 */
}

[class*="homeleft"] li:last-child {
    border-bottom: none; /* 最后一项去掉分割线 */
}

[class*="homeleft"] a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

[class*="homeleft"] a:hover {
    color: #0066cc;
    padding-left: 5px; /* hover交互效果 */
}

/* homeleft区块内的文本样式 */
[class*="homeleft"] p {
    margin-bottom: 10px;
    text-indent: 2em;
    color: #666;
}

/* 核心2：#side容器全局居中（和homeleft保持一致的居中规则） */
#side {
    width: 100%;
    max-width: 1200px; /* 与homeleft同宽，保证全局居中 */
    margin: 0 auto 30px; /* 水平居中 + 底部间距 */
}

/* 核心3：#side内所有class包含corner5px的元素，统一作为区块并在#side内居中 */
#side [class*="corner5px"] {
    width: 100%; /* 基于#side的宽度100%，实现全局居中 */
    background-color: #fff;
    border-radius: 5px; /* 匹配corner5px的5px圆角 */
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e8e8e8;
    padding: 20px;
    margin-bottom: 20px; /* 区块间间距分割 */
}

/* corner5px区块内的标题样式统一 */
#side [class*="corner5px"] h3,
#side [class*="corner5px"] h4 {
    padding-bottom: 8px;
    border-bottom: 2px solid #0066cc;
    margin-bottom: 15px;
    font-size: 16px;
    color: #333;
}

/* corner5px区块内的列表样式统一 */
#side [class*="corner5px"] ul {
    list-style: none;
}

#side [class*="corner5px"] li {
    padding: 10px 0;
    border-bottom: 1px solid #f5f5f5;
}

#side [class*="corner5px"] li:last-child {
    border-bottom: none;
}

#side [class*="corner5px"] a {
    color: #666;
    text-decoration: none;
    transition: all 0.3s;
}

#side [class*="corner5px"] a:hover {
    color: #0066cc;
    padding-left: 5px;
}

/* corner5px区块内的文本样式 */
#side [class*="corner5px"] p {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 8px;
}

/* 头部样式 - 增加底部分割线，与导航区分隔 */
.header {
    background-color: #fff;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1px;
}

.header .logo {
    font-size: 24px;
    font-weight: bold;
    color: #0066cc;
    text-decoration: none;
    display: inline-block;
}

/* 导航栏样式 - 全局居中 */
.nav {
    background-color: #0066cc;
    margin-bottom: 25px;
    border-bottom: 1px solid #0055bb;
}

.nav .container {
    display: flex;
    justify-content: flex-start;
}

.nav ul {
	justify-content: center;
    list-style: none;
    display: flex;
    width: 100%;
}

.nav li {
    position: relative;
}

.nav a {
    color: #fff;
    text-decoration: none;
    padding: 12px 20px;
    display: block;
    transition: background-color 0.3s;
}

.nav a:hover {
    background-color: #0055bb;
}

/* 二级导航 */
.nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: none;
    z-index: 999;
    min-width: 180px;
}

.nav .submenu a {
    color: #333;
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
}

.nav .submenu a:hover {
    background-color: #f5f5f5;
    color: #0066cc;
}

.nav li:hover .submenu {
    display: block;
}

/* 废弃原有main的flex布局（因#side需全局居中），改为区块化布局 */
.main {
    width: 100%;
    margin: 0 auto;
}

/* 搜索框样式 */
.search-box {
    display: flex;
    gap: 5px;
    margin-bottom: 20px;
}

.search-box input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    outline: none;
}

.search-box input:focus {
    border-color: #0066cc;
}

.search-box button {
    padding: 8px 15px;
    background-color: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.search-box button:hover {
    background-color: #0055bb;
}

/* 页脚样式 - 全局居中 */
.footer {
    background-color: #333;
    color: #ccc;
    padding: 30px 0;
    text-align: center;
    margin-top: 40px;
    border-top: 3px solid #0066cc;
    width: 100%;
}

.footer .container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer a {
    color: #ccc;
    text-decoration: none;
    margin: 0 10px;
}

.footer a:hover {
    color: #fff;
}

.footer .copyright {
    margin-top: 15px;
    font-size: 12px;
}

/* 响应式适配 - 所有区块在移动端统一居中 */
@media (max-width: 1200px) {
    [class*="homeleft"],
    #side {
        max-width: 95%; /* 移动端宽度占屏幕95%，保证居中 */
    }
}

@media (max-width: 768px) {
    [class*="homeleft"] {
        padding: 15px; /* 移动端减小内边距 */
    }
    #side [class*="corner5px"] {
        padding: 15px;
    }
    .nav ul {
        flex-wrap: wrap;
    }
    .nav a {
        padding: 10px 15px;
    }
}