
/* 全局样式设置，确保页面的响应性和整体布局 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', 'Open Sans', sans-serif;
    font-size: 16px;
    background: linear-gradient(135deg, #1e1e1e, #2e2e2e);
    color: #d3d3d3;
    line-height: 1.6;
}

/* 引入jQuery */
@import url('https://www.gptkong.com/static/js/jquery.js');

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: #1e1e1e;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    margin: 0;
}

.navbar ul li {
    position: relative;
}

.navbar ul li a {
    color: #d3d3d3;
    text-decoration: none;
    padding: 10px 20px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.navbar ul li a:hover {
    color: #1e90ff;
    transform: scale(1.1);
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #2e2e2e;
    top: 100%;
    left: 0;
    min-width: 150px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.dropdown-menu a {
    display: block;
    padding: 10px;
    color: #d3d3d3;
}

.navbar ul li:hover .dropdown-menu {
    display: block;
}

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

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 60px;
    right: 20px;
    background-color: rgba(30, 30, 30, 0.9);
    padding: 10px;
    border-radius: 8px;
}

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

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

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

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

/* 文章内容样式 */
article h2, article h3, article h4 {
    color: #ffffff;
    margin-top: 20px;
}

article p {
    color: #d3d3d3;
    font-size: 16px;
}

article pre {
    background-color: #2e2e2e;
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    margin: 20px 0;
}

article code {
    color: #1e90ff;
    font-family: 'Courier New', Courier, monospace;
}

/* 图片样式 */
img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* 提示信息样式 */
.notice {
    background: #1e90ff;
    color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 18px;
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 卡片式设计 */
.card {
    background-color: #2e2e2e;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* 按钮样式 */
.button {
    background-color: #1e90ff;
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

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

/* 关键帧动画 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 元素滚动显示 */
.fade-in-section {
    opacity: 0;
    animation: fadeInUp 1s forwards;
}

.fade-in-section.visible {
    opacity: 1;
}

/* 悬浮效果 */
.nav-item:hover .dropdown-menu {
    animation: fadeInUp 0.5s forwards;
}

/* 加载动画样式 */
.loader {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #1e90ff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 100px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }
    .chapter-nav {
        display: none;
    }
}

/* 折叠区域样式 */
.collapsible {
    background-color: #1e1e1e;
    color: #1e90ff;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 18px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.collapsible:hover {
    background-color: #8a2be2;
}

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: #2e2e2e;
    border-radius: 5px;
    margin-bottom: 10px;
    transition: max-height 0.2s ease-out;
}

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

.code-sample code {
    color: #1e90ff;
    font-family: 'Courier New', Courier, monospace;
}

/* 动态效果 */
.section {
    position: relative;
    padding: 60px 0;
    background-size: cover;
    background-position: center;
    transform: translateZ(0);
}

.section:nth-child(even) {
    background-color: #1e1e1e;
}

.section:nth-child(odd) {
    background-color: #2e2e2e;
}

/* 视觉焦点样式 */
.focus {
    color: #ff4500;
    font-weight: bold;
}

