
/* 
    主页整体样式设计
    采用深蓝色和紫色为主色调，搭配亮蓝、白色和银色作为辅色，点缀色为亮橙色，增强视觉层次感。
    使用Flexbox和Grid布局实现响应式设计，确保在不同设备上均有良好的展示效果。
    添加粒子动画和悬停效果，提升页面的科技感和互动性。
*/

/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #0d1b2a, #1b263b, #415a77, #778da9, #e0e1dd);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    overflow-x: hidden;
}

/* 容器 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    padding: 40px;
}

/* 头部导航 */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(27, 38, 59, 0.9);
    padding: 20px 40px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #00aaff;
}

/* 主内容区域 */
.main {
    margin-top: 100px;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.article-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.sidebar {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

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

/* 标题样式 */
h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: #e0e1dd;
}

h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

h3 {
    font-size: 20px;
    margin-top: 30px;
    margin-bottom: 15px;
}

h4 {
    font-size: 18px;
    margin-top: 25px;
    margin-bottom: 10px;
}

/* 段落样式 */
p {
    font-size: 16px;
    line-height: 1.6;
    color: #ffffff;
    margin-bottom: 15px;
}

a {
    color: #00aaff;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

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

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

table th {
    background-color: #1b263b;
}

table tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

/* 按钮样式 */
button {
    background-color: #00aaff;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

button:hover {
    background-color: #0077cc;
    transform: scale(1.05);
}

/* 代码块样式 */
pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 10px;
    overflow: auto;
}

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

code::before {
    content: '代码块';
    position: absolute;
    top: -20px;
    left: 0;
    background: #415a77;
    color: #ffffff;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 12px;
}

/* 粒子效果 */
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: move 10s linear infinite;
}

@keyframes move {
    from {
        transform: translate(0, 0);
    }
    to {
        transform: translate(100vw, 100vh);
    }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: column;
    }
    .nav-links {
        display: none;
    }
}

