
/* 全局样式重置，消除不同浏览器默认的样式差异 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置页面的主字体和背景颜色，使用线性渐变作为背景 */
body {
    font-family: 'Roboto', sans-serif; /* 使用现代感强的无衬线字体 */
    background: linear-gradient(135deg, #f0f0f0, #d9d9d9); /* 浅灰色渐变背景 */
    color: #0C2D48; /* 主色调，深蓝色 */
    line-height: 1.6;
    padding-top: 60px; /* 为固定导航栏预留空间 */
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 浮动效果 */
    z-index: 1000;
    display: flex;
    justify-content: center;
    transition: background 0.3s ease-in-out;
}

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

.navbar li {
    margin: 0 15px;
}

.navbar a {
    text-decoration: none;
    color: #0C2D48;
    padding: 8px 12px;
    font-family: 'Open Sans', sans-serif;
    transition: background 0.3s, color 0.3s;
}

.navbar a:hover {
    background: linear-gradient(45deg, #FF9900, #FFA500); /* 点缀色渐变 */
    color: #ffffff;
    border-radius: 4px;
}

/* 主要内容区域的布局，使用网格系统 */
.container {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: auto;
}

/* 侧边栏样式 */
.sidebar {
    background-color: #FF9900; /* 辅助色 */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.sidebar h3 {
    color: #ffffff;
    margin-bottom: 15px;
}

.sidebar img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 文章内容样式 */
article {
    background-color: #ffffff; /* 内容区背景色 */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

article h2, article h3 {
    color: #0C2D48;
    margin-bottom: 10px;
}

article h2 {
    font-size: 24px;
    margin-top: 20px;
}

article h3 {
    font-size: 20px;
    margin-top: 15px;
}

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

article pre {
    background: #f4f4f4;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

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

/* 代码块特殊样式，区分于正文内容 */
.code-sample {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin-bottom: 20px;
}

/* 示例数据区域样式 */
.examples {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
}

.example-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    width: calc(50% - 10px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.example-card img {
    width: 100%;
    height: auto;
    display: block;
}

.example-card .content {
    padding: 15px;
}

.example-card .content h4 {
    margin-bottom: 10px;
    color: #0C2D48;
}

.example-card .content p {
    font-size: 14px;
    color: #555555;
}

/* 响应式设计，适配不同屏幕尺寸 */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr 2fr;
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .example-card {
        width: 100%;
    }
    
    .navbar ul {
        flex-direction: column;
        align-items: center;
    }
    
    .navbar li {
        margin: 10px 0;
    }
}

/* 互动提示文字的样式 */
.prominent-text {
    text-align: center;
    font-size: 20px;
    color: #FF9900;
    margin: 20px 0;
    animation: fadeIn 2s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

/* 过渡效果的应用 */
.fade-in {
    opacity: 0;
    animation: fadeIn 2s forwards;
}

/* 图片装饰性样式 */
.decorative-image {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.decorative-image:hover {
    transform: rotate(3deg) scale(1.03);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* 折叠区域样式 */
.collapsible {
    background-color: #0C2D48;
    color: #ffffff;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: background 0.3s;
}

.collapsible:hover {
    background-color: #1A4E76;
}

.content-collapsible {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background-color: #f9f9f9;
    color: #0C2D48;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* 高级动画效果 */
@keyframes slideDown {
    from { max-height: 0; opacity: 0; }
    to { max-height: 500px; opacity: 1; }
}

@keyframes slideUp {
    from { max-height: 500px; opacity: 1; }
    to { max-height: 0; opacity: 0; }
}

