
/* 全局样式设置，包括字体、颜色、背景等 */
/* 设置基本的字体和背景颜色 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    color: #333;
    background: linear-gradient(135deg, #e0f7fa 70%, #80deea 25%, #26c6da 5%);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 导航栏样式 */
.nav-tabs {
    display: flex;
    background-color: rgba(51, 51, 51, 0.9);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-tabs .tab {
    flex: 1;
    padding: 15px;
    color: #fff;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.nav-tabs .tab:hover {
    background-color: rgba(85, 85, 85, 0.9);
    transform: translateY(-2px);
}

.nav-tabs .active {
    background-color: #007BFF;
    box-shadow: 0 4px 8px rgba(0,123,255,0.3);
}

/* 页面主体内容，避免被固定导航栏遮挡 */
.body-content {
    padding-top: 60px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    flex: 1;
}

/* 文章内容区块 */
.article {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}

/* 文章标题样式 */
.article h2, .article h3, .article h4 {
    color: #007BFF;
    margin-bottom: 10px;
}

/* 文章段落样式 */
.article p {
    line-height: 1.6;
    font-size: 16px;
    margin-bottom: 15px;
}

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

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

/* 图片样式，包含圆角、阴影和悬停放大效果 */
.article img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    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.2);
}

/* 按钮样式 */
.button {
    background-color: #007BFF;
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.button:hover {
    background-color: #0056b3;
    transform: scale(1.05);
}

.button:active {
    background-color: #004080;
    transform: scale(0.95);
}

/* 链接样式 */
.link {
    color: #007BFF;
    text-decoration: none;
    transition: color 0.3s, transform 0.2s;
}

.link:hover {
    color: #FFA500;
    transform: scale(1.02);
}

/* 响应式设计：调整布局在不同屏幕上的表现 */
@media (max-width: 768px) {
    .nav-tabs {
        flex-direction: column;
    }
    .body-content {
        grid-template-columns: 1fr;
    }
    .header {
        padding: 40px 10px;
    }
}

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

.fade-in {
    animation: fadeIn 1s ease-in-out;
}

/* 滚动特效 */
.scroll-effect {
    position: relative;
}

.scroll-effect::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, #007BFF, transparent);
    transform: translateX(-50%);
    animation: moveLine 3s linear infinite;
}

@keyframes moveLine {
    0% { top: -100%; }
    100% { top: 100%; }
}

/* 点缀色使用 */
.highlight {
    color: #FFA500;
}

/* 固定导航栏优化 */
.nav-tabs {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}


