
/* 主要页面背景采用深蓝至紫色的线性渐变，营造科技感与高级质感 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 使用现代无衬线字体，确保可读性 */
    font-size: 16px; /* 正文字号设置为16px，介于15-17px之间 */
    line-height: 1.6;
    background: linear-gradient(135deg, #1E2D50, #6F42C1); /* 渐变背景 */
    color: #FFFFFF; /* 文字颜色设置为白色，确保与背景形成对比 */
    transition: background 0.5s ease; /* 平滑过渡背景变化 */
    overflow-x: hidden; /* 防止出现水平滚动条 */
}

/* 页面容器使用响应式网格布局，适配不同屏幕宽度 */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr)); /* 每个模块宽度不小于500px */
    gap: 30px; /* 模块之间的间距 */
    padding: 60px 20px;
    max-width: 1920px;
    margin: 0 auto;
}

/* 模块样式，分区清晰且具备阴影效果 */
.module {
    background-color: rgba(255, 255, 255, 0.1); /* 半透明背景增强层次感 */
    padding: 40px;
    border-radius: 12px; /* 圆角设计 */
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2); /* 立体感阴影 */
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module:hover {
    transform: translateY(-10px); /* 悬停时轻微上移 */
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.3); /* 加深阴影 */
}

/* 标题样式，确保与正文区分 */
h1, h2, h3, h4 {
    color: #FFFFFF;
    margin-bottom: 20px;
}

h1 {
    font-size: 2.5em;
    text-align: center;
    margin-top: 40px;
}

h2 {
    font-size: 2em;
    border-bottom: 2px solid #FFA726; /* 使用点缀色线条突出标题 */
    display: inline-block;
    padding-bottom: 10px;
}

h3 {
    font-size: 1.75em;
}

/* 段落样式，增加行间距提升可读性 */
p {
    color: #E0E0E0;
    margin-bottom: 20px;
    font-size: 1em;
    line-height: 1.8;
}

/* 图片装饰样式，应用圆角与阴影效果 */
img.decorative {
    width: 100%;
    height: auto;
    border-radius: 8px;
    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.3);
}

/* 按钮样式，使用点缀色增强视觉焦点 */
.button {
    background: linear-gradient(45deg, #FFA726, #FF9800); /* 渐变按钮背景 */
    color: #FFFFFF;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-size: 1em;
}

.button:hover {
    background: linear-gradient(45deg, #FF9800, #FFA726); /* 反向渐变 */
    transform: scale(1.05); /* 悬停时放大 */
}

/* 导航栏样式，固定顶部并在滚动时改变背景 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(30, 45, 80, 0.8); /* 半透明背景 */
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: background 0.3s ease;
}

.navbar.scrolled {
    background: rgba(30, 45, 80, 1); /* 滚动后背景完全不透明 */
}

.navbar a {
    color: #FFFFFF;
    margin: 0 15px;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

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

.navbar a:hover::after {
    width: 100%; /* 悬停时显示下划线 */
}

/* 移动端汉堡菜单 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle div {
    width: 25px;
    height: 3px;
    background-color: #FFFFFF;
    margin: 4px 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .navbar a {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    .navbar.open a {
        display: block;
        margin: 10px 0;
    }
}

/* 背景动态图形装饰 */
.tech-graphic {
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, #6F42C1, transparent);
    border-radius: 50%;
    opacity: 0.2;
    animation: rotate 20s linear infinite;
}

.tech-graphic::before, .tech-graphic::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    background-color: #FFA726;
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: scale 10s ease-in-out infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes scale {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.5); }
}

/* 代码块样式，确保与正文区分 */
pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 8px;
    overflow: auto;
    font-size: 0.9em;
}

code {
    color: #FFA726;
    font-family: 'Source Code Pro', monospace;
}

/* 折叠区域样式 */
.details {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary {
    cursor: pointer;
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
    font-weight: bold;
}

.summary::before {
    content: '+';
    position: absolute;
    left: 0;
    top: 0;
}

.details[open] .summary::before {
    content: '-';
}


