
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #1e3c72, #2a5298); /* 主色调渐变背景 */
    color: #ffffff; /* 文字颜色为白色，确保对比度 */
    transition: background 0.5s ease-in-out;
}
/* 导航栏样式 */
.navbar {
    background: rgba(0, 0, 0, 0.5); /* 半透明背景 */
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed; /* 固定导航栏 */
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 细微阴影效果 */
}
.navbar a {
    color: #ffffff;
    text-decoration: none;
    margin: 0 15px;
    font-size: 16px;
    position: relative;
    transition: color 0.3s ease;
}
.navbar a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #ffffff;
    transition: width 0.3s;
}
.navbar a:hover::after {
    width: 100%;
}
.navbar a:hover {
    color: #ff69b4; /* 点缀色用于悬停 */
}
/* 主要内容容器 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 40px;
    padding: 100px 20px 40px 20px; /* 顶部留出导航栏空间 */
}
/* 文章样式 */
article {
    background: rgba(255, 255, 255, 0.1); /* 半透明白色背景 */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    color: #ffffff;
}
article h2, article h3 {
    color: #ff99cc; /* 辅助色用于标题 */
}
article p {
    font-size: 18px;
    line-height: 1.6;
    margin-bottom: 20px;
}
article pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
}
article code {
    color: #50C878;
    font-family: 'Courier New', Courier, monospace;
}
article pre code::before {
    content: '代码示例';
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
}
article table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
article th, article td {
    border: 1px solid #ffffff;
    padding: 10px;
    text-align: left;
}
article th {
    background: #2a5298;
}
article img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
article img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}
/* 按钮样式 */
.button {
    background: linear-gradient(90deg, #004e92, #000428);
    border: none;
    color: white;
    padding: 15px 30px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    border-radius: 5px;
    transition: transform 0.3s ease, background 0.3s ease;
}
.button:hover {
    transform: scale(1.05);
    background: linear-gradient(90deg, #000428, #004e92);
}
/* 卡片模块样式 */
.card {
    background: radial-gradient(circle, #ffe6f0, #ff99cc);
    border: 1px solid #ddd;
    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 6px 12px rgba(0, 0, 0, 0.2);
}
/* 动态背景动画 */
@keyframes gradientAnimation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.hero {
    background: linear-gradient(-45deg, #1e3c72, #2a5298, #1e3c72, #2a5298);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* 页脚样式 */
.footer {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    text-align: center;
    color: #ffffff;
}
.footer a {
    color: #ff69b4;
    text-decoration: none;
    margin: 0 10px;
}
.footer a:hover {
    text-decoration: underline;
}
/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }
    .container {
        grid-template-columns: 1fr;
    }
}

