
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, rgba(0, 0, 139, 0.8), rgba(105, 105, 105, 0.8)); /* 背景渐变 */
    color: #fff; /* 文字颜色 */
    font-family: 'Roboto', sans-serif; /* 字体设置 */
    line-height: 1.6;
    font-size: 16px;
}
/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px); /* 背景模糊 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    z-index: 1000;
}
.navbar .menu {
    display: flex;
    gap: 15px;
}
.navbar .menu a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.navbar .menu a:hover {
    color: #98FF98; /* 薄荷绿悬停效果 */
}
.navbar .actions a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}
.navbar .actions a:hover {
    color: #98FF98;
}
/* 主容器样式 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px auto; /* 上边距调整为导航栏高度 */
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}
/* 文章样式 */
article {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
article h2, article h3 {
    color: #fff;
    font-weight: 700;
}
article p {
    color: #ddd;
}
article pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    border-radius: 5px;
    overflow: auto;
}
article code {
    color: #98FF98;
    font-family: 'Courier New', Courier, monospace;
}
.article-image {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}
.article-image:hover {
    transform: scale(1.05);
}
/* 图片装饰样式 */
.decorative-image {
    width: 100%;
    max-width: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}
.decorative-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}
/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .container {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    body {
        font-size: 14px;
    }
    .navbar {
        padding: 10px;
    }
    .container {
        padding: 10px;
    }
}
/* 提示样式 */
.reference-note {
    background: rgba(0, 0, 0, 0.6);
    padding: 10px;
    border-left: 5px solid #98FF98;
    margin: 20px 0;
    font-style: italic;
    color: #fff;
}
/* 代码块样式 */
pre code {
    display: block;
    padding: 15px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 8px;
    overflow: auto;
}
pre code::before {
    content: "代码示例";
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #98FF98;
}
/* 底部样式 */
.footer {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    text-align: center;
    color: #fff;
    border-top: 1px solid rgba(255,255,255,0.2);
}
/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.fade-in {
    animation: fadeIn 2s ease-in-out;
}
/* 按钮样式 */
.button {
    background: #98FF98;
    color: #000;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
}
.button:hover {
    background: #76e076;
}
/* 阴影效果 */
.box-shadow {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

