
/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置根字体大小和背景颜色 */
:root {
    --primary-color: #002B5B; /* 深蓝色，主色调 */
    --secondary-color: #F5F5F5; /* 灰色，背景色 */
    --accent-color-orange: #FF8C00; /* 橙色，强调色 */
    --accent-color-green: #32CD32; /* 绿色，强调色 */
    --text-color: #333333; /* 文字颜色 */
    --border-color: #E0E0E0; /* 边框颜色 */
}

/* 设置全局字体和背景 */
body {
    background-color: var(--secondary-color);
    color: var(--text-color);
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    padding: 20px;
}

/* 标题样式 */
h2, h3 {
    font-family: 'Roboto Bold', sans-serif;
    color: var(--primary-color);
    margin-bottom: 15px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

/* 段落样式 */
p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* 代码块样式 */
pre {
    background: #2d2d2d;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
    margin-bottom: 20px;
    position: relative;
}

pre code {
    color: #f8f8f2;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 代码块标题 */
pre code::before {
    content: "代码示例";
    display: block;
    background: #44475a;
    color: #f8f8f2;
    padding: 5px 10px;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    font-weight: bold;
    font-size: 12px;
}

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

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

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--primary-color);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.navbar a {
    color: #FFFFFF;
    text-decoration: none;
    margin-left: 15px;
    font-size: 16px;
}

.navbar a:hover {
    text-decoration: underline;
}

/* 面包屑导航样式 */
.breadcrumb {
    margin-top: 80px;
    font-size: 14px;
    color: #666666;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    margin-right: 5px;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 卡片布局样式 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 20px;
    padding: 20px;
}

.card {
    background-color: #FFFFFF;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* 悬停效果和微交互 */
.button {
    background-color: var(--accent-color-green);
    color: #FFFFFF;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

/* 响应式设计 */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .breadcrumb {
        font-size: 12px;
    }
}

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

.hero {
    height: 60vh;
    background: linear-gradient(135deg, var(--primary-color), #005BB5);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 2s ease-out;
    margin-bottom: 40px;
}

.scroll-animation {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.scroll-animation.visible {
    opacity: 1;
    transform: translateY(0);
}

