
/* 全局样式重置，确保不同浏览器下的一致性 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设置全局字体和基础颜色 */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 顶部固定导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(32, 58, 67, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.navbar .logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffa500;
}

.navbar ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navbar ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 1em;
    position: relative;
    transition: color 0.3s ease;
}

.navbar ul li a:hover {
    color: #ff8c00;
}

/* 悬浮侧边导航样式 */
.sidebar {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar a {
    background: #f57c00;
    color: #fff;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.3s ease;
}

.sidebar a:hover {
    background: #ef6c00;
    transform: translateY(-3px);
}

/* 主要内容区域样式 */
.main-content {
    padding: 100px 20px 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 文章样式 */
article {
    margin-bottom: 50px;
}

article h2, article h3 {
    color: #ffa500;
    margin-bottom: 20px;
}

article h2 {
    font-size: 2em;
}

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

article p {
    margin-bottom: 20px;
    font-size: 1em;
    color: #ddd;
}

article pre {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

article code {
    color: #ff8c00;
    background: rgba(255, 140, 0, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

/* 图片样式 */
img.decorative {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 按钮样式 */
.btn {
    background: #ffa500;
    border: none;
    color: #fff;
    padding: 12px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
    font-size: 1em;
}

.btn:hover {
    background: #ff8c00;
    transform: translateY(-3px);
}

/* 卡片式设计 */
.card-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 40px 0;
}

.card {
    background: rgba(32, 58, 67, 0.8);
    border-radius: 10px;
    padding: 20px;
    width: 300px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card h3 {
    margin-top: 0;
    color: #ffa500;
}

.card p {
    color: #ddd;
    line-height: 1.6;
}

/* 实时数据图表容器 */
.chart-container {
    position: relative;
    width: 80%;
    height: 60%;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    margin: 0 auto 50px auto;
}

/* 动态折线图样式 */
.chart-line {
    stroke: #ff8c00;
    stroke-width: 2;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw 3s forwards;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

/* 动态数据流动画 */
.data-flow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://images.gptkong.com/demo/sample1.png') center center / cover no-repeat;
    opacity: 0.7;
    animation: fadeIn 2s ease-in-out forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 0.7; }
}

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

    .navbar ul {
        flex-direction: column;
        gap: 10px;
    }

    .sidebar {
        display: none;
    }

    .card-container {
        flex-direction: column;
        align-items: center;
    }

    .chart-container {
        width: 95%;
        height: 40%;
    }

    img.decorative {
        width: 100%;
        height: auto;
    }
}

/* 页面段落滑入效果 */
.section {
    opacity: 0;
    transform: translateX(100px);
    animation: slideIn 1s forwards;
}

.section:nth-child(odd) {
    animation-delay: 0.3s;
}

.section:nth-child(even) {
    animation-delay: 0.6s;
}

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* 代码块样式 */
.code-example {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.code-example code {
    color: #ff8c00;
    background: rgba(255, 140, 0, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    left: 20px;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chapter-nav a {
    background: #ffa500;
    color: #fff;
    padding: 8px 12px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.9em;
    transition: background 0.3s ease;
}

.chapter-nav a:hover {
    background: #ff8c00;
}

/* 提示信息样式 */
.reference-note {
    background: rgba(255, 140, 0, 0.2);
    padding: 15px;
    border-left: 5px solid #ffa500;
    margin-bottom: 30px;
    font-size: 1.2em;
}

/* 折叠区域样式 */
.collapsible {
    background-color: rgba(32, 58, 67, 0.8);
    color: #fff;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1em;
    margin-bottom: 10px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.collapsible:hover {
    background: #ff8c00;
}

.collapsible:after {
    content: '\002B';
    font-size: 13px;
    float: right;
}

.collapsible.active:after {
    content: "\2212";
}

.content {
    padding: 0 15px;
    display: none;
    background-color: rgba(32, 58, 67, 0.6);
    overflow: hidden;
    border-radius: 5px;
    margin-bottom: 20px;
}


