
/* 基础样式与全局设置 */
body {
    margin: 0;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    color: #fff;
    background: linear-gradient(135deg, #1e5799, #7db9e8);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

p, li {
    color: #f0f0f0;
    font-size: 16px;
    line-height: 1.8;
}

a {
    color: #ffeb3b;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #ff9800;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 头部设计 */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
}

header nav .logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 2px;
}

header nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

header nav ul li a {
    font-size: 18px;
    padding: 10px 15px;
    border-radius: 5px;
}

header nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 主体内容区域 */
main {
    margin-top: 80px;
    width: 100%;
}

.section {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.section h2 {
    font-size: 36px;
    margin-bottom: 20px;
    text-align: center;
}

.section p {
    text-align: justify;
}

/* 示例文章样式 */
.article {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    max-width: 1200px;
    margin: 20px auto;
}

.article h2 {
    font-size: 28px;
    color: #ffeb3b;
}

.article pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
}

.article code {
    color: #ffeb3b;
    font-family: 'Courier New', monospace;
    font-size: 14px;
}

.article table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.article table th,
.article table td {
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px;
    text-align: center;
}

.article table th {
    background: rgba(255, 255, 255, 0.1);
}

/* 图片展示 */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 20px 0;
}

.image-grid img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

/* 动画与交互效果 */
button {
    background: linear-gradient(135deg, #ffeb3b, #ff9800);
    color: #000;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(255, 255, 0, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    header nav ul {
        flex-direction: column;
        align-items: center;
    }

    .section {
        padding: 20px;
    }

    .article pre {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    header nav .logo {
        font-size: 20px;
    }

    .section h2 {
        font-size: 28px;
    }
}

