
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1E90FF 70%, #87CEFA 25%, #FFA500 5%);
    color: #333333;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(30, 144, 255, 0.9);
    padding: 20px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .logo {
    font-size: 24px;
    font-weight: bold;
    color: #FFFFFF;
    text-decoration: none;
}

.navbar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: flex-end;
}

.navbar ul li {
    margin-left: 20px;
}

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

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

/* 主内容区域样式 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px auto;
    padding: 20px;
}

.section {
    margin-bottom: 60px;
}

.section h2 {
    font-size: 24px;
    color: #1E90FF;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.section h2::after {
    content: '';
    width: 50px;
    height: 4px;
    background-color: #FFA500;
    position: absolute;
    bottom: 0;
    left: 0;
}

.section h3 {
    font-size: 20px;
    color: #87CEFA;
    margin-top: 40px;
    margin-bottom: 15px;
}

.section p {
    font-size: 16px;
    color: #333333;
    margin-bottom: 20px;
}

.section pre {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 14px;
    margin-bottom: 20px;
    border-left: 4px solid #FFA500;
}

.section pre:hover {
    background-color: #e0f0ff;
}

.code-example {
    background-color: #1E90FF;
    color: #FFFFFF;
    padding: 10px;
    border-radius: 5px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    overflow-x: auto;
}

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

.card {
    background: linear-gradient(135deg, #1E90FF, #87CEFA);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

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

.card img {
    width: 100%;
    border-radius: 12px 12px 0 0;
    transition: transform 0.3s ease;
}

.card img:hover {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
}

.card-content h4 {
    font-size: 18px;
    color: #FFFFFF;
    margin-bottom: 10px;
}

.card-content p {
    font-size: 15px;
    color: #FFFFFF;
    margin-bottom: 15px;
}

/* 微交互效果 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #FFA500;
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

/* 图片装饰 */
.decorative-image {
    border-radius: 50%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.decorative-image:hover {
    transform: rotate(10deg);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        align-items: center;
    }

    .navbar ul li {
        margin: 10px 0;
    }
}

/* 滚动动画 */
.element {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.element.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 代码示例样式 */
.style-code-example {
    background-color: #333333;
    color: #FFFFFF;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.style-code-example:hover {
    background-color: #444444;
}

/* 导航系统 */
.chapter-navigation {
    position: fixed;
    top: 100px;
    right: 20px;
    background-color: rgba(255, 165, 0, 0.9);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.chapter-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.chapter-navigation ul li {
    margin-bottom: 10px;
}

.chapter-navigation ul li a {
    color: #FFFFFF;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.chapter-navigation ul li a:hover {
    color: #87CEFA;
}

