
/* 全局样式重置，消除不同浏览器间的默认样式差异 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置网页的背景色为深蓝色，字体颜色为浅灰色，使用Roboto和Open Sans字体 */
body {
    background-color: #1a1a2e; /* 主背景色，传达专业与科技感 */
    color: #eaeaea; /* 文字颜色，确保良好的可读性 */
    font-family: 'Roboto', 'Open Sans', sans-serif; /* 使用现代无衬线字体 */
    line-height: 1.6; /* 行高，提升阅读体验 */
    font-size: 16px; /* 基础字体大小 */
}

/* 设置导航栏样式，固定在顶部，使用半透明背景，添加阴影提升层次感 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(26, 26, 46, 0.9); /* 半透明深蓝色背景 */
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* 轻微阴影 */
    transition: background 0.3s ease; /* 背景过渡效果 */
}

/* 导航链接样式，使用浅灰色，悬停时变为点缀色 */
.navbar a {
    color: #eaeaea;
    margin: 0 15px;
    text-decoration: none;
    font-size: 16px;
    transition: color 0.3s ease;
    rel: nofollow; /* 内部链接添加nofollow属性 */
}

.navbar a:hover {
    color: #f5a623; /* 点缀色，橙色 */
}

/* 设置主容器的最大宽度和内边距，使用流式布局 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px; /* 顶部留出导航栏空间 */
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 设定页面显著位置的提示文本 */
.prompt {
    text-align: center;
    font-size: 18px;
    color: #f5a623; /* 点缀色 */
    margin-bottom: 30px;
    animation: fadeIn 2s ease-in-out;
}

/* Hero Section样式，使用渐变背景，居中对齐文本 */
.hero-section {
    background: linear-gradient(135deg, #1a1a2e, #16213e); /* 线性渐变 */
    padding: 100px 20px;
    text-align: center;
    color: #fff;
    position: relative;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: slideIn 1s ease-out;
}

.hero-section h1 {
    font-size: 48px;
    margin-bottom: 20px;
}

.hero-section p {
    font-size: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* 文章区块样式，分块显示内容，添加阴影和圆角 */
.article-section {
    background-color: #16213e; /* 辅色背景 */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    animation: fadeIn 1.5s ease-in;
}

/* 文章标题样式 */
.article-section h2, .article-section h3, .article-section h4 {
    color: #f5a623; /* 点缀色 */
    margin-bottom: 20px;
}

.article-section p {
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}

/* 代码块样式，使用背景色区分，添加内边距和圆角 */
.article-section pre {
    background-color: #1f1f38;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.article-section code {
    color: #f5a623; /* 强调代码颜色 */
    font-family: 'Courier New', Courier, monospace;
}

/* 图片样式，圆角、阴影、悬浮效果 */
.decorative-image {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.decorative-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* 图片容器，使用flex布局居中显示多张图片 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

/* 按钮样式，使用点缀色背景，圆角，添加悬停和点击效果 */
.btn {
    background-color: #f5a623; /* 点缀色 */
    color: #fff;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 16px;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* CSS3 动画关键帧，淡入效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* CSS3 动画关键帧，滑入效果 */
@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* 响应式设计：调整导航栏内边距和字体大小 */
@media (max-width: 768px) {
    .navbar {
        padding: 15px 30px;
    }
    
    .navbar a {
        margin: 0 10px;
        font-size: 14px;
    }
    
    .hero-section h1 {
        font-size: 36px;
    }
    
    .hero-section p {
        font-size: 18px;
    }
}

/* 响应式设计：调整容器和图片尺寸 */
@media (max-width: 480px) {
    .container {
        margin: 80px auto 30px;
    }
    
    .hero-section {
        padding: 80px 20px;
    }
    
    .hero-section h1 {
        font-size: 28px;
    }
    
    .hero-section p {
        font-size: 16px;
    }
    
    .decorative-image {
        max-width: 100%;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}

