
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用无衬线字体确保易读性 */
    font-size: 16px; /* 正文字号设为16px，适中 */
    background-color: #ffffff; /* 背景使用纯白色 */
    color: #333333; /* 正文字体颜色为深灰色，舒适阅读 */
    line-height: 1.6; /* 行高设置为1.6，增加可读性 */
    transition: all 0.3s ease-in-out; /* 页面过渡效果 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(135deg, #001f3f 70%, #3d3d5c 25%, #ff7e5f 5%);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 17px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #ff7e5f; /* 点缀色悬停效果 */
}

/* 固定侧边栏样式 */
.sidebar {
    position: fixed;
    left: 0;
    top: 70px;
    width: 220px;
    height: calc(100% - 70px);
    background: #2c3e50;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    transform: translateX(-100%);
}

.sidebar.active {
    transform: translateX(0);
}

.sidebar a {
    display: block;
    color: #ecf0f1;
    text-decoration: none;
    margin: 15px 0;
    font-size: 16px;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: #ff7e5f; /* 点缀色悬停效果 */
}

/* 主内容区域样式 */
.main-content {
    margin-left: 0;
    padding: 100px 30px 30px 30px;
    transition: margin-left 0.3s ease;
}

.sidebar.active + .main-content {
    margin-left: 220px; /* 侧边栏展开时主内容区域偏移 */
}

/* 章节导航系统 */
.section-nav {
    position: fixed;
    top: 80px;
    right: 30px;
    background: rgba(0,0,0,0.05);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.section-nav a {
    display: block;
    color: #333333;
    text-decoration: none;
    margin: 10px 0;
    font-size: 15px;
    transition: color 0.3s ease;
}

.section-nav a:hover {
    color: #ff7e5f; /* 点缀色悬停效果 */
}

/* 文章内容样式 */
article {
    max-width: 800px;
    margin: 0 auto;
}

article h2, article h3, article h4 {
    color: #001f3f; /* 主色调标题颜色 */
    margin-top: 40px;
}

article h2 {
    font-size: 24px;
}

article h3 {
    font-size: 20px;
}

article h4 {
    font-size: 18px;
}

article p {
    margin: 15px 0;
    font-size: 16px;
}

/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 20px 0;
}

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

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background: linear-gradient(45deg, #00c6ff, #0072ff);
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    font-size: 16px;
}

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

.button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.5s ease;
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
}

.button:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0;
}

/* 卡片样式 */
.card {
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
    margin: 20px 0;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 动画效果 */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

.data-flow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: rgba(0, 198, 255, 0.1);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    transform: translate(-50%, -50%);
}

.geometric-shape {
    width: 100px;
    height: 100px;
    background: #00c6ff;
    transform: rotate(45deg);
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* 提示信息样式 */
.notice {
    text-align: center;
    background: #ffeb3b;
    padding: 15px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
    margin: 40px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

    .sidebar {
        width: 200px;
    }

    .main-content {
        padding: 80px 20px 20px 20px;
    }

    .section-nav {
        display: none; /* 移动设备隐藏章节导航 */
    }

    img.decorative {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .navbar a {
        margin: 5px 0;
        font-size: 15px;
    }

    .sidebar {
        width: 180px;
    }

    .button {
        padding: 8px 16px;
        font-size: 14px;
    }

    article {
        padding: 0 10px;
    }
}

