
/* 全局样式设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 引入Google字体 */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');

/* 设置全局字体和背景色 */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #2D3441 70%, #FCFDFB 25%, #FFA726 5%);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 容器布局 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* 头部导航样式 */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(45, 52, 65, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header .nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.header .nav a {
    color: #FCFDFB;
    text-decoration: none;
    margin: 0 10px;
    position: relative;
    transition: color 0.3s ease;
}

.header .nav a:hover {
    color: #FFA726;
}

/* 主要内容区域 */
.main {
    padding-top: 80px; /* 避免被固定头部遮挡 */
}

/* 强调提示文字样式 */
.highlight-text {
    text-align: center;
    font-size: 1.5rem;
    color: #FFA726;
    margin: 30px 0;
    animation: fadeIn 2s ease-in-out;
}

/* 章节导航样式 */
.chapter-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 40px;
}

.chapter-nav a {
    background: #1E88E5;
    color: #fff;
    padding: 10px 15px;
    margin: 5px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease;
}

.chapter-nav a:hover {
    background: #1565C0;
}

/* 文章内容样式 */
article {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

article h2, article h3 {
    color: #2D3441;
    margin-bottom: 15px;
}

article p {
    margin-bottom: 15px;
}

/* 代码块样式 */
article pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

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

/* 图片展示样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 30px 0;
}

.image-gallery img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 折叠区域样式 */
.collapsible {
    background-color: #1E88E5;
    color: white;
    cursor: pointer;
    padding: 10px 15px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1rem;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: background 0.3s ease;
}

.collapsible:hover {
    background-color: #1565C0;
}

.collapsible:after {
    content: '\002B';
    float: right;
    margin-left: 5px;
}

.collapsible.active:after {
    content: "\2212";
}

.content {
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(30, 43, 61, 0.05);
    border-radius: 5px;
    margin-bottom: 20px;
}

/* 订阅表单样式 */
.subscribe-form {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.subscribe-form input {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    transition: border-color 0.3s ease;
}

.subscribe-form input:focus {
    border-color: #FFA726;
    outline: none;
}

.subscribe-form button {
    padding: 10px;
    background: linear-gradient(45deg, #FFA726, #FFB74D);
    border: none;
    color: #fff;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.subscribe-form button:hover {
    background: linear-gradient(45deg, #FFB74D, #FFA726);
}

/* 版权信息样式 */
.footer {
    text-align: center;
    padding: 20px;
    background: rgba(45, 52, 65, 0.9);
    color: #fff;
    margin-top: 40px;
}

/* 关键帧动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header .nav {
        flex-direction: column;
    }

    .chapter-nav {
        flex-direction: column;
        align-items: center;
    }

    .image-gallery {
        flex-direction: column;
    }
}

