
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background: linear-gradient(135deg, #964B00, #808000, #F5F5DC);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    color: #333;
}

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

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #964B00;
    padding: 15px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar ul {
    display: flex;
    justify-content: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar li {
    margin: 0 20px;
}

.navbar a {
    color: #F5F5DC;
    text-decoration: none;
    font-weight: bold;
    position: relative;
}

.navbar a::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #1E90FF;
    transition: width .3s;
}

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

/* 主内容容器 */
.container {
    max-width: 1200px;
    margin: 100px auto 50px;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* 文章样式 */
article {
    background-color: rgba(245, 245, 220, 0.9);
    padding: 20px;
    border: 2px dashed #808000;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

article h2, article h3, article h4 {
    color: #964B00;
    margin-bottom: 10px;
}

article p {
    margin-bottom: 15px;
}

/* 代码块样式 */
pre {
    background-color: #1E90FF;
    color: #fff;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
}

code {
    font-size: 14px;
}

/* 图片样式 */
img.decorative {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 提示信息样式 */
.prompt {
    background-color: #1E90FF;
    color: #fff;
    padding: 10px 20px;
    text-align: center;
    font-size: 18px;
    border-radius: 5px;
    margin-bottom: 20px;
}

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

    .navbar li {
        margin: 10px 0;
    }

    .container {
        grid-template-columns: 1fr;
    }

    article {
        padding: 15px;
    }
}

/* 其他装饰元素 */
.scanline {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(to right, transparent, #1E90FF, transparent);
    animation: scan 2s linear infinite;
    pointer-events: none;
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

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

button:hover {
    background-color: #1E90FF;
    transform: scale(1.05);
}

/* 折叠区域样式 */
.details {
    background-color: #F5F5DC;
    border: 1px solid #A9A9A9;
    padding: 10px;
    border-radius: 5px;
    margin-top: 10px;
}

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

table, th, td {
    border: 1px solid #A9A9A9;
}

th, td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #808000;
    color: #fff;
}

/* 高亮区域样式 */
.highlight {
    border: 3px dashed #808000;
    padding: 20px;
    margin: 20px 0;
    position: relative;
}

.highlight::before,
.highlight::after {
    content: '';
    position: absolute;
    width: 15px;
    height: 15px;
    background: #808000;
}

.highlight::before {
    top: -10px;
    left: -10px;
}

.highlight::after {
    bottom: -10px;
    right: -10px;
}

/* 打字机效果 */
.typing {
    display: inline-block;
    border-right: 2px solid #1E90FF;
    white-space: nowrap;
    overflow: hidden;
    animation: typing 3s steps(30, end), blink 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: #1E90FF; }
}

/* 固定导航栏调整 */
.navbar {
    padding: 10px 0;
}

