
/* 全局样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    background: linear-gradient(-45deg, #1e3c72, #2a5298, #1e3c72, #2a5298);
    background-size: 400% 400%;
    animation: gradientAnimation 15s ease infinite;
    overflow-x: hidden;
}

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

/* 固定导航栏样式 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(30, 60, 114, 0.8);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.navbar .logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #ffcc00;
}

.navbar .nav-links {
    display: flex;
    list-style: none;
}

.navbar .nav-links li {
    margin: 0 1rem;
}

.navbar .nav-links a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.navbar .nav-links a:hover {
    color: #ffcc00;
}

/* 响应式汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background: #ffffff;
    margin: 4px 0;
    transition: all 0.3s ease;
}

/* 主内容区样式 */
.main-content {
    padding: 6rem 2rem 2rem 2rem;
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 2rem;
}

/* 侧边导航样式 */
.sidebar {
    position: sticky;
    top: 6rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

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

.sidebar ul li {
    margin: 1rem 0;
}

.sidebar ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s;
}

.sidebar ul li a:hover {
    color: #ffcc00;
}

/* 文章内容样式 */
.article-content {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.article-content h2, .article-content h3, .article-content h4 {
    font-family: 'Montserrat', sans-serif;
    color: #ffffff;
}

.article-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.article-content h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.article-content h4 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.article-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

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

.article-content code {
    color: #ffcc00;
}

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

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

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    border: none;
    padding: 0.75rem 1.5rem;
    color: #ffffff;
    border-radius: 25px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 折叠部分样式 */
.collapsible {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    cursor: pointer;
    padding: 0.75rem;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 5px;
    transition: background 0.3s;
}

.collapsible:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.content {
    padding: 0 1rem;
    display: none;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    margin-bottom: 1rem;
}

/* 表格样式 */
.article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.article-content th, .article-content td {
    border: 1px solid #ffffff;
    padding: 0.75rem;
    text-align: left;
}

.article-content th {
    background-color: rgba(30, 60, 114, 0.8);
}

.article-content tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

/* 代码示例部分样式 */
.code-example {
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    border-radius: 10px;
    overflow-x: auto;
    margin: 2rem 0;
}

.code-example pre {
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    color: #00ff00;
}

/* 章节导航系统样式 */
.chapter-nav {
    position: fixed;
    right: 2rem;
    top: 7rem;
    background: rgba(30, 60, 114, 0.8);
    padding: 1rem;
    border-radius: 10px;
}

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

.chapter-nav ul li {
    margin: 0.5rem 0;
}

.chapter-nav ul li a {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

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

/* 底部反馈区样式 */
.feedback-section {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
    margin-top: 2rem;
}

.feedback-section input,
.feedback-section textarea {
    width: 100%;
    padding: 0.75rem;
    margin-bottom: 1rem;
    border: none;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.feedback-section input::placeholder,
.feedback-section textarea::placeholder {
    color: #dddddd;
}

.feedback-section button {
    background: linear-gradient(45deg, #6a11cb, #2575fc);
    border: none;
    padding: 0.75rem 1.5rem;
    color: #ffffff;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s;
}

.feedback-section button:hover {
    background: linear-gradient(45deg, #2575fc, #6a11cb);
    transform: translateY(-3px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .chapter-nav {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: absolute;
        top: 60px;
        right: 0;
        background: rgba(30, 60, 114, 0.9);
        flex-direction: column;
        width: 200px;
        display: none;
        border-radius: 0 0 10px 10px;
    }

    .nav-links li {
        margin: 1rem 0;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }
}

