
/* 
整体页面样式
主色调为深蓝色，辅以橙色和绿色进行高亮点缀，营造科技感与高级质感。
使用CSS3的Flexbox和Grid布局实现响应式设计，确保在各种设备上均有良好展示效果。
*/

/* 设置基础样式 */
body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(135deg, #0d47a1, #1976d2);
    color: #ffffff;
    line-height: 1.6;
}

/* 导航栏样式 */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(13, 71, 161, 0.9);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #ffffff;
}

.navbar .nav-links a {
    margin: 0 1rem;
    text-decoration: none;
    color: #ffffff;
    transition: color 0.3s;
}

.navbar .nav-links a:hover {
    color: #ff9800;
}

/* 主视觉部分的样式 */
.parallax-section {
    position: relative;
    height: 100vh;
    background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center center;
    background-size: cover;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.parallax-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 71, 161, 0.7), rgba(25, 118, 210, 0.7));
}

.parallax-section .content {
    position: relative;
    z-index: 1;
    text-align: center;
}

.parallax-section .content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: #ff9800;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.parallax-section .content p {
    font-size: 1.2rem;
}

/* 提示信息样式 */
.warning {
    text-align: center;
    background: rgba(255, 152, 0, 0.8);
    padding: 1rem;
    font-size: 1.2rem;
    margin: 2rem 0;
    border-radius: 5px;
}

/* 文章内容样式 */
.article {
    padding: 2rem;
    max-width: 1200px;
    margin: auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.article h2, .article h3 {
    color: #ff9800;
}

.article pre {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
}

.article code {
    color: #cddc39;
}

/* 图片样式 */
.image-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.image-container img {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

/* 卡片式布局 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.card {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 1.5rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.card h3 {
    color: #ff9800;
    margin-bottom: 1rem;
}

.card p {
    color: #e0e0e0;
}

/* 响应式网格系统 */
.grid-container {
    display: flex;
    flex-wrap: wrap;
    margin: -1rem;
}

.grid-item {
    flex: 1 1 300px;
    margin: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* 加载动画 */
.loader {
    border: 8px solid rgba(255, 255, 255, 0.3);
    border-top: 8px solid #ff9800;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 页脚样式 */
.footer {
    background: #0d47a1;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.footer .section {
    flex: 1 1 200px;
    margin: 1rem;
}

.footer .section h4 {
    color: #ff9800;
    margin-bottom: 1rem;
}

.footer .section a {
    display: block;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer .section a:hover {
    color: #cddc39;
}

/* 章节导航样式 */
.chapter-nav {
    position: fixed;
    top: 50%;
    right: 2rem;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.chapter-nav a {
    display: block;
    margin: 0.5rem 0;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s;
}

.chapter-nav a:hover {
    color: #ff9800;
}

/* 折叠区域样式 */
.collapsible {
    background-color: #1976d2;
    color: white;
    cursor: pointer;
    padding: 1rem;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.2rem;
    border-radius: 5px;
    margin: 1rem 0;
    transition: background-color 0.3s;
}

.collapsible:hover {
    background-color: #0d47a1;
}

.content-collapsible {
    padding: 0 1rem;
    display: none;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

.content-collapsible p {
    color: #e0e0e0;
}

/* CSS代码示例区样式 */
.code-example {
    background: rgba(0, 0, 0, 0.7);
    padding: 1rem;
    border-radius: 5px;
    overflow-x: auto;
    margin: 1rem 0;
}

.code-example code {
    color: #cddc39;
    font-family: 'Courier New', Courier, monospace;
}

