
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica', sans-serif; /* 使用无衬线字体，简洁现代 */
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364); /* 背景使用深蓝到紫色渐变 */
    color: #ffffff; /* 全局字体颜色为白色 */
}

/* 固定导航栏样式 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(32, 58, 67, 0.9); /* 半透明背景 */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 阴影效果 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    z-index: 1000;
    transition: background 0.3s ease;
}

nav:hover {
    background: rgba(32, 58, 67, 1); /* 悬停时背景不透明 */
}

nav .logo {
    font-size: 24px;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

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

nav ul li a:hover {
    color: #00ffff; /* 悬停时颜色变化为点缀色 */
}

/* 主标题样式 */
.header {
    height: 100vh;
    background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    padding: 0 20px;
}

.header h1 {
    font-size: 48px;
    margin-bottom: 20px;
    animation: fadeInDown 2s ease;
}

.header p {
    font-size: 18px;
    max-width: 600px;
    animation: fadeInUp 2s ease;
}

/* 提示文字样式 */
.reference-note {
    position: absolute;
    top: 150px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(32, 58, 67, 0.8);
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 16px;
    animation: pulse 2s infinite;
}

/* 章节导航样式 */
.sidebar {
    position: fixed;
    top: 100px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar a {
    text-decoration: none;
    color: #ffffff;
    font-size: 14px;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: #00ffff;
}

/* 内容区块样式 */
.section {
    padding: 100px 50px;
    display: flex;
    flex-direction: column;
    gap: 50px;
    background: rgba(44, 83, 100, 0.8);
    margin-top: 60px;
}

.section h2 {
    font-size: 32px;
    margin-bottom: 20px;
    border-bottom: 2px solid #00ffff;
    display: inline-block;
}

.section p {
    font-size: 16px;
    line-height: 1.8;
}

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

.card {
    background: #203a43;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.card-content p {
    font-size: 14px;
    line-height: 1.6;
}

/* 图片装饰样式 */
.decorative-images {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.decorative-images img {
    width: 160px;
    height: 160px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.decorative-images img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.4);
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        padding: 10px 20px;
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    .header h1 {
        font-size: 32px;
    }
    
    .header p {
        font-size: 16px;
    }
    
    .section {
        padding: 50px 20px;
    }
    
    .sidebar {
        display: none;
    }
}
    
/* 关键帧动画 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.8;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.8;
    }
}

/* CSS3代码示例区块样式 */
.code-example {
    background: #2c5364;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

.code-example pre {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #00ffff;
}

