
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体确保清晰易读 */
    background: linear-gradient(135deg, #0A1F44 70%, #123456 25%, #FFA500 5%); /* 黄金比例配色：主色70%，辅色25%，点缀色5% */
    color: #FFFFFF; /* 白色文字确保在深色背景上的可读性 */
    line-height: 1.6;
    font-size: 16px; /* 正文字号设定为16px，符合美观协调 */
}

/* 容器和布局 */
.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 固定导航栏 */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(18, 52, 86, 0.8); /* 银灰色磨砂效果 */
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 导航链接样式 */
.nav-links a {
    color: #FFFFFF;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #FFA500; /* 点缀色在悬停时突出显示 */
}

/* 主要提示 */
.prominent-note {
    margin-top: 100px; /* 避免被固定导航栏遮挡 */
    padding: 20px;
    background-color: rgba(255, 165, 0, 0.2); /* 点缀色背景 */
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* 文章样式 */
article {
    width: 100%;
    padding: 40px 20px;
    background-color: rgba(10, 31, 68, 0.8); /* 深蓝色磨砂效果 */
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #00AEEF; /* 亮蓝色标题 */
}

h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
    color: #FFA500; /* 橙色副标题 */
}

p {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 20px;
    color: #FFFFFF;
}

/* 代码块样式 */
pre {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin-bottom: 20px;
}

code {
    color: #00AEEF;
    font-family: 'Courier New', Courier, monospace;
    position: relative;
}

/* 代码块标题 */
code::before {
    content: "代码示例";
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #FFA500;
    font-size: 14px;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #FFFFFF;
    padding: 10px;
    text-align: left;
}

th {
    background-color: rgba(0, 174, 239, 0.8); /* 亮蓝色表头 */
}

tbody tr:nth-child(odd) {
    background-color: rgba(255, 165, 0, 0.1); /* 橙色交替行 */
}

/* 图片样式 */
.img-decor {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    margin: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 网格布局 */
.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .menu-icon {
        display: block;
        cursor: pointer;
    }
    .header {
        padding: 20px;
    }
    .main-content {
        grid-template-columns: 1fr;
    }
    .prominent-note {
        font-size: 16px;
    }
}

