
/* 
整体页面样式
采用现代Web技术栈，结合玻璃拟态（Glassmorphism）设计风格，营造未来感与高级质感。
*/

/* 基础样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 统一使用现代无衬线字体 */
    background: linear-gradient(135deg, #001f3f 70%, #5a5a5a 25%, #00ffff 5%);
    color: #ffffff;
    line-height: 1.6;
}

/* 固定导航栏 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 31, 63, 0.8); /* 半透明背景 */
    backdrop-filter: blur(10px); /* 背景模糊效果 */
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.navbar a {
    color: #00ffff;
    margin: 0 15px;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #ffffff;
}

/* 主要内容容器 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px auto; /* 顶部预留导航栏空间 */
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* 文章标题样式 */
article h2 {
    font-size: 2em;
    margin-bottom: 20px;
    text-align: center;
    color: #00ffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 二级标题样式 */
article h3 {
    font-size: 1.5em;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #ffffff;
    border-bottom: 2px solid #00ffff;
    padding-bottom: 5px;
}

/* 段落样式 */
article p {
    font-size: 16px;
    margin-bottom: 15px;
    text-align: justify;
    text-justify: inter-ideograph;
}

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

article pre code {
    color: #00ffff;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 代码块标题 */
article pre code::before {
    content: "代码示例";
    display: block;
    background: #007ACC;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 5px 5px 0 0;
    font-weight: bold;
    font-size: 14px;
}

/* 玻璃卡片样式 */
.glass-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* 动态效果 */
.dynamic-effect {
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.dynamic-effect:hover {
    transform: scale(1.05);
}

.animated-light::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, rgba(255,255,255,0.3), rgba(255,255,255,0));
    transform: rotate(45deg);
    animation: shine 2s infinite;
}

@keyframes shine {
    from {
        transform: rotate(45deg) translateX(-100%);
    }
    to {
        transform: rotate(45deg) translateX(100%);
    }
}

/* 响应式网格布局 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); /* 保证每个模块宽度不小于500px */
    gap: 20px;
}

.grid-item {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 图片样式 */
img.decorative {
    width: 100%;
    max-width: 320px;
    border-radius: 15px;
    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.4);
}

/* 提示信息样式 */
.tip {
    background: rgba(0, 31, 63, 0.8);
    padding: 10px 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    color: #ffffff;
    margin-bottom: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* 折叠区域样式 */
.collapsible {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.collapsible:hover {
    background: rgba(0, 31, 63, 0.8);
}

.content {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 0 10px 10px;
}

.collapsible.active + .content {
    display: block;
}

/* 高亮文本 */
.highlight {
    color: #00ffff;
    font-weight: bold;
}

/* 图标样式 */
.icon {
    width: 24px;
    height: 24px;
    fill: #00ffff;
    transition: fill 0.3s ease;
}

.icon:hover {
    fill: #ffffff;
}

/* 底部资源库样式 */
.footer {
    background: rgba(0, 31, 63, 0.9);
    padding: 40px 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
}

.footer a {
    color: #00ffff;
    margin: 10px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ffffff;
}

/* 固定导航栏防止内容重叠 */
body::before {
    content: "";
    display: block;
    height: 70px; /* 导航栏高度 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }
    .container {
        grid-template-columns: 1fr;
    }
    .grid-container {
        grid-template-columns: 1fr;
    }
}

