
/* 全局样式设置，包含基础字体、背景颜色和响应式布局 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体 */
    background: linear-gradient(135deg, #1e3c72 70%, #2a5298 30%); /* 主色调渐变背景 */
    color: #ffffff;
    line-height: 1.6;
}

/* 容器类，使用响应式网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 20px;
    padding: 40px;
}

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

/* 文章副标题样式 */
article h3 {
    font-size: 20px;
    margin-top: 30px;
    color: #ffffff;
    border-bottom: 2px solid #ffdd57; /* 辅色线条 */
    padding-bottom: 10px;
}

/* 文章段落样式 */
article p {
    font-size: 16px;
    margin: 15px 0;
    text-align: justify;
}

/* 代码块样式 */
pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    overflow: visible; /* 确保代码不被遮挡 */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

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

/* 手风琴折叠内容样式 */
.collapsible {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
    border-radius: 8px;
}

.active, .collapsible:hover {
    background-color: #ffdd57; /* 点缀色 */
    color: #000000;
}

.content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0 18px;
    border-radius: 8px;
}

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

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

/* 按钮样式 */
.button {
    background-color: #ffdd57; /* 点缀色 */
    border: none;
    color: #000000;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 8px;
    transition: transform 0.2s, background-color 0.3s;
}

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

/* 导航栏样式 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(0, 47, 75, 0.9); /* 主色调 */
    padding: 15px 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    z-index: 1000;
}

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

.nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
    position: relative;
    transition: color 0.3s ease;
}

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

.nav-links a:hover::after {
    width: 100%;
}

@media (max-width: 768px) {
    .nav-links {
        flex-direction: column;
        align-items: center;
    }
}

/* 提示信息样式 */
.notice {
    background: rgba(255, 221, 87, 0.8); /* 辅色透明背景 */
    color: #000000;
    padding: 20px;
    text-align: center;
    font-size: 18px;
    border-radius: 10px;
    margin: 40px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

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

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 64px rgba(31, 38, 135, 0.5);
}

/* 按钮组样式 */
.button-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* 代码块标题样式 */
pre code::before {
    content: "示例代码:";
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #ffdd57; /* 点缀色 */
}

/* 样式提示区 */
.style-guide {
    background: rgba(0, 47, 75, 0.8); /* 主色调 */
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin: 40px 0;
}

/* 链接样式 */
a {
    color: #ffdd57; /* 点缀色 */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #ffaa00;
}

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

.icon:hover {
    fill: #ffdd57;
}

/* 结尾样式 */
.footer {
    background: rgba(0, 47, 75, 0.9); /* 主色调 */
    color: #ffffff;
    text-align: center;
    padding: 20px;
    position: relative;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.2);
}


