
/* 基础样式设置 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif; /* 主字体 */
    background: linear-gradient(135deg, #7BB661 70%, #A3D977 25%, #FF8800 5%); /* 主色调渐变背景 */
    color: #174082; /* 主文本颜色 */
}

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

.navbar a {
    text-decoration: none;
    color: #174082;
    margin: 0 15px;
    transition: color 0.3s ease, border-bottom 0.3s ease;
}

.navbar a:hover {
    color: #17A2B8;
    border-bottom: 2px solid #17A2B8;
}

/* 主内容区样式 */
.container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 40px;
    padding: 100px 20px 50px 20px; /* 顶部预留导航栏空间 */
}

.main-content {
    flex: 2;
    max-width: 800px;
    background: #FFFFFF;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.sidebar {
    flex: 1;
    max-width: 300px;
    background: #F5F5F5;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.article-title {
    font-family: 'Pacifico', cursive; /* 标题字体 */
    font-size: 2.5em;
    color: #5DA047;
    margin-bottom: 20px;
    text-align: center;
}

.article-content h3 {
    font-size: 1.8em;
    color: #17A2B8;
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-content p {
    font-size: 1em;
    line-height: 1.8;
    margin-bottom: 20px;
}

.article-content strong {
    color: #7BB661;
}

.article-content span {
    color: #FF8800;
}

pre {
    background: #f0f0f0;
    padding: 15px;
    border-radius: 8px;
    overflow: auto;
    margin-bottom: 20px;
}

pre code {
    font-family: 'Courier New', Courier, monospace;
    color: #174082;
    position: relative;
}

pre code::before {
    content: 'CSS3 代码示例';
    display: block;
    font-size: 0.9em;
    color: #5DA047;
    margin-bottom: 5px;
}

.button-gradient {
    background: linear-gradient(90deg, #7BB661, #17A2B8);
    border: none;
    color: white;
    padding: 10px 20px;
    font-size: 1em;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.button-gradient:hover {
    background: linear-gradient(90deg, #5DA047, #138496);
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* 卡片式设计 */
.card {
    background-color: #FFFFFF;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.card-title {
    font-family: 'Pacifico', cursive;
    font-size: 1.5em;
    color: #17A2B8;
    margin-bottom: 10px;
}

.card-description {
    font-size: 1em;
    color: #174082;
    margin-bottom: 15px;
}

.card-data {
    font-size: 0.9em;
    color: #5DA047;
}

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

    .sidebar {
        max-width: 100%;
    }

    .article-title {
        font-size: 2em;
    }

    .article-content h3 {
        font-size: 1.5em;
    }

    .button-gradient {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

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

img.decorative:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* 加载动画 */
.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: #FFFFFF;
}

.loading-animation {
    width: 40px;
    height: 40px;
    position: relative;
}

.loading-animation::before,
.loading-animation::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #7BB661;
    border-radius: 50%;
    animation: drop 1s infinite ease-in-out;
}

.loading-animation::after {
    left: 20px;
    animation-delay: 0.5s;
}

@keyframes drop {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(20px); opacity: 0.5; }
}

/* 动态效果 */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* 侧边导航 */
.sidebar-nav {
    position: fixed;
    left: 0;
    top: 60px;
    width: 200px;
    background-color: #FFFFFF;
    border-right: 1px solid #E0E0E0;
    padding: 20px;
    display: none;
}

.sidebar-nav.active {
    display: block;
    animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* 图表样式 */
.data-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 300px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
}

.bar {
    width: 40px;
    background-color: #17A2B8;
    transition: height 0.3s ease, background-color 0.3s ease;
}

.bar:hover {
    background-color: #138496;
}

.icon {
    width: 50px;
    height: 50px;
    fill: #7BB661;
    transition: fill 0.3s ease;
}

.icon:hover {
    fill: #5DA047;
}

/* 动态导航栏 */
.tech-background {
    background-image: url('https://images.gptkong.com/demo/sample1.png');
    background-size: cover;
    background-position: center;
    height: 400px;
    position: relative;
}

.plant-illustration {
    position: absolute;
    bottom: 20px;
    left: 20px;
    width: 150px;
    height: auto;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

/* 折叠区域 */
.collapsible {
    background-color: #e0e0e0;
    color: #174082;
    cursor: pointer;
    padding: 10px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1em;
    transition: background 0.3s ease;
    margin-bottom: 10px;
}

.active, .collapsible:hover {
    background-color: #17A2B8;
    color: #ffffff;
}

.content {
    padding: 0 18px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #f1f1f1;
    margin-bottom: 10px;
}

code {
    background-color: #f0f0f0;
    padding: 5px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
}

