
/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #2c3e50, #4ca1af);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 2em;
    color: #ffffff;
    position: relative;
}

.header::after {
    content: '这是一个网页样式设计参考';
    position: absolute;
    bottom: -20px;
    width: 100%;
    font-size: 0.8em;
    color: #ffdd57;
}

/* 侧边导航栏 */
.sidebar {
    display: flex;
    flex-direction: column;
    background: rgba(44, 62, 80, 0.9);
    width: 200px;
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    padding-top: 60px;
}

.sidebar a {
    padding: 15px 20px;
    text-decoration: none;
    color: #ecf0f1;
    transition: background 0.3s, color 0.3s;
    border-bottom: 1px solid #34495e;
}

.sidebar a:hover {
    background: #1abc9c;
    color: #ffffff;
}

/* 主内容区域 */
.main-content {
    margin-left: 200px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    flex: 1;
}

section {
    margin-bottom: 40px;
}

h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
    color: #ffffff;
}

h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

h2 {
    font-size: 2em;
    margin-top: 30px;
}

h3 {
    font-size: 1.5em;
    margin-top: 20px;
}

p, ul, pre {
    font-family: 'Open Sans', sans-serif;
    font-size: 1em;
    color: #ecf0f1;
}

ul {
    list-style-type: disc;
    margin-left: 20px;
}

pre {
    background: #2d3436;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    font-family: 'Roboto Mono', monospace;
    color: #dfe6e9;
}

/* 示例数据展示 */
.sample-data {
    background: rgba(39, 174, 96, 0.8);
    padding: 20px;
    border-radius: 10px;
}

.sample-data h2 {
    color: #ffffff;
    font-size: 1.8em;
}

.sample-data ul {
    list-style-type: square;
}

.sample-data li {
    margin-bottom: 10px;
}

/* 图片样式 */
.image-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.image-grid img {
    width: 100%;
    max-width: 150px;
    border-radius: 5px;
}

/* 代码块高亮 */
pre code {
    display: block;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* 响应式设计 */
@media (max-width: 1440px) {
    .main-content {
        margin-left: 200px;
    }
}

@media (max-width: 1200px) {
    .sidebar {
        width: 180px;
    }
    .main-content {
        margin-left: 180px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 160px;
    }
    .main-content {
        margin-left: 160px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        flex-direction: row;
        width: 100%;
        height: 60px;
        position: fixed;
        bottom: 0;
        left: 0;
        flex-direction: row;
        padding: 0;
    }
    .sidebar a {
        flex: 1;
        text-align: center;
        border-bottom: none;
        border-right: 1px solid #34495e;
    }
    .main-content {
        margin-left: 0;
        margin-bottom: 60px;
    }
}

@media (max-width: 480px) {
    .header {
        font-size: 1.5em;
    }
    .sidebar a {
        padding: 10px;
        font-size: 0.9em;
    }
    h1 {
        font-size: 2em;
    }
    h2 {
        font-size: 1.5em;
    }
    h3 {
        font-size: 1.2em;
    }
    .image-grid img {
        max-width: 100px;
    }
}

@media (max-width: 320px) {
    .header {
        font-size: 1.2em;
    }
    .sidebar a {
        padding: 8px;
        font-size: 0.8em;
    }
    h1 {
        font-size: 1.8em;
    }
    h2 {
        font-size: 1.3em;
    }
    h3 {
        font-size: 1em;
    }
    .image-grid {
        flex-direction: column;
        align-items: center;
    }
    .image-grid img {
        max-width: 80px;
    }
}

