
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #0074D9 70%, #EAEAEA 25%, #FFA500 5%); /* 渐变背景，主色70%，辅色25%，点缀色5% */
    color: #333333;
    line-height: 1.6;
    transition: background 0.5s, color 0.5s;
}

/* 容器样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 100px auto 50px auto; /* 顶部留出导航栏空间 */
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 顶部提示信息 */
.notice {
    text-align: center;
    font-size: 1.5rem;
    color: #FFFFFF;
    background-color: rgba(0, 116, 217, 0.8); /* 半透明主色背景 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* 文章标题样式 */
article h2 {
    font-size: 2rem;
    color: #FFFFFF;
    text-align: center;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* 副标题样式 */
article h3 {
    font-size: 1.75rem;
    color: #FFD700; /* 亮色点缀 */
    margin-top: 30px;
    margin-bottom: 15px;
    border-bottom: 2px solid #FFA500;
    padding-bottom: 5px;
}

/* 段落样式 */
article p {
    font-size: 1rem;
    color: #F0F0F0;
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 代码块样式 */
article pre {
    background-color: #2D2D2D;
    color: #F8F8F2;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* 代码高亮 */
article code {
    color: #50FA7B;
    font-family: 'Courier New', Courier, monospace;
}

/* 图片样式 */
article img {
    max-width: 650px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    margin: 20px auto;
    display: block;
    transition: transform 0.3s, box-shadow 0.3s;
}

/* 图片悬停效果 */
article img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* 链接样式 */
article a {
    color: #FFA500;
    text-decoration: none;
    position: relative;
}

article a::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #FFA500;
    transform-origin: bottom right;
    transition: transform 0.25s ease-out;
}

article a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(0, 116, 217, 0.9); /* 半透明主色背景 */
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 15px;
    font-size: 1rem;
    transition: color 0.3s;
}

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

/* 响应式布局 */
@media (max-width: 1200px) {
    .container {
        width: 95%;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar a {
        margin: 10px 0;
    }

    article h2 {
        font-size: 1.75rem;
    }

    article h3 {
        font-size: 1.5rem;
    }

    article p {
        font-size: 0.95rem;
    }
}

/* 高级动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 元素逐渐显现 */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.fade-in-up:nth-child(1) { animation-delay: 0.1s; }
.fade-in-up:nth-child(2) { animation-delay: 0.2s; }
.fade-in-up:nth-child(3) { animation-delay: 0.3s; }
/* ...继续为更多元素添加延迟 */

/* 折叠区域样式 */
.collapsible {
    background-color: rgba(0, 116, 217, 0.5);
    color: #FFFFFF;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.collapsible:hover {
    background-color: rgba(255, 165, 0, 0.7);
}

.content {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background-color: rgba(234, 234, 234, 0.3);
    border-radius: 5px;
    margin-top: 5px;
}

/* 代码示例块样式 */
.code-block {
    background-color: #1E1E1E;
    color: #C5C8C6;
    padding: 15px;
    border-radius: 8px;
    font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
    overflow-x: auto;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* 链接背景避免被导航栏遮挡 */
.section {
    padding-top: 60px;
}

/* 按钮样式 */
button {
    background-color: #FFA500;
    color: #FFFFFF;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #FF8C00;
}

