
/* 页面整体样式设置 */
/* 使用盒模型和全局字体 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置全局字体 */
body {
    font-family: 'Open Sans', sans-serif;
    background: linear-gradient(135deg, #1E272E, #485460); /* 渐变背景 */
    color: #ffffff;
    line-height: 1.6;
    padding: 20px;
}

/* 容器设置 */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 页面顶部提示 */
.header-notice {
    background-color: rgba(255, 165, 0, 0.8); /* 橙色背景 */
    color: #000;
    padding: 10px 20px;
    text-align: center;
    border-radius: 5px;
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: bold;
}

/* 文章样式 */
article h2 {
    font-family: 'Roboto', sans-serif;
    color: #00FFFF; /* 青色标题 */
    margin-bottom: 15px;
    font-size: 24px;
}

article section {
    margin-bottom: 30px;
    padding: 20px;
    background-color: rgba(245, 245, 245, 0.1); /* 半透明背景 */
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* 代码块样式 */
article pre {
    background-color: rgba(30, 39, 46, 0.8);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-top: 15px;
}

article code {
    color: #FFD700; /* 金色代码字体 */
    font-family: 'Courier New', Courier, monospace;
}

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

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

/* 渐变线条分隔符 */
.divider {
    height: 4px;
    background: linear-gradient(to right, #28A745, #FD7E14);
    margin: 40px 0;
    border: none;
    border-radius: 2px;
}

/* 导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2C3A47;
    padding: 15px 30px;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.navbar .logo {
    font-family: 'Roboto', sans-serif;
    font-size: 20px;
    color: #ffffff;
    text-decoration: none;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navbar ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s;
}

.navbar ul li a:hover {
    color: #FD7E14;
}

/* 主内容区间 */
.main-content {
    margin-top: 80px; /* 给固定导航栏留出空间 */
}

/* 响应式网格系统 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

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

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

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #28A745;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #1e8449;
}

/* 悬停高亮效果 */
.hover-highlight {
    transition: background-color 0.3s, color 0.3s;
}

.hover-highlight:hover {
    background-color: #ffffff;
    color: #1E272E;
}

/* 导航锚点样式 */
.anchor-link {
    color: #FD7E14;
    text-decoration: none;
}

.anchor-link:hover {
    text-decoration: underline;
}

/* 侧边栏样式 */
.sidebar {
    background-color: rgba(44, 58, 71, 0.9);
    padding: 20px;
    border-radius: 10px;
    color: #ffffff;
}

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

.sidebar a:hover {
    color: #FD7E14;
}

/* 面包屑导航样式 */
.breadcrumb {
    margin: 20px 0;
    font-size: 14px;
}

.breadcrumb a {
    color: #28A745;
    text-decoration: none;
    margin-right: 5px;
}

.breadcrumb a::after {
    content: ">";
    margin-left: 5px;
    color: #ffffff;
}

.breadcrumb a:last-child::after {
    content: "";
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        background-color: #2C3A47;
        position: absolute;
        top: 60px;
        right: 0;
        width: 200px;
        display: none;
    }
    
    .navbar ul.active {
        display: flex;
    }
    
    .navbar .menu-toggle {
        display: block;
        cursor: pointer;
    }
}

@media (min-width: 769px) {
    .navbar .menu-toggle {
        display: none;
    }
}

