
/* 
    页面整体样式定义
    使用HTML5与CSS3技术，打造一个融合未来感与高级质感的图文并茂页面。
    采用响应式设计，确保在各类设备上均有良好显示效果。
*/

/* 确定根变量，便于统一管理颜色 */
:root {
    /* 主色调，70% 使用 */
    --primary-color: #2C3E50; /* 深蓝色，营造科技氛围 */
    --secondary-color: #ECF0F1; /* 浅灰色，作为主要背景色 */
    --accent-color: #E74C3C; /* 点缀色，突出重要元素 */
    
    /* 辅助色，25% 使用 */
    --tertiary-color: #3498DB; /* 蓝色，增强层次感 */
    --quaternary-color: #95A5A6; /* 灰色，平衡视觉效果 */
    
    /* 字体大小与行高 */
    --base-font-size: 16px;
    --base-line-height: 1.6;
    
    /* 过渡时间 */
    --transition-speed: 0.3s;
}

/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: var(--base-font-size);
    line-height: var(--base-line-height);
    color: var(--primary-color);
    background: var(--secondary-color);
    overflow-x: hidden; /* 避免水平滚动 */
}

/* 导航栏样式 */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--tertiary-color));
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    z-index: 1000;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: bold;
    position: relative;
    transition: color var(--transition-speed);
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    background: var(--accent-color);
    left: 0;
    bottom: -5px;
    transition: width var(--transition-speed);
}

nav ul li a:hover::after {
    width: 100%;
}

nav ul li a:hover {
    color: var(--accent-color);
}

/* 主要内容容器 */
.container {
    max-width: 1200px;
    margin: 5rem auto 2rem; /* 顶部留出导航栏空间 */
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* 标题样式 */
h1, h2, h3, h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--tertiary-color);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.75rem;
    color: var(--tertiary-color);
}

h4 {
    font-size: 1.5rem;
    color: var(--quaternary-color);
}

/* 段落样式 */
p {
    font-size: 1rem;
    color: var(--primary-color);
    text-align: justify;
    text-justify: inter-ideograph;
}

/* 图片样式 */
img.decorative {
    max-width: 650px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

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

/* 阅览指示文字 */
.intro-text {
    font-size: 1.2rem;
    color: var(--quaternary-color);
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--tertiary-color));
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 代码块样式 */
pre {
    background: #2C3E50;
    color: #ECF0F1;
    padding: 1rem;
    border-radius: 8px;
    overflow-x: auto;
    font-size: 0.9rem;
}

code {
    font-family: 'Courier New', Courier, monospace;
}

/* 交互元素样式 */
button, .button {
    background: var(--tertiary-color);
    color: var(--secondary-color);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background var(--transition-speed), transform var(--transition-speed);
}

button:hover, .button:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

/* 布局分块 */
.section {
    padding: 2rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: center;
}

.section.reverse {
    flex-direction: row-reverse;
}

.section .text {
    flex: 1 1 500px;
}

.section .images {
    flex: 1 1 300px;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.section .images img {
    flex: 1 1 calc(50% - 1rem);
}

/* 视差效果 */
.parallax {
    background-image: url('https://images.gptkong.com/demo/sample1.png');
    height: 400px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

/* 响应式设计 */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .section {
        flex-direction: column;
    }
    
    .section .images img {
        flex: 1 1 100%;
    }
    
    .intro-text {
        font-size: 1rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 2s ease-in-out;
}

/* 按钮过渡效果 */
button, .button {
    transition: background var(--transition-speed), transform var(--transition-speed);
}

/* 悬停效果 */
a:hover, button:hover, .button:hover {
    color: var(--secondary-color);
    background: var(--accent-color);
}

/* 隐藏引导文本 */
.hidden {
    display: none;
}

/* 可展开的折叠区域 */
.collapsible {
    background-color: var(--tertiary-color);
    color: var(--secondary-color);
    cursor: pointer;
    padding: 1rem;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.1rem;
    transition: background var(--transition-speed);
    border-radius: 5px;
}

.collapsible:hover {
    background-color: var(--accent-color);
}

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

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

.content {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) ease-in-out;
    background-color: var(--secondary-color);
    border-radius: 5px;
}

.content p {
    padding: 1rem 0;
}

/* 视觉引导区 */
.visual-guide {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--tertiary-color));
    color: var(--secondary-color);
    text-align: center;
    padding: 2rem;
}

.visual-guide h1 {
    font-size: 3rem;
    animation: fadeIn 2s ease-in-out;
}

/* 导航栏优化 */
nav {
    box-sizing: border-box;
    padding: 1rem 2rem;
    /* 确保导航栏内容不被截断 */
}

nav ul li a {
    display: inline-block;
    padding: 0.5rem 1rem;
}

/* 保证内容在宽度小于500px时不被压缩 */
.container, .section {
    min-width: 500px;
}

/* 结束样式定义 */

