
/* 
整体页面样式设计
以下样式结合了未来感与高级质感，通过使用高级CSS3特性实现色彩丰富、沉浸感强烈的响应式布局。利用Flexbox和Grid布局，确保不同屏幕尺寸下的良好展示效果。注重细节表现，如渐变背景、阴影效果、动画与过渡等，营造出科技美学体验。
*/

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置根字体大小和全局字体 */
:root {
    --main-color: #2c3e50; /* 主色调蓝色 */
    --secondary-color: #8e44ad; /* 辅助色紫色 */
    --accent-color: #f39c12; /* 点缀色橙色 */
    --background-color: #ecf0f1; /* 背景色浅灰 */
    --text-color: #34495e; /* 文字颜色深灰 */
    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Open Sans', sans-serif;
}

/* 全局字体和背景 */
body {
    font-family: var(--font-secondary);
    background: linear-gradient(135deg, var(--background-color), var(--secondary-color));
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(44, 62, 80, 0.9);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 20px 0;
    transition: background 0.3s ease;
    z-index: 1000;
}

.navbar.scrolled {
    background: var(--main-color);
}

.navbar a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 18px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: var(--accent-color);
}

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

/* 分屏设计 */
.split-screen {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 50px;
}

.left-panel, .right-panel {
    flex: 1;
    min-width: 300px;
    padding: 20px;
}

.left-panel {
    background: linear-gradient(135deg, #2c3e50, #8e44ad);
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.left-panel img {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.left-panel img:hover {
    transform: scale(1.05);
}

.right-panel {
    background-color: #34495e;
    color: #ecf0f1;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 30px;
}

/* 标题样式 */
h1, h2, h3, h4 {
    font-family: var(--font-primary);
    color: var(--main-color);
    margin-bottom: 15px;
}

h1 {
    font-size: 32px;
}

h2 {
    font-size: 28px;
}

h3 {
    font-size: 24px;
}

h4 {
    font-size: 20px;
}

/* 文章内容样式 */
article {
    background: rgba(236, 240, 241, 0.9);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 50px;
}

article h2, article h3 {
    color: var(--secondary-color);
}

article pre {
    background: #2c3e50;
    padding: 15px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
}

article code {
    color: #ecf0f1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
}

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

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

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

article th {
    background-color: var(--secondary-color);
    color: #fff;
}

.article-footer {
    text-align: center;
    padding: 20px;
    background: var(--main-color);
    color: #ecf0f1;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

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

.decorative-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0,0,0,0.4);
}

/* 按钮样式 */
.button {
    background-color: var(--accent-color);
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    font-size: 16px;
}

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

/* 代码示例样式 */
.code-sample {
    background: #2c3e50;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.code-sample code {
    color: #ecf0f1;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        padding: 10px;
    }

    .navbar a {
        font-size: 16px;
        margin: 5px 0;
    }

    .split-screen {
        flex-direction: column;
    }

    .left-panel, .right-panel {
        flex: none;
        height: 50vh;
    }

    .container {
        padding: 100px 20px 20px 20px;
    }

    .decorative-image {
        width: 100%;
        height: auto;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* 折叠区域样式 */
.collapsible {
    background-color: var(--main-color);
    color: white;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    border-radius: 10px;
    margin: 10px 0;
}

.active, .collapsible:hover {
    background-color: var(--secondary-color);
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: #f1f1f1;
    border-radius: 10px;
}

.content p {
    padding: 10px 0;
    font-size: 16px;
    color: #34495e;
}


