
/* 全局样式重置和基础设置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #ffffff;
    background: linear-gradient(135deg, #1a237e, #512da8);
    background-size: 400% 400%;
    animation: backgroundMove 15s ease infinite;
    line-height: 1.6;
    overflow-x: hidden;
}
/* 动态背景关键帧动画 */
@keyframes backgroundMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 35, 126, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}
.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    position: relative;
    transition: color 0.3s ease;
}
.navbar a:hover {
    color: #FF9800;
}
.navbar .nav-links {
    display: flex;
    align-items: center;
}
.navbar .nav-item {
    position: relative;
    padding: 10px 15px;
    transition: background 0.3s ease;
}
.navbar .nav-item:hover {
    background: rgba(255, 255, 255, 0.2);
}
.navbar .dropdown-menu {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    padding: 10px;
    transition: opacity 0.3s ease;
}
.navbar .nav-item:hover .dropdown-menu {
    display: block;
    opacity: 1;
}
.navbar .dropdown-menu a {
    display: block;
    padding: 5px 0;
    color: #ffffff;
}
.navbar .dropdown-menu a:hover {
    color: #4CAF50;
}
/* 主要内容样式 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
.highlight {
    color: #FF9800;
    font-weight: bold;
}
.article-title {
    font-size: 2em;
    font-weight: 700;
    margin-bottom: 20px;
}
.article-subtitle {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 15px;
}
.article-content p {
    font-size: 1em;
    margin-bottom: 10px;
}
.article-content pre {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}
.article-content code {
    font-family: 'Courier New', Courier, monospace;
    color: #4CAF50;
}
.article-content pre code {
    display: block;
}
/* 图片样式 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
}
.image-gallery img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.5);
}
/* 响应式设计 */
@media (min-width: 768px) {
    .container {
        grid-template-columns: 3fr 1fr;
    }
    .sidebar {
        position: sticky;
        top: 100px;
    }
}
@media (max-width: 600px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar .nav-links {
        flex-direction: column;
        width: 100%;
    }
    .navbar .nav-links a {
        margin: 10px 0;
    }
}
/* 折叠区域样式 */
.collapsible {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-radius: 10px;
    padding: 10px 15px;
    cursor: pointer;
    margin-bottom: 10px;
    transition: background 0.3s ease;
}
.collapsible:hover {
    background: rgba(255, 255, 255, 0.2);
}
.collapsible-content {
    display: none;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(3px);
    border-radius: 10px;
    margin-bottom: 10px;
}
/* 导航章节链接样式 */
.chapter-nav {
    position: fixed;
    top: 150px;
    right: 20px;
    background: rgba(26, 35, 126, 0.8);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 10px;
}
.chapter-nav a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s ease;
}
.chapter-nav a:hover {
    color: #4CAF50;
}
/* “这是一个网页样式设计参考”提示样式 */
.reference-note {
    text-align: center;
    font-size: 1.2em;
    font-weight: 600;
    margin-bottom: 30px;
    color: #FF9800;
}
/* 代码示例块样式 */
.code-block {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}
.code-block code {
    color: #4CAF50;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}
/* 按钮样式 */
.button {
    background: #4CAF50;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease;
}
.button:hover {
    background: #45a049;
}

