
/* 重置默认样式，确保跨浏览器一致性 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置全局字体和颜色 */
body {
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    background: linear-gradient(135deg, #0A2342 70%, #1ABC9C 25%, #8E44AD 5%);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 60px; /* 为固定导航栏留出空间 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 35, 66, 0.9);
    padding: 15px 30px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar a {
    color: #1ABC9C;
    text-decoration: none;
    margin-left: 20px;
    font-size: 16px;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: #8E44AD;
}

/* 章节导航样式 */
.section-nav {
    position: fixed;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
}

.section-nav a {
    width: 12px;
    height: 12px;
    background: #1ABC9C;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.section-nav a:hover {
    background: #8E44AD;
}

/* 主标题样式 */
.main-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* 段落样式 */
section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

section h2, section h3, section h4 {
    color: #1ABC9C;
    margin-bottom: 20px;
    font-family: 'Montserrat', sans-serif;
}

section p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #ffffff;
}

/* 卡片式布局样式 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.grid-item {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 20px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* 图片样式 */
.decoration-image {
    width: 100%;
    max-width: 320px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 代码块样式 */
code {
    background: rgba(0, 0, 0, 0.6);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    color: #1ABC9C;
}

pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
    font-family: 'Courier New', Courier, monospace;
}

pre code {
    color: #ffffff;
}

/* 折叠区域样式 */
.collapsible {
    background-color: rgba(26, 188, 156, 0.8);
    color: white;
    cursor: pointer;
    padding: 10px 20px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: background-color 0.3s ease;
}

.collapsible:hover {
    background-color: #1ABC9C;
}

.content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    background-color: rgba(26, 188, 156, 0.1);
    transition: max-height 0.3s ease;
    border-radius: 0 0 5px 5px;
}

.content p {
    margin: 10px 0;
    color: #ffffff;
    font-size: 15px;
}

/* 高亮章节内容 */
.highlight {
    background: rgba(26, 188, 156, 0.2);
    padding: 5px;
    border-radius: 4px;
}

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

    .section-nav {
        display: none;
    }

    .main-title {
        font-size: 2rem;
    }

    section {
        padding: 40px 15px;
    }

    .collapsible {
        font-size: 14px;
    }

    section p {
        font-size: 14px;
    }
}

/* 按钮样式 */
button {
    background-color: #1ABC9C;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 16px;
}

button:hover {
    background-color: #16A085;
}

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

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

/* 链接按钮 */
.link-button {
    background: none;
    border: none;
    color: #1ABC9C;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    text-decoration: underline;
}

.link-button:hover {
    color: #8E44AD;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

table, th, td {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

th, td {
    padding: 12px;
    text-align: left;
    color: #ffffff;
}

th {
    background-color: rgba(26, 188, 156, 0.8);
}

tr:nth-child(even) {
    background-color: rgba(26, 188, 156, 0.2);
}

/* 滚动顶部按钮样式 */
#topBtn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #1ABC9C;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

#topBtn:hover {
    background-color: #16A085;
}

/* 滚动指示器 */
.scroll-indicator div {
    width: 12px;
    height: 12px;
    background: #1ABC9C;
    border-radius: 50%;
    margin: 5px 0;
    transition: background 0.3s ease;
}

.scroll-indicator div.active {
    background: #8E44AD;
}

