
/* 
    全局样式设置
    设置盒模型，确保元素的边距和填充不影响布局
*/
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* 
    定义颜色变量
    主色调、辅助色和点缀色，符合黄金比例配色法则
*/
:root {
    --primary-color: #0d47a1; /* 深蓝 */
    --secondary-color: #b0bec5; /* 银灰 */
    --accent-color: #00bcd4; /* 霓虹蓝 */
    --highlight-color: #7e57c2; /* 紫罗兰 */
    --background-color: #f5f5f5; /* 背景色 */
    --text-color: #333333; /* 文字颜色 */
}

/* 
    设置页面背景和字体
    背景使用渐变色，文字颜色统一
*/
body {
    background: linear-gradient(135deg, var(--secondary-color), var(--background-color));
    color: var(--text-color);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    padding: 0;
    margin: 0;
}

/* 
    样式化导航栏
    固定在顶部，使用Flex布局，响应式设计
*/
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .logo {
    font-size: 24px;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.navbar .menu {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navbar .menu li {
    position: relative;
}

.navbar .menu li a {
    color: #fff;
    text-decoration: none;
    padding: 8px 12px;
    transition: background 0.3s ease, transform 0.3s ease;
    border-radius: 5px;
}

.navbar .menu li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.navbar .menu li .submenu {
    display: none;
    position: absolute;
    top: 35px;
    left: 0;
    background-color: #fff;
    color: var(--primary-color);
    list-style: none;
    padding: 10px 0;
    border-radius: 5px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    min-width: 150px;
    z-index: 1000;
}

.navbar .menu li:hover .submenu {
    display: block;
}

.navbar .menu li .submenu li {
    padding: 8px 20px;
}

.navbar .menu li .submenu li a {
    color: var(--primary-color);
    display: block;
}

.navbar .menu li .submenu li a:hover {
    background-color: #f0f0f0;
}

/* 
    样式化面包屑导航
    使用Flex布局，确保响应式
*/
.breadcrumb {
    display: flex;
    align-items: center;
    font-size: 14px;
    padding: 20px 30px;
    background-color: #e0f7fa;
    border-radius: 5px;
    margin: 80px 30px 20px; /* 80px顶部留给固定导航栏 */
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
    margin-right: 5px;
    position: relative;
}

.breadcrumb a::after {
    content: '>';
    position: absolute;
    right: -10px;
    color: #999;
}

.breadcrumb a:last-child::after {
    content: '';
}

.breadcrumb span {
    color: #555;
}

/* 
    样式化主要内容区域
    使用Grid布局，确保响应式和层次分明
*/
.main-content {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: 30px;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.sidebar {
    display: grid;
    grid-template-rows: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.article-content {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

/* 
    样式化文章标题和段落
*/
.article-content h2,
.article-content h3,
.article-content h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.article-content p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* 
    样式化代码块
    使用背景色和字体区分于正文
*/
.article-content pre {
    background-color: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

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

/* 
    样式化图片
    设置圆角、阴影和悬停效果
*/
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* 
    提示信息样式
    突出显示“这是一个网页样式设计参考”
*/
.reference-note {
    background: var(--accent-color);
    color: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-size: 18px;
    margin: 30px auto;
    max-width: 800px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* 
    响应式设计
    调整布局在不同屏幕尺寸下的显示
*/
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .navbar .menu {
        flex-direction: column;
        display: none;
    }

    .navbar .menu.active {
        display: flex;
    }

    .theme-toggle {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .article-content {
        padding: 15px;
    }

    .breadcrumb {
        padding: 15px 20px;
    }

    .navbar {
        padding: 10px 20px;
    }

    .navbar .logo {
        font-size: 20px;
    }

    .breadcrumb {
        font-size: 12px;
    }

    .article-content p {
        font-size: 14px;
    }
}

/* 
    添加按钮样式
    使用渐变和过渡效果
*/
.button-highlight {
    background: linear-gradient(135deg, var(--accent-color), var(--highlight-color));
    border: none;
    padding: 12px 24px;
    color: #fff;
    border-radius: 25px;
    cursor: pointer;
    transition: background 0.5s ease, transform 0.3s ease;
    font-size: 16px;
}

.button-highlight:hover {
    background: linear-gradient(135deg, #0288d1, #5e35b1);
    transform: scale(1.05);
}

/* 
    样式化博客模块
    使用卡片布局和悬停效果
*/
.blog-section {
    padding: 40px;
    background-color: #e0f7fa;
}

.blog-title {
    text-align: center;
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.blog-posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

.post-card {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.post-image {
    width: 100%;
    height: 150px;
    background: url('https://images.gptkong.com/demo/sample1.png') no-repeat center / cover;
}

.post-content {
    padding: 20px;
}

.post-content h4 {
    margin: 0 0 10px;
    color: var(--primary-color);
    font-size: 20px;
}

.post-content p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    margin-top: 15px;
    color: var(--highlight-color);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: #5e35b1;
}

/* 
    样式化折叠区域
    使用细节设计提升可读性
*/
.collapsible {
    background-color: var(--secondary-color);
    color: #fff;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 16px;
    transition: background-color 0.3s ease;
    border-radius: 5px;
    margin-bottom: 10px;
}

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

.content {
    padding: 0 18px;
    display: none;
    overflow: hidden;
    background-color: #f1f1f1;
    border-radius: 5px;
    margin-bottom: 20px;
}

.content p {
    color: #333;
    font-size: 15px;
}

/* 
    样式化结尾区域
    确保视觉平衡和呼吸感
*/
.footer {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-top: 2px solid #fff;
}

.footer a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
}

/* 
    样式化虚拟展厅
    使用3D变换和动态效果
*/
.virtual-gallery {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotateY(-20deg);
    transition: transform 1s ease-in-out;
}

.virtual-gallery:hover {
    transform: rotateY(0deg);
}

.gallery-item {
    width: 200px;
    height: 200px;
    margin: 20px;
    background: url('https://images.gptkong.com/demo/sample2.png') no-repeat center / cover;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

