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

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: backdrop-filter 0.3s ease;
}

.navbar:hover {
    backdrop-filter: blur(15px);
}

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

.navbar a:hover {
    color: #FFC371;
}

/* 主内容区样式 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 100px 20px 40px 20px;
}

.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    backdrop-filter: blur(10px);
    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 6px 10px rgba(0, 0, 0, 0.15);
}

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

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

.card h3 {
    font-size: 18px;
    margin-top: 15px;
    color: #FFC371;
}

.card p {
    font-size: 16px;
    margin-top: 10px;
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 70px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.chapter-nav a {
    display: block;
    margin: 5px 0;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.chapter-nav a:hover {
    color: #FFC371;
}

/* 按钮样式 */
.cta-button {
    background: linear-gradient(45deg, #1E90FF, #00BFFF);
    border: none;
    border-radius: 25px;
    color: white;
    padding: 15px 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    background: linear-gradient(45deg, #1C86EE, #009ACD);
    transform: scale(1.05);
}

/* CSS代码示例样式 */
.code-example {
    background: rgba(0, 0, 0, 0.8);
    color: #00FF00;
    padding: 15px;
    border-radius: 10px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    margin: 20px 0;
}

/* 图片响应式 */
.responsive-img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

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

/* 背景与布局 */
.section {
    padding: 60px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.section:last-child {
    border-bottom: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chapter-nav {
        position: static;
        display: flex;
        justify-content: center;
        background: none;
        backdrop-filter: none;
    }
    .chapter-nav a {
        margin: 0 5px;
        font-size: 12px;
    }
    .container {
        grid-template-columns: 1fr;
        padding: 100px 10px 20px 10px;
    }
}

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

.animated-element {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInSlideUp 1s forwards;
}

