
/* 全局样式设置 */
/* 设置页面的基本字体、背景色和文字颜色 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1e3c72 70%, #2a5298 25%, #ff7e5f 5%);
    color: #ffffff;
    overflow-x: hidden;
}

/* 设置主要容器的布局，使用CSS Grid实现不对称布局 */
.container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-gap: 40px;
    padding: 40px;
}

/* 主要内容区块的样式 */
.main-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

/* 侧边栏的样式 */
.sidebar {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 20px;
}

/* 导航栏的样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.9);
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

/* 导航链接的样式 */
.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

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

/* 章节导航的样式 */
.chapter-nav {
    margin-bottom: 30px;
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
}

.chapter-nav li {
    margin-bottom: 10px;
}

.chapter-nav a {
    color: #00ff7f;
    text-decoration: none;
    font-size: 17px;
    transition: color 0.3s ease;
}

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

/* 文章标题的样式 */
.article h2, .article h3, .article h4 {
    color: #ffffff;
    margin-top: 20px;
    margin-bottom: 15px;
}

.article h2 {
    font-size: 24px;
}

.article h3 {
    font-size: 20px;
}

.article h4 {
    font-size: 18px;
}

/* 段落的样式 */
.article p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #ddf2ff;
}

/* 代码块的样式 */
.article pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.article code {
    color: #00ff7f;
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
}

/* 增强的图片样式 */
.article img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 20px 0;
}

.article img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* CSS3 示例代码块的样式 */
.css-example {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-left: 5px solid #00ff7f;
    margin-bottom: 30px;
    border-radius: 5px;
}

.css-example pre {
    background: rgba(0, 0, 0, 0.8);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

.css-example code {
    color: #ff7e5f;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #ff7e5f, #feb47b);
    border: none;
    color: #fff;
    padding: 10px 25px;
    cursor: pointer;
    border-radius: 25px;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 16px;
    margin-top: 20px;
}

.button:hover {
    background: linear-gradient(45deg, #feb47b, #ff7e5f);
    transform: scale(1.05);
}

/* 响应式设计：适配不同设备宽度 */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1.5fr 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        margin-top: 20px;
    }

    .navbar {
        padding: 10px 20px;
    }

    .navbar a {
        margin: 0 10px;
        font-size: 14px;
    }

    .article h2 {
        font-size: 22px;
    }

    .article h3 {
        font-size: 18px;
    }

    .article h4 {
        font-size: 16px;
    }

    .article p {
        font-size: 15px;
    }
}

/* 动画效果：星星闪烁 */
@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

.star {
    position: absolute;
    width: 2px;
    height: 2px;
    background: #fff;
    border-radius: 50%;
    animation: twinkle 2s infinite ease-in-out;
}

/* 动画效果：流星划过 */
@keyframes shoot {
    0% {
        top: -100px;
        left: 50%;
        transform: rotate(45deg);
    }
    100% {
        top: 100vh;
        left: 100vw;
        transform: rotate(45deg);
    }
}

.shooting-star {
    position: absolute;
    width: 3px;
    height: 100px;
    background: linear-gradient(45deg, #fff, transparent);
    animation: shoot 1.5s infinite linear;
}

/* 固定导航提示 */
.fixed-notice {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background: rgba(255, 126, 95, 0.8);
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

/* 过渡效果 */
.fade-in {
    animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 鼠标悬停效果 */
.hover-effect:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* 列表样式 */
.article ul {
    list-style: disc inside;
    margin-bottom: 20px;
}

.article ul li {
    margin-bottom: 10px;
    font-size: 16px;
    color: #cce7ff;
}

/* 表格样式 */
.article table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.article table, .article th, .article td {
    border: 1px solid #ffffff;
}

.article th, .article td {
    padding: 10px;
    text-align: left;
    font-size: 16px;
}

.article th {
    background: rgba(30, 60, 114, 0.8);
}

/* 标签样式 */
.tag {
    display: inline-block;
    background: #00ff7f;
    color: #000;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    margin-right: 5px;
    margin-bottom: 5px;
}

/* 引用样式 */
.article blockquote {
    background: rgba(255, 255, 255, 0.05);
    border-left: 5px solid #ff7e5f;
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
    color: #cce7ff;
    border-radius: 5px;
}

/* 链接样式 */
.article a {
    color: #00ff7f;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article a:hover {
    color: #ff7e5f;
}

