
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', sans-serif;
    background: linear-gradient(135deg, #004C99, #F7F7F7);
    color: #333333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: sticky;
    top: 0;
    background-color: #004C99;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar li {
    margin: 0 1rem;
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #FFA500;
}

/* 主体内容布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    background-color: rgba(247, 247, 247, 0.9);
}

/* 模块样式 */
.module {
    background-color: #FFFFFF;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

/* 标题样式 */
h1, h2, h3, h4 {
    font-family: 'Helvetica Neue', sans-serif;
    color: #004C99;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

/* 段落样式 */
p {
    font-size: 1rem;
    color: #333333;
}

/* 代码块样式 */
pre {
    background-color: #F5F5F5;
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

code {
    font-family: 'Courier New', Courier, monospace;
    color: #D14;
}

/* 按钮样式 */
.btn {
    background-color: #FFA500;
    color: #FFFFFF;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 1rem;
}

.btn:hover {
    background-color: #FF8C00;
    transform: translateY(-2px);
}

/* 图片样式 */
img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

/* 卡片布局 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.card {
    flex: 1 1 calc(33.333% - 2rem);
    background-color: #FFFFFF;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 底部样式 */
.footer {
    background-color: #004C99;
    color: #FFFFFF;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer .contact, .footer .social-media {
    margin: 1rem 0;
}

.footer a {
    color: #FFA500;
    text-decoration: none;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #FF8C00;
}

@media (min-width: 768px) {
    .footer {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .footer .contact, .footer .social-media {
        margin: 0;
    }
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 20%;
    right: 0;
    background-color: rgba(0,76,153,0.8);
    padding: 1rem;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    display: flex;
    flex-direction: column;
}

.chapter-nav a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0.5rem 0;
    transition: color 0.3s ease;
}

.chapter-nav a:hover {
    color: #FFA500;
}

/* 提示信息样式 */
.banner {
    background-color: rgba(255,165,0,0.1);
    border-left: 5px solid #FFA500;
    padding: 1rem;
    margin: 2rem;
    border-radius: 4px;
}

/* 折叠区域样式 */
.collapsible {
    background-color: #f1f1f1;
    color: #333;
    cursor: pointer;
    padding: 0.5rem;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
    transition: background-color 0.3s ease;
}

.active, .collapsible:hover {
    background-color: #ddd;
}

.content {
    padding: 0 1rem;
    display: none;
    overflow: hidden;
    background-color: #f9f9f9;
    border-left: 3px solid #FFA500;
    margin-bottom: 1rem;
}

/* CSS代码示例样式 */
.code-example {
    background-color: #272822;
    color: #F8F8F2;
    padding: 1rem;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin: 1rem 0;
}

.code-example code {
    color: #66D9EF;
}

