
/* 
    全局样式设置
    使用现代无衬线字体，设置基础字体大小与行高，确保可读性
*/
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #ffffff;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    background-size: 400% 400%;
    animation: gradientBackground 15s ease infinite;
    overflow-x: hidden;
}

/* 渐变背景动画 */
@keyframes gradientBackground {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(32, 58, 67, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

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

/* 主要内容容器，使用网格布局 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 100px 20px 20px;
}

/* 网格项样式 */
.grid-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
    transition: background 0.3s, transform 0.3s;
}

.grid-item:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-10px);
}

/* 文章标题样式 */
h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
    color: #00ffff;
    margin-bottom: 15px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

h4 {
    font-size: 18px;
}

/* 段落样式 */
p {
    color: #dddddd;
    margin-bottom: 15px;
    text-align: justify;
}

/* 代码块样式 */
pre {
    background: rgba(0, 0, 0, 0.6);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 15px;
}

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

/* 图片样式，圆角、阴影与悬浮效果 */
img.decorative {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 255, 255, 0.5);
    transition: transform 0.3s, box-shadow 0.3s;
}

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 30px rgba(0, 255, 255, 0.7);
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

th, td {
    border: 1px solid #00ffff;
    padding: 10px;
    text-align: left;
}

th {
    background: rgba(0, 255, 255, 0.2);
}

td {
    background: rgba(255, 255, 255, 0.1);
}

/* 强调文本样式 */
span.highlight {
    color: #00ffff;
    font-weight: bold;
}

/* 按钮样式 */
.button {
    background-color: #00ccff;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.button:hover {
    background-color: #0099ff;
    transform: scale(1.05);
}

/* 折叠区域样式 */
.collapsible {
    background: 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;
}

.active, .collapsible:hover {
    background: rgba(0, 255, 255, 0.2);
}

.content {
    padding: 0 15px;
    display: none;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 5px;
    margin-bottom: 15px;
}

/* 响应式设计优化 */
@media only screen and (max-width: 600px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .navbar a {
        margin: 10px 0;
    }
}

