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

/* 定义CSS变量，便于全局色彩管理 */
:root {
    /* 主色调 */
    --deep-brown: #784F49; /* 深棕色 */
    --dark-green: #2E4053; /* 墨绿色 */
    --tech-blue: #4A90E2; /* 科技蓝 */
    --silver-gray: #C0C0C0; /* 银灰色 */

    /* 辅助色 */
    --soft-beige: #F5F5DC; /* 米色 */
    --light-yellow: #FFFACD; /* 淡黄 */

    /* 点缀色 */
    --highlight-color: #FF6347; /* 番茄红 */
}

/* 设置全局字体和背景色 */
body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, var(--deep-brown) 70%, var(--dark-green) 30%);
    color: var(--silver-gray);
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

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

.navbar a {
    color: white;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.2em;
    padding: 10px 15px;
    border-right: 1px solid var(--silver-gray);
    transition: background 0.3s ease, transform 0.3s ease;
}

.navbar a:last-child {
    border-right: none;
}

.navbar a:hover {
    background: var(--tech-blue);
    transform: scale(1.05);
}

/* 主要容器，使用网格布局 */
.container {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 20px;
    padding: 100px 20px 20px 20px; /* 顶部留出导航栏空间 */
    max-width: 1920px;
    margin: 0 auto;
}

/* 文章内容区域 */
.content {
    grid-column: 2 / 12;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--tech-blue);
    margin-bottom: 20px;
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.8em;
}

h4 {
    font-size: 1.6em;
}

/* 段落和列表样式 */
p, li, span {
    font-family: 'Roboto', sans-serif;
    color: var(--silver-gray);
    font-size: 16px;
}

/* 图片样式，添加圆角、阴影和悬浮效果 */
img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    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.4);
}

/* 代码块样式，使用背景色区分 */
pre {
    background-color: rgba(0,0,0,0.7);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 20px;
}

code {
    color: #FFD700;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* 按钮样式 */
.button {
    background: linear-gradient(45deg, var(--tech-blue), var(--dark-green));
    border: none;
    color: white;
    padding: 12px 24px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 1em;
    margin: 10px 2px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease, transform 0.3s ease;
}

.button:hover {
    background: linear-gradient(45deg, var(--deep-brown), var(--tech-blue));
    transform: scale(1.05);
}

/* 视差滚动效果 */
.parallax {
    background-image: url('https://images.gptkong.com/demo/sample1.png');
    height: 500px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2em;
    font-family: 'Roboto', sans-serif;
    margin-bottom: 40px;
}

/* 动画效果 */
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--silver-gray); }
}

.typewriter h1 {
    overflow: hidden;
    border-right: .15em solid var(--silver-gray);
    white-space: nowrap;
    margin: 0 auto;
    letter-spacing: .15em;
    animation: typing 3.5s steps(30, end), blink-caret .75s step-end infinite;
    font-family: 'Playfair Display', serif;
    font-size: 2.5em;
    color: var(--tech-blue);
}

/* 折叠区域样式 */
.collapsible {
    background-color: var(--dark-green);
    color: white;
    cursor: pointer;
    padding: 10px 20px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.2em;
    border-radius: 4px;
    margin-bottom: 10px;
    transition: background 0.3s ease;
}

.collapsible:hover {
    background: var(--tech-blue);
}

.content-collapsible {
    padding: 0 20px;
    display: none;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    margin-bottom: 20px;
}

.collapsible.active + .content-collapsible {
    display: block;
}

/* 响应式布局调整 */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: repeat(8, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        grid-template-columns: 1fr;
    }

    .navbar {
        flex-direction: column;
    }

    .navbar a {
        border-right: none;
        border-bottom: 1px solid var(--silver-gray);
    }

    .navbar a:last-child {
        border-bottom: none;
    }
}

/* 多语言切换按钮样式 */
.language-switcher {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.language-switcher button {
    background-color: var(--tech-blue);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-family: 'Roboto', sans-serif;
    transition: background 0.3s ease, transform 0.3s ease;
}

.language-switcher button:hover {
    background: var(--deep-brown);
    transform: translateY(-2px);
}

/* 链接样式，确保内部链接添加 rel="nofollow" */
a[nofollow] {
    color: var(--tech-blue);
    text-decoration: none;
}

a[nofollow]:hover {
    text-decoration: underline;
}

/* 提示文本样式 */
.notice {
    background-color: var(--dark-green);
    color: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.2em;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* 图片容器样式 */
.image-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.image-container img {
    max-width: 650px;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 分隔线样式 */
.separator {
    border: 0;
    height: 1px;
    background: var(--silver-gray);
    margin: 40px 0;
}

/* 时间轴样式 */
.timeline {
    position: relative;
    padding: 20px 0;
    list-style: none;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--tech-blue);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin: 20px 0;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--deep-brown);
    border-radius: 50%;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

@media (max-width: 768px) {
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        margin-left: 40px;
    }

    .timeline-item::after {
        left: 20px;
    }
}

