
/* 定义主色调及辅助色 */
:root {
    --primary-color: #002B5B; /* 深蓝色 - 传达专业与稳定 */
    --secondary-color: #4A90E2; /* 辅助蓝色 */
    --accent-color: #FF7F50; /* 亮橙色 - 强调与引导 */
    --neutral-bg: #F5F5F5; /* 浅灰色 - 背景色 */
    --text-color: #333333; /* 文字主色 */
    --heading-color: #002B5B; /* 标题颜色 */
    --border-color: #e0e0e0; /* 边框颜色 */
    --shadow-color: rgba(0, 0, 0, 0.1); /* 阴影颜色 */
}

/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: linear-gradient(135deg, var(--neutral-bg), #e0f7fa);
    color: var(--text-color);
    line-height: 1.6;
}

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

.navbar a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s;
}

.navbar a:hover {
    color: var(--accent-color);
}

/* 面包屑导航样式 */
.breadcrumb {
    list-style: none;
    display: flex;
    gap: 5px;
    padding: 10px 20px;
    background: var(--neutral-bg);
    color: var(--text-color);
}

.breadcrumb li::after {
    content: ">";
    margin-left: 5px;
}

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

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

.breadcrumb a:hover {
    color: var(--accent-color);
}

/* 主要容器 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: var(--heading-color);
    margin-bottom: 10px;
}

h2 {
    font-size: 1.8em;
    grid-column: 1 / -1;
}

h3 {
    font-size: 1.6em;
    margin-top: 20px;
}

/* 文章内容 */
article {
    grid-column: 1 / 9;
}

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

/* 代码块样式 */
pre code {
    background: #272822;
    color: #f8f8f2;
    padding: 15px;
    border-radius: 5px;
    display: block;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
}

/* 图片样式 */
img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: transform 0.3s, box-shadow 0.3s;
}

img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 10px var(--shadow-color);
}

/* 卡片式布局 */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-10px);
}

/* 按钮样式 */
.button {
    background: var(--primary-color);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    box-shadow: 0 5px #001A33;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.button:hover {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    transform: translateY(-3px);
    box-shadow: 0 8px #001A33;
}

/* 关键帧动画 - 渐显 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 应用于动画 */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

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

    article {
        grid-column: 1 / -1;
    }
}

@media (max-width: 480px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .breadcrumb {
        flex-wrap: wrap;
    }
}

/* 折叠区域样式 */
.collapsible {
    background: var(--neutral-bg);
    color: var(--text-color);
    cursor: pointer;
    padding: 10px;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    width: 100%;
    transition: background 0.3s;
}

.active, .collapsible:hover {
    background: var(--accent-color);
    color: #fff;
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: #f1f1f1;
}

/* 导航锚点平滑滚动 */
html {
    scroll-behavior: smooth;
}

/* CSS3示例代码块样式 */
.code-example {
    background: #282c34;
    color: #61dafb;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-example code {
    display: block;
}

/* 图标样式 */
.icon {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* 导航链接样式 */
.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    margin: 0 10px;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background: var(--accent-color);
    left: 0;
    bottom: -5px;
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* 段落独立成块 */
.section {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px var(--shadow-color);
    margin-bottom: 20px;
    transition: transform 0.3s;
}

.section:hover {
    transform: translateY(-5px);
}

/* 渐变线条 */
.gradient-line {
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    margin: 20px 0;
}

/* 3D变换效果 */
.three-d {
    transform: perspective(600px) rotateY(10deg);
    transition: transform 0.5s;
}

.three-d:hover {
    transform: perspective(600px) rotateY(0deg);
}

/* 定义留白区域 */
.spacer {
    height: 40px;
}

/* 结束 */

