
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif; /* 正文字体 */
    background: linear-gradient(135deg, #1E90FF 70%, #F5F5F5 25%, #FFA500 5%);
    color: #333;
    line-height: 1.6;
}

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

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

.navbar a:hover {
    color: #FFA500;
    transition: color 0.3s;
}

/* 侧边导航栏样式 */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    width: 200px;
    height: calc(100% - 70px);
    background-color: #F5F5F5;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

.sidebar a {
    display: block;
    color: #333;
    text-decoration: none;
    margin: 15px 0;
    font-size: 16px;
}

.sidebar a:hover {
    color: #FFA500;
    transition: color 0.3s;
}

/* 主要内容区域样式 */
.main-content {
    margin-left: 220px;
    padding: 80px 30px 30px 30px;
}

h1, h2, h3, h4 {
    font-family: 'Roboto', sans-serif; /* 标题字体 */
    color: #1E90FF;
}

h2 {
    font-size: 24px;
    margin-top: 40px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: #FFA500;
    margin-top: 10px;
    border-radius: 2px;
}

/* 卡片样式 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card img {
    width: 100%;
    height: auto;
    border-bottom: 1px solid #CCCCCC;
}

.card-content {
    padding: 20px;
}

.card-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: #1E90FF;
}

.card-text {
    font-size: 16px;
    color: #555;
}

/* 图片样式 */
.image-decor {
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 响应式设计 */
@media (max-width: 1200px) {
    .sidebar {
        width: 180px;
    }
    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        box-shadow: none;
    }
    .main-content {
        margin-left: 0;
    }
    .card-container {
        grid-template-columns: 1fr;
    }
}

/* 按钮样式 */
.button-primary {
    background-color: #FFA500;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.button-primary:hover {
    background-color: #e69500;
}

.button-success {
    background-color: #32CD32;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.button-success:hover {
    background-color: #28a428;
}

/* 代码示例样式 */
.code-example {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Courier New', Courier, monospace;
    color: #333;
}

.code-example code {
    display: block;
    white-space: pre;
}

/* 提示信息样式 */
.reference-note {
    background-color: #fff3cd;
    border-left: 5px solid #ffeeba;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    font-size: 16px;
    color: #856404;
}

/* 页脚样式 */
.footer {
    background-color: #1E90FF;
    color: #fff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

