
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #1F1F1F 70%, #3DDC84 25%, #A6ACAF 5%);
    color: #FFFFFF;
    line-height: 1.6;
    transition: background 0.5s ease;
}

/* 容器布局 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* 头部样式 */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(31, 31, 31, 0.9);
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: center;
    gap: 30px;
}

nav a {
    color: #3DDC84;
    text-decoration: none;
    font-size: 18px;
    position: relative;
    transition: color 0.3s;
}

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

nav a:hover {
    color: #A6ACAF;
}

nav a:hover::after {
    width: 100%;
}

/* 主内容区域 */
.main-content {
    padding-top: 80px; /* 为固定导航栏留出空间 */
}

.article {
    background: rgba(31, 31, 31, 0.8);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.article h2, .article h3, .article h4 {
    color: #3DDC84;
}

.article p {
    font-size: 16px;
    margin-bottom: 20px;
}

.article pre {
    background: #2E3B4E;
    padding: 15px;
    border-radius: 5px;
    overflow: auto;
    margin-bottom: 20px;
}

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

/* 图片样式 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

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

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

/* 提示信息样式 */
.notification {
    background: #3DDC84;
    color: #1F1F1F;
    padding: 15px;
    border-radius: 5px;
    text-align: center;
    font-size: 18px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

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

    .article {
        padding: 20px;
    }

    .notification {
        font-size: 16px;
    }
}

/* 按钮样式 */
.button {
    background-color: #3DDC84;
    border: none;
    padding: 12px 25px;
    color: #1F1F1F;
    font-size: 16px;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

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

/* 折叠内容样式 */
.collapsible {
    background-color: #2E3B4E;
    color: #FFFFFF;
    cursor: pointer;
    padding: 10px 20px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.collapsible:hover {
    background-color: #3DDC84;
}

.content {
    padding: 0 20px;
    display: none;
    overflow: hidden;
    background-color: #1F1F1F;
    border-radius: 5px;
    margin-bottom: 20px;
}

.content p {
    margin: 15px 0;
}

/* 代码块标题 */
pre code::before {
    content: "代码示例";
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #6FCF97;
    margin-bottom: 5px;
}

/* 提升视觉层级 */
.section {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.section .card {
    background: #2E3B4E;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

.section .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px  sixteen px rgba(0,0,0,0.5);
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

/* 过渡效果 */
.transition {
    transition: all 0.3s ease;
}

/* 无关的链接不添加下划线 */
a {
    text-decoration: none;
    color: inherit;
}

/* 强制内部链接nofollow */
a[href^="#"] {
    rel: nofollow;
}

/* 图片描述属性为空 */
img {
    alt: "";
}

/* 确保段落宽度不小于500px */
@media (min-width: 500px) {
    .article p {
        max-width: 800px;
    }
}


