
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #1e3c72, #2a5298); /* 主色调渐变背景 */
    color: #ffffff;
    overflow-x: hidden; /* 避免水平滚动条 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 60, 114, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    transition: top 0.3s;
}

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

.navbar.visible {
    top: 0;
}

.navbar a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1em;
    position: relative;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #00FF7F;
}

.navbar a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background: #00FF7F;
    left: 0;
    bottom: -5px;
    transition: width 0.3s;
}

.navbar a:hover::after {
    width: 100%;
}

/* 主内容区样式 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 100px 40px 40px 40px; /* 顶部留出导航栏空间 */
}

/* 模块样式 */
.module {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.6);
}

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

.module img:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

/* 文章样式 */
article {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

article h2, article h3 {
    color: #00FF7F;
}

article pre {
    background: #2a5298;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

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

/* 提示信息样式 */
.callout {
    grid-column: 1 / -1;
    background: rgba(255, 165, 0, 0.8);
    color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 1.5em;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
    }

    .container {
        padding: 100px 20px 20px 20px;
    }

    .callout {
        font-size: 1.2em;
    }
}

/* 提升视觉层次 */
.section-title {
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background: #00FF7F;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* 按钮样式 */
.button {
    background: #00FF7F;
    border: none;
    padding: 12px 25px;
    color: #1e3c72;
    font-size: 1em;
    border-radius: 5px;
    box-shadow: 0 5px #999;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.button:active {
    box-shadow: 0 2px #666;
    transform: translateY(3px);
}

.button:hover {
    background: #00cc6a;
}

/* 代码示例样式 */
.code-sample {
    background: #1e3c72;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
}

.code-sample code {
    color: #00FF7F;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1em;
}

/* 阴影与光效 */
.light-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    filter: blur(100px);
    transform: translate(-50%, -50%);
    animation: lightPulse 5s infinite;
}

@keyframes lightPulse {
    0%, 100% {
        opacity: 0.3;
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1.2);
    }
}

