
/* 全局样式设置，应用字体、背景和基础布局 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); /* 渐变背景色，体现科技感 */
    color: #333;
    line-height: 1.6;
}

/* 使网页完全响应式，适配不同设备 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

/* 导航栏样式 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: flex-end;
    padding: 10px 20px;
}

nav ul li {
    margin-left: 20px;
}

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

nav ul li a:hover {
    color: #ff9800; /* 点缀色用于悬停效果 */
}

/* 首屏样式 */
.header {
    height: 100vh;
    background: url('https://images.gptkong.com/demo/sample1.png') center center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
}

.header::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 60, 114, 0.6); /* 半透明覆盖层 */
}

.header .content {
    position: relative;
    z-index: 1;
    color: #fff;
}

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

.header p {
    font-size: 18px;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* 章节导航样式 */
.section-nav {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 8px;
}

.section-nav ul {
    list-style: none;
}

.section-nav ul li {
    margin: 10px 0;
}

.section-nav ul li a {
    text-decoration: none;
    color: #fff;
    font-size: 14px;
    transition: color 0.3s ease;
}

.section-nav ul li a:hover {
    color: #ff9800;
}

/* 文章内容样式 */
article {
    padding: 100px 0 50px 0; /* 顶部留出导航栏空间 */
}

article h2, article h3, article h4 {
    color: #fff;
    margin-top: 40px;
    margin-bottom: 20px;
}

article h2 {
    font-size: 32px;
    border-bottom: 2px solid #ff9800;
    display: inline-block;
}

article h3 {
    font-size: 24px;
    margin-top: 30px;
}

article p {
    font-size: 16px;
    color: #f0f0f0;
    margin-bottom: 20px;
}

/* 图片样式 */
img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 信息卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    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.2);
}

/* 渐变按钮样式 */
.cta-button {
    background: linear-gradient(45deg, #1e90ff, #8a2be2);
    border: none;
    border-radius: 25px;
    color: #fff;
    padding: 15px 30px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background: linear-gradient(45deg, #1c86ee, #7a1ebc);
    transform: scale(1.05);
}

/* CSS代码示例样式 */
.code-sample {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.code-sample pre {
    color: #fff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

.code-sample code {
    color: #ff9800;
}

/* 页脚样式 */
footer {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    text-align: center;
    padding: 20px 0;
    position: relative;
    bottom: 0;
    width: 100%;
}

footer a {
    color: #ff9800;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff;
}

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

    .section-nav {
        display: none;
    }
}

/* 动画与过渡细节 */
.fade-in {
    opacity: 0;
    animation: fadeIn 2s forwards;
}

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

/* 面包屑导航样式 */
.breadcrumb {
    margin: 20px 0;
    font-size: 14px;
    color: #ddd;
}

.breadcrumb a {
    color: #ff9800;
    text-decoration: none;
    margin-right: 5px;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 信息层次设计 */
.section {
    margin-bottom: 50px;
}

.section .card {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.section .card img {
    flex: 1 1 300px;
}

.section .card .content {
    flex: 2 1 600px;
}

/* 鼠标悬停链接样式 */
a {
    color: #1e90ff;
    transition: color 0.3s ease;
}

a:hover {
    color: #ff9800;
}

