
/* 主体颜色定义 */
:root {
    --main-color: #5D4037; /* 深棕色 */
    --secondary-color: #00BCD4; /* 霓虹蓝 */
    --accent-color: #FF5722; /* 亮橙色 */
    --background-color: #FFFFFF; /* 白色背景 */
    --text-color: #333333; /* 正文字体颜色 */
    --header-color: rgba(93, 64, 55, 0.9); /* 导航栏颜色 */
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    overflow-x: hidden; /* 防止出现横向滚动条 */
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--header-color);
    display: flex;
    justify-content: space-around;
    padding: 15px 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: var(--accent-color);
}

/* 页面提示 */
.header-note {
    margin-top: 80px; /* 为固定导航栏留出空间 */
    text-align: center;
    font-size: 1.2rem;
    color: var(--accent-color);
    padding: 20px 0;
    animation: fadeIn 2s ease-in-out;
}

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

/* 栅格布局容器 */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* 卡片样式 */
.card {
    background-color: var(--background-color);
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card img {
    width: 100%;
    height: auto;
    border-bottom: 2px solid var(--secondary-color);
}

.card-content {
    padding: 15px;
}

.card-title {
    font-family: 'Bodoni MT', serif;
    font-size: 1.5rem;
    color: var(--main-color);
    margin-bottom: 10px;
}

.card-description {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

.card a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: bold;
    transition: color 0.3s ease;
}

.card a:hover {
    color: var(--accent-color);
}

/* 文章内容样式 */
article {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

article h2, article h3, article h4 {
    font-family: 'Bodoni MT', serif;
    color: var(--main-color);
    margin-bottom: 15px;
}

article p {
    font-size: 1rem;
    color: var(--text-color);
    margin-bottom: 15px;
}

article pre {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 15px;
}

article code {
    font-family: 'Courier New', Courier, monospace;
    color: var(--secondary-color);
}

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

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

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

    .grid-container {
        grid-template-columns: 1fr;
    }

    .decorative-image {
        width: 100%;
        height: auto;
    }
}

/* 动画效果 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

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

.button:hover {
    background-color: darken(var(--accent-color), 10%);
    transform: scale(1.05);
}

/* 数据可视化图表 */
.chart-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 300px;
    padding: 20px;
    background: linear-gradient(180deg, #FFFFFF, #f0f0f0);
}

.bar {
    width: 50px;
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: 5px 5px 0 0;
    transition: height 0.5s ease;
}

.bar:hover {
    opacity: 0.8;
}


