
/* 全局样式定义 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #032B44 70%, #6FCF97 25%, #FFC048 5%);
    color: #333333;
    line-height: 1.6;
}

/* 导航栏样式 */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(3, 43, 68, 0.9);
    color: #FFFFFF;
    padding: 20px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo {
    font-size: 24px;
    font-weight: bold;
}

.header nav a {
    color: #FFFFFF;
    text-decoration: none;
    margin-left: 20px;
    transition: color 0.3s ease;
}

.header nav a:hover {
    color: #FFC048;
}

/* 侧边栏样式 */
.sidebar {
    position: fixed;
    top: 80px;
    left: 0;
    width: 250px;
    height: calc(100% - 80px);
    background: #032B44;
    color: #EAEAEA;
    padding: 20px;
    overflow-y: auto;
}

.sidebar a {
    display: block;
    color: #EAEAEA;
    text-decoration: none;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

.sidebar a:hover {
    color: #FFC048;
}

/* 主内容样式 */
.main-content {
    margin-left: 270px;
    padding: 100px 40px 40px 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    min-height: 100vh;
}

/* 章节导航样式 */
.chapter-nav {
    position: sticky;
    top: 100px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 40px;
}

.chapter-nav ul {
    list-style: none;
    padding: 0;
}

.chapter-nav ul li {
    margin-bottom: 10px;
}

.chapter-nav ul li a {
    text-decoration: none;
    color: #032B44;
    font-weight: bold;
    transition: color 0.3s ease;
}

.chapter-nav ul li a:hover {
    color: #6FCF97;
}

/* 内容区块样式 */
.section {
    margin-bottom: 60px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    transition: transform 0.3s ease, background 0.3s ease;
}

.section:hover {
    transform: translateY(-10px);
    background: rgba(255, 255, 255, 0.25);
}

/* 图片样式 */
.section img {
    width: 100%;
    max-width: 320px;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: #FFFFFF;
}

h1 {
    font-size: 32px;
    margin-bottom: 20px;
}

h2 {
    font-size: 28px;
    margin-bottom: 15px;
}

h3 {
    font-size: 24px;
    margin-bottom: 10px;
}

h4 {
    font-size: 20px;
    margin-bottom: 8px;
}

/* 正文样式 */
p {
    font-size: 16px;
    margin-bottom: 15px;
    color: #EAEAEA;
}

/* 代码块样式 */
pre {
    background: #1E1E1E;
    color: #C5C5C5;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

pre code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 提示文字样式 */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin: 10px 0;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.alert.success {
    background-color: #6FCF97;
    color: #FFFFFF;
}

.alert.error {
    background-color: #FFC048;
    color: #FFFFFF;
}

.alert.show {
    opacity: 1;
}

/* 按钮样式 */
.button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #6FCF97;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

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

/* 响应式设计 */
@media (max-width: 1200px) {
    .sidebar {
        display: none;
    }
    .main-content {
        margin-left: 20px;
    }
}

@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
    }
    .chapter-nav {
        position: static;
        margin-bottom: 20px;
    }
    .section {
        padding: 15px;
    }
    h1 {
        font-size: 28px;
    }
    h2 {
        font-size: 24px;
    }
    h3 {
        font-size: 20px;
    }
    h4 {
        font-size: 18px;
    }
    p {
        font-size: 14px;
    }
}

