
/* 全局样式设置 */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    color: #333333;
    background: linear-gradient(135deg, #1E90FF 70%, #00CED1 25%, #FF4500 5%);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 响应式网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    padding: 40px;
    box-sizing: border-box;
}

/* 文章样式 */
article {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* 标题样式 */
h2, h3 {
    color: #1E90FF;
    text-align: center;
    margin-bottom: 20px;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 22px;
}

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

/* 强调文本 */
span {
    font-weight: bold;
}

/* 代码块样式 */
pre {
    background: #f5f5f5;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
    margin-bottom: 20px;
}

code {
    font-family: 'Courier New', Courier, monospace;
    color: #d14;
}

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

img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(30, 144, 255, 0.9);
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: top 0.3s;
}

.navbar.hidden {
    top: -80px;
}

.nav-links {
    display: flex;
    gap: 20px;
}

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

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

/* 响应式隐藏菜单 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle div {
    width: 25px;
    height: 3px;
    background-color: #ffffff;
    margin: 4px 0;
    transition: all 0.3s;
}

/* 主内容区 */
.main-content {
    padding-top: 100px; /* 避免内容被固定导航栏遮挡 */
    flex: 1;
}

/* 底部样式 */
.footer {
    background-color: rgba(30, 144, 255, 0.9);
    color: #ffffff;
    padding: 40px 20px;
    text-align: center;
}

.footer a {
    color: #FF4500;
    text-decoration: none;
    transition: color 0.3s;
}

.footer a:hover {
    color: #00CED1;
}

/* 图片网格 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.image-grid img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.image-grid img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* 代码块样式优化 */
code::before {
    content: "代码示例";
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #1E90FF;
}

pre code {
    background: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    display: block;
    overflow-x: auto;
}

/* 折叠区域样式 */
.details-summary {
    background-color: rgba(30, 144, 255, 0.2);
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.details-summary:hover {
    background-color: rgba(30, 144, 255, 0.4);
}

details p {
    padding: 10px;
    margin: 0;
}

/* 动态线条背景 */
.animated-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('data-flow-lines.svg') repeat;
    animation: moveLines 10s linear infinite;
    opacity: 0.2;
    z-index: -1;
}

@keyframes moveLines {
    from { background-position: 0 0; }
    to { background-position: 1000px 0; }
}

/* 交互动画 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* 高级特效 */
.button {
    background-color: #FF4500;
    border: none;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.button:hover {
    background-color: #1E90FF;
}

/* 搜索框样式 */
.search-box {
    position: relative;
}

.search-box input {
    padding: 10px;
    border: none;
    border-radius: 20px;
    width: 200px;
    transition: width 0.3s;
}

.search-box input:focus {
    width: 300px;
    outline: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }
}

@media (max-width: 500px) {
    h2 {
        font-size: 24px;
    }

    h3 {
        font-size: 20px;
    }

    p {
        font-size: 14px;
    }

    .container {
        padding: 20px;
    }
}

