
/* 全局样式设置，包括字体、颜色、布局等 */
/* 使用CSS变量定义主色调、辅助色和点缀色，方便统一管理和修改 */
:root {
    --primary-color: #1E90FF; /* 主色调，深蓝色 */
    --secondary-color: #2F4F4F; /* 辅助色，深灰色 */
    --accent-color: #FF4500; /* 点缀色，橙色 */
    --highlight-color: #32CD32; /* 高亮色，绿色 */
    --background-gradient: linear-gradient(135deg, #2F4F4F, #1E90FF); /* 背景渐变 */
    --text-color: #FFFFFF; /* 文字颜色 */
    --navbar-bg: rgba(31, 38, 135, 0.9); /* 导航栏背景色，带透明度 */
    --card-bg: rgba(255, 255, 255, 0.1); /* 卡片背景色，玻璃质感 */
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37); /* 玻璃阴影效果 */
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* 通用盒子阴影 */
    --border-radius: 16px; /* 圆角设置 */
    --transition-speed: 0.3s; /* 过渡动画速度 */
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* 主字体 */
}

/* 全局字体和背景设置 */
body {
    margin: 0;
    padding: 0;
    background: var(--background-gradient);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden; /* 防止出现水平滚动条 */
}

/* 固定粘性导航栏样式 */
.navbar {
    position: sticky;
    top: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

/* 导航菜单列表样式 */
.navbar ul {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

/* 导航项样式 */
.navbar li {
    position: relative;
}

/* 导航链接样式 */
.navbar a {
    color: var(--text-color);
    text-decoration: none;
    padding: 8px 12px;
    transition: background var(--transition-speed) ease, transform var(--transition-speed) ease;
    font-size: 16px;
}

/* 导航链接悬停效果 */
.navbar a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
    border-radius: 4px;
}

/* 下拉菜单样式 */
.dropdown {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    list-style: none;
    padding: 10px 0;
}

/* 鼠标悬停显示下拉菜单 */
.navbar li:hover .dropdown {
    display: block;
}

/* 下拉菜单项样式 */
.dropdown li {
    padding: 8px 20px;
}

/* 下拉菜单项悬停效果 */
.dropdown li:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* 首页全屏区域样式 */
.fullscreen-section {
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url('https://images.gptkong.com/demo/sample1.png') center center / cover no-repeat;
    position: relative;
    color: var(--text-color);
    text-align: center;
}

/* 全屏区域遮罩层 */
.fullscreen-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

/* 全屏内容样式 */
.fullscreen-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 20px;
}

/* 滚动提示箭头样式 */
.scroll-down {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    border: solid var(--text-color);
    border-width: 0 4px 4px 0;
    display: inline-block;
    padding: 10px;
    animation: bounce 2s infinite;
}

/* 弹跳动画关键帧 */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) rotate(45deg) translateY(0);
    }
    40% {
        transform: translateX(-50%) rotate(45deg) translateY(-10px);
    }
    60% {
        transform: translateX(-50%) rotate(45deg) translateY(-5px);
    }
}

/* 主要内容区域样式 */
.main-content {
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* 卡片布局样式 */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    box-shadow: var(--box-shadow);
    padding: 20px;
    transition: transform var(--transition-speed) ease, background var(--transition-speed) ease;
}

/* 卡片悬停放大效果 */
.card:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.15);
}

/* 图像样式，圆角、阴影、悬浮效果 */
.card img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed) ease;
}

/* 图像悬停放大效果 */
.card img:hover {
    transform: scale(1.1);
}

/* 文章内容样式 */
article {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--box-shadow);
    color: #FFFFFF;
}

/* 文章内代码块样式，使用单独的背景和字体样式 */
article pre {
    background: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin: 20px 0;
}

/* 文章内代码文字颜色 */
article code {
    color: #00FF00;
}

/* 章节导航样式，固定在页面一侧 */
.chapter-nav {
    position: fixed;
    top: 100px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
}

/* 章节导航列表样式 */
.chapter-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* 章节导航链接样式 */
.chapter-nav a {
    display: block;
    color: var(--text-color);
    text-decoration: none;
    margin: 10px 0;
    transition: color var(--transition-speed) ease;
}

/* 章节导航链接悬停颜色变化 */
.chapter-nav a:hover {
    color: var(--highlight-color);
}

/* 图片展示容器样式，使用grid布局 */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

/* 图片样式，圆角、阴影、悬浮效果 */
.image-gallery img {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--box-shadow);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

/* 图片悬停效果 */
.image-gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

/* 提示信息样式，居中显示 */
.prompt-message {
    text-align: center;
    font-size: 18px;
    margin: 30px 0;
    color: var(--highlight-color);
    font-weight: bold;
}

/* 代码示例块样式，与文章内容区分 */
.code-example {
    background: rgba(0, 0, 0, 0.8);
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    font-family: 'Courier New', Courier, monospace;
    margin: 20px 0;
    color: #00FF00;
}

/* 折叠区域样式，使用details和summary标签 */
.details-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 10px 20px;
    margin: 20px 0;
}

.details-section summary {
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--accent-color);
}

.details-section p {
    margin: 10px 0;
}

/* 响应式设计，调整导航栏和主要内容布局 */
@media (max-width: 768px) {
    .navbar ul {
        flex-direction: column;
        gap: 10px;
    }

    .chapter-nav {
        display: none; /* 移动端隐藏章节导航 */
    }

    .fullscreen-section {
        height: auto;
        padding: 60px 20px;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .fullscreen-content {
        padding: 10px;
    }

    .navbar a {
        font-size: 14px;
    }
}

