
/* 
整体页面样式设置
设置全局字体、背景色、主色调和辅助色调，确保响应式布局和视觉一致性。
*/
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: #0A0A0A; /* 深色背景 */
    color: #FFFFFF;
    line-height: 1.6;
}

/*
导航栏样式
固定导航栏顶部，使用渐变背景，添加阴影效果，确保在滚动时清晰可见。
*/
.navbar {
    background: linear-gradient(90deg, #001F3F, #0074D9); /* 渐变背景 */
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.5);
    z-index: 1000;
}

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

.navbar a:hover {
    color: #2ECC40; /* 辅助色绿色 */
}

/*
主内容容器
使用网格布局，确保模块化设计和响应式调整。
*/
.container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    padding: 100px 20px 50px; /* 顶部留白以避免覆盖导航栏 */
}

/*
章节样式
每个章节占据不同的列数，确保在大屏幕和小屏幕上的良好展示。
*/
section {
    grid-column: span 12;
    background: #1A1A1A;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.7);
    margin-bottom: 30px;
    transition: background 0.3s;
}

section:hover {
    background: #2A2A2A;
}

/*
标题样式
设置不同层级标题的字体大小和颜色，增强视觉层次感。
*/
h2 {
    font-size: 24px;
    color: #FF851B; /* 辅助色橙色 */
    margin-bottom: 10px;
}

h3 {
    font-size: 20px;
    color: #2ECC40; /* 辅助色绿色 */
    margin-top: 15px;
    margin-bottom: 10px;
}

h4 {
    font-size: 18px;
    color: #0074D9; /* 主色系蓝色 */
    margin-top: 10px;
    margin-bottom: 8px;
}

/*
段落样式
设置段落的字体大小和行间距，确保可读性。
*/
p {
    font-size: 16px;
    margin-bottom: 15px;
}

/*
代码块样式
区别于正文内容，使用不同的背景和字体样式展示代码示例。
*/
pre {
    background: #2A2A2A;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

pre code {
    font-family: 'Courier New', Courier, monospace;
    color: #FFDC00; /* 点缀色黄色 */
    font-size: 14px;
}

/*
按钮样式
采用主色调和辅助色的渐变效果，添加悬停动画，提升互动性。
*/
.button {
    background: linear-gradient(45deg, #0074D9, #2ECC40);
    color: #FFFFFF;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    font-size: 16px;
}

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

/*
图片样式
圆角、阴影和悬浮效果，确保装饰性图片的美观展示。
*/
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/*
响应式布局
通过媒体查询调整不同屏幕尺寸下的网格布局，确保无论在何种设备上均有良好展示。
*/
@media (max-width: 1024px) {
    .container {
        grid-template-columns: repeat(6, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(2, 1fr);
    }
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar a {
        margin: 10px 0;
    }
}

/*
导航锚点样式
平滑滚动效果，提升用户体验。
*/
html {
    scroll-behavior: smooth;
}

/*
提示信息样式
在显著位置展示提示信息，使用强调色和大字体。
*/
.prompt {
    grid-column: span 12;
    text-align: center;
    font-size: 20px;
    color: #FF851B;
    margin-bottom: 30px;
}

/*
卡片式设计
信息展示的卡片样式，添加悬停效果和渐变边框。
*/
.card {
    background: #1A1A1A;
    border: 1px solid #0074D9;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/*
仪表盘样式
采用Flex布局，实现自适应的仪表盘元素排列。
*/
.dashboard {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.dashboard-item {
    flex: 1 1 calc(33.333% - 40px);
    background: #1A1A1A;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.3s;
}

.dashboard-item:hover {
    transform: scale(1.05);
}

/*
订阅表单样式
输入框和按钮的设计，添加聚焦和悬停效果。
*/
.subscription-form {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.subscription-form input[type="email"] {
    width: 80%;
    max-width: 400px;
    padding: 10px;
    border: 2px solid #0074D9;
    border-radius: 5px;
    transition: border-color 0.3s;
    margin-bottom: 15px;
    background: #2A2A2A;
    color: #FFFFFF;
}

.subscription-form input[type="email"]:focus {
    border-color: #2ECC40;
    outline: none;
}

.subscription-form .submit-button {
    background: linear-gradient(45deg, #0074D9, #2ECC40);
    color: #FFFFFF;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    font-size: 16px;
}

.subscription-form .submit-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/*
多语言切换按钮样式
明显的颜色对比，方便用户快速识别和操作。
*/
.language-switcher {
    margin-top: 20px;
}

.language-switcher button {
    background: #FF851B;
    color: #FFFFFF;
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 0 5px;
    transition: background 0.3s, transform 0.3s;
    font-size: 14px;
}

.language-switcher button:hover {
    background: #2ECC40;
    transform: scale(1.05);
}

/*
页脚样式
简洁的页脚设计，包含版权信息和简要链接。
*/
footer {
    background: #001F3F;
    color: #FFFFFF;
    text-align: center;
    padding: 20px;
    position: relative;
    bottom: 0;
    width: 100%;
}

/*
滚动到顶部按钮样式
固定在页面右下角，提供返回顶部的便捷操作。
*/
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #0074D9;
    color: #FFFFFF;
    padding: 10px 15px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    transition: background 0.3s, transform 0.3s;
}

.scroll-top:hover {
    background: #2ECC40;
    transform: scale(1.2);
}

